From b64bec98fa2cc42d484e75a0abfd90cebfbd0e19 Mon Sep 17 00:00:00 2001 From: Benjamin Randolph <104036158+neb417@users.noreply.github.com> Date: Wed, 6 Nov 2024 11:03:34 -0700 Subject: [PATCH] Style federal tax page and render on dashboard with link (#54) * Update gems * update gems and nodes * Add tailwind script * Style brackets. * Style header. * Update ordering of brackets. * Add filing status. * Turbo stream federal tax index. * Style tabs, render turbo frames. * Style buttons. * Lint. --- Gemfile | 8 +- Gemfile.lock | 176 +- .../stylesheets/application.tailwind.css | 28 +- app/controllers/dashboard_controller.rb | 4 + .../federal_tax_brackets_controller.rb | 4 + app/javascript/application.js | 1 + app/models/federal_tax_bracket.rb | 2 +- app/views/components/_toolbar.html.erb | 36 +- app/views/dashboard/_index.html.erb | 12 +- app/views/dashboard/index.html.erb | 1 + app/views/dashboard/index.turbo_stream.erb | 2 + .../_federal_tax_bracket.html.erb | 8 +- .../federal_tax_brackets/_index.html.erb | 35 +- app/views/federal_tax_brackets/index.html.erb | 9 +- .../index.turbo_stream.erb | 2 + app/views/layouts/application.html.erb | 1 + config/importmap.rb | 1 + config/tailwind.config.js | 4 + node_modules/.bin/mini-svg-data-uri | 1 + node_modules/.bin/resolve | 1 + node_modules/.package-lock.json | 191 + node_modules/@popperjs/core/LICENSE.md | 20 + node_modules/@popperjs/core/README.md | 376 + node_modules/@popperjs/core/dist/cjs/enums.js | 65 + .../@popperjs/core/dist/cjs/enums.js.flow | 3 + .../@popperjs/core/dist/cjs/enums.js.map | 1 + .../@popperjs/core/dist/cjs/popper-base.js | 939 ++ .../core/dist/cjs/popper-base.js.flow | 3 + .../core/dist/cjs/popper-base.js.map | 1 + .../@popperjs/core/dist/cjs/popper-lite.js | 1260 +++ .../core/dist/cjs/popper-lite.js.flow | 3 + .../core/dist/cjs/popper-lite.js.map | 1 + .../@popperjs/core/dist/cjs/popper.js | 1819 ++++ .../@popperjs/core/dist/cjs/popper.js.flow | 3 + .../@popperjs/core/dist/cjs/popper.js.map | 1 + .../@popperjs/core/dist/esm/createPopper.js | 199 + .../core/dist/esm/dom-utils/contains.js | 23 + .../esm/dom-utils/getBoundingClientRect.js | 41 + .../dist/esm/dom-utils/getClippingRect.js | 70 + .../dist/esm/dom-utils/getCompositeRect.js | 58 + .../dist/esm/dom-utils/getComputedStyle.js | 4 + .../dist/esm/dom-utils/getDocumentElement.js | 6 + .../dist/esm/dom-utils/getDocumentRect.js | 29 + .../esm/dom-utils/getHTMLElementScroll.js | 6 + .../core/dist/esm/dom-utils/getLayoutRect.js | 25 + .../core/dist/esm/dom-utils/getNodeName.js | 3 + .../core/dist/esm/dom-utils/getNodeScroll.js | 11 + .../dist/esm/dom-utils/getOffsetParent.js | 69 + .../core/dist/esm/dom-utils/getParentNode.js | 19 + .../dist/esm/dom-utils/getScrollParent.js | 16 + .../dist/esm/dom-utils/getViewportRect.js | 31 + .../core/dist/esm/dom-utils/getWindow.js | 12 + .../dist/esm/dom-utils/getWindowScroll.js | 10 + .../dist/esm/dom-utils/getWindowScrollBarX.js | 13 + .../core/dist/esm/dom-utils/instanceOf.js | 23 + .../dist/esm/dom-utils/isLayoutViewport.js | 4 + .../core/dist/esm/dom-utils/isScrollParent.js | 10 + .../core/dist/esm/dom-utils/isTableElement.js | 4 + .../dist/esm/dom-utils/listScrollParents.js | 26 + node_modules/@popperjs/core/dist/esm/enums.js | 31 + node_modules/@popperjs/core/dist/esm/index.js | 8 + .../core/dist/esm/modifiers/applyStyles.js | 84 + .../core/dist/esm/modifiers/arrow.js | 90 + .../core/dist/esm/modifiers/computeStyles.js | 169 + .../core/dist/esm/modifiers/eventListeners.js | 49 + .../@popperjs/core/dist/esm/modifiers/flip.js | 147 + .../@popperjs/core/dist/esm/modifiers/hide.js | 61 + .../core/dist/esm/modifiers/index.js | 9 + .../core/dist/esm/modifiers/offset.js | 54 + .../core/dist/esm/modifiers/popperOffsets.js | 25 + .../dist/esm/modifiers/preventOverflow.js | 142 + .../@popperjs/core/dist/esm/popper-base.js | 3 + .../@popperjs/core/dist/esm/popper-lite.js | 11 + .../@popperjs/core/dist/esm/popper.js | 20 + node_modules/@popperjs/core/dist/esm/types.js | 0 .../dist/esm/utils/computeAutoPlacement.js | 43 + .../core/dist/esm/utils/computeOffsets.js | 70 + .../@popperjs/core/dist/esm/utils/debounce.js | 15 + .../core/dist/esm/utils/detectOverflow.js | 65 + .../core/dist/esm/utils/expandToHashMap.js | 6 + .../core/dist/esm/utils/getAltAxis.js | 3 + .../core/dist/esm/utils/getAltLen.js | 3 + .../core/dist/esm/utils/getBasePlacement.js | 4 + .../core/dist/esm/utils/getFreshSideObject.js | 8 + .../esm/utils/getMainAxisFromPlacement.js | 3 + .../dist/esm/utils/getOppositePlacement.js | 11 + .../utils/getOppositeVariationPlacement.js | 9 + .../core/dist/esm/utils/getVariation.js | 3 + .../@popperjs/core/dist/esm/utils/math.js | 3 + .../core/dist/esm/utils/mergeByName.js | 14 + .../core/dist/esm/utils/mergePaddingObject.js | 4 + .../core/dist/esm/utils/orderModifiers.js | 44 + .../core/dist/esm/utils/rectToClientRect.js | 8 + .../@popperjs/core/dist/esm/utils/uniqueBy.js | 11 + .../core/dist/esm/utils/userAgent.js | 11 + .../@popperjs/core/dist/esm/utils/within.js | 8 + node_modules/@popperjs/core/dist/umd/enums.js | 71 + .../@popperjs/core/dist/umd/enums.js.map | 1 + .../@popperjs/core/dist/umd/enums.min.js | 6 + .../@popperjs/core/dist/umd/enums.min.js.flow | 3 + .../@popperjs/core/dist/umd/enums.min.js.map | 1 + .../@popperjs/core/dist/umd/popper-base.js | 945 ++ .../core/dist/umd/popper-base.js.map | 1 + .../core/dist/umd/popper-base.min.js | 6 + .../core/dist/umd/popper-base.min.js.flow | 3 + .../core/dist/umd/popper-base.min.js.map | 1 + .../@popperjs/core/dist/umd/popper-lite.js | 1266 +++ .../core/dist/umd/popper-lite.js.map | 1 + .../core/dist/umd/popper-lite.min.js | 6 + .../core/dist/umd/popper-lite.min.js.flow | 3 + .../core/dist/umd/popper-lite.min.js.map | 1 + .../@popperjs/core/dist/umd/popper.js | 1825 ++++ .../@popperjs/core/dist/umd/popper.js.map | 1 + .../@popperjs/core/dist/umd/popper.min.js | 6 + .../core/dist/umd/popper.min.js.flow | 3 + .../@popperjs/core/dist/umd/popper.min.js.map | 1 + node_modules/@popperjs/core/index.d.ts | 1 + .../@popperjs/core/lib/createPopper.d.ts | 9 + .../@popperjs/core/lib/createPopper.js | 199 + .../@popperjs/core/lib/createPopper.js.flow | 218 + .../core/lib/dom-utils/contains.d.ts | 1 + .../@popperjs/core/lib/dom-utils/contains.js | 23 + .../core/lib/dom-utils/contains.js.flow | 25 + .../lib/dom-utils/getBoundingClientRect.d.ts | 2 + .../lib/dom-utils/getBoundingClientRect.js | 41 + .../dom-utils/getBoundingClientRect.js.flow | 52 + .../core/lib/dom-utils/getClippingRect.d.ts | 3 + .../core/lib/dom-utils/getClippingRect.js | 70 + .../lib/dom-utils/getClippingRect.js.flow | 106 + .../core/lib/dom-utils/getCompositeRect.d.ts | 2 + .../core/lib/dom-utils/getCompositeRect.js | 58 + .../lib/dom-utils/getCompositeRect.js.flow | 64 + .../core/lib/dom-utils/getComputedStyle.d.ts | 1 + .../core/lib/dom-utils/getComputedStyle.js | 4 + .../lib/dom-utils/getComputedStyle.js.flow | 8 + .../lib/dom-utils/getDocumentElement.d.ts | 2 + .../core/lib/dom-utils/getDocumentElement.js | 6 + .../lib/dom-utils/getDocumentElement.js.flow | 15 + .../core/lib/dom-utils/getDocumentRect.d.ts | 2 + .../core/lib/dom-utils/getDocumentRect.js | 29 + .../lib/dom-utils/getDocumentRect.js.flow | 37 + .../lib/dom-utils/getHTMLElementScroll.d.ts | 4 + .../lib/dom-utils/getHTMLElementScroll.js | 6 + .../dom-utils/getHTMLElementScroll.js.flow | 8 + .../core/lib/dom-utils/getLayoutRect.d.ts | 2 + .../core/lib/dom-utils/getLayoutRect.js | 25 + .../core/lib/dom-utils/getLayoutRect.js.flow | 29 + .../core/lib/dom-utils/getNodeName.d.ts | 2 + .../core/lib/dom-utils/getNodeName.js | 3 + .../core/lib/dom-utils/getNodeName.js.flow | 6 + .../core/lib/dom-utils/getNodeScroll.d.ts | 5 + .../core/lib/dom-utils/getNodeScroll.js | 11 + .../core/lib/dom-utils/getNodeScroll.js.flow | 14 + .../core/lib/dom-utils/getOffsetParent.d.ts | 1 + .../core/lib/dom-utils/getOffsetParent.js | 69 + .../lib/dom-utils/getOffsetParent.js.flow | 93 + .../core/lib/dom-utils/getParentNode.d.ts | 1 + .../core/lib/dom-utils/getParentNode.js | 19 + .../core/lib/dom-utils/getParentNode.js.flow | 21 + .../core/lib/dom-utils/getScrollParent.d.ts | 1 + .../core/lib/dom-utils/getScrollParent.js | 16 + .../lib/dom-utils/getScrollParent.js.flow | 18 + .../core/lib/dom-utils/getViewportRect.d.ts | 7 + .../core/lib/dom-utils/getViewportRect.js | 31 + .../lib/dom-utils/getViewportRect.js.flow | 39 + .../core/lib/dom-utils/getWindow.d.ts | 1 + .../@popperjs/core/lib/dom-utils/getWindow.js | 12 + .../core/lib/dom-utils/getWindow.js.flow | 16 + .../core/lib/dom-utils/getWindowScroll.d.ts | 5 + .../core/lib/dom-utils/getWindowScroll.js | 10 + .../lib/dom-utils/getWindowScroll.js.flow | 14 + .../lib/dom-utils/getWindowScrollBarX.d.ts | 1 + .../core/lib/dom-utils/getWindowScrollBarX.js | 13 + .../lib/dom-utils/getWindowScrollBarX.js.flow | 18 + .../core/lib/dom-utils/instanceOf.d.ts | 4 + .../core/lib/dom-utils/instanceOf.js | 23 + .../core/lib/dom-utils/instanceOf.js.flow | 29 + .../core/lib/dom-utils/isLayoutViewport.d.ts | 1 + .../core/lib/dom-utils/isLayoutViewport.js | 4 + .../lib/dom-utils/isLayoutViewport.js.flow | 6 + .../core/lib/dom-utils/isScrollParent.d.ts | 1 + .../core/lib/dom-utils/isScrollParent.js | 10 + .../core/lib/dom-utils/isScrollParent.js.flow | 8 + .../core/lib/dom-utils/isTableElement.d.ts | 1 + .../core/lib/dom-utils/isTableElement.js | 4 + .../core/lib/dom-utils/isTableElement.js.flow | 6 + .../core/lib/dom-utils/listScrollParents.d.ts | 2 + .../core/lib/dom-utils/listScrollParents.js | 26 + .../lib/dom-utils/listScrollParents.js.flow | 33 + node_modules/@popperjs/core/lib/enums.d.ts | 34 + node_modules/@popperjs/core/lib/enums.js | 31 + node_modules/@popperjs/core/lib/enums.js.flow | 91 + node_modules/@popperjs/core/lib/index.d.ts | 6 + node_modules/@popperjs/core/lib/index.js | 8 + node_modules/@popperjs/core/lib/index.js.flow | 13 + .../core/lib/modifiers/applyStyles.d.ts | 4 + .../core/lib/modifiers/applyStyles.js | 84 + .../core/lib/modifiers/applyStyles.js.flow | 98 + .../@popperjs/core/lib/modifiers/arrow.d.ts | 13 + .../@popperjs/core/lib/modifiers/arrow.js | 90 + .../core/lib/modifiers/arrow.js.flow | 120 + .../core/lib/modifiers/computeStyles.d.ts | 38 + .../core/lib/modifiers/computeStyles.js | 169 + .../core/lib/modifiers/computeStyles.js.flow | 233 + .../core/lib/modifiers/eventListeners.d.ts | 8 + .../core/lib/modifiers/eventListeners.js | 49 + .../core/lib/modifiers/eventListeners.js.flow | 54 + .../@popperjs/core/lib/modifiers/flip.d.ts | 16 + .../@popperjs/core/lib/modifiers/flip.js | 147 + .../@popperjs/core/lib/modifiers/flip.js.flow | 177 + .../@popperjs/core/lib/modifiers/hide.d.ts | 4 + .../@popperjs/core/lib/modifiers/hide.js | 61 + .../@popperjs/core/lib/modifiers/hide.js.flow | 76 + .../@popperjs/core/lib/modifiers/index.d.ts | 9 + .../@popperjs/core/lib/modifiers/index.js | 9 + .../core/lib/modifiers/index.js.flow | 10 + .../@popperjs/core/lib/modifiers/offset.d.ts | 18 + .../@popperjs/core/lib/modifiers/offset.js | 54 + .../core/lib/modifiers/offset.js.flow | 71 + .../core/lib/modifiers/popperOffsets.d.ts | 4 + .../core/lib/modifiers/popperOffsets.js | 25 + .../core/lib/modifiers/popperOffsets.js.flow | 26 + .../core/lib/modifiers/preventOverflow.d.ts | 30 + .../core/lib/modifiers/preventOverflow.js | 142 + .../lib/modifiers/preventOverflow.js.flow | 220 + .../@popperjs/core/lib/popper-base.d.ts | 3 + .../@popperjs/core/lib/popper-base.js | 3 + .../@popperjs/core/lib/popper-base.js.flow | 7 + .../@popperjs/core/lib/popper-lite.d.ts | 5 + .../@popperjs/core/lib/popper-lite.js | 11 + .../@popperjs/core/lib/popper-lite.js.flow | 21 + node_modules/@popperjs/core/lib/popper.d.ts | 7 + node_modules/@popperjs/core/lib/popper.js | 20 + .../@popperjs/core/lib/popper.js.flow | 35 + node_modules/@popperjs/core/lib/types.d.ts | 167 + node_modules/@popperjs/core/lib/types.js | 0 node_modules/@popperjs/core/lib/types.js.flow | 199 + .../core/lib/utils/computeAutoPlacement.d.ts | 12 + .../core/lib/utils/computeAutoPlacement.js | 43 + .../lib/utils/computeAutoPlacement.js.flow | 73 + .../core/lib/utils/computeOffsets.d.ts | 8 + .../core/lib/utils/computeOffsets.js | 70 + .../core/lib/utils/computeOffsets.js.flow | 82 + .../@popperjs/core/lib/utils/debounce.d.ts | 1 + .../@popperjs/core/lib/utils/debounce.js | 15 + .../@popperjs/core/lib/utils/debounce.js.flow | 17 + .../core/lib/utils/detectOverflow.d.ts | 12 + .../core/lib/utils/detectOverflow.js | 65 + .../core/lib/utils/detectOverflow.js.flow | 112 + .../core/lib/utils/expandToHashMap.d.ts | 3 + .../core/lib/utils/expandToHashMap.js | 6 + .../core/lib/utils/expandToHashMap.js.flow | 11 + .../@popperjs/core/lib/utils/getAltAxis.d.ts | 1 + .../@popperjs/core/lib/utils/getAltAxis.js | 3 + .../core/lib/utils/getAltAxis.js.flow | 5 + .../@popperjs/core/lib/utils/getAltLen.d.ts | 1 + .../@popperjs/core/lib/utils/getAltLen.js | 3 + .../core/lib/utils/getAltLen.js.flow | 5 + .../core/lib/utils/getBasePlacement.d.ts | 2 + .../core/lib/utils/getBasePlacement.js | 4 + .../core/lib/utils/getBasePlacement.js.flow | 8 + .../core/lib/utils/getFreshSideObject.d.ts | 2 + .../core/lib/utils/getFreshSideObject.js | 8 + .../core/lib/utils/getFreshSideObject.js.flow | 11 + .../lib/utils/getMainAxisFromPlacement.d.ts | 2 + .../lib/utils/getMainAxisFromPlacement.js | 3 + .../utils/getMainAxisFromPlacement.js.flow | 8 + .../core/lib/utils/getOppositePlacement.d.ts | 2 + .../core/lib/utils/getOppositePlacement.js | 11 + .../lib/utils/getOppositePlacement.js.flow | 11 + .../utils/getOppositeVariationPlacement.d.ts | 2 + .../utils/getOppositeVariationPlacement.js | 9 + .../getOppositeVariationPlacement.js.flow | 10 + .../core/lib/utils/getVariation.d.ts | 2 + .../@popperjs/core/lib/utils/getVariation.js | 3 + .../core/lib/utils/getVariation.js.flow | 6 + .../@popperjs/core/lib/utils/math.d.ts | 3 + node_modules/@popperjs/core/lib/utils/math.js | 3 + .../@popperjs/core/lib/utils/math.js.flow | 4 + .../@popperjs/core/lib/utils/mergeByName.d.ts | 2 + .../@popperjs/core/lib/utils/mergeByName.js | 14 + .../core/lib/utils/mergeByName.js.flow | 22 + .../core/lib/utils/mergePaddingObject.d.ts | 2 + .../core/lib/utils/mergePaddingObject.js | 4 + .../core/lib/utils/mergePaddingObject.js.flow | 12 + .../core/lib/utils/orderModifiers.d.ts | 2 + .../core/lib/utils/orderModifiers.js | 44 + .../core/lib/utils/orderModifiers.js.flow | 59 + .../core/lib/utils/rectToClientRect.d.ts | 2 + .../core/lib/utils/rectToClientRect.js | 8 + .../core/lib/utils/rectToClientRect.js.flow | 12 + .../@popperjs/core/lib/utils/uniqueBy.d.ts | 1 + .../@popperjs/core/lib/utils/uniqueBy.js | 11 + .../@popperjs/core/lib/utils/uniqueBy.js.flow | 14 + .../@popperjs/core/lib/utils/userAgent.d.ts | 1 + .../@popperjs/core/lib/utils/userAgent.js | 11 + .../core/lib/utils/userAgent.js.flow | 20 + .../@popperjs/core/lib/utils/within.d.ts | 2 + .../@popperjs/core/lib/utils/within.js | 8 + .../@popperjs/core/lib/utils/within.js.flow | 11 + node_modules/@popperjs/core/package.json | 119 + .../@rollup/plugin-node-resolve/LICENSE | 21 + .../@rollup/plugin-node-resolve/README.md | 293 + .../plugin-node-resolve/dist/cjs/index.js | 1369 +++ .../plugin-node-resolve/dist/es/index.js | 1362 +++ .../plugin-node-resolve/dist/es/package.json | 1 + .../@rollup/plugin-node-resolve/package.json | 89 + .../plugin-node-resolve/types/index.d.ts | 115 + node_modules/@rollup/pluginutils/LICENSE | 21 + node_modules/@rollup/pluginutils/README.md | 262 + .../@rollup/pluginutils/dist/cjs/index.js | 371 + .../@rollup/pluginutils/dist/es/index.js | 359 + .../@rollup/pluginutils/dist/es/package.json | 1 + node_modules/@rollup/pluginutils/package.json | 99 + .../@rollup/pluginutils/types/index.d.ts | 98 + node_modules/@types/estree/LICENSE | 21 + node_modules/@types/estree/README.md | 15 + node_modules/@types/estree/flow.d.ts | 167 + node_modules/@types/estree/index.d.ts | 684 ++ node_modules/@types/estree/package.json | 26 + node_modules/@types/resolve/LICENSE | 21 + node_modules/@types/resolve/README.md | 16 + node_modules/@types/resolve/index.d.ts | 175 + node_modules/@types/resolve/package.json | 35 + node_modules/deepmerge/.editorconfig | 7 + node_modules/deepmerge/.eslintcache | 1 + node_modules/deepmerge/changelog.md | 167 + node_modules/deepmerge/dist/cjs.js | 133 + node_modules/deepmerge/dist/umd.js | 139 + node_modules/deepmerge/index.d.ts | 20 + node_modules/deepmerge/index.js | 106 + node_modules/deepmerge/license.txt | 21 + node_modules/deepmerge/package.json | 42 + node_modules/deepmerge/readme.md | 264 + node_modules/deepmerge/rollup.config.js | 22 + node_modules/estree-walker/CHANGELOG.md | 92 + node_modules/estree-walker/LICENSE | 7 + node_modules/estree-walker/README.md | 48 + .../estree-walker/dist/esm/estree-walker.js | 333 + .../estree-walker/dist/esm/package.json | 1 + .../estree-walker/dist/umd/estree-walker.js | 344 + node_modules/estree-walker/package.json | 37 + node_modules/estree-walker/src/async.js | 118 + node_modules/estree-walker/src/index.js | 35 + node_modules/estree-walker/src/package.json | 1 + node_modules/estree-walker/src/sync.js | 118 + node_modules/estree-walker/src/walker.js | 61 + node_modules/estree-walker/types/async.d.ts | 53 + node_modules/estree-walker/types/index.d.ts | 56 + node_modules/estree-walker/types/sync.d.ts | 53 + .../estree-walker/types/tsconfig.tsbuildinfo | 345 + node_modules/estree-walker/types/walker.d.ts | 37 + .../flowbite-datepicker/.eslintignore | 2 + node_modules/flowbite-datepicker/.eslintrc.js | 73 + node_modules/flowbite-datepicker/.stylelintrc | 12 + node_modules/flowbite-datepicker/CHANGELOG.md | 72 + node_modules/flowbite-datepicker/LICENSE | 21 + node_modules/flowbite-datepicker/README.md | 71 + .../flowbite-datepicker/demo/index.html | 582 + .../flowbite-datepicker/demo/live-demo.js | 469 + .../dist/DateRangePicker.cjs.js | 2993 ++++++ .../dist/DateRangePicker.esm.js | 2991 ++++++ .../dist/Datepicker.cjs.js | 2775 +++++ .../dist/Datepicker.esm.js | 2773 +++++ .../dist/css/datepicker-bs4.css | 276 + .../dist/css/datepicker-bs4.min.css | 1 + .../dist/css/datepicker-bs5.css | 276 + .../dist/css/datepicker-bs5.min.css | 1 + .../dist/css/datepicker-bulma.css | 258 + .../dist/css/datepicker-bulma.min.css | 1 + .../dist/css/datepicker-foundation.css | 262 + .../dist/css/datepicker-foundation.min.css | 1 + .../dist/css/datepicker.css | 306 + .../dist/css/datepicker.min.css | 1 + .../dist/js/datepicker-full.js | 2777 +++++ .../dist/js/datepicker-full.min.js | 1 + .../flowbite-datepicker/dist/js/datepicker.js | 2569 +++++ .../dist/js/datepicker.min.js | 1 + .../dist/js/locales/ar-tn.js | 15 + .../flowbite-datepicker/dist/js/locales/ar.js | 15 + .../flowbite-datepicker/dist/js/locales/az.js | 14 + .../flowbite-datepicker/dist/js/locales/bg.js | 14 + .../flowbite-datepicker/dist/js/locales/bm.js | 18 + .../flowbite-datepicker/dist/js/locales/bn.js | 19 + .../flowbite-datepicker/dist/js/locales/br.js | 18 + .../flowbite-datepicker/dist/js/locales/bs.js | 15 + .../flowbite-datepicker/dist/js/locales/ca.js | 18 + .../flowbite-datepicker/dist/js/locales/cs.js | 19 + .../flowbite-datepicker/dist/js/locales/cy.js | 14 + .../flowbite-datepicker/dist/js/locales/da.js | 19 + .../flowbite-datepicker/dist/js/locales/de.js | 18 + .../flowbite-datepicker/dist/js/locales/el.js | 16 + .../dist/js/locales/en-AU.js | 18 + .../dist/js/locales/en-CA.js | 18 + .../dist/js/locales/en-GB.js | 18 + .../dist/js/locales/en-IE.js | 17 + .../dist/js/locales/en-NZ.js | 17 + .../dist/js/locales/en-ZA.js | 17 + .../flowbite-datepicker/dist/js/locales/eo.js | 17 + .../flowbite-datepicker/dist/js/locales/es.js | 18 + .../flowbite-datepicker/dist/js/locales/et.js | 18 + .../flowbite-datepicker/dist/js/locales/eu.js | 18 + .../flowbite-datepicker/dist/js/locales/fa.js | 17 + .../flowbite-datepicker/dist/js/locales/fi.js | 17 + .../flowbite-datepicker/dist/js/locales/fo.js | 15 + .../dist/js/locales/fr-CH.js | 21 + .../flowbite-datepicker/dist/js/locales/fr.js | 18 + .../flowbite-datepicker/dist/js/locales/gl.js | 16 + .../flowbite-datepicker/dist/js/locales/he.js | 15 + .../flowbite-datepicker/dist/js/locales/hi.js | 18 + .../flowbite-datepicker/dist/js/locales/hr.js | 13 + .../flowbite-datepicker/dist/js/locales/hu.js | 18 + .../flowbite-datepicker/dist/js/locales/hy.js | 18 + .../flowbite-datepicker/dist/js/locales/id.js | 15 + .../flowbite-datepicker/dist/js/locales/is.js | 14 + .../dist/js/locales/it-CH.js | 20 + .../flowbite-datepicker/dist/js/locales/it.js | 18 + .../flowbite-datepicker/dist/js/locales/ja.js | 17 + .../flowbite-datepicker/dist/js/locales/ka.js | 17 + .../flowbite-datepicker/dist/js/locales/kk.js | 15 + .../flowbite-datepicker/dist/js/locales/km.js | 15 + .../flowbite-datepicker/dist/js/locales/ko.js | 18 + .../flowbite-datepicker/dist/js/locales/lt.js | 19 + .../flowbite-datepicker/dist/js/locales/lv.js | 18 + .../flowbite-datepicker/dist/js/locales/me.js | 17 + .../flowbite-datepicker/dist/js/locales/mk.js | 15 + .../flowbite-datepicker/dist/js/locales/mn.js | 17 + .../flowbite-datepicker/dist/js/locales/mr.js | 18 + .../flowbite-datepicker/dist/js/locales/ms.js | 15 + .../dist/js/locales/nl-BE.js | 18 + .../flowbite-datepicker/dist/js/locales/nl.js | 18 + .../flowbite-datepicker/dist/js/locales/no.js | 18 + .../flowbite-datepicker/dist/js/locales/oc.js | 17 + .../flowbite-datepicker/dist/js/locales/pl.js | 17 + .../dist/js/locales/pt-BR.js | 17 + .../flowbite-datepicker/dist/js/locales/pt.js | 18 + .../flowbite-datepicker/dist/js/locales/ro.js | 17 + .../flowbite-datepicker/dist/js/locales/ru.js | 18 + .../flowbite-datepicker/dist/js/locales/si.js | 18 + .../flowbite-datepicker/dist/js/locales/sk.js | 18 + .../flowbite-datepicker/dist/js/locales/sl.js | 15 + .../flowbite-datepicker/dist/js/locales/sq.js | 18 + .../dist/js/locales/sr-latn.js | 16 + .../flowbite-datepicker/dist/js/locales/sr.js | 16 + .../flowbite-datepicker/dist/js/locales/sv.js | 17 + .../flowbite-datepicker/dist/js/locales/sw.js | 15 + .../flowbite-datepicker/dist/js/locales/ta.js | 18 + .../flowbite-datepicker/dist/js/locales/tg.js | 19 + .../flowbite-datepicker/dist/js/locales/th.js | 14 + .../flowbite-datepicker/dist/js/locales/tk.js | 18 + .../flowbite-datepicker/dist/js/locales/tr.js | 17 + .../flowbite-datepicker/dist/js/locales/uk.js | 17 + .../dist/js/locales/uz-cyrl.js | 18 + .../dist/js/locales/uz-latn.js | 18 + .../flowbite-datepicker/dist/js/locales/vi.js | 16 + .../dist/js/locales/zh-CN.js | 19 + .../dist/js/locales/zh-TW.js | 18 + .../flowbite-datepicker/dist/main.cjs.js | 2996 ++++++ .../flowbite-datepicker/dist/main.esm.js | 2991 ++++++ .../flowbite-datepicker/docs/.nojekyll | 0 .../flowbite-datepicker/docs/README.md | 266 + .../flowbite-datepicker/docs/_sidebar.md | 6 + node_modules/flowbite-datepicker/docs/api.md | 284 + .../docs/date-string+format.md | 90 + node_modules/flowbite-datepicker/docs/i18n.md | 99 + .../docs/images/datepicker-inline.jpg | Bin 0 -> 10357 bytes .../docs/images/datepicker.jpg | Bin 0 -> 12814 bytes .../docs/images/multidate.jpg | Bin 0 -> 24666 bytes .../docs/images/picker-structure.jpg | Bin 0 -> 21964 bytes .../docs/images/rangepicker.jpg | Bin 0 -> 14177 bytes .../docs/images/view-days.jpg | Bin 0 -> 12681 bytes .../docs/images/view-decades.jpg | Bin 0 -> 8702 bytes .../docs/images/view-months.jpg | Bin 0 -> 6443 bytes .../docs/images/view-years.jpg | Bin 0 -> 8913 bytes .../flowbite-datepicker/docs/index.html | 26 + .../flowbite-datepicker/docs/options.md | 354 + .../flowbite-datepicker/docs/overview.md | 174 + .../test/twoDigitToFullYear.js | 58 + .../twoDigitToFullYear/twoDigitToFullYear.js | 26 + .../flowbite-datepicker/js/DateRangePicker.js | 210 + .../flowbite-datepicker/js/Datepicker.js | 487 + .../flowbite-datepicker/js/datepicker-full.js | 5 + .../js/events/functions.js | 48 + .../js/events/inputFieldListeners.js | 206 + .../js/events/otherListeners.js | 15 + .../js/events/pickerListeners.js | 70 + .../js/i18n/base-locales.js | 13 + .../js/i18n/locales/ar-tn.js | 15 + .../flowbite-datepicker/js/i18n/locales/ar.js | 15 + .../flowbite-datepicker/js/i18n/locales/az.js | 14 + .../flowbite-datepicker/js/i18n/locales/bg.js | 14 + .../flowbite-datepicker/js/i18n/locales/bm.js | 18 + .../flowbite-datepicker/js/i18n/locales/bn.js | 19 + .../flowbite-datepicker/js/i18n/locales/br.js | 18 + .../flowbite-datepicker/js/i18n/locales/bs.js | 15 + .../flowbite-datepicker/js/i18n/locales/ca.js | 18 + .../flowbite-datepicker/js/i18n/locales/cs.js | 19 + .../flowbite-datepicker/js/i18n/locales/cy.js | 14 + .../flowbite-datepicker/js/i18n/locales/da.js | 19 + .../flowbite-datepicker/js/i18n/locales/de.js | 18 + .../flowbite-datepicker/js/i18n/locales/el.js | 16 + .../js/i18n/locales/en-AU.js | 18 + .../js/i18n/locales/en-CA.js | 18 + .../js/i18n/locales/en-GB.js | 18 + .../js/i18n/locales/en-IE.js | 17 + .../js/i18n/locales/en-NZ.js | 17 + .../js/i18n/locales/en-ZA.js | 17 + .../flowbite-datepicker/js/i18n/locales/eo.js | 17 + .../flowbite-datepicker/js/i18n/locales/es.js | 18 + .../flowbite-datepicker/js/i18n/locales/et.js | 18 + .../flowbite-datepicker/js/i18n/locales/eu.js | 18 + .../flowbite-datepicker/js/i18n/locales/fa.js | 17 + .../flowbite-datepicker/js/i18n/locales/fi.js | 17 + .../flowbite-datepicker/js/i18n/locales/fo.js | 15 + .../js/i18n/locales/fr-CH.js | 21 + .../flowbite-datepicker/js/i18n/locales/fr.js | 18 + .../flowbite-datepicker/js/i18n/locales/gl.js | 16 + .../flowbite-datepicker/js/i18n/locales/he.js | 15 + .../flowbite-datepicker/js/i18n/locales/hi.js | 18 + .../flowbite-datepicker/js/i18n/locales/hr.js | 13 + .../flowbite-datepicker/js/i18n/locales/hu.js | 18 + .../flowbite-datepicker/js/i18n/locales/hy.js | 18 + .../flowbite-datepicker/js/i18n/locales/id.js | 15 + .../flowbite-datepicker/js/i18n/locales/is.js | 14 + .../js/i18n/locales/it-CH.js | 20 + .../flowbite-datepicker/js/i18n/locales/it.js | 18 + .../flowbite-datepicker/js/i18n/locales/ja.js | 17 + .../flowbite-datepicker/js/i18n/locales/ka.js | 17 + .../flowbite-datepicker/js/i18n/locales/kk.js | 15 + .../flowbite-datepicker/js/i18n/locales/km.js | 15 + .../flowbite-datepicker/js/i18n/locales/ko.js | 18 + .../flowbite-datepicker/js/i18n/locales/lt.js | 19 + .../flowbite-datepicker/js/i18n/locales/lv.js | 18 + .../flowbite-datepicker/js/i18n/locales/me.js | 17 + .../flowbite-datepicker/js/i18n/locales/mk.js | 15 + .../flowbite-datepicker/js/i18n/locales/mn.js | 17 + .../flowbite-datepicker/js/i18n/locales/mr.js | 18 + .../flowbite-datepicker/js/i18n/locales/ms.js | 15 + .../js/i18n/locales/nl-BE.js | 18 + .../flowbite-datepicker/js/i18n/locales/nl.js | 18 + .../flowbite-datepicker/js/i18n/locales/no.js | 18 + .../flowbite-datepicker/js/i18n/locales/oc.js | 17 + .../flowbite-datepicker/js/i18n/locales/pl.js | 17 + .../js/i18n/locales/pt-BR.js | 17 + .../flowbite-datepicker/js/i18n/locales/pt.js | 18 + .../flowbite-datepicker/js/i18n/locales/ro.js | 17 + .../flowbite-datepicker/js/i18n/locales/ru.js | 18 + .../flowbite-datepicker/js/i18n/locales/si.js | 18 + .../flowbite-datepicker/js/i18n/locales/sk.js | 18 + .../flowbite-datepicker/js/i18n/locales/sl.js | 15 + .../flowbite-datepicker/js/i18n/locales/sq.js | 18 + .../js/i18n/locales/sr-latn.js | 16 + .../flowbite-datepicker/js/i18n/locales/sr.js | 16 + .../flowbite-datepicker/js/i18n/locales/sv.js | 17 + .../flowbite-datepicker/js/i18n/locales/sw.js | 15 + .../flowbite-datepicker/js/i18n/locales/ta.js | 18 + .../flowbite-datepicker/js/i18n/locales/tg.js | 19 + .../flowbite-datepicker/js/i18n/locales/th.js | 14 + .../flowbite-datepicker/js/i18n/locales/tk.js | 18 + .../flowbite-datepicker/js/i18n/locales/tr.js | 17 + .../flowbite-datepicker/js/i18n/locales/uk.js | 17 + .../js/i18n/locales/uz-cyrl.js | 18 + .../js/i18n/locales/uz-latn.js | 18 + .../flowbite-datepicker/js/i18n/locales/vi.js | 16 + .../js/i18n/locales/zh-CN.js | 19 + .../js/i18n/locales/zh-TW.js | 18 + .../flowbite-datepicker/js/lib/date-format.js | 185 + .../flowbite-datepicker/js/lib/date.js | 82 + .../flowbite-datepicker/js/lib/dom.js | 54 + .../flowbite-datepicker/js/lib/event.js | 68 + .../flowbite-datepicker/js/lib/utils.js | 61 + node_modules/flowbite-datepicker/js/main.js | 4 + .../js/options/defaultOptions.js | 38 + .../js/options/processOptions.js | 263 + .../flowbite-datepicker/js/picker/Picker.js | 334 + .../picker/templates/calendarWeeksTemplate.js | 8 + .../js/picker/templates/daysTemplate.js | 8 + .../js/picker/templates/pickerTemplate.js | 23 + .../js/picker/views/DaysView.js | 250 + .../js/picker/views/MonthsView.js | 198 + .../js/picker/views/View.js | 55 + .../js/picker/views/YearsView.js | 170 + node_modules/flowbite-datepicker/package.json | 78 + .../flowbite-datepicker/postcss.config.js | 7 + .../flowbite-datepicker/rollup.config.js | 60 + .../flowbite-datepicker/sass/_mixins.scss | 12 + .../sass/datepicker-bs4.scss | 91 + .../sass/datepicker-bs5.scss | 91 + .../sass/datepicker-bulma.scss | 69 + .../sass/datepicker-foundation.scss | 66 + .../flowbite-datepicker/sass/datepicker.scss | 436 + .../flowbite-datepicker/sass/index-bs4.scss | 5 + .../flowbite-datepicker/sass/index-bs5.scss | 5 + .../flowbite-datepicker/sass/index-bulma.scss | 6 + .../sass/index-foundation.scss | 3 + .../flowbite-datepicker/scripts/build-css.js | 39 + .../scripts/build-locales.js | 26 + .../scripts/convert-bsdp-locales.js | 65 + .../flowbite-datepicker/scripts/minify-css.js | 31 + .../flowbite-datepicker/scripts/minify-js.js | 17 + node_modules/flowbite-datepicker/style.css | 4 + .../flowbite-datepicker/tailwind.config.js | 13 + node_modules/flowbite-datepicker/tailwind.css | 1389 +++ .../test/DateRangePicker/DateRangePicker.js | 547 + .../test/DateRangePicker/api-methods.js | 415 + .../test/DateRangePicker/date-selection.js | 472 + .../test/DateRangePicker/options.js | 308 + .../test/Datepicker/Datepicker-object.js | 236 + .../test/Datepicker/api-methods.js | 328 + .../flowbite-datepicker/test/_utils/date.js | 102 + .../flowbite-datepicker/test/_utils/dom.js | 70 + .../flowbite-datepicker/test/events.js | 785 ++ .../flowbite-datepicker/test/inline-mode.js | 45 + .../test/keyboard-operation/arrow-down.js | 293 + .../test/keyboard-operation/arrow-left.js | 255 + .../test/keyboard-operation/arrow-right.js | 215 + .../test/keyboard-operation/arrow-up.js | 461 + .../test/keyboard-operation/edit-mode.js | 458 + .../keyboard-operation/keyboard-operation.js | 146 + .../test/mouse-operation.js | 580 + .../test/options/before-show.js | 635 ++ .../bulma-datepicker.sublime-workspace | 1280 +++ .../test/options/buttons.js | 383 + .../test/options/date-restrictions.js | 802 ++ .../test/options/format.js | 281 + .../test/options/multidate.js | 380 + .../test/options/options.js | 727 ++ .../test/options/orientation.js | 410 + .../test/options/pick-levle+view.js | 357 + .../flowbite-datepicker/test/test.html | 94 + .../test/unit/DateRangePicker.js | 192 + .../test/unit/Datepicker.js | 307 + .../flowbite-datepicker/test/unit/_setup.js | 28 + .../test/unit/lib/date-format.js | 310 + .../flowbite-datepicker/test/unit/lib/date.js | 211 + .../flowbite-datepicker/test/unit/lib/dom.js | 142 + .../test/unit/lib/event.js | 207 + .../test/unit/lib/utils.js | 135 + .../flowbite-datepicker/tsconfig.json | 7 + .../types/flowbite-datepicker.d.ts | 4 + node_modules/flowbite/LICENSE.md | 21 + node_modules/flowbite/README.md | 844 ++ node_modules/flowbite/dist/flowbite.css | 9555 +++++++++++++++++ node_modules/flowbite/dist/flowbite.js | 8542 +++++++++++++++ node_modules/flowbite/dist/flowbite.js.map | 1 + node_modules/flowbite/dist/flowbite.min.css | 1 + node_modules/flowbite/dist/flowbite.min.js | 2 + .../flowbite/dist/flowbite.min.js.map | 1 + .../flowbite/dist/flowbite.phoenix.js | 8549 +++++++++++++++ .../flowbite/dist/flowbite.phoenix.js.map | 1 + .../flowbite/dist/flowbite.phoenix.min.js | 2 + .../flowbite/dist/flowbite.phoenix.min.js.map | 1 + node_modules/flowbite/dist/flowbite.turbo.js | 8533 +++++++++++++++ .../flowbite/dist/flowbite.turbo.js.map | 1 + .../flowbite/dist/flowbite.turbo.min.js | 2 + .../flowbite/dist/flowbite.turbo.min.js.map | 1 + .../lib/cjs/components/accordion/index.d.ts | 26 + .../cjs/components/accordion/index.d.ts.map | 1 + .../lib/cjs/components/accordion/index.js | 194 + .../lib/cjs/components/accordion/index.js.map | 1 + .../cjs/components/accordion/interface.d.ts | 13 + .../components/accordion/interface.d.ts.map | 1 + .../lib/cjs/components/accordion/interface.js | 3 + .../cjs/components/accordion/interface.js.map | 1 + .../lib/cjs/components/accordion/types.d.ts | 18 + .../cjs/components/accordion/types.d.ts.map | 1 + .../lib/cjs/components/accordion/types.js | 3 + .../lib/cjs/components/accordion/types.js.map | 1 + .../lib/cjs/components/carousel/index.d.ts | 64 + .../cjs/components/carousel/index.d.ts.map | 1 + .../lib/cjs/components/carousel/index.js | 289 + .../lib/cjs/components/carousel/index.js.map | 1 + .../cjs/components/carousel/interface.d.ts | 23 + .../components/carousel/interface.d.ts.map | 1 + .../lib/cjs/components/carousel/interface.js | 3 + .../cjs/components/carousel/interface.js.map | 1 + .../lib/cjs/components/carousel/types.d.ts | 27 + .../cjs/components/carousel/types.d.ts.map | 1 + .../lib/cjs/components/carousel/types.js | 3 + .../lib/cjs/components/carousel/types.js.map | 1 + .../lib/cjs/components/clipboard/index.d.ts | 24 + .../cjs/components/clipboard/index.d.ts.map | 1 + .../lib/cjs/components/clipboard/index.js | 143 + .../lib/cjs/components/clipboard/index.js.map | 1 + .../cjs/components/clipboard/interface.d.ts | 12 + .../components/clipboard/interface.d.ts.map | 1 + .../lib/cjs/components/clipboard/interface.js | 3 + .../cjs/components/clipboard/interface.js.map | 1 + .../lib/cjs/components/clipboard/types.d.ts | 7 + .../cjs/components/clipboard/types.d.ts.map | 1 + .../lib/cjs/components/clipboard/types.js | 3 + .../lib/cjs/components/clipboard/types.js.map | 1 + .../lib/cjs/components/collapse/index.d.ts | 26 + .../cjs/components/collapse/index.d.ts.map | 1 + .../lib/cjs/components/collapse/index.js | 143 + .../lib/cjs/components/collapse/index.js.map | 1 + .../cjs/components/collapse/interface.d.ts | 15 + .../components/collapse/interface.d.ts.map | 1 + .../lib/cjs/components/collapse/interface.js | 3 + .../cjs/components/collapse/interface.js.map | 1 + .../lib/cjs/components/collapse/types.d.ts | 7 + .../cjs/components/collapse/types.d.ts.map | 1 + .../lib/cjs/components/collapse/types.js | 3 + .../lib/cjs/components/collapse/types.js.map | 1 + .../lib/cjs/components/datepicker/index.d.ts | 27 + .../cjs/components/datepicker/index.d.ts.map | 1 + .../lib/cjs/components/datepicker/index.js | 192 + .../cjs/components/datepicker/index.js.map | 1 + .../cjs/components/datepicker/interface.d.ts | 11 + .../components/datepicker/interface.d.ts.map | 1 + .../cjs/components/datepicker/interface.js | 3 + .../components/datepicker/interface.js.map | 1 + .../lib/cjs/components/datepicker/types.d.ts | 20 + .../cjs/components/datepicker/types.d.ts.map | 1 + .../lib/cjs/components/datepicker/types.js | 3 + .../cjs/components/datepicker/types.js.map | 1 + .../lib/cjs/components/dial/index.d.ts | 34 + .../lib/cjs/components/dial/index.d.ts.map | 1 + .../flowbite/lib/cjs/components/dial/index.js | 184 + .../lib/cjs/components/dial/index.js.map | 1 + .../lib/cjs/components/dial/interface.d.ts | 19 + .../cjs/components/dial/interface.d.ts.map | 1 + .../lib/cjs/components/dial/interface.js | 3 + .../lib/cjs/components/dial/interface.js.map | 1 + .../lib/cjs/components/dial/types.d.ts | 13 + .../lib/cjs/components/dial/types.d.ts.map | 1 + .../flowbite/lib/cjs/components/dial/types.js | 3 + .../lib/cjs/components/dial/types.js.map | 1 + .../lib/cjs/components/dismiss/index.d.ts | 21 + .../lib/cjs/components/dismiss/index.d.ts.map | 1 + .../lib/cjs/components/dismiss/index.js | 97 + .../lib/cjs/components/dismiss/index.js.map | 1 + .../lib/cjs/components/dismiss/interface.d.ts | 12 + .../cjs/components/dismiss/interface.d.ts.map | 1 + .../lib/cjs/components/dismiss/interface.js | 3 + .../cjs/components/dismiss/interface.js.map | 1 + .../lib/cjs/components/dismiss/types.d.ts | 8 + .../lib/cjs/components/dismiss/types.d.ts.map | 1 + .../lib/cjs/components/dismiss/types.js | 3 + .../lib/cjs/components/dismiss/types.js.map | 1 + .../lib/cjs/components/drawer/index.d.ts | 35 + .../lib/cjs/components/drawer/index.d.ts.map | 1 + .../lib/cjs/components/drawer/index.js | 358 + .../lib/cjs/components/drawer/index.js.map | 1 + .../lib/cjs/components/drawer/interface.d.ts | 23 + .../cjs/components/drawer/interface.d.ts.map | 1 + .../lib/cjs/components/drawer/interface.js | 3 + .../cjs/components/drawer/interface.js.map | 1 + .../lib/cjs/components/drawer/types.d.ts | 18 + .../lib/cjs/components/drawer/types.d.ts.map | 1 + .../lib/cjs/components/drawer/types.js | 3 + .../lib/cjs/components/drawer/types.js.map | 1 + .../lib/cjs/components/dropdown/index.d.ts | 42 + .../cjs/components/dropdown/index.d.ts.map | 1 + .../lib/cjs/components/dropdown/index.js | 306 + .../lib/cjs/components/dropdown/index.js.map | 1 + .../cjs/components/dropdown/interface.d.ts | 26 + .../components/dropdown/interface.d.ts.map | 1 + .../lib/cjs/components/dropdown/interface.js | 3 + .../cjs/components/dropdown/interface.js.map | 1 + .../lib/cjs/components/dropdown/types.d.ts | 19 + .../cjs/components/dropdown/types.d.ts.map | 1 + .../lib/cjs/components/dropdown/types.js | 3 + .../lib/cjs/components/dropdown/types.js.map | 1 + .../flowbite/lib/cjs/components/index.d.ts | 2 + .../lib/cjs/components/index.d.ts.map | 1 + .../flowbite/lib/cjs/components/index.js | 38 + .../flowbite/lib/cjs/components/index.js.map | 1 + .../cjs/components/input-counter/index.d.ts | 27 + .../components/input-counter/index.d.ts.map | 1 + .../lib/cjs/components/input-counter/index.js | 159 + .../cjs/components/input-counter/index.js.map | 1 + .../components/input-counter/interface.d.ts | 14 + .../input-counter/interface.d.ts.map | 1 + .../cjs/components/input-counter/interface.js | 3 + .../components/input-counter/interface.js.map | 1 + .../cjs/components/input-counter/types.d.ts | 8 + .../components/input-counter/types.d.ts.map | 1 + .../lib/cjs/components/input-counter/types.js | 3 + .../cjs/components/input-counter/types.js.map | 1 + .../lib/cjs/components/modal/index.d.ts | 39 + .../lib/cjs/components/modal/index.d.ts.map | 1 + .../lib/cjs/components/modal/index.js | 305 + .../lib/cjs/components/modal/index.js.map | 1 + .../lib/cjs/components/modal/interface.d.ts | 27 + .../cjs/components/modal/interface.d.ts.map | 1 + .../lib/cjs/components/modal/interface.js | 3 + .../lib/cjs/components/modal/interface.js.map | 1 + .../lib/cjs/components/modal/types.d.ts | 13 + .../lib/cjs/components/modal/types.d.ts.map | 1 + .../lib/cjs/components/modal/types.js | 3 + .../lib/cjs/components/modal/types.js.map | 1 + .../lib/cjs/components/popover/index.d.ts | 43 + .../lib/cjs/components/popover/index.d.ts.map | 1 + .../lib/cjs/components/popover/index.js | 269 + .../lib/cjs/components/popover/index.js.map | 1 + .../lib/cjs/components/popover/interface.d.ts | 26 + .../cjs/components/popover/interface.d.ts.map | 1 + .../lib/cjs/components/popover/interface.js | 3 + .../cjs/components/popover/interface.js.map | 1 + .../lib/cjs/components/popover/types.d.ts | 16 + .../lib/cjs/components/popover/types.d.ts.map | 1 + .../lib/cjs/components/popover/types.js | 3 + .../lib/cjs/components/popover/types.js.map | 1 + .../lib/cjs/components/tabs/index.d.ts | 24 + .../lib/cjs/components/tabs/index.d.ts.map | 1 + .../flowbite/lib/cjs/components/tabs/index.js | 151 + .../lib/cjs/components/tabs/index.js.map | 1 + .../lib/cjs/components/tabs/interface.d.ts | 16 + .../cjs/components/tabs/interface.d.ts.map | 1 + .../lib/cjs/components/tabs/interface.js | 3 + .../lib/cjs/components/tabs/interface.js.map | 1 + .../lib/cjs/components/tabs/types.d.ts | 13 + .../lib/cjs/components/tabs/types.d.ts.map | 1 + .../flowbite/lib/cjs/components/tabs/types.js | 3 + .../lib/cjs/components/tabs/types.js.map | 1 + .../lib/cjs/components/tooltip/index.d.ts | 43 + .../lib/cjs/components/tooltip/index.d.ts.map | 1 + .../lib/cjs/components/tooltip/index.js | 257 + .../lib/cjs/components/tooltip/index.js.map | 1 + .../lib/cjs/components/tooltip/interface.d.ts | 26 + .../cjs/components/tooltip/interface.d.ts.map | 1 + .../lib/cjs/components/tooltip/interface.js | 3 + .../cjs/components/tooltip/interface.js.map | 1 + .../lib/cjs/components/tooltip/types.d.ts | 15 + .../lib/cjs/components/tooltip/types.d.ts.map | 1 + .../lib/cjs/components/tooltip/types.js | 3 + .../lib/cjs/components/tooltip/types.js.map | 1 + .../flowbite/lib/cjs/config/global.d.ts | 49 + .../flowbite/lib/cjs/config/global.d.ts.map | 1 + .../flowbite/lib/cjs/config/global.js | 3 + .../flowbite/lib/cjs/config/global.js.map | 1 + node_modules/flowbite/lib/cjs/dom/events.d.ts | 8 + .../flowbite/lib/cjs/dom/events.d.ts.map | 1 + node_modules/flowbite/lib/cjs/dom/events.js | 20 + .../flowbite/lib/cjs/dom/events.js.map | 1 + .../flowbite/lib/cjs/dom/instances.d.ts | 100 + .../flowbite/lib/cjs/dom/instances.d.ts.map | 1 + .../flowbite/lib/cjs/dom/instances.js | 107 + .../flowbite/lib/cjs/dom/instances.js.map | 1 + node_modules/flowbite/lib/cjs/dom/types.d.ts | 10 + .../flowbite/lib/cjs/dom/types.d.ts.map | 1 + node_modules/flowbite/lib/cjs/dom/types.js | 3 + .../flowbite/lib/cjs/dom/types.js.map | 1 + node_modules/flowbite/lib/cjs/index.d.ts | 61 + node_modules/flowbite/lib/cjs/index.d.ts.map | 1 + node_modules/flowbite/lib/cjs/index.js | 145 + node_modules/flowbite/lib/cjs/index.js.map | 1 + .../flowbite/lib/cjs/index.phoenix.d.ts | 35 + .../flowbite/lib/cjs/index.phoenix.d.ts.map | 1 + .../flowbite/lib/cjs/index.phoenix.js | 71 + .../flowbite/lib/cjs/index.phoenix.js.map | 1 + .../flowbite/lib/cjs/index.turbo.d.ts | 34 + .../flowbite/lib/cjs/index.turbo.d.ts.map | 1 + node_modules/flowbite/lib/cjs/index.turbo.js | 55 + .../flowbite/lib/cjs/index.turbo.js.map | 1 + node_modules/flowbite/lib/cjs/index.umd.d.ts | 36 + .../flowbite/lib/cjs/index.umd.d.ts.map | 1 + node_modules/flowbite/lib/cjs/index.umd.js | 55 + .../flowbite/lib/cjs/index.umd.js.map | 1 + .../flowbite/lib/cjs/types/declarations.d.ts | 19 + .../lib/cjs/types/declarations.d.ts.map | 1 + .../flowbite/lib/cjs/types/declarations.js | 1 + .../lib/cjs/types/declarations.js.map | 1 + .../lib/esm/components/accordion/index.d.ts | 26 + .../esm/components/accordion/index.d.ts.map | 1 + .../lib/esm/components/accordion/index.js | 190 + .../lib/esm/components/accordion/index.js.map | 1 + .../esm/components/accordion/interface.d.ts | 13 + .../components/accordion/interface.d.ts.map | 1 + .../lib/esm/components/accordion/interface.js | 2 + .../esm/components/accordion/interface.js.map | 1 + .../lib/esm/components/accordion/types.d.ts | 18 + .../esm/components/accordion/types.d.ts.map | 1 + .../lib/esm/components/accordion/types.js | 2 + .../lib/esm/components/accordion/types.js.map | 1 + .../lib/esm/components/carousel/index.d.ts | 64 + .../esm/components/carousel/index.d.ts.map | 1 + .../lib/esm/components/carousel/index.js | 285 + .../lib/esm/components/carousel/index.js.map | 1 + .../esm/components/carousel/interface.d.ts | 23 + .../components/carousel/interface.d.ts.map | 1 + .../lib/esm/components/carousel/interface.js | 2 + .../esm/components/carousel/interface.js.map | 1 + .../lib/esm/components/carousel/types.d.ts | 27 + .../esm/components/carousel/types.d.ts.map | 1 + .../lib/esm/components/carousel/types.js | 2 + .../lib/esm/components/carousel/types.js.map | 1 + .../lib/esm/components/clipboard/index.d.ts | 24 + .../esm/components/clipboard/index.d.ts.map | 1 + .../lib/esm/components/clipboard/index.js | 139 + .../lib/esm/components/clipboard/index.js.map | 1 + .../esm/components/clipboard/interface.d.ts | 12 + .../components/clipboard/interface.d.ts.map | 1 + .../lib/esm/components/clipboard/interface.js | 2 + .../esm/components/clipboard/interface.js.map | 1 + .../lib/esm/components/clipboard/types.d.ts | 7 + .../esm/components/clipboard/types.d.ts.map | 1 + .../lib/esm/components/clipboard/types.js | 2 + .../lib/esm/components/clipboard/types.js.map | 1 + .../lib/esm/components/collapse/index.d.ts | 26 + .../esm/components/collapse/index.d.ts.map | 1 + .../lib/esm/components/collapse/index.js | 139 + .../lib/esm/components/collapse/index.js.map | 1 + .../esm/components/collapse/interface.d.ts | 15 + .../components/collapse/interface.d.ts.map | 1 + .../lib/esm/components/collapse/interface.js | 2 + .../esm/components/collapse/interface.js.map | 1 + .../lib/esm/components/collapse/types.d.ts | 7 + .../esm/components/collapse/types.d.ts.map | 1 + .../lib/esm/components/collapse/types.js | 2 + .../lib/esm/components/collapse/types.js.map | 1 + .../lib/esm/components/datepicker/index.d.ts | 27 + .../esm/components/datepicker/index.d.ts.map | 1 + .../lib/esm/components/datepicker/index.js | 188 + .../esm/components/datepicker/index.js.map | 1 + .../esm/components/datepicker/interface.d.ts | 11 + .../components/datepicker/interface.d.ts.map | 1 + .../esm/components/datepicker/interface.js | 2 + .../components/datepicker/interface.js.map | 1 + .../lib/esm/components/datepicker/types.d.ts | 20 + .../esm/components/datepicker/types.d.ts.map | 1 + .../lib/esm/components/datepicker/types.js | 2 + .../esm/components/datepicker/types.js.map | 1 + .../lib/esm/components/dial/index.d.ts | 34 + .../lib/esm/components/dial/index.d.ts.map | 1 + .../flowbite/lib/esm/components/dial/index.js | 180 + .../lib/esm/components/dial/index.js.map | 1 + .../lib/esm/components/dial/interface.d.ts | 19 + .../esm/components/dial/interface.d.ts.map | 1 + .../lib/esm/components/dial/interface.js | 2 + .../lib/esm/components/dial/interface.js.map | 1 + .../lib/esm/components/dial/types.d.ts | 13 + .../lib/esm/components/dial/types.d.ts.map | 1 + .../flowbite/lib/esm/components/dial/types.js | 2 + .../lib/esm/components/dial/types.js.map | 1 + .../lib/esm/components/dismiss/index.d.ts | 21 + .../lib/esm/components/dismiss/index.d.ts.map | 1 + .../lib/esm/components/dismiss/index.js | 93 + .../lib/esm/components/dismiss/index.js.map | 1 + .../lib/esm/components/dismiss/interface.d.ts | 12 + .../esm/components/dismiss/interface.d.ts.map | 1 + .../lib/esm/components/dismiss/interface.js | 2 + .../esm/components/dismiss/interface.js.map | 1 + .../lib/esm/components/dismiss/types.d.ts | 8 + .../lib/esm/components/dismiss/types.d.ts.map | 1 + .../lib/esm/components/dismiss/types.js | 2 + .../lib/esm/components/dismiss/types.js.map | 1 + .../lib/esm/components/drawer/index.d.ts | 35 + .../lib/esm/components/drawer/index.d.ts.map | 1 + .../lib/esm/components/drawer/index.js | 354 + .../lib/esm/components/drawer/index.js.map | 1 + .../lib/esm/components/drawer/interface.d.ts | 23 + .../esm/components/drawer/interface.d.ts.map | 1 + .../lib/esm/components/drawer/interface.js | 2 + .../esm/components/drawer/interface.js.map | 1 + .../lib/esm/components/drawer/types.d.ts | 18 + .../lib/esm/components/drawer/types.d.ts.map | 1 + .../lib/esm/components/drawer/types.js | 2 + .../lib/esm/components/drawer/types.js.map | 1 + .../lib/esm/components/dropdown/index.d.ts | 42 + .../esm/components/dropdown/index.d.ts.map | 1 + .../lib/esm/components/dropdown/index.js | 302 + .../lib/esm/components/dropdown/index.js.map | 1 + .../esm/components/dropdown/interface.d.ts | 26 + .../components/dropdown/interface.d.ts.map | 1 + .../lib/esm/components/dropdown/interface.js | 2 + .../esm/components/dropdown/interface.js.map | 1 + .../lib/esm/components/dropdown/types.d.ts | 19 + .../esm/components/dropdown/types.d.ts.map | 1 + .../lib/esm/components/dropdown/types.js | 2 + .../lib/esm/components/dropdown/types.js.map | 1 + .../flowbite/lib/esm/components/index.d.ts | 2 + .../lib/esm/components/index.d.ts.map | 1 + .../flowbite/lib/esm/components/index.js | 34 + .../flowbite/lib/esm/components/index.js.map | 1 + .../esm/components/input-counter/index.d.ts | 27 + .../components/input-counter/index.d.ts.map | 1 + .../lib/esm/components/input-counter/index.js | 155 + .../esm/components/input-counter/index.js.map | 1 + .../components/input-counter/interface.d.ts | 14 + .../input-counter/interface.d.ts.map | 1 + .../esm/components/input-counter/interface.js | 2 + .../components/input-counter/interface.js.map | 1 + .../esm/components/input-counter/types.d.ts | 8 + .../components/input-counter/types.d.ts.map | 1 + .../lib/esm/components/input-counter/types.js | 2 + .../esm/components/input-counter/types.js.map | 1 + .../lib/esm/components/modal/index.d.ts | 39 + .../lib/esm/components/modal/index.d.ts.map | 1 + .../lib/esm/components/modal/index.js | 301 + .../lib/esm/components/modal/index.js.map | 1 + .../lib/esm/components/modal/interface.d.ts | 27 + .../esm/components/modal/interface.d.ts.map | 1 + .../lib/esm/components/modal/interface.js | 2 + .../lib/esm/components/modal/interface.js.map | 1 + .../lib/esm/components/modal/types.d.ts | 13 + .../lib/esm/components/modal/types.d.ts.map | 1 + .../lib/esm/components/modal/types.js | 2 + .../lib/esm/components/modal/types.js.map | 1 + .../lib/esm/components/popover/index.d.ts | 43 + .../lib/esm/components/popover/index.d.ts.map | 1 + .../lib/esm/components/popover/index.js | 265 + .../lib/esm/components/popover/index.js.map | 1 + .../lib/esm/components/popover/interface.d.ts | 26 + .../esm/components/popover/interface.d.ts.map | 1 + .../lib/esm/components/popover/interface.js | 2 + .../esm/components/popover/interface.js.map | 1 + .../lib/esm/components/popover/types.d.ts | 16 + .../lib/esm/components/popover/types.d.ts.map | 1 + .../lib/esm/components/popover/types.js | 2 + .../lib/esm/components/popover/types.js.map | 1 + .../lib/esm/components/tabs/index.d.ts | 24 + .../lib/esm/components/tabs/index.d.ts.map | 1 + .../flowbite/lib/esm/components/tabs/index.js | 147 + .../lib/esm/components/tabs/index.js.map | 1 + .../lib/esm/components/tabs/interface.d.ts | 16 + .../esm/components/tabs/interface.d.ts.map | 1 + .../lib/esm/components/tabs/interface.js | 2 + .../lib/esm/components/tabs/interface.js.map | 1 + .../lib/esm/components/tabs/types.d.ts | 13 + .../lib/esm/components/tabs/types.d.ts.map | 1 + .../flowbite/lib/esm/components/tabs/types.js | 2 + .../lib/esm/components/tabs/types.js.map | 1 + .../lib/esm/components/tooltip/index.d.ts | 43 + .../lib/esm/components/tooltip/index.d.ts.map | 1 + .../lib/esm/components/tooltip/index.js | 253 + .../lib/esm/components/tooltip/index.js.map | 1 + .../lib/esm/components/tooltip/interface.d.ts | 26 + .../esm/components/tooltip/interface.d.ts.map | 1 + .../lib/esm/components/tooltip/interface.js | 2 + .../esm/components/tooltip/interface.js.map | 1 + .../lib/esm/components/tooltip/types.d.ts | 15 + .../lib/esm/components/tooltip/types.d.ts.map | 1 + .../lib/esm/components/tooltip/types.js | 2 + .../lib/esm/components/tooltip/types.js.map | 1 + .../flowbite/lib/esm/config/global.d.ts | 49 + .../flowbite/lib/esm/config/global.d.ts.map | 1 + .../flowbite/lib/esm/config/global.js | 2 + .../flowbite/lib/esm/config/global.js.map | 1 + node_modules/flowbite/lib/esm/dom/events.d.ts | 8 + .../flowbite/lib/esm/dom/events.d.ts.map | 1 + node_modules/flowbite/lib/esm/dom/events.js | 18 + .../flowbite/lib/esm/dom/events.js.map | 1 + .../flowbite/lib/esm/dom/instances.d.ts | 100 + .../flowbite/lib/esm/dom/instances.d.ts.map | 1 + .../flowbite/lib/esm/dom/instances.js | 105 + .../flowbite/lib/esm/dom/instances.js.map | 1 + node_modules/flowbite/lib/esm/dom/types.d.ts | 10 + .../flowbite/lib/esm/dom/types.d.ts.map | 1 + node_modules/flowbite/lib/esm/dom/types.js | 2 + .../flowbite/lib/esm/dom/types.js.map | 1 + node_modules/flowbite/lib/esm/index.d.ts | 61 + node_modules/flowbite/lib/esm/index.d.ts.map | 1 + node_modules/flowbite/lib/esm/index.js | 99 + node_modules/flowbite/lib/esm/index.js.map | 1 + .../flowbite/lib/esm/index.phoenix.d.ts | 35 + .../flowbite/lib/esm/index.phoenix.d.ts.map | 1 + .../flowbite/lib/esm/index.phoenix.js | 69 + .../flowbite/lib/esm/index.phoenix.js.map | 1 + .../flowbite/lib/esm/index.turbo.d.ts | 34 + .../flowbite/lib/esm/index.turbo.d.ts.map | 1 + node_modules/flowbite/lib/esm/index.turbo.js | 53 + .../flowbite/lib/esm/index.turbo.js.map | 1 + node_modules/flowbite/lib/esm/index.umd.d.ts | 36 + .../flowbite/lib/esm/index.umd.d.ts.map | 1 + node_modules/flowbite/lib/esm/index.umd.js | 53 + .../flowbite/lib/esm/index.umd.js.map | 1 + .../flowbite/lib/esm/types/declarations.d.ts | 19 + .../lib/esm/types/declarations.d.ts.map | 1 + .../flowbite/lib/esm/types/declarations.js | 1 + .../lib/esm/types/declarations.js.map | 1 + node_modules/flowbite/package.json | 123 + node_modules/flowbite/plugin-windicss.js | 588 + node_modules/flowbite/plugin.d.ts | 2 + node_modules/flowbite/plugin.js | 1462 +++ node_modules/function-bind/.eslintrc | 21 + .../function-bind/.github/FUNDING.yml | 12 + .../function-bind/.github/SECURITY.md | 3 + node_modules/function-bind/.nycrc | 13 + node_modules/function-bind/CHANGELOG.md | 136 + node_modules/function-bind/LICENSE | 20 + node_modules/function-bind/README.md | 46 + node_modules/function-bind/implementation.js | 84 + node_modules/function-bind/index.js | 5 + node_modules/function-bind/package.json | 87 + node_modules/function-bind/test/.eslintrc | 9 + node_modules/function-bind/test/index.js | 252 + node_modules/hasown/.eslintrc | 5 + node_modules/hasown/.github/FUNDING.yml | 12 + node_modules/hasown/.nycrc | 13 + node_modules/hasown/CHANGELOG.md | 40 + node_modules/hasown/LICENSE | 21 + node_modules/hasown/README.md | 40 + node_modules/hasown/index.d.ts | 3 + node_modules/hasown/index.js | 8 + node_modules/hasown/package.json | 92 + node_modules/hasown/tsconfig.json | 6 + node_modules/is-core-module/.eslintrc | 18 + node_modules/is-core-module/.nycrc | 9 + node_modules/is-core-module/CHANGELOG.md | 205 + node_modules/is-core-module/LICENSE | 20 + node_modules/is-core-module/README.md | 40 + node_modules/is-core-module/core.json | 161 + node_modules/is-core-module/index.js | 69 + node_modules/is-core-module/package.json | 76 + node_modules/is-core-module/test/index.js | 154 + node_modules/is-module/.npmignore | 1 + node_modules/is-module/README.md | 41 + node_modules/is-module/component.json | 11 + node_modules/is-module/index.js | 11 + node_modules/is-module/package.json | 20 + node_modules/mini-svg-data-uri/LICENSE | 21 + node_modules/mini-svg-data-uri/README.md | 109 + node_modules/mini-svg-data-uri/cli.js | 41 + node_modules/mini-svg-data-uri/index.d.ts | 7 + node_modules/mini-svg-data-uri/index.js | 55 + .../mini-svg-data-uri/index.test-d.ts | 5 + node_modules/mini-svg-data-uri/package.json | 26 + .../shorter-css-color-names.js | 56 + node_modules/path-parse/LICENSE | 21 + node_modules/path-parse/README.md | 42 + node_modules/path-parse/index.js | 75 + node_modules/path-parse/package.json | 33 + node_modules/picomatch/LICENSE | 21 + node_modules/picomatch/README.md | 738 ++ node_modules/picomatch/index.js | 17 + node_modules/picomatch/lib/constants.js | 179 + node_modules/picomatch/lib/parse.js | 1085 ++ node_modules/picomatch/lib/picomatch.js | 341 + node_modules/picomatch/lib/scan.js | 391 + node_modules/picomatch/lib/utils.js | 72 + node_modules/picomatch/package.json | 83 + node_modules/picomatch/posix.js | 3 + node_modules/resolve/.editorconfig | 37 + node_modules/resolve/.eslintrc | 65 + node_modules/resolve/.github/FUNDING.yml | 12 + node_modules/resolve/LICENSE | 21 + node_modules/resolve/SECURITY.md | 3 + node_modules/resolve/async.js | 3 + node_modules/resolve/bin/resolve | 50 + node_modules/resolve/example/async.js | 5 + node_modules/resolve/example/sync.js | 3 + node_modules/resolve/index.js | 6 + node_modules/resolve/lib/async.js | 329 + node_modules/resolve/lib/caller.js | 8 + node_modules/resolve/lib/core.js | 12 + node_modules/resolve/lib/core.json | 158 + node_modules/resolve/lib/homedir.js | 24 + node_modules/resolve/lib/is-core.js | 5 + .../resolve/lib/node-modules-paths.js | 42 + node_modules/resolve/lib/normalize-options.js | 10 + node_modules/resolve/lib/sync.js | 208 + node_modules/resolve/package.json | 72 + node_modules/resolve/readme.markdown | 301 + node_modules/resolve/sync.js | 3 + node_modules/resolve/test/core.js | 88 + node_modules/resolve/test/dotdot.js | 29 + node_modules/resolve/test/dotdot/abc/index.js | 2 + node_modules/resolve/test/dotdot/index.js | 1 + node_modules/resolve/test/faulty_basedir.js | 29 + node_modules/resolve/test/filter.js | 34 + node_modules/resolve/test/filter_sync.js | 33 + node_modules/resolve/test/home_paths.js | 127 + node_modules/resolve/test/home_paths_sync.js | 114 + node_modules/resolve/test/mock.js | 315 + node_modules/resolve/test/mock_sync.js | 214 + node_modules/resolve/test/module_dir.js | 56 + .../test/module_dir/xmodules/aaa/index.js | 1 + .../test/module_dir/ymodules/aaa/index.js | 1 + .../test/module_dir/zmodules/bbb/main.js | 1 + .../test/module_dir/zmodules/bbb/package.json | 3 + .../resolve/test/node-modules-paths.js | 143 + node_modules/resolve/test/node_path.js | 70 + .../resolve/test/node_path/x/aaa/index.js | 1 + .../resolve/test/node_path/x/ccc/index.js | 1 + .../resolve/test/node_path/y/bbb/index.js | 1 + .../resolve/test/node_path/y/ccc/index.js | 1 + node_modules/resolve/test/nonstring.js | 9 + node_modules/resolve/test/pathfilter.js | 75 + .../resolve/test/pathfilter/deep_ref/main.js | 0 node_modules/resolve/test/precedence.js | 23 + node_modules/resolve/test/precedence/aaa.js | 1 + .../resolve/test/precedence/aaa/index.js | 1 + .../resolve/test/precedence/aaa/main.js | 1 + node_modules/resolve/test/precedence/bbb.js | 1 + .../resolve/test/precedence/bbb/main.js | 1 + node_modules/resolve/test/resolver.js | 597 + .../resolve/test/resolver/baz/doom.js | 0 .../resolve/test/resolver/baz/package.json | 4 + .../resolve/test/resolver/baz/quux.js | 1 + .../resolve/test/resolver/browser_field/a.js | 0 .../resolve/test/resolver/browser_field/b.js | 0 .../test/resolver/browser_field/package.json | 5 + node_modules/resolve/test/resolver/cup.coffee | 1 + .../resolve/test/resolver/dot_main/index.js | 1 + .../test/resolver/dot_main/package.json | 3 + .../test/resolver/dot_slash_main/index.js | 1 + .../test/resolver/dot_slash_main/package.json | 3 + .../resolve/test/resolver/false_main/index.js | 0 .../test/resolver/false_main/package.json | 4 + node_modules/resolve/test/resolver/foo.js | 1 + .../test/resolver/incorrect_main/index.js | 2 + .../test/resolver/incorrect_main/package.json | 3 + .../test/resolver/invalid_main/package.json | 7 + node_modules/resolve/test/resolver/mug.coffee | 0 node_modules/resolve/test/resolver/mug.js | 0 .../test/resolver/multirepo/lerna.json | 6 + .../test/resolver/multirepo/package.json | 20 + .../multirepo/packages/package-a/index.js | 35 + .../multirepo/packages/package-a/package.json | 14 + .../multirepo/packages/package-b/index.js | 0 .../multirepo/packages/package-b/package.json | 14 + .../resolver/nested_symlinks/mylib/async.js | 26 + .../nested_symlinks/mylib/package.json | 15 + .../resolver/nested_symlinks/mylib/sync.js | 12 + .../test/resolver/other_path/lib/other-lib.js | 0 .../resolve/test/resolver/other_path/root.js | 0 .../resolve/test/resolver/quux/foo/index.js | 1 + .../resolve/test/resolver/same_names/foo.js | 1 + .../test/resolver/same_names/foo/index.js | 1 + .../resolver/symlinked/_/node_modules/foo.js | 0 .../symlinked/_/symlink_target/.gitkeep | 0 .../test/resolver/symlinked/package/bar.js | 1 + .../resolver/symlinked/package/package.json | 3 + .../test/resolver/without_basedir/main.js | 5 + node_modules/resolve/test/resolver_sync.js | 730 ++ node_modules/resolve/test/shadowed_core.js | 54 + .../shadowed_core/node_modules/util/index.js | 0 node_modules/resolve/test/subdirs.js | 13 + node_modules/resolve/test/symlinks.js | 176 + .../supports-preserve-symlinks-flag/.eslintrc | 14 + .../.github/FUNDING.yml | 12 + .../supports-preserve-symlinks-flag/.nycrc | 9 + .../CHANGELOG.md | 22 + .../supports-preserve-symlinks-flag/LICENSE | 21 + .../supports-preserve-symlinks-flag/README.md | 42 + .../browser.js | 3 + .../supports-preserve-symlinks-flag/index.js | 9 + .../package.json | 70 + .../test/index.js | 29 + package-lock.json | 192 +- package.json | 5 + 1243 files changed, 130568 insertions(+), 136 deletions(-) create mode 100644 app/views/dashboard/index.turbo_stream.erb create mode 100644 app/views/federal_tax_brackets/index.turbo_stream.erb create mode 120000 node_modules/.bin/mini-svg-data-uri create mode 120000 node_modules/.bin/resolve create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/@popperjs/core/LICENSE.md create mode 100644 node_modules/@popperjs/core/README.md create mode 100644 node_modules/@popperjs/core/dist/cjs/enums.js create mode 100644 node_modules/@popperjs/core/dist/cjs/enums.js.flow create mode 100644 node_modules/@popperjs/core/dist/cjs/enums.js.map create mode 100644 node_modules/@popperjs/core/dist/cjs/popper-base.js create mode 100644 node_modules/@popperjs/core/dist/cjs/popper-base.js.flow create mode 100644 node_modules/@popperjs/core/dist/cjs/popper-base.js.map create mode 100644 node_modules/@popperjs/core/dist/cjs/popper-lite.js create mode 100644 node_modules/@popperjs/core/dist/cjs/popper-lite.js.flow create mode 100644 node_modules/@popperjs/core/dist/cjs/popper-lite.js.map create mode 100644 node_modules/@popperjs/core/dist/cjs/popper.js create mode 100644 node_modules/@popperjs/core/dist/cjs/popper.js.flow create mode 100644 node_modules/@popperjs/core/dist/cjs/popper.js.map create mode 100644 node_modules/@popperjs/core/dist/esm/createPopper.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/contains.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getBoundingClientRect.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getClippingRect.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getCompositeRect.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getComputedStyle.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getDocumentElement.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getDocumentRect.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getHTMLElementScroll.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getLayoutRect.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getNodeName.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getNodeScroll.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getOffsetParent.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getParentNode.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getScrollParent.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getViewportRect.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getWindow.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getWindowScroll.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/getWindowScrollBarX.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/instanceOf.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/isLayoutViewport.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/isScrollParent.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/isTableElement.js create mode 100644 node_modules/@popperjs/core/dist/esm/dom-utils/listScrollParents.js create mode 100644 node_modules/@popperjs/core/dist/esm/enums.js create mode 100644 node_modules/@popperjs/core/dist/esm/index.js create mode 100644 node_modules/@popperjs/core/dist/esm/modifiers/applyStyles.js create mode 100644 node_modules/@popperjs/core/dist/esm/modifiers/arrow.js create mode 100644 node_modules/@popperjs/core/dist/esm/modifiers/computeStyles.js create mode 100644 node_modules/@popperjs/core/dist/esm/modifiers/eventListeners.js create mode 100644 node_modules/@popperjs/core/dist/esm/modifiers/flip.js create mode 100644 node_modules/@popperjs/core/dist/esm/modifiers/hide.js create mode 100644 node_modules/@popperjs/core/dist/esm/modifiers/index.js create mode 100644 node_modules/@popperjs/core/dist/esm/modifiers/offset.js create mode 100644 node_modules/@popperjs/core/dist/esm/modifiers/popperOffsets.js create mode 100644 node_modules/@popperjs/core/dist/esm/modifiers/preventOverflow.js create mode 100644 node_modules/@popperjs/core/dist/esm/popper-base.js create mode 100644 node_modules/@popperjs/core/dist/esm/popper-lite.js create mode 100644 node_modules/@popperjs/core/dist/esm/popper.js create mode 100644 node_modules/@popperjs/core/dist/esm/types.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/computeAutoPlacement.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/computeOffsets.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/debounce.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/detectOverflow.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/expandToHashMap.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/getAltAxis.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/getAltLen.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/getBasePlacement.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/getFreshSideObject.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/getMainAxisFromPlacement.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/getOppositePlacement.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/getOppositeVariationPlacement.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/getVariation.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/math.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/mergeByName.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/mergePaddingObject.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/orderModifiers.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/rectToClientRect.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/uniqueBy.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/userAgent.js create mode 100644 node_modules/@popperjs/core/dist/esm/utils/within.js create mode 100644 node_modules/@popperjs/core/dist/umd/enums.js create mode 100644 node_modules/@popperjs/core/dist/umd/enums.js.map create mode 100644 node_modules/@popperjs/core/dist/umd/enums.min.js create mode 100644 node_modules/@popperjs/core/dist/umd/enums.min.js.flow create mode 100644 node_modules/@popperjs/core/dist/umd/enums.min.js.map create mode 100644 node_modules/@popperjs/core/dist/umd/popper-base.js create mode 100644 node_modules/@popperjs/core/dist/umd/popper-base.js.map create mode 100644 node_modules/@popperjs/core/dist/umd/popper-base.min.js create mode 100644 node_modules/@popperjs/core/dist/umd/popper-base.min.js.flow create mode 100644 node_modules/@popperjs/core/dist/umd/popper-base.min.js.map create mode 100644 node_modules/@popperjs/core/dist/umd/popper-lite.js create mode 100644 node_modules/@popperjs/core/dist/umd/popper-lite.js.map create mode 100644 node_modules/@popperjs/core/dist/umd/popper-lite.min.js create mode 100644 node_modules/@popperjs/core/dist/umd/popper-lite.min.js.flow create mode 100644 node_modules/@popperjs/core/dist/umd/popper-lite.min.js.map create mode 100644 node_modules/@popperjs/core/dist/umd/popper.js create mode 100644 node_modules/@popperjs/core/dist/umd/popper.js.map create mode 100644 node_modules/@popperjs/core/dist/umd/popper.min.js create mode 100644 node_modules/@popperjs/core/dist/umd/popper.min.js.flow create mode 100644 node_modules/@popperjs/core/dist/umd/popper.min.js.map create mode 100644 node_modules/@popperjs/core/index.d.ts create mode 100644 node_modules/@popperjs/core/lib/createPopper.d.ts create mode 100644 node_modules/@popperjs/core/lib/createPopper.js create mode 100644 node_modules/@popperjs/core/lib/createPopper.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/contains.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/contains.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/contains.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getClippingRect.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getNodeName.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getNodeName.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getNodeName.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getParentNode.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getParentNode.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getParentNode.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getScrollParent.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getViewportRect.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getWindow.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getWindow.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getWindow.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/instanceOf.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/instanceOf.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/instanceOf.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/isScrollParent.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/isTableElement.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/isTableElement.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/isTableElement.js.flow create mode 100644 node_modules/@popperjs/core/lib/dom-utils/listScrollParents.d.ts create mode 100644 node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js create mode 100644 node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js.flow create mode 100644 node_modules/@popperjs/core/lib/enums.d.ts create mode 100644 node_modules/@popperjs/core/lib/enums.js create mode 100644 node_modules/@popperjs/core/lib/enums.js.flow create mode 100644 node_modules/@popperjs/core/lib/index.d.ts create mode 100644 node_modules/@popperjs/core/lib/index.js create mode 100644 node_modules/@popperjs/core/lib/index.js.flow create mode 100644 node_modules/@popperjs/core/lib/modifiers/applyStyles.d.ts create mode 100644 node_modules/@popperjs/core/lib/modifiers/applyStyles.js create mode 100644 node_modules/@popperjs/core/lib/modifiers/applyStyles.js.flow create mode 100644 node_modules/@popperjs/core/lib/modifiers/arrow.d.ts create mode 100644 node_modules/@popperjs/core/lib/modifiers/arrow.js create mode 100644 node_modules/@popperjs/core/lib/modifiers/arrow.js.flow create mode 100644 node_modules/@popperjs/core/lib/modifiers/computeStyles.d.ts create mode 100644 node_modules/@popperjs/core/lib/modifiers/computeStyles.js create mode 100644 node_modules/@popperjs/core/lib/modifiers/computeStyles.js.flow create mode 100644 node_modules/@popperjs/core/lib/modifiers/eventListeners.d.ts create mode 100644 node_modules/@popperjs/core/lib/modifiers/eventListeners.js create mode 100644 node_modules/@popperjs/core/lib/modifiers/eventListeners.js.flow create mode 100644 node_modules/@popperjs/core/lib/modifiers/flip.d.ts create mode 100644 node_modules/@popperjs/core/lib/modifiers/flip.js create mode 100644 node_modules/@popperjs/core/lib/modifiers/flip.js.flow create mode 100644 node_modules/@popperjs/core/lib/modifiers/hide.d.ts create mode 100644 node_modules/@popperjs/core/lib/modifiers/hide.js create mode 100644 node_modules/@popperjs/core/lib/modifiers/hide.js.flow create mode 100644 node_modules/@popperjs/core/lib/modifiers/index.d.ts create mode 100644 node_modules/@popperjs/core/lib/modifiers/index.js create mode 100644 node_modules/@popperjs/core/lib/modifiers/index.js.flow create mode 100644 node_modules/@popperjs/core/lib/modifiers/offset.d.ts create mode 100644 node_modules/@popperjs/core/lib/modifiers/offset.js create mode 100644 node_modules/@popperjs/core/lib/modifiers/offset.js.flow create mode 100644 node_modules/@popperjs/core/lib/modifiers/popperOffsets.d.ts create mode 100644 node_modules/@popperjs/core/lib/modifiers/popperOffsets.js create mode 100644 node_modules/@popperjs/core/lib/modifiers/popperOffsets.js.flow create mode 100644 node_modules/@popperjs/core/lib/modifiers/preventOverflow.d.ts create mode 100644 node_modules/@popperjs/core/lib/modifiers/preventOverflow.js create mode 100644 node_modules/@popperjs/core/lib/modifiers/preventOverflow.js.flow create mode 100644 node_modules/@popperjs/core/lib/popper-base.d.ts create mode 100644 node_modules/@popperjs/core/lib/popper-base.js create mode 100644 node_modules/@popperjs/core/lib/popper-base.js.flow create mode 100644 node_modules/@popperjs/core/lib/popper-lite.d.ts create mode 100644 node_modules/@popperjs/core/lib/popper-lite.js create mode 100644 node_modules/@popperjs/core/lib/popper-lite.js.flow create mode 100644 node_modules/@popperjs/core/lib/popper.d.ts create mode 100644 node_modules/@popperjs/core/lib/popper.js create mode 100644 node_modules/@popperjs/core/lib/popper.js.flow create mode 100644 node_modules/@popperjs/core/lib/types.d.ts create mode 100644 node_modules/@popperjs/core/lib/types.js create mode 100644 node_modules/@popperjs/core/lib/types.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/computeAutoPlacement.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js create mode 100644 node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/computeOffsets.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/computeOffsets.js create mode 100644 node_modules/@popperjs/core/lib/utils/computeOffsets.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/debounce.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/debounce.js create mode 100644 node_modules/@popperjs/core/lib/utils/debounce.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/detectOverflow.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/detectOverflow.js create mode 100644 node_modules/@popperjs/core/lib/utils/detectOverflow.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/expandToHashMap.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/expandToHashMap.js create mode 100644 node_modules/@popperjs/core/lib/utils/expandToHashMap.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/getAltAxis.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/getAltAxis.js create mode 100644 node_modules/@popperjs/core/lib/utils/getAltAxis.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/getAltLen.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/getAltLen.js create mode 100644 node_modules/@popperjs/core/lib/utils/getAltLen.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/getBasePlacement.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/getBasePlacement.js create mode 100644 node_modules/@popperjs/core/lib/utils/getBasePlacement.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/getFreshSideObject.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/getFreshSideObject.js create mode 100644 node_modules/@popperjs/core/lib/utils/getFreshSideObject.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js create mode 100644 node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/getOppositePlacement.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/getOppositePlacement.js create mode 100644 node_modules/@popperjs/core/lib/utils/getOppositePlacement.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js create mode 100644 node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/getVariation.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/getVariation.js create mode 100644 node_modules/@popperjs/core/lib/utils/getVariation.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/math.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/math.js create mode 100644 node_modules/@popperjs/core/lib/utils/math.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/mergeByName.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/mergeByName.js create mode 100644 node_modules/@popperjs/core/lib/utils/mergeByName.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/mergePaddingObject.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/mergePaddingObject.js create mode 100644 node_modules/@popperjs/core/lib/utils/mergePaddingObject.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/orderModifiers.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/orderModifiers.js create mode 100644 node_modules/@popperjs/core/lib/utils/orderModifiers.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/rectToClientRect.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/rectToClientRect.js create mode 100644 node_modules/@popperjs/core/lib/utils/rectToClientRect.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/uniqueBy.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/uniqueBy.js create mode 100644 node_modules/@popperjs/core/lib/utils/uniqueBy.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/userAgent.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/userAgent.js create mode 100644 node_modules/@popperjs/core/lib/utils/userAgent.js.flow create mode 100644 node_modules/@popperjs/core/lib/utils/within.d.ts create mode 100644 node_modules/@popperjs/core/lib/utils/within.js create mode 100644 node_modules/@popperjs/core/lib/utils/within.js.flow create mode 100644 node_modules/@popperjs/core/package.json create mode 100644 node_modules/@rollup/plugin-node-resolve/LICENSE create mode 100644 node_modules/@rollup/plugin-node-resolve/README.md create mode 100644 node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js create mode 100644 node_modules/@rollup/plugin-node-resolve/dist/es/index.js create mode 100644 node_modules/@rollup/plugin-node-resolve/dist/es/package.json create mode 100644 node_modules/@rollup/plugin-node-resolve/package.json create mode 100644 node_modules/@rollup/plugin-node-resolve/types/index.d.ts create mode 100644 node_modules/@rollup/pluginutils/LICENSE create mode 100644 node_modules/@rollup/pluginutils/README.md create mode 100644 node_modules/@rollup/pluginutils/dist/cjs/index.js create mode 100644 node_modules/@rollup/pluginutils/dist/es/index.js create mode 100644 node_modules/@rollup/pluginutils/dist/es/package.json create mode 100644 node_modules/@rollup/pluginutils/package.json create mode 100644 node_modules/@rollup/pluginutils/types/index.d.ts create mode 100644 node_modules/@types/estree/LICENSE create mode 100644 node_modules/@types/estree/README.md create mode 100644 node_modules/@types/estree/flow.d.ts create mode 100644 node_modules/@types/estree/index.d.ts create mode 100644 node_modules/@types/estree/package.json create mode 100755 node_modules/@types/resolve/LICENSE create mode 100755 node_modules/@types/resolve/README.md create mode 100755 node_modules/@types/resolve/index.d.ts create mode 100755 node_modules/@types/resolve/package.json create mode 100644 node_modules/deepmerge/.editorconfig create mode 100644 node_modules/deepmerge/.eslintcache create mode 100644 node_modules/deepmerge/changelog.md create mode 100644 node_modules/deepmerge/dist/cjs.js create mode 100644 node_modules/deepmerge/dist/umd.js create mode 100644 node_modules/deepmerge/index.d.ts create mode 100644 node_modules/deepmerge/index.js create mode 100644 node_modules/deepmerge/license.txt create mode 100644 node_modules/deepmerge/package.json create mode 100644 node_modules/deepmerge/readme.md create mode 100644 node_modules/deepmerge/rollup.config.js create mode 100644 node_modules/estree-walker/CHANGELOG.md create mode 100644 node_modules/estree-walker/LICENSE create mode 100644 node_modules/estree-walker/README.md create mode 100644 node_modules/estree-walker/dist/esm/estree-walker.js create mode 100644 node_modules/estree-walker/dist/esm/package.json create mode 100644 node_modules/estree-walker/dist/umd/estree-walker.js create mode 100644 node_modules/estree-walker/package.json create mode 100644 node_modules/estree-walker/src/async.js create mode 100644 node_modules/estree-walker/src/index.js create mode 100644 node_modules/estree-walker/src/package.json create mode 100644 node_modules/estree-walker/src/sync.js create mode 100644 node_modules/estree-walker/src/walker.js create mode 100644 node_modules/estree-walker/types/async.d.ts create mode 100644 node_modules/estree-walker/types/index.d.ts create mode 100644 node_modules/estree-walker/types/sync.d.ts create mode 100644 node_modules/estree-walker/types/tsconfig.tsbuildinfo create mode 100644 node_modules/estree-walker/types/walker.d.ts create mode 100644 node_modules/flowbite-datepicker/.eslintignore create mode 100644 node_modules/flowbite-datepicker/.eslintrc.js create mode 100644 node_modules/flowbite-datepicker/.stylelintrc create mode 100644 node_modules/flowbite-datepicker/CHANGELOG.md create mode 100755 node_modules/flowbite-datepicker/LICENSE create mode 100644 node_modules/flowbite-datepicker/README.md create mode 100644 node_modules/flowbite-datepicker/demo/index.html create mode 100644 node_modules/flowbite-datepicker/demo/live-demo.js create mode 100644 node_modules/flowbite-datepicker/dist/DateRangePicker.cjs.js create mode 100644 node_modules/flowbite-datepicker/dist/DateRangePicker.esm.js create mode 100644 node_modules/flowbite-datepicker/dist/Datepicker.cjs.js create mode 100644 node_modules/flowbite-datepicker/dist/Datepicker.esm.js create mode 100644 node_modules/flowbite-datepicker/dist/css/datepicker-bs4.css create mode 100644 node_modules/flowbite-datepicker/dist/css/datepicker-bs4.min.css create mode 100644 node_modules/flowbite-datepicker/dist/css/datepicker-bs5.css create mode 100644 node_modules/flowbite-datepicker/dist/css/datepicker-bs5.min.css create mode 100644 node_modules/flowbite-datepicker/dist/css/datepicker-bulma.css create mode 100644 node_modules/flowbite-datepicker/dist/css/datepicker-bulma.min.css create mode 100644 node_modules/flowbite-datepicker/dist/css/datepicker-foundation.css create mode 100644 node_modules/flowbite-datepicker/dist/css/datepicker-foundation.min.css create mode 100644 node_modules/flowbite-datepicker/dist/css/datepicker.css create mode 100644 node_modules/flowbite-datepicker/dist/css/datepicker.min.css create mode 100644 node_modules/flowbite-datepicker/dist/js/datepicker-full.js create mode 100644 node_modules/flowbite-datepicker/dist/js/datepicker-full.min.js create mode 100644 node_modules/flowbite-datepicker/dist/js/datepicker.js create mode 100644 node_modules/flowbite-datepicker/dist/js/datepicker.min.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/ar-tn.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/ar.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/az.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/bg.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/bm.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/bn.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/br.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/bs.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/ca.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/cs.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/cy.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/da.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/de.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/el.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/en-AU.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/en-CA.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/en-GB.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/en-IE.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/en-NZ.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/en-ZA.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/eo.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/es.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/et.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/eu.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/fa.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/fi.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/fo.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/fr-CH.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/fr.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/gl.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/he.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/hi.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/hr.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/hu.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/hy.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/id.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/is.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/it-CH.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/it.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/ja.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/ka.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/kk.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/km.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/ko.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/lt.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/lv.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/me.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/mk.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/mn.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/mr.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/ms.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/nl-BE.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/nl.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/no.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/oc.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/pl.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/pt-BR.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/pt.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/ro.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/ru.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/si.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/sk.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/sl.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/sq.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/sr-latn.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/sr.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/sv.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/sw.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/ta.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/tg.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/th.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/tk.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/tr.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/uk.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/uz-cyrl.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/uz-latn.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/vi.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/zh-CN.js create mode 100644 node_modules/flowbite-datepicker/dist/js/locales/zh-TW.js create mode 100644 node_modules/flowbite-datepicker/dist/main.cjs.js create mode 100644 node_modules/flowbite-datepicker/dist/main.esm.js create mode 100644 node_modules/flowbite-datepicker/docs/.nojekyll create mode 100644 node_modules/flowbite-datepicker/docs/README.md create mode 100644 node_modules/flowbite-datepicker/docs/_sidebar.md create mode 100644 node_modules/flowbite-datepicker/docs/api.md create mode 100644 node_modules/flowbite-datepicker/docs/date-string+format.md create mode 100644 node_modules/flowbite-datepicker/docs/i18n.md create mode 100644 node_modules/flowbite-datepicker/docs/images/datepicker-inline.jpg create mode 100644 node_modules/flowbite-datepicker/docs/images/datepicker.jpg create mode 100644 node_modules/flowbite-datepicker/docs/images/multidate.jpg create mode 100644 node_modules/flowbite-datepicker/docs/images/picker-structure.jpg create mode 100644 node_modules/flowbite-datepicker/docs/images/rangepicker.jpg create mode 100644 node_modules/flowbite-datepicker/docs/images/view-days.jpg create mode 100644 node_modules/flowbite-datepicker/docs/images/view-decades.jpg create mode 100644 node_modules/flowbite-datepicker/docs/images/view-months.jpg create mode 100644 node_modules/flowbite-datepicker/docs/images/view-years.jpg create mode 100644 node_modules/flowbite-datepicker/docs/index.html create mode 100644 node_modules/flowbite-datepicker/docs/options.md create mode 100644 node_modules/flowbite-datepicker/docs/overview.md create mode 100644 node_modules/flowbite-datepicker/extras/twoDigitToFullYear/test/twoDigitToFullYear.js create mode 100644 node_modules/flowbite-datepicker/extras/twoDigitToFullYear/twoDigitToFullYear.js create mode 100644 node_modules/flowbite-datepicker/js/DateRangePicker.js create mode 100644 node_modules/flowbite-datepicker/js/Datepicker.js create mode 100644 node_modules/flowbite-datepicker/js/datepicker-full.js create mode 100644 node_modules/flowbite-datepicker/js/events/functions.js create mode 100644 node_modules/flowbite-datepicker/js/events/inputFieldListeners.js create mode 100644 node_modules/flowbite-datepicker/js/events/otherListeners.js create mode 100644 node_modules/flowbite-datepicker/js/events/pickerListeners.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/base-locales.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/ar-tn.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/ar.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/az.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/bg.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/bm.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/bn.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/br.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/bs.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/ca.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/cs.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/cy.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/da.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/de.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/el.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/en-AU.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/en-CA.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/en-GB.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/en-IE.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/en-NZ.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/en-ZA.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/eo.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/es.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/et.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/eu.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/fa.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/fi.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/fo.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/fr-CH.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/fr.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/gl.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/he.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/hi.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/hr.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/hu.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/hy.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/id.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/is.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/it-CH.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/it.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/ja.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/ka.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/kk.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/km.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/ko.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/lt.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/lv.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/me.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/mk.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/mn.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/mr.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/ms.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/nl-BE.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/nl.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/no.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/oc.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/pl.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/pt-BR.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/pt.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/ro.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/ru.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/si.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/sk.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/sl.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/sq.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/sr-latn.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/sr.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/sv.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/sw.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/ta.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/tg.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/th.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/tk.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/tr.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/uk.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/uz-cyrl.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/uz-latn.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/vi.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/zh-CN.js create mode 100644 node_modules/flowbite-datepicker/js/i18n/locales/zh-TW.js create mode 100644 node_modules/flowbite-datepicker/js/lib/date-format.js create mode 100644 node_modules/flowbite-datepicker/js/lib/date.js create mode 100644 node_modules/flowbite-datepicker/js/lib/dom.js create mode 100644 node_modules/flowbite-datepicker/js/lib/event.js create mode 100644 node_modules/flowbite-datepicker/js/lib/utils.js create mode 100644 node_modules/flowbite-datepicker/js/main.js create mode 100644 node_modules/flowbite-datepicker/js/options/defaultOptions.js create mode 100644 node_modules/flowbite-datepicker/js/options/processOptions.js create mode 100644 node_modules/flowbite-datepicker/js/picker/Picker.js create mode 100644 node_modules/flowbite-datepicker/js/picker/templates/calendarWeeksTemplate.js create mode 100644 node_modules/flowbite-datepicker/js/picker/templates/daysTemplate.js create mode 100644 node_modules/flowbite-datepicker/js/picker/templates/pickerTemplate.js create mode 100644 node_modules/flowbite-datepicker/js/picker/views/DaysView.js create mode 100644 node_modules/flowbite-datepicker/js/picker/views/MonthsView.js create mode 100644 node_modules/flowbite-datepicker/js/picker/views/View.js create mode 100644 node_modules/flowbite-datepicker/js/picker/views/YearsView.js create mode 100644 node_modules/flowbite-datepicker/package.json create mode 100644 node_modules/flowbite-datepicker/postcss.config.js create mode 100644 node_modules/flowbite-datepicker/rollup.config.js create mode 100644 node_modules/flowbite-datepicker/sass/_mixins.scss create mode 100644 node_modules/flowbite-datepicker/sass/datepicker-bs4.scss create mode 100644 node_modules/flowbite-datepicker/sass/datepicker-bs5.scss create mode 100644 node_modules/flowbite-datepicker/sass/datepicker-bulma.scss create mode 100644 node_modules/flowbite-datepicker/sass/datepicker-foundation.scss create mode 100644 node_modules/flowbite-datepicker/sass/datepicker.scss create mode 100644 node_modules/flowbite-datepicker/sass/index-bs4.scss create mode 100644 node_modules/flowbite-datepicker/sass/index-bs5.scss create mode 100644 node_modules/flowbite-datepicker/sass/index-bulma.scss create mode 100644 node_modules/flowbite-datepicker/sass/index-foundation.scss create mode 100644 node_modules/flowbite-datepicker/scripts/build-css.js create mode 100644 node_modules/flowbite-datepicker/scripts/build-locales.js create mode 100644 node_modules/flowbite-datepicker/scripts/convert-bsdp-locales.js create mode 100644 node_modules/flowbite-datepicker/scripts/minify-css.js create mode 100644 node_modules/flowbite-datepicker/scripts/minify-js.js create mode 100644 node_modules/flowbite-datepicker/style.css create mode 100644 node_modules/flowbite-datepicker/tailwind.config.js create mode 100644 node_modules/flowbite-datepicker/tailwind.css create mode 100644 node_modules/flowbite-datepicker/test/DateRangePicker/DateRangePicker.js create mode 100644 node_modules/flowbite-datepicker/test/DateRangePicker/api-methods.js create mode 100644 node_modules/flowbite-datepicker/test/DateRangePicker/date-selection.js create mode 100644 node_modules/flowbite-datepicker/test/DateRangePicker/options.js create mode 100644 node_modules/flowbite-datepicker/test/Datepicker/Datepicker-object.js create mode 100644 node_modules/flowbite-datepicker/test/Datepicker/api-methods.js create mode 100644 node_modules/flowbite-datepicker/test/_utils/date.js create mode 100644 node_modules/flowbite-datepicker/test/_utils/dom.js create mode 100644 node_modules/flowbite-datepicker/test/events.js create mode 100644 node_modules/flowbite-datepicker/test/inline-mode.js create mode 100644 node_modules/flowbite-datepicker/test/keyboard-operation/arrow-down.js create mode 100644 node_modules/flowbite-datepicker/test/keyboard-operation/arrow-left.js create mode 100644 node_modules/flowbite-datepicker/test/keyboard-operation/arrow-right.js create mode 100644 node_modules/flowbite-datepicker/test/keyboard-operation/arrow-up.js create mode 100644 node_modules/flowbite-datepicker/test/keyboard-operation/edit-mode.js create mode 100644 node_modules/flowbite-datepicker/test/keyboard-operation/keyboard-operation.js create mode 100644 node_modules/flowbite-datepicker/test/mouse-operation.js create mode 100644 node_modules/flowbite-datepicker/test/options/before-show.js create mode 100644 node_modules/flowbite-datepicker/test/options/bulma-datepicker.sublime-workspace create mode 100644 node_modules/flowbite-datepicker/test/options/buttons.js create mode 100644 node_modules/flowbite-datepicker/test/options/date-restrictions.js create mode 100644 node_modules/flowbite-datepicker/test/options/format.js create mode 100644 node_modules/flowbite-datepicker/test/options/multidate.js create mode 100644 node_modules/flowbite-datepicker/test/options/options.js create mode 100644 node_modules/flowbite-datepicker/test/options/orientation.js create mode 100644 node_modules/flowbite-datepicker/test/options/pick-levle+view.js create mode 100644 node_modules/flowbite-datepicker/test/test.html create mode 100644 node_modules/flowbite-datepicker/test/unit/DateRangePicker.js create mode 100644 node_modules/flowbite-datepicker/test/unit/Datepicker.js create mode 100644 node_modules/flowbite-datepicker/test/unit/_setup.js create mode 100644 node_modules/flowbite-datepicker/test/unit/lib/date-format.js create mode 100644 node_modules/flowbite-datepicker/test/unit/lib/date.js create mode 100644 node_modules/flowbite-datepicker/test/unit/lib/dom.js create mode 100644 node_modules/flowbite-datepicker/test/unit/lib/event.js create mode 100644 node_modules/flowbite-datepicker/test/unit/lib/utils.js create mode 100644 node_modules/flowbite-datepicker/tsconfig.json create mode 100644 node_modules/flowbite-datepicker/types/flowbite-datepicker.d.ts create mode 100644 node_modules/flowbite/LICENSE.md create mode 100644 node_modules/flowbite/README.md create mode 100644 node_modules/flowbite/dist/flowbite.css create mode 100644 node_modules/flowbite/dist/flowbite.js create mode 100644 node_modules/flowbite/dist/flowbite.js.map create mode 100644 node_modules/flowbite/dist/flowbite.min.css create mode 100644 node_modules/flowbite/dist/flowbite.min.js create mode 100644 node_modules/flowbite/dist/flowbite.min.js.map create mode 100644 node_modules/flowbite/dist/flowbite.phoenix.js create mode 100644 node_modules/flowbite/dist/flowbite.phoenix.js.map create mode 100644 node_modules/flowbite/dist/flowbite.phoenix.min.js create mode 100644 node_modules/flowbite/dist/flowbite.phoenix.min.js.map create mode 100644 node_modules/flowbite/dist/flowbite.turbo.js create mode 100644 node_modules/flowbite/dist/flowbite.turbo.js.map create mode 100644 node_modules/flowbite/dist/flowbite.turbo.min.js create mode 100644 node_modules/flowbite/dist/flowbite.turbo.min.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/accordion/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/carousel/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/clipboard/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/collapse/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/datepicker/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/dial/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/dial/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/dial/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/dial/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/dial/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/dial/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/dial/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/dial/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/dial/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/dial/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/dial/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/dial/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/dismiss/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/drawer/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/dropdown/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/input-counter/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/modal/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/modal/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/modal/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/modal/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/modal/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/modal/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/modal/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/modal/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/modal/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/modal/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/modal/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/modal/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/popover/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/popover/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/popover/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/popover/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/popover/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/popover/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/popover/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/popover/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/popover/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/popover/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/popover/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/popover/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/tabs/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/index.js create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/interface.js create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/interface.js.map create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/types.js create mode 100644 node_modules/flowbite/lib/cjs/components/tooltip/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/config/global.d.ts create mode 100644 node_modules/flowbite/lib/cjs/config/global.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/config/global.js create mode 100644 node_modules/flowbite/lib/cjs/config/global.js.map create mode 100644 node_modules/flowbite/lib/cjs/dom/events.d.ts create mode 100644 node_modules/flowbite/lib/cjs/dom/events.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/dom/events.js create mode 100644 node_modules/flowbite/lib/cjs/dom/events.js.map create mode 100644 node_modules/flowbite/lib/cjs/dom/instances.d.ts create mode 100644 node_modules/flowbite/lib/cjs/dom/instances.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/dom/instances.js create mode 100644 node_modules/flowbite/lib/cjs/dom/instances.js.map create mode 100644 node_modules/flowbite/lib/cjs/dom/types.d.ts create mode 100644 node_modules/flowbite/lib/cjs/dom/types.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/dom/types.js create mode 100644 node_modules/flowbite/lib/cjs/dom/types.js.map create mode 100644 node_modules/flowbite/lib/cjs/index.d.ts create mode 100644 node_modules/flowbite/lib/cjs/index.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/index.js create mode 100644 node_modules/flowbite/lib/cjs/index.js.map create mode 100644 node_modules/flowbite/lib/cjs/index.phoenix.d.ts create mode 100644 node_modules/flowbite/lib/cjs/index.phoenix.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/index.phoenix.js create mode 100644 node_modules/flowbite/lib/cjs/index.phoenix.js.map create mode 100644 node_modules/flowbite/lib/cjs/index.turbo.d.ts create mode 100644 node_modules/flowbite/lib/cjs/index.turbo.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/index.turbo.js create mode 100644 node_modules/flowbite/lib/cjs/index.turbo.js.map create mode 100644 node_modules/flowbite/lib/cjs/index.umd.d.ts create mode 100644 node_modules/flowbite/lib/cjs/index.umd.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/index.umd.js create mode 100644 node_modules/flowbite/lib/cjs/index.umd.js.map create mode 100644 node_modules/flowbite/lib/cjs/types/declarations.d.ts create mode 100644 node_modules/flowbite/lib/cjs/types/declarations.d.ts.map create mode 100644 node_modules/flowbite/lib/cjs/types/declarations.js create mode 100644 node_modules/flowbite/lib/cjs/types/declarations.js.map create mode 100644 node_modules/flowbite/lib/esm/components/accordion/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/accordion/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/accordion/index.js create mode 100644 node_modules/flowbite/lib/esm/components/accordion/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/accordion/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/accordion/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/accordion/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/accordion/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/accordion/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/accordion/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/accordion/types.js create mode 100644 node_modules/flowbite/lib/esm/components/accordion/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/carousel/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/carousel/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/carousel/index.js create mode 100644 node_modules/flowbite/lib/esm/components/carousel/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/carousel/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/carousel/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/carousel/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/carousel/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/carousel/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/carousel/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/carousel/types.js create mode 100644 node_modules/flowbite/lib/esm/components/carousel/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/index.js create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/types.js create mode 100644 node_modules/flowbite/lib/esm/components/clipboard/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/collapse/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/collapse/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/collapse/index.js create mode 100644 node_modules/flowbite/lib/esm/components/collapse/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/collapse/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/collapse/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/collapse/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/collapse/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/collapse/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/collapse/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/collapse/types.js create mode 100644 node_modules/flowbite/lib/esm/components/collapse/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/index.js create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/types.js create mode 100644 node_modules/flowbite/lib/esm/components/datepicker/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/dial/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/dial/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/dial/index.js create mode 100644 node_modules/flowbite/lib/esm/components/dial/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/dial/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/dial/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/dial/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/dial/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/dial/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/dial/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/dial/types.js create mode 100644 node_modules/flowbite/lib/esm/components/dial/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/index.js create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/types.js create mode 100644 node_modules/flowbite/lib/esm/components/dismiss/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/drawer/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/drawer/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/drawer/index.js create mode 100644 node_modules/flowbite/lib/esm/components/drawer/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/drawer/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/drawer/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/drawer/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/drawer/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/drawer/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/drawer/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/drawer/types.js create mode 100644 node_modules/flowbite/lib/esm/components/drawer/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/index.js create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/types.js create mode 100644 node_modules/flowbite/lib/esm/components/dropdown/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/index.js create mode 100644 node_modules/flowbite/lib/esm/components/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/index.js create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/types.js create mode 100644 node_modules/flowbite/lib/esm/components/input-counter/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/modal/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/modal/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/modal/index.js create mode 100644 node_modules/flowbite/lib/esm/components/modal/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/modal/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/modal/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/modal/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/modal/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/modal/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/modal/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/modal/types.js create mode 100644 node_modules/flowbite/lib/esm/components/modal/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/popover/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/popover/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/popover/index.js create mode 100644 node_modules/flowbite/lib/esm/components/popover/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/popover/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/popover/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/popover/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/popover/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/popover/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/popover/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/popover/types.js create mode 100644 node_modules/flowbite/lib/esm/components/popover/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/tabs/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/tabs/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/tabs/index.js create mode 100644 node_modules/flowbite/lib/esm/components/tabs/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/tabs/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/tabs/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/tabs/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/tabs/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/tabs/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/tabs/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/tabs/types.js create mode 100644 node_modules/flowbite/lib/esm/components/tabs/types.js.map create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/index.js create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/index.js.map create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/interface.js create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/interface.js.map create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/types.js create mode 100644 node_modules/flowbite/lib/esm/components/tooltip/types.js.map create mode 100644 node_modules/flowbite/lib/esm/config/global.d.ts create mode 100644 node_modules/flowbite/lib/esm/config/global.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/config/global.js create mode 100644 node_modules/flowbite/lib/esm/config/global.js.map create mode 100644 node_modules/flowbite/lib/esm/dom/events.d.ts create mode 100644 node_modules/flowbite/lib/esm/dom/events.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/dom/events.js create mode 100644 node_modules/flowbite/lib/esm/dom/events.js.map create mode 100644 node_modules/flowbite/lib/esm/dom/instances.d.ts create mode 100644 node_modules/flowbite/lib/esm/dom/instances.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/dom/instances.js create mode 100644 node_modules/flowbite/lib/esm/dom/instances.js.map create mode 100644 node_modules/flowbite/lib/esm/dom/types.d.ts create mode 100644 node_modules/flowbite/lib/esm/dom/types.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/dom/types.js create mode 100644 node_modules/flowbite/lib/esm/dom/types.js.map create mode 100644 node_modules/flowbite/lib/esm/index.d.ts create mode 100644 node_modules/flowbite/lib/esm/index.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/index.js create mode 100644 node_modules/flowbite/lib/esm/index.js.map create mode 100644 node_modules/flowbite/lib/esm/index.phoenix.d.ts create mode 100644 node_modules/flowbite/lib/esm/index.phoenix.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/index.phoenix.js create mode 100644 node_modules/flowbite/lib/esm/index.phoenix.js.map create mode 100644 node_modules/flowbite/lib/esm/index.turbo.d.ts create mode 100644 node_modules/flowbite/lib/esm/index.turbo.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/index.turbo.js create mode 100644 node_modules/flowbite/lib/esm/index.turbo.js.map create mode 100644 node_modules/flowbite/lib/esm/index.umd.d.ts create mode 100644 node_modules/flowbite/lib/esm/index.umd.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/index.umd.js create mode 100644 node_modules/flowbite/lib/esm/index.umd.js.map create mode 100644 node_modules/flowbite/lib/esm/types/declarations.d.ts create mode 100644 node_modules/flowbite/lib/esm/types/declarations.d.ts.map create mode 100644 node_modules/flowbite/lib/esm/types/declarations.js create mode 100644 node_modules/flowbite/lib/esm/types/declarations.js.map create mode 100644 node_modules/flowbite/package.json create mode 100644 node_modules/flowbite/plugin-windicss.js create mode 100644 node_modules/flowbite/plugin.d.ts create mode 100644 node_modules/flowbite/plugin.js create mode 100644 node_modules/function-bind/.eslintrc create mode 100644 node_modules/function-bind/.github/FUNDING.yml create mode 100644 node_modules/function-bind/.github/SECURITY.md create mode 100644 node_modules/function-bind/.nycrc create mode 100644 node_modules/function-bind/CHANGELOG.md create mode 100644 node_modules/function-bind/LICENSE create mode 100644 node_modules/function-bind/README.md create mode 100644 node_modules/function-bind/implementation.js create mode 100644 node_modules/function-bind/index.js create mode 100644 node_modules/function-bind/package.json create mode 100644 node_modules/function-bind/test/.eslintrc create mode 100644 node_modules/function-bind/test/index.js create mode 100644 node_modules/hasown/.eslintrc create mode 100644 node_modules/hasown/.github/FUNDING.yml create mode 100644 node_modules/hasown/.nycrc create mode 100644 node_modules/hasown/CHANGELOG.md create mode 100644 node_modules/hasown/LICENSE create mode 100644 node_modules/hasown/README.md create mode 100644 node_modules/hasown/index.d.ts create mode 100644 node_modules/hasown/index.js create mode 100644 node_modules/hasown/package.json create mode 100644 node_modules/hasown/tsconfig.json create mode 100644 node_modules/is-core-module/.eslintrc create mode 100644 node_modules/is-core-module/.nycrc create mode 100644 node_modules/is-core-module/CHANGELOG.md create mode 100644 node_modules/is-core-module/LICENSE create mode 100644 node_modules/is-core-module/README.md create mode 100644 node_modules/is-core-module/core.json create mode 100644 node_modules/is-core-module/index.js create mode 100644 node_modules/is-core-module/package.json create mode 100644 node_modules/is-core-module/test/index.js create mode 100644 node_modules/is-module/.npmignore create mode 100644 node_modules/is-module/README.md create mode 100644 node_modules/is-module/component.json create mode 100644 node_modules/is-module/index.js create mode 100644 node_modules/is-module/package.json create mode 100644 node_modules/mini-svg-data-uri/LICENSE create mode 100644 node_modules/mini-svg-data-uri/README.md create mode 100755 node_modules/mini-svg-data-uri/cli.js create mode 100644 node_modules/mini-svg-data-uri/index.d.ts create mode 100644 node_modules/mini-svg-data-uri/index.js create mode 100644 node_modules/mini-svg-data-uri/index.test-d.ts create mode 100644 node_modules/mini-svg-data-uri/package.json create mode 100644 node_modules/mini-svg-data-uri/shorter-css-color-names.js create mode 100644 node_modules/path-parse/LICENSE create mode 100644 node_modules/path-parse/README.md create mode 100644 node_modules/path-parse/index.js create mode 100644 node_modules/path-parse/package.json create mode 100644 node_modules/picomatch/LICENSE create mode 100644 node_modules/picomatch/README.md create mode 100644 node_modules/picomatch/index.js create mode 100644 node_modules/picomatch/lib/constants.js create mode 100644 node_modules/picomatch/lib/parse.js create mode 100644 node_modules/picomatch/lib/picomatch.js create mode 100644 node_modules/picomatch/lib/scan.js create mode 100644 node_modules/picomatch/lib/utils.js create mode 100644 node_modules/picomatch/package.json create mode 100644 node_modules/picomatch/posix.js create mode 100644 node_modules/resolve/.editorconfig create mode 100644 node_modules/resolve/.eslintrc create mode 100644 node_modules/resolve/.github/FUNDING.yml create mode 100644 node_modules/resolve/LICENSE create mode 100644 node_modules/resolve/SECURITY.md create mode 100644 node_modules/resolve/async.js create mode 100755 node_modules/resolve/bin/resolve create mode 100644 node_modules/resolve/example/async.js create mode 100644 node_modules/resolve/example/sync.js create mode 100644 node_modules/resolve/index.js create mode 100644 node_modules/resolve/lib/async.js create mode 100644 node_modules/resolve/lib/caller.js create mode 100644 node_modules/resolve/lib/core.js create mode 100644 node_modules/resolve/lib/core.json create mode 100644 node_modules/resolve/lib/homedir.js create mode 100644 node_modules/resolve/lib/is-core.js create mode 100644 node_modules/resolve/lib/node-modules-paths.js create mode 100644 node_modules/resolve/lib/normalize-options.js create mode 100644 node_modules/resolve/lib/sync.js create mode 100644 node_modules/resolve/package.json create mode 100644 node_modules/resolve/readme.markdown create mode 100644 node_modules/resolve/sync.js create mode 100644 node_modules/resolve/test/core.js create mode 100644 node_modules/resolve/test/dotdot.js create mode 100644 node_modules/resolve/test/dotdot/abc/index.js create mode 100644 node_modules/resolve/test/dotdot/index.js create mode 100644 node_modules/resolve/test/faulty_basedir.js create mode 100644 node_modules/resolve/test/filter.js create mode 100644 node_modules/resolve/test/filter_sync.js create mode 100644 node_modules/resolve/test/home_paths.js create mode 100644 node_modules/resolve/test/home_paths_sync.js create mode 100644 node_modules/resolve/test/mock.js create mode 100644 node_modules/resolve/test/mock_sync.js create mode 100644 node_modules/resolve/test/module_dir.js create mode 100644 node_modules/resolve/test/module_dir/xmodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/ymodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/main.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/package.json create mode 100644 node_modules/resolve/test/node-modules-paths.js create mode 100644 node_modules/resolve/test/node_path.js create mode 100644 node_modules/resolve/test/node_path/x/aaa/index.js create mode 100644 node_modules/resolve/test/node_path/x/ccc/index.js create mode 100644 node_modules/resolve/test/node_path/y/bbb/index.js create mode 100644 node_modules/resolve/test/node_path/y/ccc/index.js create mode 100644 node_modules/resolve/test/nonstring.js create mode 100644 node_modules/resolve/test/pathfilter.js create mode 100644 node_modules/resolve/test/pathfilter/deep_ref/main.js create mode 100644 node_modules/resolve/test/precedence.js create mode 100644 node_modules/resolve/test/precedence/aaa.js create mode 100644 node_modules/resolve/test/precedence/aaa/index.js create mode 100644 node_modules/resolve/test/precedence/aaa/main.js create mode 100644 node_modules/resolve/test/precedence/bbb.js create mode 100644 node_modules/resolve/test/precedence/bbb/main.js create mode 100644 node_modules/resolve/test/resolver.js create mode 100644 node_modules/resolve/test/resolver/baz/doom.js create mode 100644 node_modules/resolve/test/resolver/baz/package.json create mode 100644 node_modules/resolve/test/resolver/baz/quux.js create mode 100644 node_modules/resolve/test/resolver/browser_field/a.js create mode 100644 node_modules/resolve/test/resolver/browser_field/b.js create mode 100644 node_modules/resolve/test/resolver/browser_field/package.json create mode 100644 node_modules/resolve/test/resolver/cup.coffee create mode 100644 node_modules/resolve/test/resolver/dot_main/index.js create mode 100644 node_modules/resolve/test/resolver/dot_main/package.json create mode 100644 node_modules/resolve/test/resolver/dot_slash_main/index.js create mode 100644 node_modules/resolve/test/resolver/dot_slash_main/package.json create mode 100644 node_modules/resolve/test/resolver/false_main/index.js create mode 100644 node_modules/resolve/test/resolver/false_main/package.json create mode 100644 node_modules/resolve/test/resolver/foo.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/index.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/package.json create mode 100644 node_modules/resolve/test/resolver/invalid_main/package.json create mode 100644 node_modules/resolve/test/resolver/mug.coffee create mode 100644 node_modules/resolve/test/resolver/mug.js create mode 100644 node_modules/resolve/test/resolver/multirepo/lerna.json create mode 100644 node_modules/resolve/test/resolver/multirepo/package.json create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json create mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js create mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json create mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js create mode 100644 node_modules/resolve/test/resolver/other_path/lib/other-lib.js create mode 100644 node_modules/resolve/test/resolver/other_path/root.js create mode 100644 node_modules/resolve/test/resolver/quux/foo/index.js create mode 100644 node_modules/resolve/test/resolver/same_names/foo.js create mode 100644 node_modules/resolve/test/resolver/same_names/foo/index.js create mode 100644 node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js create mode 100644 node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep create mode 100644 node_modules/resolve/test/resolver/symlinked/package/bar.js create mode 100644 node_modules/resolve/test/resolver/symlinked/package/package.json create mode 100644 node_modules/resolve/test/resolver/without_basedir/main.js create mode 100644 node_modules/resolve/test/resolver_sync.js create mode 100644 node_modules/resolve/test/shadowed_core.js create mode 100644 node_modules/resolve/test/shadowed_core/node_modules/util/index.js create mode 100644 node_modules/resolve/test/subdirs.js create mode 100644 node_modules/resolve/test/symlinks.js create mode 100644 node_modules/supports-preserve-symlinks-flag/.eslintrc create mode 100644 node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml create mode 100644 node_modules/supports-preserve-symlinks-flag/.nycrc create mode 100644 node_modules/supports-preserve-symlinks-flag/CHANGELOG.md create mode 100644 node_modules/supports-preserve-symlinks-flag/LICENSE create mode 100644 node_modules/supports-preserve-symlinks-flag/README.md create mode 100644 node_modules/supports-preserve-symlinks-flag/browser.js create mode 100644 node_modules/supports-preserve-symlinks-flag/index.js create mode 100644 node_modules/supports-preserve-symlinks-flag/package.json create mode 100644 node_modules/supports-preserve-symlinks-flag/test/index.js create mode 100644 package.json diff --git a/Gemfile b/Gemfile index 655e978..a5b2d26 100644 --- a/Gemfile +++ b/Gemfile @@ -10,10 +10,10 @@ gem "rails", "~> 7.2" gem "sprockets-rails" # Use postgresql as the database for Active Record -gem "pg", "~> 1.1" +gem "pg" # Use the Puma web server [https://github.com/puma/puma] -gem "puma", "~> 5.0" +gem "puma" # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] gem "importmap-rails" @@ -28,7 +28,7 @@ gem "stimulus-rails" gem "jbuilder" # Use Redis adapter to run Action Cable in production -gem "redis", "~> 4.0" +gem "redis" # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] # gem "kredis" @@ -82,4 +82,4 @@ group :development do gem "annotate" end -gem "tailwindcss-rails", "~> 2.0" +gem "tailwindcss-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 385ca7a..59f765a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,8 +72,8 @@ GEM minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) - addressable (2.8.1) - public_suffix (>= 2.0.2, < 6.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) annotate (3.2.0) activerecord (>= 3.2, < 8.0) rake (>= 10.4, < 14.0) @@ -82,9 +82,9 @@ GEM benchmark (0.3.0) bigdecimal (3.1.8) bindex (0.8.1) - bootsnap (1.16.0) + bootsnap (1.18.4) msgpack (~> 1.2) - builder (3.2.4) + builder (3.3.0) byebug (11.1.3) capybara (3.40.0) addressable @@ -95,6 +95,8 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) + childprocess (5.1.0) + logger (~> 1.5) coderay (1.1.3) concurrent-ruby (1.3.4) connection_pool (2.4.1) @@ -103,19 +105,19 @@ GEM activerecord (>= 6.1) railties (>= 6.1) date (3.4.0) - diff-lcs (1.5.0) - docile (1.4.0) + diff-lcs (1.5.1) + docile (1.4.1) drb (2.2.1) - erubi (1.12.0) - factory_bot (6.2.1) + erubi (1.13.0) + factory_bot (6.5.0) activesupport (>= 5.0.0) - factory_bot_rails (6.2.0) - factory_bot (~> 6.2.0) + factory_bot_rails (6.4.4) + factory_bot (~> 6.5) railties (>= 5.0.0) faker (3.5.1) i18n (>= 1.8.11, < 2) - globalid (1.1.0) - activesupport (>= 5.0) + globalid (1.2.1) + activesupport (>= 6.1) i18n (1.14.6) concurrent-ruby (~> 1.0) importmap-rails (2.0.3) @@ -130,11 +132,12 @@ GEM jbuilder (2.13.0) actionview (>= 5.0.0) activesupport (>= 5.0.0) - json (2.6.3) + json (2.7.6) language_server-protocol (3.17.0.3) - launchy (2.5.2) + launchy (3.0.1) addressable (~> 2.8) - lint_roller (1.0.0) + childprocess (~> 5.0) + lint_roller (1.1.0) logger (1.6.1) loofah (2.23.1) crass (~> 1.0.2) @@ -146,20 +149,20 @@ GEM net-smtp marcel (1.0.4) matrix (0.4.2) - method_source (1.0.0) - mini_mime (1.1.2) - minitest (5.18.0) - monetize (1.12.0) + method_source (1.1.0) + mini_mime (1.1.5) + minitest (5.25.1) + monetize (1.13.0) money (~> 6.12) - money (6.16.0) + money (6.19.0) i18n (>= 0.6.4, <= 2) money-rails (1.15.0) activesupport (>= 3.0) monetize (~> 1.9) money (~> 6.13) railties (>= 3.0) - msgpack (1.7.1) - net-http (0.3.2) + msgpack (1.7.3) + net-http (0.4.1) uri net-imap (0.5.0) date @@ -170,7 +173,7 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.5.9) + nio4r (2.7.4) nokogiri (1.16.7-x86_64-darwin) racc (~> 1.4) nokogiri (1.16.7-x86_64-linux) @@ -178,27 +181,28 @@ GEM orderly (0.1.1) capybara (>= 1.1) rspec (>= 2.14) - parallel (1.23.0) - parser (3.2.2.1) + parallel (1.26.3) + parser (3.3.6.0) ast (~> 2.4.1) - pg (1.5.3) + racc + pg (1.5.9) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) pry-byebug (3.10.1) byebug (~> 11.0) pry (>= 0.13, < 0.15) - pry-rails (0.3.9) - pry (>= 0.10.4) + pry-rails (0.3.11) + pry (>= 0.13.0) pry-rescue (1.6.0) interception (>= 0.5) pry (>= 0.12.0) psych (5.1.2) stringio - public_suffix (5.0.1) - puma (5.6.5) + public_suffix (6.0.1) + puma (6.4.3) nio4r (~> 2.0) - racc (1.6.2) + racc (1.8.1) rack (3.1.8) rack-session (2.0.0) rack (>= 3.0.0) @@ -236,50 +240,52 @@ GEM thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.0.6) + rake (13.2.1) rdoc (6.7.0) psych (>= 4.0.0) - redis (4.8.1) - regexp_parser (2.6.2) + redis (5.3.0) + redis-client (>= 0.22.0) + redis-client (0.22.2) + connection_pool + regexp_parser (2.9.2) reline (0.5.10) io-console (~> 0.5) - rexml (3.2.5) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-core (3.12.3) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.2) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.2) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.3) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-rails (6.1.1) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) - rspec-core (~> 3.12) - rspec-expectations (~> 3.12) - rspec-mocks (~> 3.12) - rspec-support (~> 3.12) - rspec-support (3.12.0) - rubocop (1.50.2) + rspec-support (~> 3.13.0) + rspec-rails (7.0.1) + actionpack (>= 7.0) + activesupport (>= 7.0) + railties (>= 7.0) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) + rspec-support (3.13.1) + rubocop (1.66.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + regexp_parser (>= 2.4, < 3.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.28.1) - parser (>= 3.2.1.0) - rubocop-performance (1.16.0) - rubocop (>= 1.7.0, < 2.0) - rubocop-ast (>= 0.4.0) + rubocop-ast (1.34.0) + parser (>= 3.3.1.0) + rubocop-performance (1.22.1) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) securerandom (0.3.1) shoulda-matchers (6.4.0) @@ -288,7 +294,7 @@ GEM docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) sprockets (4.2.1) concurrent-ruby (~> 1.0) @@ -297,33 +303,35 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - standard (1.28.2) + standard (1.41.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.50.2) + rubocop (~> 1.66.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.0.1) - standard-custom (1.0.0) - lint_roller (~> 1.0) - standard-performance (1.0.1) + standard-performance (~> 1.5) + standard-custom (1.0.2) lint_roller (~> 1.0) - rubocop-performance (~> 1.16.0) + rubocop (~> 1.50) + standard-performance (1.5.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.22.0) stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.1.1) - tailwindcss-rails (2.0.29-x86_64-darwin) - railties (>= 6.0.0) - tailwindcss-rails (2.0.29-x86_64-linux) - railties (>= 6.0.0) - thor (1.2.2) + tailwindcss-rails (3.0.0) + railties (>= 7.0.0) + tailwindcss-ruby + tailwindcss-ruby (3.4.14-x86_64-darwin) + tailwindcss-ruby (3.4.14-x86_64-linux) + thor (1.3.2) timeout (0.4.1) turbo-rails (2.0.11) actionpack (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.4.2) - uri (0.12.1) + unicode-display_width (2.6.0) + uri (0.13.1) useragent (0.16.10) web-console (4.2.1) actionview (>= 6.0.0) @@ -335,7 +343,7 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.8) + zeitwerk (2.7.1) PLATFORMS x86_64-darwin-21 @@ -356,20 +364,20 @@ DEPENDENCIES money-rails net-http orderly - pg (~> 1.1) + pg pry-byebug pry-rails pry-rescue - puma (~> 5.0) + puma rails (~> 7.2) - redis (~> 4.0) + redis rspec-rails shoulda-matchers simplecov sprockets-rails standard stimulus-rails - tailwindcss-rails (~> 2.0) + tailwindcss-rails turbo-rails tzinfo-data web-console diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index 3f7b012..5f1aa07 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -4,7 +4,7 @@ @layer components { .btn-primary { - @apply rounded-lg px-4 bg-purple-800 inline-block font-medium text-white; + @apply rounded-lg px-4 bg-primary-purple inline-block font-medium text-white; } .btn-danger { @@ -41,6 +41,32 @@ border-radius: 0.5rem; color: #2b2b2b; } + + .active-toolbar-tab { + background-color: white; + display: inline-block; + padding: 16px; + color: #5521B5; + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; + } + + .inactive-toolbar-tab { + display: inline-block; + padding: 16px; + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; + } + + .inactive-toolbar-tab:hover { + color: rgb(75 85 99); + background-color: rgb(249 250 251); + } + + input[type="radio"].radio-button:checked { + background-color:#5521B5; + border:1px solid black; + } } diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 189a80d..295b4ff 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -4,6 +4,10 @@ class DashboardController < ApplicationController def index build_dashboard_variables! + respond_to do |format| + format.turbo_stream + format.html + end end def switch_taxable_income diff --git a/app/controllers/federal_tax_brackets_controller.rb b/app/controllers/federal_tax_brackets_controller.rb index 88426d5..013b796 100644 --- a/app/controllers/federal_tax_brackets_controller.rb +++ b/app/controllers/federal_tax_brackets_controller.rb @@ -4,6 +4,10 @@ class FederalTaxBracketsController < ApplicationController # GET /federal_tax_brackets or /federal_tax_brackets.json def index @federal_tax_brackets = FederalTaxBracket.order_by_range + respond_to do |format| + format.turbo_stream + format.html + end end # GET /federal_tax_brackets/1 or /federal_tax_brackets/1.json diff --git a/app/javascript/application.js b/app/javascript/application.js index 0d7b494..28313b0 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -1,3 +1,4 @@ // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails import "@hotwired/turbo-rails" import "controllers" +import 'flowbite'; diff --git a/app/models/federal_tax_bracket.rb b/app/models/federal_tax_bracket.rb index efb3fa7..3da6fde 100644 --- a/app/models/federal_tax_bracket.rb +++ b/app/models/federal_tax_bracket.rb @@ -31,7 +31,7 @@ class FederalTaxBracket < ApplicationRecord monetize :cumulative_cents def self.order_by_range - all.order(:bottom_range_cents) + all.order(:federal_tax_table_type_id, :bottom_range_cents) end def update_rate(rate:) diff --git a/app/views/components/_toolbar.html.erb b/app/views/components/_toolbar.html.erb index c28240c..c0d842d 100644 --- a/app/views/components/_toolbar.html.erb +++ b/app/views/components/_toolbar.html.erb @@ -1,17 +1,19 @@ - +<%= turbo_frame_tag "dashboard_toolbar" do %> + +<% end %> diff --git a/app/views/dashboard/_index.html.erb b/app/views/dashboard/_index.html.erb index 0a3998f..1385eff 100644 --- a/app/views/dashboard/_index.html.erb +++ b/app/views/dashboard/_index.html.erb @@ -1,11 +1,5 @@ <%= turbo_frame_tag "primary_frame" do %>
-
-
- <%= render partial: "components/toolbar" %> -
-
-
@@ -43,7 +37,7 @@
<% FederalTaxTableType.all.each do |table| %>
- <%= form.radio_button :federal_tax_table_type_id, table.id, checked: table.id == @federal_tax_table_type_id, onchange: "this.form.requestSubmit()" %> + <%= form.radio_button :federal_tax_table_type_id, table.id, checked: table.id == @federal_tax_table_type_id, onchange: "this.form.requestSubmit()", class: "radio-button" %> <%= form.label :federal_tax_table_type_id, table.filing_status.humanize.capitalize %>
<% end %> @@ -95,5 +89,5 @@ <%= render partial: "shared/total_costs", locals: { total_cost: @total_cost } %>
-
-<% end %> + <% end %> +
diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 5ff9740..a2a1e0c 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -1 +1,2 @@ +<%= render partial: "components/toolbar", locals: { active_tab: :budget_calculator } %> <%= render partial: "dashboard/index" %> diff --git a/app/views/dashboard/index.turbo_stream.erb b/app/views/dashboard/index.turbo_stream.erb new file mode 100644 index 0000000..5a27425 --- /dev/null +++ b/app/views/dashboard/index.turbo_stream.erb @@ -0,0 +1,2 @@ +<%= turbo_stream.replace "primary_frame", partial: "dashboard/index" %> +<%= turbo_stream.replace "dashboard_toolbar", partial: "components/toolbar", locals: { active_tab: :budget_calculator } %> \ No newline at end of file diff --git a/app/views/federal_tax_brackets/_federal_tax_bracket.html.erb b/app/views/federal_tax_brackets/_federal_tax_bracket.html.erb index 64728b6..6c00782 100644 --- a/app/views/federal_tax_brackets/_federal_tax_bracket.html.erb +++ b/app/views/federal_tax_brackets/_federal_tax_bracket.html.erb @@ -1,9 +1,9 @@ <%= turbo_frame_tag dom_id(federal_tax_bracket) do %> -
- <% attributes = federal_tax_bracket.tier, humanized_money_with_symbol(federal_tax_bracket.bottom_range), humanized_money_with_symbol(federal_tax_bracket.top_range), number_to_percentage(federal_tax_bracket.rate * 100, precision: 1), humanized_money_with_symbol(federal_tax_bracket.cumulative) %> +
+ <% attributes = federal_tax_bracket.federal_tax_table_type.filing_status.humanize.capitalize, federal_tax_bracket.tier, humanized_money_with_symbol(federal_tax_bracket.bottom_range), humanized_money_with_symbol(federal_tax_bracket.top_range), number_to_percentage(federal_tax_bracket.rate * 100, precision: 1), humanized_money_with_symbol(federal_tax_bracket.cumulative) %> <% attributes.each do |attribute| %> -
<%= attribute %>
+
<%= attribute %>
<% end %> -
<%= link_to 'Edit', edit_federal_tax_bracket_path(federal_tax_bracket), class: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %>
+
<%= link_to 'Edit', edit_federal_tax_bracket_path(federal_tax_bracket), class: "btn btn-primary" %>
<% end %> diff --git a/app/views/federal_tax_brackets/_index.html.erb b/app/views/federal_tax_brackets/_index.html.erb index f8c8f13..b133a60 100644 --- a/app/views/federal_tax_brackets/_index.html.erb +++ b/app/views/federal_tax_brackets/_index.html.erb @@ -1,9 +1,30 @@ -
- <% tax_headings = %w[Tier From To Rate Cumulative] %> - <% tax_headings.each do |tax_heading| %> -
<%= tax_heading %>
+<%= turbo_frame_tag "primary_frame" do %> + <%= turbo_frame_tag :federal_tax_brackets do %> +
+
+
+
+

Federal Tax Brackets

+ <%= link_to 'New federal tax bracket', new_federal_tax_bracket_path, class: "rounded-lg p-2 bg-primary-purple inline-block font-medium text-white" %> +
+
+
+ +
+
+
+ <% tax_headings = ["Filing Status", "Tier", "From", "To", "Rate", "Cumulative"] %> + <% tax_headings.each do |tax_heading| %> +
+ <%= tax_heading %> +
+ <% end %> +
+
+ + <%= render @federal_tax_brackets %> +
+
+
<% end %> -
-<%= turbo_frame_tag :federal_tax_brackets do %> - <%= render @federal_tax_brackets %> <% end %> diff --git a/app/views/federal_tax_brackets/index.html.erb b/app/views/federal_tax_brackets/index.html.erb index e968b14..8c292dc 100644 --- a/app/views/federal_tax_brackets/index.html.erb +++ b/app/views/federal_tax_brackets/index.html.erb @@ -3,12 +3,5 @@

<%= notice %>

<% end %> -
-

Federal Tax Brackets

- <%= link_to 'New federal tax bracket', new_federal_tax_bracket_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %> -
- -
- <%= render "federal_tax_brackets/index" %> -
+ <%= render partial: "federal_tax_brackets/index" %>
diff --git a/app/views/federal_tax_brackets/index.turbo_stream.erb b/app/views/federal_tax_brackets/index.turbo_stream.erb new file mode 100644 index 0000000..821b797 --- /dev/null +++ b/app/views/federal_tax_brackets/index.turbo_stream.erb @@ -0,0 +1,2 @@ +<%= turbo_stream.replace "primary_frame", partial: "federal_tax_brackets/index" %> +<%= turbo_stream.replace "dashboard_toolbar", partial: "components/toolbar", locals: { active_tab: :federal_tax_brackets } %> \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 5823923..91033a0 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -9,6 +9,7 @@ <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> <%= javascript_importmap_tags %> + diff --git a/config/importmap.rb b/config/importmap.rb index 8dce42d..998d2fd 100644 --- a/config/importmap.rb +++ b/config/importmap.rb @@ -5,3 +5,4 @@ pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true pin_all_from "app/javascript/controllers", under: "controllers" +pin "flowbite", to: "https://cdn.jsdelivr.net/npm/flowbite@2.5.2/dist/flowbite.turbo.min.js" diff --git a/config/tailwind.config.js b/config/tailwind.config.js index 39364de..c598649 100644 --- a/config/tailwind.config.js +++ b/config/tailwind.config.js @@ -12,6 +12,9 @@ module.exports = { fontFamily: { sans: ['Inter var', ...defaultTheme.fontFamily.sans], }, + colors:{ + 'primary-purple': '#5521B5', + } }, }, plugins: [ @@ -19,5 +22,6 @@ module.exports = { require('@tailwindcss/aspect-ratio'), require('@tailwindcss/typography'), require('@tailwindcss/container-queries'), + require('flowbite/plugin') ] } diff --git a/node_modules/.bin/mini-svg-data-uri b/node_modules/.bin/mini-svg-data-uri new file mode 120000 index 0000000..20b061f --- /dev/null +++ b/node_modules/.bin/mini-svg-data-uri @@ -0,0 +1 @@ +../mini-svg-data-uri/cli.js \ No newline at end of file diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve new file mode 120000 index 0000000..b6afda6 --- /dev/null +++ b/node_modules/.bin/resolve @@ -0,0 +1 @@ +../resolve/bin/resolve \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..02761ca --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,191 @@ +{ + "name": "finance", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz", + "integrity": "sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", + "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/flowbite": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/flowbite/-/flowbite-2.5.2.tgz", + "integrity": "sha512-kwFD3n8/YW4EG8GlY3Od9IoKND97kitO+/ejISHSqpn3vw2i5K/+ZI8Jm2V+KC4fGdnfi0XZ+TzYqQb4Q1LshA==", + "dependencies": { + "@popperjs/core": "^2.9.3", + "flowbite-datepicker": "^1.3.0", + "mini-svg-data-uri": "^1.4.3" + } + }, + "node_modules/flowbite-datepicker": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flowbite-datepicker/-/flowbite-datepicker-1.3.0.tgz", + "integrity": "sha512-CLVqzuoE2vkUvWYK/lJ6GzT0be5dlTbH3uuhVwyB67+PjqJWABm2wv68xhBf5BqjpBxvTSQ3mrmLHpPJ2tvrSQ==", + "dependencies": { + "@rollup/plugin-node-resolve": "^15.2.3", + "flowbite": "^2.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==" + }, + "node_modules/mini-svg-data-uri": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", + "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", + "bin": { + "mini-svg-data-uri": "cli.js" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + } + } +} diff --git a/node_modules/@popperjs/core/LICENSE.md b/node_modules/@popperjs/core/LICENSE.md new file mode 100644 index 0000000..0370c45 --- /dev/null +++ b/node_modules/@popperjs/core/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2019 Federico Zivolo + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@popperjs/core/README.md b/node_modules/@popperjs/core/README.md new file mode 100644 index 0000000..53be7b9 --- /dev/null +++ b/node_modules/@popperjs/core/README.md @@ -0,0 +1,376 @@ + +

+ Popper +

+ +
+

Tooltip & Popover Positioning Engine

+
+ +

+ + npm version + + + npm downloads per month (popper.js + @popperjs/core) + + + Rolling Versions + +

+ +
+ + +**Positioning tooltips and popovers is difficult. Popper is here to help!** + +Given an element, such as a button, and a tooltip element describing it, Popper +will automatically put the tooltip in the right place near the button. + +It will position _any_ UI element that "pops out" from the flow of your document +and floats near a target element. The most common example is a tooltip, but it +also includes popovers, drop-downs, and more. All of these can be generically +described as a "popper" element. + +## Demo + +[![Popper visualized](https://i.imgur.com/F7qWsmV.jpg)](https://popper.js.org) + +## Docs + +- [v2.x (latest)](https://popper.js.org/docs/v2/) +- [v1.x](https://popper.js.org/docs/v1/) + +We've created a +[Migration Guide](https://popper.js.org/docs/v2/migration-guide/) to help you +migrate from Popper 1 to Popper 2. + +To contribute to the Popper website and documentation, please visit the +[dedicated repository](https://github.com/popperjs/website). + +## Why not use pure CSS? + +- **Clipping and overflow issues**: Pure CSS poppers will not be prevented from + overflowing clipping boundaries, such as the viewport. It will get partially + cut off or overflows if it's near the edge since there is no dynamic + positioning logic. When using Popper, your popper will always be positioned in + the right place without needing manual adjustments. +- **No flipping**: CSS poppers will not flip to a different placement to fit + better in view if necessary. While you can manually adjust for the main axis + overflow, this feature cannot be achieved via CSS alone. Popper automatically + flips the tooltip to make it fit in view as best as possible for the user. +- **No virtual positioning**: CSS poppers cannot follow the mouse cursor or be + used as a context menu. Popper allows you to position your tooltip relative to + any coordinates you desire. +- **Slower development cycle**: When pure CSS is used to position popper + elements, the lack of dynamic positioning means they must be carefully placed + to consider overflow on all screen sizes. In reusable component libraries, + this means a developer can't just add the component anywhere on the page, + because these issues need to be considered and adjusted for every time. With + Popper, you can place your elements anywhere and they will be positioned + correctly, without needing to consider different screen sizes, layouts, etc. + This massively speeds up development time because this work is automatically + offloaded to Popper. +- **Lack of extensibility**: CSS poppers cannot be easily extended to fit any + arbitrary use case you may need to adjust for. Popper is built with + extensibility in mind. + +## Why Popper? + +With the CSS drawbacks out of the way, we now move on to Popper in the +JavaScript space itself. + +Naive JavaScript tooltip implementations usually have the following problems: + +- **Scrolling containers**: They don't ensure the tooltip stays with the + reference element while scrolling when inside any number of scrolling + containers. +- **DOM context**: They often require the tooltip move outside of its original + DOM context because they don't handle `offsetParent` contexts. +- **Compatibility**: Popper handles an incredible number of edge cases regarding + different browsers and environments (mobile viewports, RTL, scrollbars enabled + or disabled, etc.). Popper is a popular and well-maintained library, so you + can be confident positioning will work for your users on any device. +- **Configurability**: They often lack advanced configurability to suit any + possible use case. +- **Size**: They are usually relatively large in size, or require an ancient + jQuery dependency. +- **Performance**: They often have runtime performance issues and update the + tooltip position too slowly. + +**Popper solves all of these key problems in an elegant, performant manner.** It +is a lightweight ~3 kB library that aims to provide a reliable and extensible +positioning engine you can use to ensure all your popper elements are positioned +in the right place. + +When you start writing your own popper implementation, you'll quickly run into +all of the problems mentioned above. These widgets are incredibly common in our +UIs; we've done the hard work figuring this out so you don't need to spend hours +fixing and handling numerous edge cases that we already ran into while building +the library! + +Popper is used in popular libraries like Bootstrap, Foundation, Material UI, and +more. It's likely you've already used popper elements on the web positioned by +Popper at some point in the past few years. + +Since we write UIs using powerful abstraction libraries such as React or Angular +nowadays, you'll also be glad to know Popper can fully integrate with them and +be a good citizen together with your other components. Check out `react-popper` +for the official Popper wrapper for React. + +## Installation + +### 1. Package Manager + +```bash +# With npm +npm i @popperjs/core + +# With Yarn +yarn add @popperjs/core +``` + +### 2. CDN + +```html + + + + + +``` + +### 3. Direct Download? + +Managing dependencies by "directly downloading" them and placing them into your +source code is not recommended for a variety of reasons, including missing out +on feat/fix updates easily. Please use a versioning management system like a CDN +or npm/Yarn. + +## Usage + +The most straightforward way to get started is to import Popper from the `unpkg` +CDN, which includes all of its features. You can call the `Popper.createPopper` +constructor to create new popper instances. + +Here is a complete example: + +```html + +Popper example + + + + + + + + +``` + +Visit the [tutorial](https://popper.js.org/docs/v2/tutorial/) for an example of +how to build your own tooltip from scratch using Popper. + +### Module bundlers + +You can import the `createPopper` constructor from the fully-featured file: + +```js +import { createPopper } from '@popperjs/core'; + +const button = document.querySelector('#button'); +const tooltip = document.querySelector('#tooltip'); + +// Pass the button, the tooltip, and some options, and Popper will do the +// magic positioning for you: +createPopper(button, tooltip, { + placement: 'right', +}); +``` + +All the modifiers listed in the docs menu will be enabled and "just work", so +you don't need to think about setting Popper up. The size of Popper including +all of its features is about 5 kB minzipped, but it may grow a bit in the +future. + +#### Popper Lite (tree-shaking) + +If bundle size is important, you'll want to take advantage of tree-shaking. The +library is built in a modular way to allow to import only the parts you really +need. + +```js +import { createPopperLite as createPopper } from '@popperjs/core'; +``` + +The Lite version includes the most necessary modifiers that will compute the +offsets of the popper, compute and add the positioning styles, and add event +listeners. This is close in bundle size to pure CSS tooltip libraries, and +behaves somewhat similarly. + +However, this does not include the features that makes Popper truly useful. + +The two most useful modifiers not included in Lite are `preventOverflow` and +`flip`: + +```js +import { + createPopperLite as createPopper, + preventOverflow, + flip, +} from '@popperjs/core'; + +const button = document.querySelector('#button'); +const tooltip = document.querySelector('#tooltip'); + +createPopper(button, tooltip, { + modifiers: [preventOverflow, flip], +}); +``` + +As you make more poppers, you may be finding yourself needing other modifiers +provided by the library. + +See [tree-shaking](https://popper.js.org/docs/v2/performance/#tree-shaking) for more +information. + +## Distribution targets + +Popper is distributed in 3 different versions, in 3 different file formats. + +The 3 file formats are: + +- `esm` (works with `import` syntax — **recommended**) +- `umd` (works with ` + + + + \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/demo/live-demo.js b/node_modules/flowbite-datepicker/demo/live-demo.js new file mode 100644 index 0000000..86cdba5 --- /dev/null +++ b/node_modules/flowbite-datepicker/demo/live-demo.js @@ -0,0 +1,469 @@ +/*eslint no-unused-vars: ["error", { "varsIgnorePattern": "initialize|on[A-Z]*" }]*/ +var templates = { + input: `
+
+ +
+
`, + inline: `
`, + range: `
+
+ +
+
+ to +
+
+ +
+
`, +}; +var beforeShowFns = { +beforeShowDay(date) { + if (date.getMonth() == new Date().getMonth()) { + switch (date.getDate()) { + case 4: + return { + content: '4', + classes: 'has-background-info' + }; + case 8: + return false; + case 12: + return "has-text-success"; + } + } +}, +beforeShowMonth(date) { + switch (date.getMonth()) { + case 6: + if (date.getFullYear() === new Date().getFullYear()) { + return {content: '🎉'}; + } + break; + case 8: + return false; + } +}, +beforeShowYear(date) { + switch (date.getFullYear()) { + case 2017: + return false; + case 2020: + return {content: '2020'}; + } +}, +beforeShowDecade(date) { + switch (date.getFullYear()) { + case 2000: + return false; + case 2100: + return { + content: '💯', + classes: 'is-background-success', + }; + } +}, +}; +var buttonClass; + +const today = new Date().setHours(0, 0, 0, 0); +const defaultOptions = { + allowOneSidedRange: false, + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: today, + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '»', + orientation: 'auto', + pickLevel: 0, + prevArrow: '«', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0, +}; +const languages = { + 'ar-tn': 'Arabic-Tunisia', + ar: 'Arabic', + az: 'Azerbaijani', + bg: 'Bulgarian', + bm: 'Bamanankan', + bn: 'Bengali (Bangla)', + br: 'Breton', + bs: 'Bosnian', + ca: 'Catalan', + cs: 'Czech', + cy: 'Welsh', + da: 'Danish', + de: 'German', + el: 'Greek', + 'en-AU': 'Australian English', + 'en-CA': 'Canadian English', + 'en-GB': 'British English', + 'en-IE': 'Irish English', + 'en-NZ': 'New Zealand English', + 'en-ZA': 'South African English', + eo: 'Esperanto', + es: 'Spanish', + et: 'Estonian', + eu: 'Basque', + fa: 'Persian', + fi: 'Finnish', + fo: 'Faroese', + 'fr-CH': 'French (Switzerland)', + fr: 'French', + gl: 'Galician', + he: 'Hebrew', + hi: 'Hindi', + hr: 'Croatian', + hu: 'Hungarian', + hy: 'Armenian', + id: 'Bahasa', + is: 'Icelandic', + 'it-CH': 'Italian (Switzerland)', + it: 'Italian', + ja: 'Japanese', + ka: 'Georgian', + kk: 'Kazakh', + km: 'Khmer', + ko: 'Korean', + lt: 'Lithuanian', + lv: 'Latvian', + me: 'Montenegrin', + mk: 'Macedonian', + mn: 'Mongolian', + mr: 'Marathi', + ms: 'Malay', + 'nl-BE': 'Belgium-Dutch', + nl: 'Dutch', + no: 'Norwegian', + oc: 'Occitan', + pl: 'Polish', + 'pt-BR': 'Brazilian', + pt: 'Portuguese', + ro: 'Romanian', + ru: 'Russian', + si: 'Sinhala', + sk: 'Slovak', + sl: 'Slovene', + sq: 'Albanian', + 'sr-latn': 'Serbian latin', + sr: 'Serbian cyrillic', + sv: 'Swedish', + sw: 'Swahili', + ta: 'Tamil', + tg: 'Tajik', + th: 'Thai', + tk: 'Turkmen', + tr: 'Turkish', + uk: 'Ukrainian', + 'uz-cyrl': 'Uzbek cyrillic', + 'uz-latn': 'Uzbek latin', + vi: 'Vietnamese', + 'zh-CN': 'Simplified Chinese', + 'zh-TW': 'Traditional Chinese', +}; +const range = document.createRange(); +const sandbox = document.getElementById('sandbox'); +const options = document.getElementById('options'); +const jsonFields = ['datesDisabled']; + +function parseHTML(html) { + return range.createContextualFragment(html); +} + +function getBeforeShowFnSrc(name) { + return beforeShowFns[name].toString(); +} + +function switchPicker(type) { + const options = buttonClass ? {buttonClass} : {}; + if (window.demoPicker) { + const currentOpts = window.demoPicker instanceof DateRangePicker + ? window.demoPicker.datepickers[0]._options + : window.demoPicker._options; + Object.keys(defaultOptions).reduce((opts, key) => { + if (key in currentOpts && String(currentOpts[key] !== String(defaultOptions[key]))) { + opts[key] = currentOpts[key]; + } + return opts; + }, options); + + window.demoPicker.destroy(); + sandbox.removeChild(sandbox.firstChild); + } + sandbox.appendChild(parseHTML(templates[type])); + + const el = sandbox.querySelector('.date'); + window.demoPicker = type === 'range' + ? new DateRangePicker(el, options) + : new Datepicker(el, options); +} + +const setOptions = function setOptions(name, value) { + window.demoPicker.setOptions({[name]: value}); + refreshOptionForm(); +}; +const refreshOptionForm = function refreshOptionForm() { + const demoPicker = window.demoPicker; + const rangePicker = demoPicker instanceof DateRangePicker; + const datepicker = rangePicker ? demoPicker.datepickers[0] : demoPicker; + const optsForm = document.getElementById('options'); + const {config, _options} = datepicker; + const configDefaults = { + minDate: new Date(today).setFullYear(0, 0, 1), + maxDate: undefined, + }; + const formElemByName = name => optsForm.querySelector(`[name="${name}"]`); + const formatDate = val => Datepicker.formatDate(val, config.format, config.lang); + + if (!rangePicker) { + const allowOneSided = formElemByName('allowOneSidedRange'); + if (allowOneSided.checked) { + allowOneSided.checked = false; + } + } + Object.entries(datepicker.config).forEach(entry => { + const [key, val] = entry; + let el; + switch (key) { + case 'format': + case 'weekStart': + el = formElemByName(key); + if (el.value || val !== defaultOptions[key]) { + el.value = val; + } + break; + case 'minDate': + case 'maxDate': + el = formElemByName(key); + if (val === configDefaults[key]) { + if (!el.value || el.value === 'null') { + break; + } + if (_options[key] === null) { + el.value = ''; + break; + } + } + el.value = formatDate(val); + break; + case 'datesDisabled': + el = formElemByName(key); + if (val.length === 0) { + if (!el.value || el.value === '[]') { + break; + } + if (String(_options.datesDisabled) === '[]') { + el.value = ''; + break; + } + } + el.value = JSON.stringify(val.map(item => formatDate(item))); + break; + case 'daysOfWeekDisabled': + case 'daysOfWeekHighlighted': + optsForm.querySelectorAll(`[name=${key}`).forEach(chkbox => { + chkbox.checked = val.includes(Number.parseInt(chkbox.value, 10)); + }); + break; + case 'defaultViewDate': + el = formElemByName(key); + if (val === defaultOptions[key]) { + if (!el.value || el.value === 'today') { + break; + } + if (_options[key] === 'today') { + el.value = ''; + break; + } + } + el.value = formatDate(val); + break; + case 'maxView': + case 'pickLevel': + case 'startView': + formElemByName(key).value = val; + break; + case 'maxNumberOfDates': + el = formElemByName(key); + if (rangePicker) { + if (el.value) { + el.value = ''; + } + break; + } + if (el.value || val !== defaultOptions[key]) { + el.value = val; + } + break; + } + }); +}; +const handleArrayOption = function handleArrayOption(name) { + const checkedInputs = options.querySelectorAll(`input[name=${name}]:checked`); + setOptions(name, Array.from(checkedInputs).map(el => Number(el.value))); +}; + +function updateOption(name, value) { + switch (name) { + case 'beforeShowDay': + case 'beforeShowMonth': + case 'beforeShowYear': + case 'beforeShowDecade': + setOptions(name, value ? beforeShowFns[name] : null); + return; + case 'daysOfWeekDisabled': + case 'daysOfWeekHighlighted': + handleArrayOption(name, value); + return; + } + + let newValue; + if (typeof value === 'string') { + switch (value) { + case '': + newValue = defaultOptions[name]; + break; + case 'null': + newValue = null; + break; + case 'false': + newValue = false; + break; + case 'true': + newValue = true; + break; + default: + newValue = Number(value); + if (isNaN(newValue)) { + newValue = value; + } + } + } else { + newValue = value; + } + setOptions(name, newValue); +} + +function addError(el, message) { + const field = el.parentElement.parentElement; + field.appendChild(parseHTML(`

${message}

`)); + el.classList.add('is-danger'); +} + +function removeErrors(el) { + const field = el.parentElement.parentElement; + field.querySelectorAll('.help.is-danger').forEach((errMsg) => { + field.removeChild(errMsg); + }); + el.classList.remove('is-danger'); +} + +function onChangeType(ev) { + switchPicker(ev.target.value); + refreshOptionForm(); +} + +function onChnageDirection(ev) { + const defaultDir = window.getComputedStyle(document.body).direction; + const dir = ev.target.value; + const mainElem = document.querySelector('main'); + + if (dir !== defaultDir) { + mainElem.dir = dir; + } else { + mainElem.removeAttribute('dir'); + } +} + +function onChangeInputOption(ev) { + updateOption(ev.target.name, ev.target.value); +} + +function onChangeTextareaOption(ev) { + let {value, name} = ev.target; + if (jsonFields.includes(name)) { + removeErrors(ev.target); + if (value.length > 0) { + try { + value = JSON.parse(value); + } catch (err) { + addError(ev.target, 'Invalid JSON string'); + return; + } + } + } + if (name === 'datesDisabled') { + if (value && !Array.isArray(value)) { + addError(ev.target, 'This option must be an array'); + return; + } + } + updateOption(name, value); +} + +function onClickCheckboxOptions(ev) { + ev.stopPropagation(); + + let checkbox; + let checked; + if (ev.target.tagName === 'INPUT') { + checkbox = ev.target; + checked = checkbox.checked; + } else { + ev.preventDefault(); + checkbox = ev.currentTarget.querySelector('input'); + checked = checkbox.checked = !checkbox.checked; + } + + const value = checkbox.value === 'true' ? checked : checkbox.value; + updateOption(checkbox.name, value); +} + +function initialize() { + // load languages + const selectElem = options.querySelector('select[name=language]'); + Object.keys(languages).forEach((lang) => { + document.body.appendChild(parseHTML(``)); + selectElem.appendChild(parseHTML(``)); + }); + + document.querySelector('.toggle-btn').addEventListener('click', () => { + document.body.classList.toggle('open'); + }); + + document.querySelectorAll('.code-wrap pre').forEach((el) => { + el.textContent = getBeforeShowFnSrc(el.id.replace('code-', '')); + }); + + // collapsibles + document.querySelectorAll('.collapse-button').forEach((el) => { + el.addEventListener('click', () => { + const target = document.getElementById(el.dataset.target); + el.classList.toggle('is-active'); + target.classList.toggle('is-active'); + }); + }); +} diff --git a/node_modules/flowbite-datepicker/dist/DateRangePicker.cjs.js b/node_modules/flowbite-datepicker/dist/DateRangePicker.cjs.js new file mode 100644 index 0000000..e520c36 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/DateRangePicker.cjs.js @@ -0,0 +1,2993 @@ +'use strict'; + +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; +} +function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); +} +function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); +} +function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); + } +} +function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; +} +function _get() { + return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { + var p = _superPropBase(e, t); + if (p) { + var n = Object.getOwnPropertyDescriptor(p, t); + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; + } + }, _get.apply(null, arguments); +} +function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, _getPrototypeOf(t); +} +function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), Object.defineProperty(t, "prototype", { + writable: !1 + }), e && _setPrototypeOf(t, e); +} +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function () { + return !!t; + })(); +} +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _possibleConstructorReturn(t, e) { + if (e && ("object" == typeof e || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t); +} +function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { + return t.__proto__ = e, t; + }, _setPrototypeOf(t, e); +} +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); +} +function _superPropBase(t, o) { + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); + return t; +} +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; +} +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } +} + +var listenerRegistry = new WeakMap(); +var _EventTarget$prototyp = EventTarget.prototype, + addEventListener = _EventTarget$prototyp.addEventListener, + removeEventListener = _EventTarget$prototyp.removeEventListener; + +// Register event listeners to a key object +// listeners: array of listener definitions; +// - each definition must be a flat array of event target and the arguments +// used to call addEventListener() on the target +function registerListeners(keyObj, listeners) { + var registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach(function (listener) { + addEventListener.call.apply(addEventListener, _toConsumableArray(listener)); + registered.push(listener); + }); +} +function unregisterListeners(keyObj) { + var listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach(function (listener) { + removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener)); + }); + listenerRegistry["delete"](keyObj); +} + +// Event.composedPath() polyfill for Edge +// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec +if (!Event.prototype.composedPath) { + var getComposedPath = function getComposedPath(node) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + path.push(node); + var parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { + // ShadowRoot + parent = node.host; + } else if (node.defaultView) { + // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; +} +function findFromPath(path, criteria, currentTarget) { + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); +} + +// Search for the actual target of a delegated event +function findElementInEventPath(ev, selector) { + var criteria = typeof selector === 'function' ? selector : function (el) { + return el.matches(selector); + }; + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); +} + +function stripTime(timeValue) { + return new Date(timeValue).setHours(0, 0, 0, 0); +} +function today() { + return new Date().setHours(0, 0, 0, 0); +} + +// Get the time value of the start of given date or year, month and day +function dateValue() { + switch (arguments.length) { + case 0: + return today(); + case 1: + return stripTime(arguments.length <= 0 ? undefined : arguments[0]); + } + + // use setFullYear() to keep 2-digit year from being mapped to 1900-1999 + var newDate = new Date(0); + newDate.setFullYear.apply(newDate, arguments); + return newDate.setHours(0, 0, 0, 0); +} +function addDays(date, amount) { + var newDate = new Date(date); + return newDate.setDate(newDate.getDate() + amount); +} +function addWeeks(date, amount) { + return addDays(date, amount * 7); +} +function addMonths(date, amount) { + // If the day of the date is not in the new month, the last day of the new + // month will be returned. e.g. Jan 31 + 1 month → Feb 28 (not Mar 03) + var newDate = new Date(date); + var monthsToSet = newDate.getMonth() + amount; + var expectedMonth = monthsToSet % 12; + if (expectedMonth < 0) { + expectedMonth += 12; + } + var time = newDate.setMonth(monthsToSet); + return newDate.getMonth() !== expectedMonth ? newDate.setDate(0) : time; +} +function addYears(date, amount) { + // If the date is Feb 29 and the new year is not a leap year, Feb 28 of the + // new year will be returned. + var newDate = new Date(date); + var expectedMonth = newDate.getMonth(); + var time = newDate.setFullYear(newDate.getFullYear() + amount); + return expectedMonth === 1 && newDate.getMonth() === 2 ? newDate.setDate(0) : time; +} + +// Calculate the distance bettwen 2 days of the week +function dayDiff(day, from) { + return (day - from + 7) % 7; +} + +// Get the date of the specified day of the week of given base date +function dayOfTheWeekOf(baseDate, dayOfWeek) { + var weekStart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); +} + +// Get the ISO week of a date +function getWeek(date) { + // start of ISO week is Monday + var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; +} + +// Get the start year of the period of years that includes given date +// years: length of the year period +function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + var year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; +} + +function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +function lastItemOf(arr) { + return arr[arr.length - 1]; +} + +// push only the items not included in the array +function pushUnique(arr) { + for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + items[_key - 1] = arguments[_key]; + } + items.forEach(function (item) { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; +} +function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; +} +function isInRange(testVal, min, max) { + var minOK = min === undefined || testVal >= min; + var maxOK = max === undefined || testVal <= max; + return minOK && maxOK; +} +function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +} +function createTagRepeat(tagName, repeat) { + var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ''; + var openTagSrc = Object.keys(attributes).reduce(function (src, attr) { + var val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return "".concat(src, " ").concat(attr, "=\"").concat(val, "\""); + }, tagName); + html += "<".concat(openTagSrc, ">"); + var next = index + 1; + return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html; +} + +// Remove the spacing surrounding tags for HTML parser not to create text nodes +// before/after elements +function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); +} +function padZero(num, length) { + return num.toString().padStart(length, '0'); +} +function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + var separators = format.split(reFormatTokens); + var parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + var partFormatters = parts.map(function (token) { + return formatFns[token]; + }); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) { + var token = parts.find(function (part) { + return part[0] !== 'D' && part[0].toLowerCase() === key; + }); + if (token) { + keys.push(key); + } + return keys; + }, []); + return knownFormats[format] = { + parser: function parser(dateStr, locale) { + var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) { + if (part.length > 0 && parts[index]) { + var token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce(function (origDate, key) { + var newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, today()); + }, + formatter: function formatter(date, locale) { + var dateStr = partFormatters.reduce(function (str, fn, index) { + return str += "".concat(separators[index]).concat(fn(date, locale)); + }, ''); + // separators' length is always parts' length + 1, + return dateStr += lastItemOf(separators); + } + }; +} +function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + var date = stripTime(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return today(); + } + if (format && format.toValue) { + var _date = format.toValue(dateStr, format, locale); + return isNaN(_date) ? undefined : stripTime(_date); + } + return parseFormatString(format).parser(dateStr, locale); +} +function formatDate(date, format, locale) { + if (isNaN(date) || !date && date !== 0) { + return ''; + } + var dateObj = typeof date === 'number' ? new Date(date) : date; + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + return parseFormatString(format).formatter(dateObj, locale); +} + +// default locales +var locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } +}; + +// config options updatable by setOptions() and their default values +var defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, + // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0 +}; + +var range = document.createRange(); +function parseHTML(html) { + return range.createContextualFragment(html); +} +function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; +} +function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } +} +function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } +} +function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach(function (node) { + el.appendChild(node); + }); + } +} + +var defaultLang = defaultOptions.language, + defaultFormat = defaultOptions.format, + defaultWeekStart = defaultOptions.weekStart; + +// Reducer function to filter out invalid day-of-week from the input +function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow; +} +function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; +} + +// validate input date. if invalid, fallback to the original value +function validateDate(value, format, locale, origValue) { + var date = parseDate(value, format, locale); + return date !== undefined ? date : origValue; +} + +// Validate viewId. if invalid, fallback to the original value +function validateViewId(value, origValue) { + var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; + var viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; +} + +// Create Datepicker configuration to set +function processOptions(options, datepicker) { + var inOpts = Object.assign({}, options); + var config = {}; + var locales = datepicker.constructor.locales; + var _ref = datepicker.config || {}, + format = _ref.format, + language = _ref.language, + locale = _ref.locale, + maxDate = _ref.maxDate, + maxView = _ref.maxView, + minDate = _ref.minDate, + pickLevel = _ref.pickLevel, + startView = _ref.startView, + weekStart = _ref.weekStart; + if (inOpts.language) { + var lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + var origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + if (inOpts.format) { + var hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + var hasToValue = typeof inOpts.format.toValue === 'function'; + var validFormatString = reFormatTokens.test(inOpts.format); + if (hasToDisplay && hasToValue || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + var minDt = minDate; + var maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) { + var date = parseDate(dt, format, locale); + return date !== undefined ? pushUnique(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + var viewDate = parseDate(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + var wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + var newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + var newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + var newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + var prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + var nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + var orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(function (x) { + return x === 'left' || x === 'right'; + }) || 'auto', + y: orientation.find(function (y) { + return y === 'top' || y === 'bottom'; + }) || 'auto' + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch (inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach(function (key) { + if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + return config; +} + +var pickerTemplate = optimizeTemplateHTML("
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
"); + +var daysTemplate = optimizeTemplateHTML("
\n
".concat(createTagRepeat('span', 7, { + "class": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
").concat(createTagRepeat('span', 42, { + "class": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400' +}), "
\n
")); + +var calendarWeeksTemplate = optimizeTemplateHTML("
\n
\n
".concat(createTagRepeat('span', 6, { + "class": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
")); + +// Base class of the view classes +var View = /*#__PURE__*/function () { + function View(picker, config) { + _classCallCheck(this, View); + Object.assign(this, config, { + picker: picker, + element: parseHTML("
").firstChild, + selected: [] + }); + this.init(this.picker.datepicker.config); + } + return _createClass(View, [{ + key: "init", + value: function init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + }, { + key: "performBeforeHook", + value: function performBeforeHook(el, current, timeValue) { + var result = this.beforeShow(new Date(timeValue)); + switch (_typeof(result)) { + case 'boolean': + result = { + enabled: result + }; + break; + case 'string': + result = { + classes: result + }; + } + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + var _el$classList; + var extraClasses = result.classes.split(/\s+/); + (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses)); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } + }]); +}(); + +var DaysView = /*#__PURE__*/function (_View) { + function DaysView(picker) { + _classCallCheck(this, DaysView); + return _callSuper(this, DaysView, [picker, { + id: 0, + name: 'days', + cellClass: 'day' + }]); + } + _inherits(DaysView, _View); + return _createClass(DaysView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + var inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + _get(_getPrototypeOf(DaysView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + var _this = this; + var updateDOW; + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + var locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined; + } + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + var weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach(function (el, index) { + var dow = (_this.weekStart + index) % 7; + el.textContent = _this.dayNames[dow]; + el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var viewYear = viewDate.getFullYear(); + var viewMonth = viewDate.getMonth(); + var firstOfMonth = dateValue(viewYear, viewMonth, 1); + var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = _toConsumableArray(this.datesDisabled); + var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + var startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = addDays(_this2.start, index); + var date = new Date(current); + var day = date.getDay(); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + el.dataset.date = current; + el.textContent = date.getDate(); + if (current < _this2.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > _this2.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (_this2.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (_this2.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(_this2.disabled, current); + } + if (_this2.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.dataset.date); + var classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg'); + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + var _range = _slicedToArray(range, 2), + _range$ = _slicedToArray(_range[0], 2), + startY = _range$[0], + startM = _range$[1], + _range$2 = _slicedToArray(_range[1], 2), + endY = _range$2[0], + endM = _range$2[1]; + if (startY > thisYear || endY < thisYear) { + return; + } + return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12]; +} +var MonthsView = /*#__PURE__*/function (_View) { + function MonthsView(picker) { + _classCallCheck(this, MonthsView); + return _callSuper(this, MonthsView, [picker, { + id: 1, + name: 'months', + cellClass: 'month' + }]); + } + _inherits(MonthsView, _View); + return _createClass(MonthsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, { + 'data-month': function dataMonth(ix) { + return ix; + } + }))); + } + _get(_getPrototypeOf(MonthsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + var minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + var maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (selected, timeValue) { + var date = new Date(timeValue); + var year = date.getFullYear(); + var month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + var date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this = this; + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + var selected = this.selected[this.year] || []; + var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + var isMinYear = this.year === this.minYear; + var isMaxYear = this.year === this.maxYear; + var range = computeMonthRange(this.range, this.year); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var date = dateValue(_this.year, index, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this.cellClass); + if (_this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = _this.monthNames[index]; + if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) { + classList.add('disabled'); + } + if (range) { + var _range2 = _slicedToArray(range, 2), + rangeStart = _range2[0], + rangeEnd = _range2[1]; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this.focused) { + classList.add('focused'); + } + if (_this.beforeShow) { + _this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this2 = this; + var selected = this.selected[this.year] || []; + var _ref = computeMonthRange(this.range, this.year) || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this2.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } + }]); +}(View); + +function toTitleCase(word) { + return _toConsumableArray(word).reduce(function (str, ch, ix) { + return str += ix ? ch : ch.toUpperCase(); + }, ''); +} + +// Class representing the years and decades view elements +var YearsView = /*#__PURE__*/function (_View) { + function YearsView(picker, config) { + _classCallCheck(this, YearsView); + return _callSuper(this, YearsView, [picker, config]); + } + _inherits(YearsView, _View); + return _createClass(YearsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = "beforeShow".concat(toTitleCase(this.cellClass)); + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + _get(_getPrototypeOf(YearsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + var beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var first = startOfYearPeriod(viewDate, this.navStep); + var last = first + 9 * this.step; + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this = this; + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (years, timeValue) { + return pushUnique(years, startOfYearPeriod(timeValue, _this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, _this.step); + } + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel("".concat(this.first, "-").concat(this.last)); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = _this2.start + index * _this2.step; + var date = dateValue(current, 0, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + if (_this2.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < _this2.minYear || current > _this2.maxYear) { + classList.add('disabled'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.textContent); + var classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function triggerDatepickerEvent(datepicker, type) { + var detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker: datepicker + }; + datepicker.element.dispatchEvent(new CustomEvent(type, { + detail: detail + })); +} + +// direction: -1 (to previous), 1 (to next) +function goToPrevOrNext(datepicker, direction) { + var _datepicker$config = datepicker.config, + minDate = _datepicker$config.minDate, + maxDate = _datepicker$config.maxDate; + var _datepicker$picker = datepicker.picker, + currentView = _datepicker$picker.currentView, + viewDate = _datepicker$picker.viewDate; + var newViewDate; + switch (currentView.id) { + case 0: + newViewDate = addMonths(viewDate, direction); + break; + case 1: + newViewDate = addYears(viewDate, direction); + break; + default: + newViewDate = addYears(viewDate, direction * currentView.navStep); + } + newViewDate = limitToRange(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); +} +function switchView(datepicker) { + var viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); +} +function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({ + autohide: true + }); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } +} + +function goToSelectedMonthOrYear(datepicker, selection) { + var picker = datepicker.picker; + var viewDate = new Date(picker.viewDate); + var viewId = picker.currentView.id; + var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear()); + picker.changeFocus(newDate).changeView(viewId - 1).render(); +} +function onClickTodayBtn(datepicker) { + var picker = datepicker.picker; + var currentDate = today(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, { + render: false + }); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); +} +function onClickClearBtn(datepicker) { + datepicker.setDate({ + clear: true + }); +} +function onClickViewSwitch(datepicker) { + switchView(datepicker); +} +function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); +} +function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); +} + +// For the picker's main block to delegete the events from `datepicker-cell`s +function onClickView(datepicker, ev) { + var target = findElementInEventPath(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + var _datepicker$picker$cu = datepicker.picker.currentView, + id = _datepicker$picker$cu.id, + isMinView = _datepicker$picker$cu.isMinView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } +} +function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } +} + +function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + var prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach(function (node) { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + var nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach(function (node) { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) { + var _picker$datepicker$co = picker.datepicker.config, + minDate = _picker$datepicker$co.minDate, + maxDate = _picker$datepicker$co.maxDate; + picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } +} + +// Compute view date to reset, which will be... +// - the last item of the selected dates or defaultViewDate if no selection +// - limitted to minDate or maxDate if it exceeds the range +function computeResetViewDate(datepicker) { + var dates = datepicker.dates, + config = datepicker.config; + var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate; + return limitToRange(viewDate, config.minDate, config.maxDate); +} + +// Change current view's view date +function setViewDate(picker, newDate) { + var oldViewDate = new Date(picker.viewDate); + var newViewDate = new Date(newDate); + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + year = _picker$currentView.year, + first = _picker$currentView.first, + last = _picker$currentView.last; + var viewYear = newViewDate.getFullYear(); + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } +} +function getTextDirection(el) { + return window.getComputedStyle(el).direction; +} + +// Class representing the picker UI +var Picker = /*#__PURE__*/function () { + function Picker(datepicker) { + _classCallCheck(this, Picker); + this.datepicker = datepicker; + var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + var element = this.element = parseHTML(template).firstChild; + var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3), + header = _element$firstChild$c[0], + main = _element$firstChild$c[1], + footer = _element$firstChild$c[2]; + var title = header.firstElementChild; + var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3), + prevBtn = _header$lastElementCh[0], + viewSwitch = _header$lastElementCh[1], + nextBtn = _header$lastElementCh[2]; + var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2), + todayBtn = _footer$firstChild$ch[0], + clearBtn = _footer$firstChild$ch[1]; + var controls = { + title: title, + prevBtn: prevBtn, + viewSwitch: viewSwitch, + nextBtn: nextBtn, + todayBtn: todayBtn, + clearBtn: clearBtn + }; + this.main = main; + this.controls = controls; + var elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add("datepicker-".concat(elementClass)); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), { + capture: true + }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]); + + // set up views + this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, { + id: 2, + name: 'years', + cellClass: 'year', + step: 1 + }), new YearsView(this, { + id: 3, + name: 'decades', + cellClass: 'decade', + step: 10 + })]; + this.currentView = this.views[datepicker.config.startView]; + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + return _createClass(Picker, [{ + key: "setOptions", + value: function setOptions(options) { + processPickerOptions(this, options); + this.views.forEach(function (view) { + view.init(options, false); + }); + this.currentView.render(); + } + }, { + key: "detach", + value: function detach() { + this.datepicker.config.container.removeChild(this.element); + } + }, { + key: "show", + value: function show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + var datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + var inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + }, { + key: "hide", + value: function hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + }, { + key: "place", + value: function place() { + var _this$element = this.element, + classList = _this$element.classList, + style = _this$element.style; + var _this$datepicker = this.datepicker, + config = _this$datepicker.config, + inputField = _this$datepicker.inputField; + var container = config.container; + var _this$element$getBoun = this.element.getBoundingClientRect(), + calendarWidth = _this$element$getBoun.width, + calendarHeight = _this$element$getBoun.height; + var _container$getBoundin = container.getBoundingClientRect(), + containerLeft = _container$getBoundin.left, + containerTop = _container$getBoundin.top, + containerWidth = _container$getBoundin.width; + var _inputField$getBoundi = inputField.getBoundingClientRect(), + inputLeft = _inputField$getBoundi.left, + inputTop = _inputField$getBoundi.top, + inputWidth = _inputField$getBoundi.width, + inputHeight = _inputField$getBoundi.height; + var _config$orientation = config.orientation, + orientX = _config$orientation.x, + orientY = _config$orientation.y; + var scrollTop; + var left; + var top; + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left'); + classList.add("datepicker-orient-".concat(orientY), "datepicker-orient-".concat(orientX)); + style.top = top ? "".concat(top, "px") : top; + style.left = left ? "".concat(left, "px") : left; + } + }, { + key: "setViewSwitchLabel", + value: function setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + }, { + key: "setPrevBtnDisabled", + value: function setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + }, { + key: "setNextBtnDisabled", + value: function setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + }, { + key: "changeView", + value: function changeView(viewId) { + var oldView = this.currentView; + var newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + }, { + key: "changeFocus", + value: function changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach(function (view) { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + }, { + key: "update", + value: function update() { + var newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach(function (view) { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + }, { + key: "render", + value: function render() { + var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var renderMethod = quickRender && this._renderMethod || 'render'; + delete this._renderMethod; + this.currentView[renderMethod](); + } + }]); +}(); + +// Find the closest date that doesn't meet the condition for unavailable date +// Returns undefined if no available date is found +// addFn: function to calculate the next date +// - args: time value, amount +// increase: amount to pass to addFn +// testFn: function to test the unavailablity of the date +// - args: time value; retun: true if unavailable +function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!isInRange(date, min, max)) { + return; + } + if (testFn(date)) { + var newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; +} + +// direction: -1 (left/up), 1 (right/down) +// vertical: true for up/down, false for left/right +function moveByArrowKey(datepicker, ev, direction, vertical) { + var picker = datepicker.picker; + var currentView = picker.currentView; + var step = currentView.step || 1; + var viewDate = picker.viewDate; + var addFn; + var testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = addDays(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = addYears(viewDate, direction); + } else { + viewDate = addDays(viewDate, direction); + } + addFn = addDays; + testFn = function testFn(date) { + return currentView.disabled.includes(date); + }; + break; + case 1: + viewDate = addMonths(viewDate, vertical ? direction * 4 : direction); + addFn = addMonths; + testFn = function testFn(date) { + var dt = new Date(date); + var year = currentView.year, + disabled = currentView.disabled; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = addYears; + testFn = function testFn(date) { + return currentView.disabled.includes(startOfYearPeriod(date, step)); + }; + } + viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } +} +function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + var picker = datepicker.picker; + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + isMinView = _picker$currentView.isMinView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({ + update: true, + autohide: datepicker.config.autohide + }); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); +} +function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } +} + +// for the prevention for entering edit mode while getting focus on click +function onMousedown(datepicker, ev) { + var el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(function () { + delete el._active; + delete el._clicking; + }, 2000); + } +} +function onClickInput(datepicker, ev) { + var el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + if (datepicker.config.showOnClick) { + datepicker.show(); + } +} +function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } +} + +// for the `document` to delegate the events from outside the picker/input field +function onClickOutside(datepicker, ev) { + var element = datepicker.element; + if (element !== document.activeElement) { + return; + } + var pickerElem = datepicker.picker.element; + if (findElementInEventPath(ev, function (el) { + return el === element || el === pickerElem; + })) { + return; + } + unfocus(datepicker); +} + +function stringifyDates(dates, config) { + return dates.map(function (dt) { + return formatDate(dt, config.format, config.locale); + }).join(config.dateDelimiter); +} + +// parse input dates and create an array of time values for selection +// returns undefined if there are no valid dates in inputDates +// when origDates (current selection) is passed, the function works to mix +// the input dates into the current selection +function processInputDates(datepicker, inputDates) { + var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var config = datepicker.config, + origDates = datepicker.dates, + rangepicker = datepicker.rangepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + var newDates = inputDates.reduce(function (dates, dt) { + var date = parseDate(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + var _dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1); + } else { + date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1); + } + } + if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce(function (dates, date) { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(function (date) { + return !newDates.includes(date); + })); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates; +} + +// refresh the UI elements +// modes: 1: input only, 2, picker only, 3 both +function refreshUI(datepicker) { + var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3; + var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var config = datepicker.config, + picker = datepicker.picker, + inputField = datepicker.inputField; + if (mode & 2) { + var newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } +} +function _setDate(datepicker, inputDates, options) { + var clear = options.clear, + render = options.render, + autohide = options.autohide; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + var newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } +} + +/** + * Class representing a date picker + */ +var Datepicker = /*#__PURE__*/function () { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + function Datepicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + _classCallCheck(this, Datepicker); + element.datepicker = this; + this.element = element; + + // set up config + var config = this.config = Object.assign({ + buttonClass: options.buttonClass && String(options.buttonClass) || 'button', + container: document.body, + defaultViewDate: today(), + maxDate: undefined, + minDate: undefined + }, processOptions(defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + var inline = this.inline = element.tagName !== 'INPUT'; + var inputField; + var initialDates; + if (inline) { + config.container = element; + initialDates = stringToArray(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + var container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = stringToArray(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + var index = rangepicker.inputs.indexOf(inputField); + var datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get: function get() { + return rangepicker; + } + }); + } + + // set initial dates + this.dates = []; + // process initial value + var inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + var picker = this.picker = new Picker(this); + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + var onMousedownDocument = onClickOutside.bind(null, this); + var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]]; + registerListeners(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + return _createClass(Datepicker, [{ + key: "active", + get: + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + function get() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + }, { + key: "pickerElement", + get: function get() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + var picker = this.picker; + var newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + }, { + key: "show", + value: function show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + }, { + key: "hide", + value: function hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.hide(); + unregisterListeners(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + }, { + key: "getDate", + value: function getDate() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.config.locale); + } : function (date) { + return new Date(date); + }; + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + }, { + key: "setDate", + value: function setDate() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + var dates = [].concat(args); + var opts = {}; + var lastArg = lastItemOf(args); + if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) { + Object.assign(opts, dates.pop()); + } + var inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + _setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + }, { + key: "update", + value: function update() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline) { + return; + } + var opts = { + clear: true, + autohide: !!(options && options.autohide) + }; + var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter); + _setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + }, { + key: "refresh", + value: function refresh() { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + var mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + }, { + key: "enterEditMode", + value: function enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + }, { + key: "exitEditMode", + value: function exitEditMode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline || !this.editMode) { + return; + } + var opts = Object.assign({ + update: false + }, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700'); + if (opts.update) { + this.update(opts); + } + } + }], [{ + key: "formatDate", + value: function formatDate$1(date, format, lang) { + return formatDate(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + }, { + key: "parseDate", + value: function parseDate$1(dateStr, format, lang) { + return parseDate(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + }, { + key: "locales", + get: function get() { + return locales; + } + }]); +}(); + +// filter out the config options inapproprite to pass to Datepicker +function filterOptions(options) { + var newOpts = Object.assign({}, options); + delete newOpts.inputs; + delete newOpts.allowOneSidedRange; + delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date + + return newOpts; +} +function setupDatepicker(rangepicker, changeDateListener, el, options) { + registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]); + new Datepicker(el, options, rangepicker); +} +function onChangeDate(rangepicker, ev) { + // to prevent both datepickers trigger the other side's update each other + if (rangepicker._updating) { + return; + } + rangepicker._updating = true; + var target = ev.target; + if (target.datepicker === undefined) { + return; + } + var datepickers = rangepicker.datepickers; + var setDateOptions = { + render: false + }; + var changedSide = rangepicker.inputs.indexOf(target); + var otherSide = changedSide === 0 ? 1 : 0; + var changedDate = datepickers[changedSide].dates[0]; + var otherDate = datepickers[otherSide].dates[0]; + if (changedDate !== undefined && otherDate !== undefined) { + // if the start of the range > the end, swap them + if (changedSide === 0 && changedDate > otherDate) { + datepickers[0].setDate(otherDate, setDateOptions); + datepickers[1].setDate(changedDate, setDateOptions); + } else if (changedSide === 1 && changedDate < otherDate) { + datepickers[0].setDate(changedDate, setDateOptions); + datepickers[1].setDate(otherDate, setDateOptions); + } + } else if (!rangepicker.allowOneSidedRange) { + // to prevent the range from becoming one-sided, copy changed side's + // selection (no matter if it's empty) to the other side + if (changedDate !== undefined || otherDate !== undefined) { + setDateOptions.clear = true; + datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions); + } + } + datepickers[0].picker.update().render(); + datepickers[1].picker.update().render(); + delete rangepicker._updating; +} + +/** + * Class representing a date range picker + */ +var DateRangePicker = /*#__PURE__*/function () { + /** + * Create a date range picker + * @param {Element} element - element to bind a date range picker + * @param {Object} [options] - config options + */ + function DateRangePicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + _classCallCheck(this, DateRangePicker); + var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input')); + if (inputs.length < 2) { + return; + } + element.rangepicker = this; + this.element = element; + this.inputs = inputs.slice(0, 2); + this.allowOneSidedRange = !!options.allowOneSidedRange; + var changeDateListener = onChangeDate.bind(null, this); + var cleanOptions = filterOptions(options); + // in order for initial date setup to work right when pcicLvel > 0, + // let Datepicker constructor add the instance to the rangepicker + var datepickers = []; + Object.defineProperty(this, 'datepickers', { + get: function get() { + return datepickers; + } + }); + setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions); + setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions); + Object.freeze(datepickers); + // normalize the range if inital dates are given + if (datepickers[0].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[0] + }); + } else if (datepickers[1].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[1] + }); + } + } + + /** + * @type {Array} - selected date of the linked date pickers + */ + return _createClass(DateRangePicker, [{ + key: "dates", + get: function get() { + return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + this.allowOneSidedRange = !!options.allowOneSidedRange; + var cleanOptions = filterOptions(options); + this.datepickers[0].setOptions(cleanOptions); + this.datepickers[1].setOptions(cleanOptions); + } + + /** + * Destroy the DateRangePicker instance + * @return {DateRangePicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.datepickers[0].destroy(); + this.datepickers[1].destroy(); + unregisterListeners(this); + delete this.element.rangepicker; + } + + /** + * Get the start and end dates of the date range + * + * The method returns Date objects by default. If format string is passed, + * it returns date strings formatted in given format. + * The result array always contains 2 items (start date/end date) and + * undefined is used for unselected side. (e.g. If none is selected, + * the result will be [undefined, undefined]. If only the end date is set + * when allowOneSidedRange config option is true, [undefined, endDate] will + * be returned.) + * + * @param {String} [format] - Format string to stringify the dates + * @return {Array} - Start and end dates + */ + }, { + key: "getDates", + value: function getDates() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.datepickers[0].config.locale); + } : function (date) { + return new Date(date); + }; + return this.dates.map(function (date) { + return date === undefined ? date : callback(date); + }); + } + + /** + * Set the start and end dates of the date range + * + * The method calls datepicker.setDate() internally using each of the + * arguments in start→end order. + * + * When a clear: true option object is passed instead of a date, the method + * clears the date. + * + * If an invalid date, the same date as the current one or an option object + * without clear: true is passed, the method considers that argument as an + * "ineffective" argument because calling datepicker.setDate() with those + * values makes no changes to the date selection. + * + * When the allowOneSidedRange config option is false, passing {clear: true} + * to clear the range works only when it is done to the last effective + * argument (in other words, passed to rangeEnd or to rangeStart along with + * ineffective rangeEnd). This is because when the date range is changed, + * it gets normalized based on the last change at the end of the changing + * process. + * + * @param {Date|Number|String|Object} rangeStart - Start date of the range + * or {clear: true} to clear the date + * @param {Date|Number|String|Object} rangeEnd - End date of the range + * or {clear: true} to clear the date + */ + }, { + key: "setDates", + value: function setDates(rangeStart, rangeEnd) { + var _this$datepickers = _slicedToArray(this.datepickers, 2), + datepicker0 = _this$datepickers[0], + datepicker1 = _this$datepickers[1]; + var origDates = this.dates; + + // If range normalization runs on every change, we can't set a new range + // that starts after the end of the current range correctly because the + // normalization process swaps start↔︎end right after setting the new start + // date. To prevent this, the normalization process needs to run once after + // both of the new dates are set. + this._updating = true; + datepicker0.setDate(rangeStart); + datepicker1.setDate(rangeEnd); + delete this._updating; + if (datepicker1.dates[0] !== origDates[1]) { + onChangeDate(this, { + target: this.inputs[1] + }); + } else if (datepicker0.dates[0] !== origDates[0]) { + onChangeDate(this, { + target: this.inputs[0] + }); + } + } + }]); +}(); + +module.exports = DateRangePicker; diff --git a/node_modules/flowbite-datepicker/dist/DateRangePicker.esm.js b/node_modules/flowbite-datepicker/dist/DateRangePicker.esm.js new file mode 100644 index 0000000..0760083 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/DateRangePicker.esm.js @@ -0,0 +1,2991 @@ +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; +} +function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); +} +function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); +} +function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); + } +} +function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; +} +function _get() { + return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { + var p = _superPropBase(e, t); + if (p) { + var n = Object.getOwnPropertyDescriptor(p, t); + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; + } + }, _get.apply(null, arguments); +} +function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, _getPrototypeOf(t); +} +function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), Object.defineProperty(t, "prototype", { + writable: !1 + }), e && _setPrototypeOf(t, e); +} +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function () { + return !!t; + })(); +} +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _possibleConstructorReturn(t, e) { + if (e && ("object" == typeof e || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t); +} +function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { + return t.__proto__ = e, t; + }, _setPrototypeOf(t, e); +} +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); +} +function _superPropBase(t, o) { + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); + return t; +} +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; +} +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } +} + +var listenerRegistry = new WeakMap(); +var _EventTarget$prototyp = EventTarget.prototype, + addEventListener = _EventTarget$prototyp.addEventListener, + removeEventListener = _EventTarget$prototyp.removeEventListener; + +// Register event listeners to a key object +// listeners: array of listener definitions; +// - each definition must be a flat array of event target and the arguments +// used to call addEventListener() on the target +function registerListeners(keyObj, listeners) { + var registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach(function (listener) { + addEventListener.call.apply(addEventListener, _toConsumableArray(listener)); + registered.push(listener); + }); +} +function unregisterListeners(keyObj) { + var listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach(function (listener) { + removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener)); + }); + listenerRegistry["delete"](keyObj); +} + +// Event.composedPath() polyfill for Edge +// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec +if (!Event.prototype.composedPath) { + var getComposedPath = function getComposedPath(node) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + path.push(node); + var parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { + // ShadowRoot + parent = node.host; + } else if (node.defaultView) { + // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; +} +function findFromPath(path, criteria, currentTarget) { + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); +} + +// Search for the actual target of a delegated event +function findElementInEventPath(ev, selector) { + var criteria = typeof selector === 'function' ? selector : function (el) { + return el.matches(selector); + }; + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); +} + +function stripTime(timeValue) { + return new Date(timeValue).setHours(0, 0, 0, 0); +} +function today() { + return new Date().setHours(0, 0, 0, 0); +} + +// Get the time value of the start of given date or year, month and day +function dateValue() { + switch (arguments.length) { + case 0: + return today(); + case 1: + return stripTime(arguments.length <= 0 ? undefined : arguments[0]); + } + + // use setFullYear() to keep 2-digit year from being mapped to 1900-1999 + var newDate = new Date(0); + newDate.setFullYear.apply(newDate, arguments); + return newDate.setHours(0, 0, 0, 0); +} +function addDays(date, amount) { + var newDate = new Date(date); + return newDate.setDate(newDate.getDate() + amount); +} +function addWeeks(date, amount) { + return addDays(date, amount * 7); +} +function addMonths(date, amount) { + // If the day of the date is not in the new month, the last day of the new + // month will be returned. e.g. Jan 31 + 1 month → Feb 28 (not Mar 03) + var newDate = new Date(date); + var monthsToSet = newDate.getMonth() + amount; + var expectedMonth = monthsToSet % 12; + if (expectedMonth < 0) { + expectedMonth += 12; + } + var time = newDate.setMonth(monthsToSet); + return newDate.getMonth() !== expectedMonth ? newDate.setDate(0) : time; +} +function addYears(date, amount) { + // If the date is Feb 29 and the new year is not a leap year, Feb 28 of the + // new year will be returned. + var newDate = new Date(date); + var expectedMonth = newDate.getMonth(); + var time = newDate.setFullYear(newDate.getFullYear() + amount); + return expectedMonth === 1 && newDate.getMonth() === 2 ? newDate.setDate(0) : time; +} + +// Calculate the distance bettwen 2 days of the week +function dayDiff(day, from) { + return (day - from + 7) % 7; +} + +// Get the date of the specified day of the week of given base date +function dayOfTheWeekOf(baseDate, dayOfWeek) { + var weekStart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); +} + +// Get the ISO week of a date +function getWeek(date) { + // start of ISO week is Monday + var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; +} + +// Get the start year of the period of years that includes given date +// years: length of the year period +function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + var year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; +} + +function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +function lastItemOf(arr) { + return arr[arr.length - 1]; +} + +// push only the items not included in the array +function pushUnique(arr) { + for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + items[_key - 1] = arguments[_key]; + } + items.forEach(function (item) { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; +} +function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; +} +function isInRange(testVal, min, max) { + var minOK = min === undefined || testVal >= min; + var maxOK = max === undefined || testVal <= max; + return minOK && maxOK; +} +function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +} +function createTagRepeat(tagName, repeat) { + var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ''; + var openTagSrc = Object.keys(attributes).reduce(function (src, attr) { + var val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return "".concat(src, " ").concat(attr, "=\"").concat(val, "\""); + }, tagName); + html += "<".concat(openTagSrc, ">"); + var next = index + 1; + return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html; +} + +// Remove the spacing surrounding tags for HTML parser not to create text nodes +// before/after elements +function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); +} +function padZero(num, length) { + return num.toString().padStart(length, '0'); +} +function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + var separators = format.split(reFormatTokens); + var parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + var partFormatters = parts.map(function (token) { + return formatFns[token]; + }); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) { + var token = parts.find(function (part) { + return part[0] !== 'D' && part[0].toLowerCase() === key; + }); + if (token) { + keys.push(key); + } + return keys; + }, []); + return knownFormats[format] = { + parser: function parser(dateStr, locale) { + var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) { + if (part.length > 0 && parts[index]) { + var token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce(function (origDate, key) { + var newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, today()); + }, + formatter: function formatter(date, locale) { + var dateStr = partFormatters.reduce(function (str, fn, index) { + return str += "".concat(separators[index]).concat(fn(date, locale)); + }, ''); + // separators' length is always parts' length + 1, + return dateStr += lastItemOf(separators); + } + }; +} +function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + var date = stripTime(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return today(); + } + if (format && format.toValue) { + var _date = format.toValue(dateStr, format, locale); + return isNaN(_date) ? undefined : stripTime(_date); + } + return parseFormatString(format).parser(dateStr, locale); +} +function formatDate(date, format, locale) { + if (isNaN(date) || !date && date !== 0) { + return ''; + } + var dateObj = typeof date === 'number' ? new Date(date) : date; + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + return parseFormatString(format).formatter(dateObj, locale); +} + +// default locales +var locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } +}; + +// config options updatable by setOptions() and their default values +var defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, + // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0 +}; + +var range = document.createRange(); +function parseHTML(html) { + return range.createContextualFragment(html); +} +function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; +} +function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } +} +function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } +} +function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach(function (node) { + el.appendChild(node); + }); + } +} + +var defaultLang = defaultOptions.language, + defaultFormat = defaultOptions.format, + defaultWeekStart = defaultOptions.weekStart; + +// Reducer function to filter out invalid day-of-week from the input +function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow; +} +function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; +} + +// validate input date. if invalid, fallback to the original value +function validateDate(value, format, locale, origValue) { + var date = parseDate(value, format, locale); + return date !== undefined ? date : origValue; +} + +// Validate viewId. if invalid, fallback to the original value +function validateViewId(value, origValue) { + var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; + var viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; +} + +// Create Datepicker configuration to set +function processOptions(options, datepicker) { + var inOpts = Object.assign({}, options); + var config = {}; + var locales = datepicker.constructor.locales; + var _ref = datepicker.config || {}, + format = _ref.format, + language = _ref.language, + locale = _ref.locale, + maxDate = _ref.maxDate, + maxView = _ref.maxView, + minDate = _ref.minDate, + pickLevel = _ref.pickLevel, + startView = _ref.startView, + weekStart = _ref.weekStart; + if (inOpts.language) { + var lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + var origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + if (inOpts.format) { + var hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + var hasToValue = typeof inOpts.format.toValue === 'function'; + var validFormatString = reFormatTokens.test(inOpts.format); + if (hasToDisplay && hasToValue || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + var minDt = minDate; + var maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) { + var date = parseDate(dt, format, locale); + return date !== undefined ? pushUnique(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + var viewDate = parseDate(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + var wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + var newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + var newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + var newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + var prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + var nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + var orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(function (x) { + return x === 'left' || x === 'right'; + }) || 'auto', + y: orientation.find(function (y) { + return y === 'top' || y === 'bottom'; + }) || 'auto' + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch (inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach(function (key) { + if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + return config; +} + +var pickerTemplate = optimizeTemplateHTML("
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
"); + +var daysTemplate = optimizeTemplateHTML("
\n
".concat(createTagRepeat('span', 7, { + "class": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
").concat(createTagRepeat('span', 42, { + "class": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400' +}), "
\n
")); + +var calendarWeeksTemplate = optimizeTemplateHTML("
\n
\n
".concat(createTagRepeat('span', 6, { + "class": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
")); + +// Base class of the view classes +var View = /*#__PURE__*/function () { + function View(picker, config) { + _classCallCheck(this, View); + Object.assign(this, config, { + picker: picker, + element: parseHTML("
").firstChild, + selected: [] + }); + this.init(this.picker.datepicker.config); + } + return _createClass(View, [{ + key: "init", + value: function init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + }, { + key: "performBeforeHook", + value: function performBeforeHook(el, current, timeValue) { + var result = this.beforeShow(new Date(timeValue)); + switch (_typeof(result)) { + case 'boolean': + result = { + enabled: result + }; + break; + case 'string': + result = { + classes: result + }; + } + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + var _el$classList; + var extraClasses = result.classes.split(/\s+/); + (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses)); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } + }]); +}(); + +var DaysView = /*#__PURE__*/function (_View) { + function DaysView(picker) { + _classCallCheck(this, DaysView); + return _callSuper(this, DaysView, [picker, { + id: 0, + name: 'days', + cellClass: 'day' + }]); + } + _inherits(DaysView, _View); + return _createClass(DaysView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + var inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + _get(_getPrototypeOf(DaysView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + var _this = this; + var updateDOW; + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + var locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined; + } + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + var weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach(function (el, index) { + var dow = (_this.weekStart + index) % 7; + el.textContent = _this.dayNames[dow]; + el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var viewYear = viewDate.getFullYear(); + var viewMonth = viewDate.getMonth(); + var firstOfMonth = dateValue(viewYear, viewMonth, 1); + var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = _toConsumableArray(this.datesDisabled); + var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + var startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = addDays(_this2.start, index); + var date = new Date(current); + var day = date.getDay(); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + el.dataset.date = current; + el.textContent = date.getDate(); + if (current < _this2.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > _this2.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (_this2.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (_this2.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(_this2.disabled, current); + } + if (_this2.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.dataset.date); + var classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg'); + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + var _range = _slicedToArray(range, 2), + _range$ = _slicedToArray(_range[0], 2), + startY = _range$[0], + startM = _range$[1], + _range$2 = _slicedToArray(_range[1], 2), + endY = _range$2[0], + endM = _range$2[1]; + if (startY > thisYear || endY < thisYear) { + return; + } + return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12]; +} +var MonthsView = /*#__PURE__*/function (_View) { + function MonthsView(picker) { + _classCallCheck(this, MonthsView); + return _callSuper(this, MonthsView, [picker, { + id: 1, + name: 'months', + cellClass: 'month' + }]); + } + _inherits(MonthsView, _View); + return _createClass(MonthsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, { + 'data-month': function dataMonth(ix) { + return ix; + } + }))); + } + _get(_getPrototypeOf(MonthsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + var minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + var maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (selected, timeValue) { + var date = new Date(timeValue); + var year = date.getFullYear(); + var month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + var date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this = this; + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + var selected = this.selected[this.year] || []; + var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + var isMinYear = this.year === this.minYear; + var isMaxYear = this.year === this.maxYear; + var range = computeMonthRange(this.range, this.year); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var date = dateValue(_this.year, index, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this.cellClass); + if (_this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = _this.monthNames[index]; + if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) { + classList.add('disabled'); + } + if (range) { + var _range2 = _slicedToArray(range, 2), + rangeStart = _range2[0], + rangeEnd = _range2[1]; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this.focused) { + classList.add('focused'); + } + if (_this.beforeShow) { + _this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this2 = this; + var selected = this.selected[this.year] || []; + var _ref = computeMonthRange(this.range, this.year) || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this2.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } + }]); +}(View); + +function toTitleCase(word) { + return _toConsumableArray(word).reduce(function (str, ch, ix) { + return str += ix ? ch : ch.toUpperCase(); + }, ''); +} + +// Class representing the years and decades view elements +var YearsView = /*#__PURE__*/function (_View) { + function YearsView(picker, config) { + _classCallCheck(this, YearsView); + return _callSuper(this, YearsView, [picker, config]); + } + _inherits(YearsView, _View); + return _createClass(YearsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = "beforeShow".concat(toTitleCase(this.cellClass)); + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + _get(_getPrototypeOf(YearsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + var beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var first = startOfYearPeriod(viewDate, this.navStep); + var last = first + 9 * this.step; + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this = this; + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (years, timeValue) { + return pushUnique(years, startOfYearPeriod(timeValue, _this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, _this.step); + } + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel("".concat(this.first, "-").concat(this.last)); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = _this2.start + index * _this2.step; + var date = dateValue(current, 0, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + if (_this2.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < _this2.minYear || current > _this2.maxYear) { + classList.add('disabled'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.textContent); + var classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function triggerDatepickerEvent(datepicker, type) { + var detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker: datepicker + }; + datepicker.element.dispatchEvent(new CustomEvent(type, { + detail: detail + })); +} + +// direction: -1 (to previous), 1 (to next) +function goToPrevOrNext(datepicker, direction) { + var _datepicker$config = datepicker.config, + minDate = _datepicker$config.minDate, + maxDate = _datepicker$config.maxDate; + var _datepicker$picker = datepicker.picker, + currentView = _datepicker$picker.currentView, + viewDate = _datepicker$picker.viewDate; + var newViewDate; + switch (currentView.id) { + case 0: + newViewDate = addMonths(viewDate, direction); + break; + case 1: + newViewDate = addYears(viewDate, direction); + break; + default: + newViewDate = addYears(viewDate, direction * currentView.navStep); + } + newViewDate = limitToRange(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); +} +function switchView(datepicker) { + var viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); +} +function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({ + autohide: true + }); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } +} + +function goToSelectedMonthOrYear(datepicker, selection) { + var picker = datepicker.picker; + var viewDate = new Date(picker.viewDate); + var viewId = picker.currentView.id; + var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear()); + picker.changeFocus(newDate).changeView(viewId - 1).render(); +} +function onClickTodayBtn(datepicker) { + var picker = datepicker.picker; + var currentDate = today(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, { + render: false + }); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); +} +function onClickClearBtn(datepicker) { + datepicker.setDate({ + clear: true + }); +} +function onClickViewSwitch(datepicker) { + switchView(datepicker); +} +function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); +} +function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); +} + +// For the picker's main block to delegete the events from `datepicker-cell`s +function onClickView(datepicker, ev) { + var target = findElementInEventPath(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + var _datepicker$picker$cu = datepicker.picker.currentView, + id = _datepicker$picker$cu.id, + isMinView = _datepicker$picker$cu.isMinView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } +} +function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } +} + +function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + var prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach(function (node) { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + var nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach(function (node) { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) { + var _picker$datepicker$co = picker.datepicker.config, + minDate = _picker$datepicker$co.minDate, + maxDate = _picker$datepicker$co.maxDate; + picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } +} + +// Compute view date to reset, which will be... +// - the last item of the selected dates or defaultViewDate if no selection +// - limitted to minDate or maxDate if it exceeds the range +function computeResetViewDate(datepicker) { + var dates = datepicker.dates, + config = datepicker.config; + var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate; + return limitToRange(viewDate, config.minDate, config.maxDate); +} + +// Change current view's view date +function setViewDate(picker, newDate) { + var oldViewDate = new Date(picker.viewDate); + var newViewDate = new Date(newDate); + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + year = _picker$currentView.year, + first = _picker$currentView.first, + last = _picker$currentView.last; + var viewYear = newViewDate.getFullYear(); + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } +} +function getTextDirection(el) { + return window.getComputedStyle(el).direction; +} + +// Class representing the picker UI +var Picker = /*#__PURE__*/function () { + function Picker(datepicker) { + _classCallCheck(this, Picker); + this.datepicker = datepicker; + var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + var element = this.element = parseHTML(template).firstChild; + var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3), + header = _element$firstChild$c[0], + main = _element$firstChild$c[1], + footer = _element$firstChild$c[2]; + var title = header.firstElementChild; + var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3), + prevBtn = _header$lastElementCh[0], + viewSwitch = _header$lastElementCh[1], + nextBtn = _header$lastElementCh[2]; + var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2), + todayBtn = _footer$firstChild$ch[0], + clearBtn = _footer$firstChild$ch[1]; + var controls = { + title: title, + prevBtn: prevBtn, + viewSwitch: viewSwitch, + nextBtn: nextBtn, + todayBtn: todayBtn, + clearBtn: clearBtn + }; + this.main = main; + this.controls = controls; + var elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add("datepicker-".concat(elementClass)); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), { + capture: true + }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]); + + // set up views + this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, { + id: 2, + name: 'years', + cellClass: 'year', + step: 1 + }), new YearsView(this, { + id: 3, + name: 'decades', + cellClass: 'decade', + step: 10 + })]; + this.currentView = this.views[datepicker.config.startView]; + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + return _createClass(Picker, [{ + key: "setOptions", + value: function setOptions(options) { + processPickerOptions(this, options); + this.views.forEach(function (view) { + view.init(options, false); + }); + this.currentView.render(); + } + }, { + key: "detach", + value: function detach() { + this.datepicker.config.container.removeChild(this.element); + } + }, { + key: "show", + value: function show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + var datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + var inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + }, { + key: "hide", + value: function hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + }, { + key: "place", + value: function place() { + var _this$element = this.element, + classList = _this$element.classList, + style = _this$element.style; + var _this$datepicker = this.datepicker, + config = _this$datepicker.config, + inputField = _this$datepicker.inputField; + var container = config.container; + var _this$element$getBoun = this.element.getBoundingClientRect(), + calendarWidth = _this$element$getBoun.width, + calendarHeight = _this$element$getBoun.height; + var _container$getBoundin = container.getBoundingClientRect(), + containerLeft = _container$getBoundin.left, + containerTop = _container$getBoundin.top, + containerWidth = _container$getBoundin.width; + var _inputField$getBoundi = inputField.getBoundingClientRect(), + inputLeft = _inputField$getBoundi.left, + inputTop = _inputField$getBoundi.top, + inputWidth = _inputField$getBoundi.width, + inputHeight = _inputField$getBoundi.height; + var _config$orientation = config.orientation, + orientX = _config$orientation.x, + orientY = _config$orientation.y; + var scrollTop; + var left; + var top; + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left'); + classList.add("datepicker-orient-".concat(orientY), "datepicker-orient-".concat(orientX)); + style.top = top ? "".concat(top, "px") : top; + style.left = left ? "".concat(left, "px") : left; + } + }, { + key: "setViewSwitchLabel", + value: function setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + }, { + key: "setPrevBtnDisabled", + value: function setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + }, { + key: "setNextBtnDisabled", + value: function setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + }, { + key: "changeView", + value: function changeView(viewId) { + var oldView = this.currentView; + var newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + }, { + key: "changeFocus", + value: function changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach(function (view) { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + }, { + key: "update", + value: function update() { + var newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach(function (view) { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + }, { + key: "render", + value: function render() { + var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var renderMethod = quickRender && this._renderMethod || 'render'; + delete this._renderMethod; + this.currentView[renderMethod](); + } + }]); +}(); + +// Find the closest date that doesn't meet the condition for unavailable date +// Returns undefined if no available date is found +// addFn: function to calculate the next date +// - args: time value, amount +// increase: amount to pass to addFn +// testFn: function to test the unavailablity of the date +// - args: time value; retun: true if unavailable +function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!isInRange(date, min, max)) { + return; + } + if (testFn(date)) { + var newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; +} + +// direction: -1 (left/up), 1 (right/down) +// vertical: true for up/down, false for left/right +function moveByArrowKey(datepicker, ev, direction, vertical) { + var picker = datepicker.picker; + var currentView = picker.currentView; + var step = currentView.step || 1; + var viewDate = picker.viewDate; + var addFn; + var testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = addDays(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = addYears(viewDate, direction); + } else { + viewDate = addDays(viewDate, direction); + } + addFn = addDays; + testFn = function testFn(date) { + return currentView.disabled.includes(date); + }; + break; + case 1: + viewDate = addMonths(viewDate, vertical ? direction * 4 : direction); + addFn = addMonths; + testFn = function testFn(date) { + var dt = new Date(date); + var year = currentView.year, + disabled = currentView.disabled; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = addYears; + testFn = function testFn(date) { + return currentView.disabled.includes(startOfYearPeriod(date, step)); + }; + } + viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } +} +function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + var picker = datepicker.picker; + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + isMinView = _picker$currentView.isMinView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({ + update: true, + autohide: datepicker.config.autohide + }); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); +} +function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } +} + +// for the prevention for entering edit mode while getting focus on click +function onMousedown(datepicker, ev) { + var el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(function () { + delete el._active; + delete el._clicking; + }, 2000); + } +} +function onClickInput(datepicker, ev) { + var el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + if (datepicker.config.showOnClick) { + datepicker.show(); + } +} +function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } +} + +// for the `document` to delegate the events from outside the picker/input field +function onClickOutside(datepicker, ev) { + var element = datepicker.element; + if (element !== document.activeElement) { + return; + } + var pickerElem = datepicker.picker.element; + if (findElementInEventPath(ev, function (el) { + return el === element || el === pickerElem; + })) { + return; + } + unfocus(datepicker); +} + +function stringifyDates(dates, config) { + return dates.map(function (dt) { + return formatDate(dt, config.format, config.locale); + }).join(config.dateDelimiter); +} + +// parse input dates and create an array of time values for selection +// returns undefined if there are no valid dates in inputDates +// when origDates (current selection) is passed, the function works to mix +// the input dates into the current selection +function processInputDates(datepicker, inputDates) { + var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var config = datepicker.config, + origDates = datepicker.dates, + rangepicker = datepicker.rangepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + var newDates = inputDates.reduce(function (dates, dt) { + var date = parseDate(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + var _dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1); + } else { + date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1); + } + } + if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce(function (dates, date) { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(function (date) { + return !newDates.includes(date); + })); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates; +} + +// refresh the UI elements +// modes: 1: input only, 2, picker only, 3 both +function refreshUI(datepicker) { + var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3; + var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var config = datepicker.config, + picker = datepicker.picker, + inputField = datepicker.inputField; + if (mode & 2) { + var newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } +} +function _setDate(datepicker, inputDates, options) { + var clear = options.clear, + render = options.render, + autohide = options.autohide; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + var newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } +} + +/** + * Class representing a date picker + */ +var Datepicker = /*#__PURE__*/function () { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + function Datepicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + _classCallCheck(this, Datepicker); + element.datepicker = this; + this.element = element; + + // set up config + var config = this.config = Object.assign({ + buttonClass: options.buttonClass && String(options.buttonClass) || 'button', + container: document.body, + defaultViewDate: today(), + maxDate: undefined, + minDate: undefined + }, processOptions(defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + var inline = this.inline = element.tagName !== 'INPUT'; + var inputField; + var initialDates; + if (inline) { + config.container = element; + initialDates = stringToArray(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + var container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = stringToArray(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + var index = rangepicker.inputs.indexOf(inputField); + var datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get: function get() { + return rangepicker; + } + }); + } + + // set initial dates + this.dates = []; + // process initial value + var inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + var picker = this.picker = new Picker(this); + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + var onMousedownDocument = onClickOutside.bind(null, this); + var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]]; + registerListeners(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + return _createClass(Datepicker, [{ + key: "active", + get: + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + function get() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + }, { + key: "pickerElement", + get: function get() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + var picker = this.picker; + var newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + }, { + key: "show", + value: function show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + }, { + key: "hide", + value: function hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.hide(); + unregisterListeners(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + }, { + key: "getDate", + value: function getDate() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.config.locale); + } : function (date) { + return new Date(date); + }; + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + }, { + key: "setDate", + value: function setDate() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + var dates = [].concat(args); + var opts = {}; + var lastArg = lastItemOf(args); + if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) { + Object.assign(opts, dates.pop()); + } + var inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + _setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + }, { + key: "update", + value: function update() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline) { + return; + } + var opts = { + clear: true, + autohide: !!(options && options.autohide) + }; + var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter); + _setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + }, { + key: "refresh", + value: function refresh() { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + var mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + }, { + key: "enterEditMode", + value: function enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + }, { + key: "exitEditMode", + value: function exitEditMode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline || !this.editMode) { + return; + } + var opts = Object.assign({ + update: false + }, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700'); + if (opts.update) { + this.update(opts); + } + } + }], [{ + key: "formatDate", + value: function formatDate$1(date, format, lang) { + return formatDate(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + }, { + key: "parseDate", + value: function parseDate$1(dateStr, format, lang) { + return parseDate(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + }, { + key: "locales", + get: function get() { + return locales; + } + }]); +}(); + +// filter out the config options inapproprite to pass to Datepicker +function filterOptions(options) { + var newOpts = Object.assign({}, options); + delete newOpts.inputs; + delete newOpts.allowOneSidedRange; + delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date + + return newOpts; +} +function setupDatepicker(rangepicker, changeDateListener, el, options) { + registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]); + new Datepicker(el, options, rangepicker); +} +function onChangeDate(rangepicker, ev) { + // to prevent both datepickers trigger the other side's update each other + if (rangepicker._updating) { + return; + } + rangepicker._updating = true; + var target = ev.target; + if (target.datepicker === undefined) { + return; + } + var datepickers = rangepicker.datepickers; + var setDateOptions = { + render: false + }; + var changedSide = rangepicker.inputs.indexOf(target); + var otherSide = changedSide === 0 ? 1 : 0; + var changedDate = datepickers[changedSide].dates[0]; + var otherDate = datepickers[otherSide].dates[0]; + if (changedDate !== undefined && otherDate !== undefined) { + // if the start of the range > the end, swap them + if (changedSide === 0 && changedDate > otherDate) { + datepickers[0].setDate(otherDate, setDateOptions); + datepickers[1].setDate(changedDate, setDateOptions); + } else if (changedSide === 1 && changedDate < otherDate) { + datepickers[0].setDate(changedDate, setDateOptions); + datepickers[1].setDate(otherDate, setDateOptions); + } + } else if (!rangepicker.allowOneSidedRange) { + // to prevent the range from becoming one-sided, copy changed side's + // selection (no matter if it's empty) to the other side + if (changedDate !== undefined || otherDate !== undefined) { + setDateOptions.clear = true; + datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions); + } + } + datepickers[0].picker.update().render(); + datepickers[1].picker.update().render(); + delete rangepicker._updating; +} + +/** + * Class representing a date range picker + */ +var DateRangePicker = /*#__PURE__*/function () { + /** + * Create a date range picker + * @param {Element} element - element to bind a date range picker + * @param {Object} [options] - config options + */ + function DateRangePicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + _classCallCheck(this, DateRangePicker); + var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input')); + if (inputs.length < 2) { + return; + } + element.rangepicker = this; + this.element = element; + this.inputs = inputs.slice(0, 2); + this.allowOneSidedRange = !!options.allowOneSidedRange; + var changeDateListener = onChangeDate.bind(null, this); + var cleanOptions = filterOptions(options); + // in order for initial date setup to work right when pcicLvel > 0, + // let Datepicker constructor add the instance to the rangepicker + var datepickers = []; + Object.defineProperty(this, 'datepickers', { + get: function get() { + return datepickers; + } + }); + setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions); + setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions); + Object.freeze(datepickers); + // normalize the range if inital dates are given + if (datepickers[0].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[0] + }); + } else if (datepickers[1].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[1] + }); + } + } + + /** + * @type {Array} - selected date of the linked date pickers + */ + return _createClass(DateRangePicker, [{ + key: "dates", + get: function get() { + return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + this.allowOneSidedRange = !!options.allowOneSidedRange; + var cleanOptions = filterOptions(options); + this.datepickers[0].setOptions(cleanOptions); + this.datepickers[1].setOptions(cleanOptions); + } + + /** + * Destroy the DateRangePicker instance + * @return {DateRangePicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.datepickers[0].destroy(); + this.datepickers[1].destroy(); + unregisterListeners(this); + delete this.element.rangepicker; + } + + /** + * Get the start and end dates of the date range + * + * The method returns Date objects by default. If format string is passed, + * it returns date strings formatted in given format. + * The result array always contains 2 items (start date/end date) and + * undefined is used for unselected side. (e.g. If none is selected, + * the result will be [undefined, undefined]. If only the end date is set + * when allowOneSidedRange config option is true, [undefined, endDate] will + * be returned.) + * + * @param {String} [format] - Format string to stringify the dates + * @return {Array} - Start and end dates + */ + }, { + key: "getDates", + value: function getDates() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.datepickers[0].config.locale); + } : function (date) { + return new Date(date); + }; + return this.dates.map(function (date) { + return date === undefined ? date : callback(date); + }); + } + + /** + * Set the start and end dates of the date range + * + * The method calls datepicker.setDate() internally using each of the + * arguments in start→end order. + * + * When a clear: true option object is passed instead of a date, the method + * clears the date. + * + * If an invalid date, the same date as the current one or an option object + * without clear: true is passed, the method considers that argument as an + * "ineffective" argument because calling datepicker.setDate() with those + * values makes no changes to the date selection. + * + * When the allowOneSidedRange config option is false, passing {clear: true} + * to clear the range works only when it is done to the last effective + * argument (in other words, passed to rangeEnd or to rangeStart along with + * ineffective rangeEnd). This is because when the date range is changed, + * it gets normalized based on the last change at the end of the changing + * process. + * + * @param {Date|Number|String|Object} rangeStart - Start date of the range + * or {clear: true} to clear the date + * @param {Date|Number|String|Object} rangeEnd - End date of the range + * or {clear: true} to clear the date + */ + }, { + key: "setDates", + value: function setDates(rangeStart, rangeEnd) { + var _this$datepickers = _slicedToArray(this.datepickers, 2), + datepicker0 = _this$datepickers[0], + datepicker1 = _this$datepickers[1]; + var origDates = this.dates; + + // If range normalization runs on every change, we can't set a new range + // that starts after the end of the current range correctly because the + // normalization process swaps start↔︎end right after setting the new start + // date. To prevent this, the normalization process needs to run once after + // both of the new dates are set. + this._updating = true; + datepicker0.setDate(rangeStart); + datepicker1.setDate(rangeEnd); + delete this._updating; + if (datepicker1.dates[0] !== origDates[1]) { + onChangeDate(this, { + target: this.inputs[1] + }); + } else if (datepicker0.dates[0] !== origDates[0]) { + onChangeDate(this, { + target: this.inputs[0] + }); + } + } + }]); +}(); + +export { DateRangePicker as default }; diff --git a/node_modules/flowbite-datepicker/dist/Datepicker.cjs.js b/node_modules/flowbite-datepicker/dist/Datepicker.cjs.js new file mode 100644 index 0000000..01bc361 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/Datepicker.cjs.js @@ -0,0 +1,2775 @@ +'use strict'; + +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; +} +function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); +} +function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); +} +function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); + } +} +function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; +} +function _get() { + return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { + var p = _superPropBase(e, t); + if (p) { + var n = Object.getOwnPropertyDescriptor(p, t); + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; + } + }, _get.apply(null, arguments); +} +function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, _getPrototypeOf(t); +} +function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), Object.defineProperty(t, "prototype", { + writable: !1 + }), e && _setPrototypeOf(t, e); +} +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function () { + return !!t; + })(); +} +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _possibleConstructorReturn(t, e) { + if (e && ("object" == typeof e || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t); +} +function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { + return t.__proto__ = e, t; + }, _setPrototypeOf(t, e); +} +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); +} +function _superPropBase(t, o) { + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); + return t; +} +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; +} +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } +} + +function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +function lastItemOf(arr) { + return arr[arr.length - 1]; +} + +// push only the items not included in the array +function pushUnique(arr) { + for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + items[_key - 1] = arguments[_key]; + } + items.forEach(function (item) { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; +} +function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; +} +function isInRange(testVal, min, max) { + var minOK = min === undefined || testVal >= min; + var maxOK = max === undefined || testVal <= max; + return minOK && maxOK; +} +function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +} +function createTagRepeat(tagName, repeat) { + var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ''; + var openTagSrc = Object.keys(attributes).reduce(function (src, attr) { + var val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return "".concat(src, " ").concat(attr, "=\"").concat(val, "\""); + }, tagName); + html += "<".concat(openTagSrc, ">"); + var next = index + 1; + return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html; +} + +// Remove the spacing surrounding tags for HTML parser not to create text nodes +// before/after elements +function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0; + var baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); +} + +// Get the ISO week of a date +function getWeek(date) { + // start of ISO week is Monday + var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; +} + +// Get the start year of the period of years that includes given date +// years: length of the year period +function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + var year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; +} + +// pattern for format parts +var reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/; +// pattern for non date parts +var reNonDateParts = /[\s!-/:-@[-`{-~年月日]+/; +// cache for persed formats +var knownFormats = {}; +// parse funtions for date parts +var parseFns = { + y: function y(date, year) { + return new Date(date).setFullYear(parseInt(year, 10)); + }, + m: function m(date, month, locale) { + var newDate = new Date(date); + var monthIndex = parseInt(month, 10) - 1; + if (isNaN(monthIndex)) { + if (!month) { + return NaN; + } + var monthName = month.toLowerCase(); + var compareNames = function compareNames(name) { + return name.toLowerCase().startsWith(monthName); + }; + // compare with both short and full names because some locales have periods + // in the short names (not equal to the first X letters of the full names) + monthIndex = locale.monthsShort.findIndex(compareNames); + if (monthIndex < 0) { + monthIndex = locale.months.findIndex(compareNames); + } + if (monthIndex < 0) { + return NaN; + } + } + newDate.setMonth(monthIndex); + return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime(); + }, + d: function d(date, day) { + return new Date(date).setDate(parseInt(day, 10)); + } +}; +// format functions for date parts +var formatFns = { + d: function d(date) { + return date.getDate(); + }, + dd: function dd(date) { + return padZero(date.getDate(), 2); + }, + D: function D(date, locale) { + return locale.daysShort[date.getDay()]; + }, + DD: function DD(date, locale) { + return locale.days[date.getDay()]; + }, + m: function m(date) { + return date.getMonth() + 1; + }, + mm: function mm(date) { + return padZero(date.getMonth() + 1, 2); + }, + M: function M(date, locale) { + return locale.monthsShort[date.getMonth()]; + }, + MM: function MM(date, locale) { + return locale.months[date.getMonth()]; + }, + y: function y(date) { + return date.getFullYear(); + }, + yy: function yy(date) { + return padZero(date.getFullYear(), 2).slice(-2); + }, + yyyy: function yyyy(date) { + return padZero(date.getFullYear(), 4); + } +}; + +// get month index in normal range (0 - 11) from any number +function normalizeMonth(monthIndex) { + return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); +} +function padZero(num, length) { + return num.toString().padStart(length, '0'); +} +function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + var separators = format.split(reFormatTokens); + var parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + var partFormatters = parts.map(function (token) { + return formatFns[token]; + }); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) { + var token = parts.find(function (part) { + return part[0] !== 'D' && part[0].toLowerCase() === key; + }); + if (token) { + keys.push(key); + } + return keys; + }, []); + return knownFormats[format] = { + parser: function parser(dateStr, locale) { + var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) { + if (part.length > 0 && parts[index]) { + var token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce(function (origDate, key) { + var newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, today()); + }, + formatter: function formatter(date, locale) { + var dateStr = partFormatters.reduce(function (str, fn, index) { + return str += "".concat(separators[index]).concat(fn(date, locale)); + }, ''); + // separators' length is always parts' length + 1, + return dateStr += lastItemOf(separators); + } + }; +} +function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + var date = stripTime(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return today(); + } + if (format && format.toValue) { + var _date = format.toValue(dateStr, format, locale); + return isNaN(_date) ? undefined : stripTime(_date); + } + return parseFormatString(format).parser(dateStr, locale); +} +function formatDate(date, format, locale) { + if (isNaN(date) || !date && date !== 0) { + return ''; + } + var dateObj = typeof date === 'number' ? new Date(date) : date; + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + return parseFormatString(format).formatter(dateObj, locale); +} + +var listenerRegistry = new WeakMap(); +var _EventTarget$prototyp = EventTarget.prototype, + addEventListener = _EventTarget$prototyp.addEventListener, + removeEventListener = _EventTarget$prototyp.removeEventListener; + +// Register event listeners to a key object +// listeners: array of listener definitions; +// - each definition must be a flat array of event target and the arguments +// used to call addEventListener() on the target +function registerListeners(keyObj, listeners) { + var registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach(function (listener) { + addEventListener.call.apply(addEventListener, _toConsumableArray(listener)); + registered.push(listener); + }); +} +function unregisterListeners(keyObj) { + var listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach(function (listener) { + removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener)); + }); + listenerRegistry["delete"](keyObj); +} + +// Event.composedPath() polyfill for Edge +// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec +if (!Event.prototype.composedPath) { + var getComposedPath = function getComposedPath(node) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + path.push(node); + var parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { + // ShadowRoot + parent = node.host; + } else if (node.defaultView) { + // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; +} +function findFromPath(path, criteria, currentTarget) { + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); +} + +// Search for the actual target of a delegated event +function findElementInEventPath(ev, selector) { + var criteria = typeof selector === 'function' ? selector : function (el) { + return el.matches(selector); + }; + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); +} + +// default locales +var locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } +}; + +// config options updatable by setOptions() and their default values +var defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, + // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0 +}; + +var range = document.createRange(); +function parseHTML(html) { + return range.createContextualFragment(html); +} +function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; +} +function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } +} +function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } +} +function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach(function (node) { + el.appendChild(node); + }); + } +} + +var defaultLang = defaultOptions.language, + defaultFormat = defaultOptions.format, + defaultWeekStart = defaultOptions.weekStart; + +// Reducer function to filter out invalid day-of-week from the input +function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow; +} +function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; +} + +// validate input date. if invalid, fallback to the original value +function validateDate(value, format, locale, origValue) { + var date = parseDate(value, format, locale); + return date !== undefined ? date : origValue; +} + +// Validate viewId. if invalid, fallback to the original value +function validateViewId(value, origValue) { + var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; + var viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; +} + +// Create Datepicker configuration to set +function processOptions(options, datepicker) { + var inOpts = Object.assign({}, options); + var config = {}; + var locales = datepicker.constructor.locales; + var _ref = datepicker.config || {}, + format = _ref.format, + language = _ref.language, + locale = _ref.locale, + maxDate = _ref.maxDate, + maxView = _ref.maxView, + minDate = _ref.minDate, + pickLevel = _ref.pickLevel, + startView = _ref.startView, + weekStart = _ref.weekStart; + if (inOpts.language) { + var lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + var origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + if (inOpts.format) { + var hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + var hasToValue = typeof inOpts.format.toValue === 'function'; + var validFormatString = reFormatTokens.test(inOpts.format); + if (hasToDisplay && hasToValue || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + var minDt = minDate; + var maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) { + var date = parseDate(dt, format, locale); + return date !== undefined ? pushUnique(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + var viewDate = parseDate(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + var wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + var newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + var newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + var newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + var prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + var nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + var orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(function (x) { + return x === 'left' || x === 'right'; + }) || 'auto', + y: orientation.find(function (y) { + return y === 'top' || y === 'bottom'; + }) || 'auto' + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch (inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach(function (key) { + if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + return config; +} + +var pickerTemplate = optimizeTemplateHTML("
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
"); + +var daysTemplate = optimizeTemplateHTML("
\n
".concat(createTagRepeat('span', 7, { + "class": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
").concat(createTagRepeat('span', 42, { + "class": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400' +}), "
\n
")); + +var calendarWeeksTemplate = optimizeTemplateHTML("
\n
\n
".concat(createTagRepeat('span', 6, { + "class": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
")); + +// Base class of the view classes +var View = /*#__PURE__*/function () { + function View(picker, config) { + _classCallCheck(this, View); + Object.assign(this, config, { + picker: picker, + element: parseHTML("
").firstChild, + selected: [] + }); + this.init(this.picker.datepicker.config); + } + return _createClass(View, [{ + key: "init", + value: function init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + }, { + key: "performBeforeHook", + value: function performBeforeHook(el, current, timeValue) { + var result = this.beforeShow(new Date(timeValue)); + switch (_typeof(result)) { + case 'boolean': + result = { + enabled: result + }; + break; + case 'string': + result = { + classes: result + }; + } + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + var _el$classList; + var extraClasses = result.classes.split(/\s+/); + (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses)); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } + }]); +}(); + +var DaysView = /*#__PURE__*/function (_View) { + function DaysView(picker) { + _classCallCheck(this, DaysView); + return _callSuper(this, DaysView, [picker, { + id: 0, + name: 'days', + cellClass: 'day' + }]); + } + _inherits(DaysView, _View); + return _createClass(DaysView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + var inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + _get(_getPrototypeOf(DaysView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + var _this = this; + var updateDOW; + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + var locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined; + } + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + var weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach(function (el, index) { + var dow = (_this.weekStart + index) % 7; + el.textContent = _this.dayNames[dow]; + el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var viewYear = viewDate.getFullYear(); + var viewMonth = viewDate.getMonth(); + var firstOfMonth = dateValue(viewYear, viewMonth, 1); + var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = _toConsumableArray(this.datesDisabled); + var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + var startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = addDays(_this2.start, index); + var date = new Date(current); + var day = date.getDay(); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + el.dataset.date = current; + el.textContent = date.getDate(); + if (current < _this2.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > _this2.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (_this2.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (_this2.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(_this2.disabled, current); + } + if (_this2.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.dataset.date); + var classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg'); + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + var _range = _slicedToArray(range, 2), + _range$ = _slicedToArray(_range[0], 2), + startY = _range$[0], + startM = _range$[1], + _range$2 = _slicedToArray(_range[1], 2), + endY = _range$2[0], + endM = _range$2[1]; + if (startY > thisYear || endY < thisYear) { + return; + } + return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12]; +} +var MonthsView = /*#__PURE__*/function (_View) { + function MonthsView(picker) { + _classCallCheck(this, MonthsView); + return _callSuper(this, MonthsView, [picker, { + id: 1, + name: 'months', + cellClass: 'month' + }]); + } + _inherits(MonthsView, _View); + return _createClass(MonthsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, { + 'data-month': function dataMonth(ix) { + return ix; + } + }))); + } + _get(_getPrototypeOf(MonthsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + var minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + var maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (selected, timeValue) { + var date = new Date(timeValue); + var year = date.getFullYear(); + var month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + var date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this = this; + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + var selected = this.selected[this.year] || []; + var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + var isMinYear = this.year === this.minYear; + var isMaxYear = this.year === this.maxYear; + var range = computeMonthRange(this.range, this.year); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var date = dateValue(_this.year, index, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this.cellClass); + if (_this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = _this.monthNames[index]; + if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) { + classList.add('disabled'); + } + if (range) { + var _range2 = _slicedToArray(range, 2), + rangeStart = _range2[0], + rangeEnd = _range2[1]; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this.focused) { + classList.add('focused'); + } + if (_this.beforeShow) { + _this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this2 = this; + var selected = this.selected[this.year] || []; + var _ref = computeMonthRange(this.range, this.year) || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this2.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } + }]); +}(View); + +function toTitleCase(word) { + return _toConsumableArray(word).reduce(function (str, ch, ix) { + return str += ix ? ch : ch.toUpperCase(); + }, ''); +} + +// Class representing the years and decades view elements +var YearsView = /*#__PURE__*/function (_View) { + function YearsView(picker, config) { + _classCallCheck(this, YearsView); + return _callSuper(this, YearsView, [picker, config]); + } + _inherits(YearsView, _View); + return _createClass(YearsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = "beforeShow".concat(toTitleCase(this.cellClass)); + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + _get(_getPrototypeOf(YearsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + var beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var first = startOfYearPeriod(viewDate, this.navStep); + var last = first + 9 * this.step; + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this = this; + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (years, timeValue) { + return pushUnique(years, startOfYearPeriod(timeValue, _this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, _this.step); + } + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel("".concat(this.first, "-").concat(this.last)); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = _this2.start + index * _this2.step; + var date = dateValue(current, 0, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + if (_this2.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < _this2.minYear || current > _this2.maxYear) { + classList.add('disabled'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.textContent); + var classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function triggerDatepickerEvent(datepicker, type) { + var detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker: datepicker + }; + datepicker.element.dispatchEvent(new CustomEvent(type, { + detail: detail + })); +} + +// direction: -1 (to previous), 1 (to next) +function goToPrevOrNext(datepicker, direction) { + var _datepicker$config = datepicker.config, + minDate = _datepicker$config.minDate, + maxDate = _datepicker$config.maxDate; + var _datepicker$picker = datepicker.picker, + currentView = _datepicker$picker.currentView, + viewDate = _datepicker$picker.viewDate; + var newViewDate; + switch (currentView.id) { + case 0: + newViewDate = addMonths(viewDate, direction); + break; + case 1: + newViewDate = addYears(viewDate, direction); + break; + default: + newViewDate = addYears(viewDate, direction * currentView.navStep); + } + newViewDate = limitToRange(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); +} +function switchView(datepicker) { + var viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); +} +function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({ + autohide: true + }); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } +} + +function goToSelectedMonthOrYear(datepicker, selection) { + var picker = datepicker.picker; + var viewDate = new Date(picker.viewDate); + var viewId = picker.currentView.id; + var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear()); + picker.changeFocus(newDate).changeView(viewId - 1).render(); +} +function onClickTodayBtn(datepicker) { + var picker = datepicker.picker; + var currentDate = today(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, { + render: false + }); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); +} +function onClickClearBtn(datepicker) { + datepicker.setDate({ + clear: true + }); +} +function onClickViewSwitch(datepicker) { + switchView(datepicker); +} +function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); +} +function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); +} + +// For the picker's main block to delegete the events from `datepicker-cell`s +function onClickView(datepicker, ev) { + var target = findElementInEventPath(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + var _datepicker$picker$cu = datepicker.picker.currentView, + id = _datepicker$picker$cu.id, + isMinView = _datepicker$picker$cu.isMinView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } +} +function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } +} + +function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + var prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach(function (node) { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + var nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach(function (node) { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) { + var _picker$datepicker$co = picker.datepicker.config, + minDate = _picker$datepicker$co.minDate, + maxDate = _picker$datepicker$co.maxDate; + picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } +} + +// Compute view date to reset, which will be... +// - the last item of the selected dates or defaultViewDate if no selection +// - limitted to minDate or maxDate if it exceeds the range +function computeResetViewDate(datepicker) { + var dates = datepicker.dates, + config = datepicker.config; + var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate; + return limitToRange(viewDate, config.minDate, config.maxDate); +} + +// Change current view's view date +function setViewDate(picker, newDate) { + var oldViewDate = new Date(picker.viewDate); + var newViewDate = new Date(newDate); + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + year = _picker$currentView.year, + first = _picker$currentView.first, + last = _picker$currentView.last; + var viewYear = newViewDate.getFullYear(); + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } +} +function getTextDirection(el) { + return window.getComputedStyle(el).direction; +} + +// Class representing the picker UI +var Picker = /*#__PURE__*/function () { + function Picker(datepicker) { + _classCallCheck(this, Picker); + this.datepicker = datepicker; + var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + var element = this.element = parseHTML(template).firstChild; + var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3), + header = _element$firstChild$c[0], + main = _element$firstChild$c[1], + footer = _element$firstChild$c[2]; + var title = header.firstElementChild; + var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3), + prevBtn = _header$lastElementCh[0], + viewSwitch = _header$lastElementCh[1], + nextBtn = _header$lastElementCh[2]; + var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2), + todayBtn = _footer$firstChild$ch[0], + clearBtn = _footer$firstChild$ch[1]; + var controls = { + title: title, + prevBtn: prevBtn, + viewSwitch: viewSwitch, + nextBtn: nextBtn, + todayBtn: todayBtn, + clearBtn: clearBtn + }; + this.main = main; + this.controls = controls; + var elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add("datepicker-".concat(elementClass)); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), { + capture: true + }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]); + + // set up views + this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, { + id: 2, + name: 'years', + cellClass: 'year', + step: 1 + }), new YearsView(this, { + id: 3, + name: 'decades', + cellClass: 'decade', + step: 10 + })]; + this.currentView = this.views[datepicker.config.startView]; + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + return _createClass(Picker, [{ + key: "setOptions", + value: function setOptions(options) { + processPickerOptions(this, options); + this.views.forEach(function (view) { + view.init(options, false); + }); + this.currentView.render(); + } + }, { + key: "detach", + value: function detach() { + this.datepicker.config.container.removeChild(this.element); + } + }, { + key: "show", + value: function show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + var datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + var inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + }, { + key: "hide", + value: function hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + }, { + key: "place", + value: function place() { + var _this$element = this.element, + classList = _this$element.classList, + style = _this$element.style; + var _this$datepicker = this.datepicker, + config = _this$datepicker.config, + inputField = _this$datepicker.inputField; + var container = config.container; + var _this$element$getBoun = this.element.getBoundingClientRect(), + calendarWidth = _this$element$getBoun.width, + calendarHeight = _this$element$getBoun.height; + var _container$getBoundin = container.getBoundingClientRect(), + containerLeft = _container$getBoundin.left, + containerTop = _container$getBoundin.top, + containerWidth = _container$getBoundin.width; + var _inputField$getBoundi = inputField.getBoundingClientRect(), + inputLeft = _inputField$getBoundi.left, + inputTop = _inputField$getBoundi.top, + inputWidth = _inputField$getBoundi.width, + inputHeight = _inputField$getBoundi.height; + var _config$orientation = config.orientation, + orientX = _config$orientation.x, + orientY = _config$orientation.y; + var scrollTop; + var left; + var top; + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left'); + classList.add("datepicker-orient-".concat(orientY), "datepicker-orient-".concat(orientX)); + style.top = top ? "".concat(top, "px") : top; + style.left = left ? "".concat(left, "px") : left; + } + }, { + key: "setViewSwitchLabel", + value: function setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + }, { + key: "setPrevBtnDisabled", + value: function setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + }, { + key: "setNextBtnDisabled", + value: function setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + }, { + key: "changeView", + value: function changeView(viewId) { + var oldView = this.currentView; + var newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + }, { + key: "changeFocus", + value: function changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach(function (view) { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + }, { + key: "update", + value: function update() { + var newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach(function (view) { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + }, { + key: "render", + value: function render() { + var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var renderMethod = quickRender && this._renderMethod || 'render'; + delete this._renderMethod; + this.currentView[renderMethod](); + } + }]); +}(); + +// Find the closest date that doesn't meet the condition for unavailable date +// Returns undefined if no available date is found +// addFn: function to calculate the next date +// - args: time value, amount +// increase: amount to pass to addFn +// testFn: function to test the unavailablity of the date +// - args: time value; retun: true if unavailable +function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!isInRange(date, min, max)) { + return; + } + if (testFn(date)) { + var newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; +} + +// direction: -1 (left/up), 1 (right/down) +// vertical: true for up/down, false for left/right +function moveByArrowKey(datepicker, ev, direction, vertical) { + var picker = datepicker.picker; + var currentView = picker.currentView; + var step = currentView.step || 1; + var viewDate = picker.viewDate; + var addFn; + var testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = addDays(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = addYears(viewDate, direction); + } else { + viewDate = addDays(viewDate, direction); + } + addFn = addDays; + testFn = function testFn(date) { + return currentView.disabled.includes(date); + }; + break; + case 1: + viewDate = addMonths(viewDate, vertical ? direction * 4 : direction); + addFn = addMonths; + testFn = function testFn(date) { + var dt = new Date(date); + var year = currentView.year, + disabled = currentView.disabled; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = addYears; + testFn = function testFn(date) { + return currentView.disabled.includes(startOfYearPeriod(date, step)); + }; + } + viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } +} +function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + var picker = datepicker.picker; + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + isMinView = _picker$currentView.isMinView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({ + update: true, + autohide: datepicker.config.autohide + }); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); +} +function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } +} + +// for the prevention for entering edit mode while getting focus on click +function onMousedown(datepicker, ev) { + var el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(function () { + delete el._active; + delete el._clicking; + }, 2000); + } +} +function onClickInput(datepicker, ev) { + var el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + if (datepicker.config.showOnClick) { + datepicker.show(); + } +} +function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } +} + +// for the `document` to delegate the events from outside the picker/input field +function onClickOutside(datepicker, ev) { + var element = datepicker.element; + if (element !== document.activeElement) { + return; + } + var pickerElem = datepicker.picker.element; + if (findElementInEventPath(ev, function (el) { + return el === element || el === pickerElem; + })) { + return; + } + unfocus(datepicker); +} + +function stringifyDates(dates, config) { + return dates.map(function (dt) { + return formatDate(dt, config.format, config.locale); + }).join(config.dateDelimiter); +} + +// parse input dates and create an array of time values for selection +// returns undefined if there are no valid dates in inputDates +// when origDates (current selection) is passed, the function works to mix +// the input dates into the current selection +function processInputDates(datepicker, inputDates) { + var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var config = datepicker.config, + origDates = datepicker.dates, + rangepicker = datepicker.rangepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + var newDates = inputDates.reduce(function (dates, dt) { + var date = parseDate(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + var _dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1); + } else { + date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1); + } + } + if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce(function (dates, date) { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(function (date) { + return !newDates.includes(date); + })); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates; +} + +// refresh the UI elements +// modes: 1: input only, 2, picker only, 3 both +function refreshUI(datepicker) { + var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3; + var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var config = datepicker.config, + picker = datepicker.picker, + inputField = datepicker.inputField; + if (mode & 2) { + var newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } +} +function _setDate(datepicker, inputDates, options) { + var clear = options.clear, + render = options.render, + autohide = options.autohide; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + var newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } +} + +/** + * Class representing a date picker + */ +var Datepicker = /*#__PURE__*/function () { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + function Datepicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + _classCallCheck(this, Datepicker); + element.datepicker = this; + this.element = element; + + // set up config + var config = this.config = Object.assign({ + buttonClass: options.buttonClass && String(options.buttonClass) || 'button', + container: document.body, + defaultViewDate: today(), + maxDate: undefined, + minDate: undefined + }, processOptions(defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + var inline = this.inline = element.tagName !== 'INPUT'; + var inputField; + var initialDates; + if (inline) { + config.container = element; + initialDates = stringToArray(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + var container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = stringToArray(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + var index = rangepicker.inputs.indexOf(inputField); + var datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get: function get() { + return rangepicker; + } + }); + } + + // set initial dates + this.dates = []; + // process initial value + var inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + var picker = this.picker = new Picker(this); + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + var onMousedownDocument = onClickOutside.bind(null, this); + var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]]; + registerListeners(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + return _createClass(Datepicker, [{ + key: "active", + get: + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + function get() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + }, { + key: "pickerElement", + get: function get() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + var picker = this.picker; + var newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + }, { + key: "show", + value: function show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + }, { + key: "hide", + value: function hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.hide(); + unregisterListeners(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + }, { + key: "getDate", + value: function getDate() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.config.locale); + } : function (date) { + return new Date(date); + }; + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + }, { + key: "setDate", + value: function setDate() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + var dates = [].concat(args); + var opts = {}; + var lastArg = lastItemOf(args); + if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) { + Object.assign(opts, dates.pop()); + } + var inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + _setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + }, { + key: "update", + value: function update() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline) { + return; + } + var opts = { + clear: true, + autohide: !!(options && options.autohide) + }; + var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter); + _setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + }, { + key: "refresh", + value: function refresh() { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + var mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + }, { + key: "enterEditMode", + value: function enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + }, { + key: "exitEditMode", + value: function exitEditMode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline || !this.editMode) { + return; + } + var opts = Object.assign({ + update: false + }, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700'); + if (opts.update) { + this.update(opts); + } + } + }], [{ + key: "formatDate", + value: function formatDate$1(date, format, lang) { + return formatDate(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + }, { + key: "parseDate", + value: function parseDate$1(dateStr, format, lang) { + return parseDate(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + }, { + key: "locales", + get: function get() { + return locales; + } + }]); +}(); + +module.exports = Datepicker; diff --git a/node_modules/flowbite-datepicker/dist/Datepicker.esm.js b/node_modules/flowbite-datepicker/dist/Datepicker.esm.js new file mode 100644 index 0000000..192a880 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/Datepicker.esm.js @@ -0,0 +1,2773 @@ +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; +} +function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); +} +function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); +} +function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); + } +} +function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; +} +function _get() { + return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { + var p = _superPropBase(e, t); + if (p) { + var n = Object.getOwnPropertyDescriptor(p, t); + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; + } + }, _get.apply(null, arguments); +} +function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, _getPrototypeOf(t); +} +function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), Object.defineProperty(t, "prototype", { + writable: !1 + }), e && _setPrototypeOf(t, e); +} +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function () { + return !!t; + })(); +} +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _possibleConstructorReturn(t, e) { + if (e && ("object" == typeof e || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t); +} +function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { + return t.__proto__ = e, t; + }, _setPrototypeOf(t, e); +} +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); +} +function _superPropBase(t, o) { + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); + return t; +} +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; +} +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } +} + +function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +function lastItemOf(arr) { + return arr[arr.length - 1]; +} + +// push only the items not included in the array +function pushUnique(arr) { + for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + items[_key - 1] = arguments[_key]; + } + items.forEach(function (item) { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; +} +function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; +} +function isInRange(testVal, min, max) { + var minOK = min === undefined || testVal >= min; + var maxOK = max === undefined || testVal <= max; + return minOK && maxOK; +} +function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +} +function createTagRepeat(tagName, repeat) { + var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ''; + var openTagSrc = Object.keys(attributes).reduce(function (src, attr) { + var val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return "".concat(src, " ").concat(attr, "=\"").concat(val, "\""); + }, tagName); + html += "<".concat(openTagSrc, ">"); + var next = index + 1; + return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html; +} + +// Remove the spacing surrounding tags for HTML parser not to create text nodes +// before/after elements +function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0; + var baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); +} + +// Get the ISO week of a date +function getWeek(date) { + // start of ISO week is Monday + var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; +} + +// Get the start year of the period of years that includes given date +// years: length of the year period +function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + var year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; +} + +// pattern for format parts +var reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/; +// pattern for non date parts +var reNonDateParts = /[\s!-/:-@[-`{-~年月日]+/; +// cache for persed formats +var knownFormats = {}; +// parse funtions for date parts +var parseFns = { + y: function y(date, year) { + return new Date(date).setFullYear(parseInt(year, 10)); + }, + m: function m(date, month, locale) { + var newDate = new Date(date); + var monthIndex = parseInt(month, 10) - 1; + if (isNaN(monthIndex)) { + if (!month) { + return NaN; + } + var monthName = month.toLowerCase(); + var compareNames = function compareNames(name) { + return name.toLowerCase().startsWith(monthName); + }; + // compare with both short and full names because some locales have periods + // in the short names (not equal to the first X letters of the full names) + monthIndex = locale.monthsShort.findIndex(compareNames); + if (monthIndex < 0) { + monthIndex = locale.months.findIndex(compareNames); + } + if (monthIndex < 0) { + return NaN; + } + } + newDate.setMonth(monthIndex); + return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime(); + }, + d: function d(date, day) { + return new Date(date).setDate(parseInt(day, 10)); + } +}; +// format functions for date parts +var formatFns = { + d: function d(date) { + return date.getDate(); + }, + dd: function dd(date) { + return padZero(date.getDate(), 2); + }, + D: function D(date, locale) { + return locale.daysShort[date.getDay()]; + }, + DD: function DD(date, locale) { + return locale.days[date.getDay()]; + }, + m: function m(date) { + return date.getMonth() + 1; + }, + mm: function mm(date) { + return padZero(date.getMonth() + 1, 2); + }, + M: function M(date, locale) { + return locale.monthsShort[date.getMonth()]; + }, + MM: function MM(date, locale) { + return locale.months[date.getMonth()]; + }, + y: function y(date) { + return date.getFullYear(); + }, + yy: function yy(date) { + return padZero(date.getFullYear(), 2).slice(-2); + }, + yyyy: function yyyy(date) { + return padZero(date.getFullYear(), 4); + } +}; + +// get month index in normal range (0 - 11) from any number +function normalizeMonth(monthIndex) { + return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); +} +function padZero(num, length) { + return num.toString().padStart(length, '0'); +} +function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + var separators = format.split(reFormatTokens); + var parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + var partFormatters = parts.map(function (token) { + return formatFns[token]; + }); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) { + var token = parts.find(function (part) { + return part[0] !== 'D' && part[0].toLowerCase() === key; + }); + if (token) { + keys.push(key); + } + return keys; + }, []); + return knownFormats[format] = { + parser: function parser(dateStr, locale) { + var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) { + if (part.length > 0 && parts[index]) { + var token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce(function (origDate, key) { + var newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, today()); + }, + formatter: function formatter(date, locale) { + var dateStr = partFormatters.reduce(function (str, fn, index) { + return str += "".concat(separators[index]).concat(fn(date, locale)); + }, ''); + // separators' length is always parts' length + 1, + return dateStr += lastItemOf(separators); + } + }; +} +function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + var date = stripTime(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return today(); + } + if (format && format.toValue) { + var _date = format.toValue(dateStr, format, locale); + return isNaN(_date) ? undefined : stripTime(_date); + } + return parseFormatString(format).parser(dateStr, locale); +} +function formatDate(date, format, locale) { + if (isNaN(date) || !date && date !== 0) { + return ''; + } + var dateObj = typeof date === 'number' ? new Date(date) : date; + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + return parseFormatString(format).formatter(dateObj, locale); +} + +var listenerRegistry = new WeakMap(); +var _EventTarget$prototyp = EventTarget.prototype, + addEventListener = _EventTarget$prototyp.addEventListener, + removeEventListener = _EventTarget$prototyp.removeEventListener; + +// Register event listeners to a key object +// listeners: array of listener definitions; +// - each definition must be a flat array of event target and the arguments +// used to call addEventListener() on the target +function registerListeners(keyObj, listeners) { + var registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach(function (listener) { + addEventListener.call.apply(addEventListener, _toConsumableArray(listener)); + registered.push(listener); + }); +} +function unregisterListeners(keyObj) { + var listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach(function (listener) { + removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener)); + }); + listenerRegistry["delete"](keyObj); +} + +// Event.composedPath() polyfill for Edge +// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec +if (!Event.prototype.composedPath) { + var getComposedPath = function getComposedPath(node) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + path.push(node); + var parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { + // ShadowRoot + parent = node.host; + } else if (node.defaultView) { + // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; +} +function findFromPath(path, criteria, currentTarget) { + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); +} + +// Search for the actual target of a delegated event +function findElementInEventPath(ev, selector) { + var criteria = typeof selector === 'function' ? selector : function (el) { + return el.matches(selector); + }; + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); +} + +// default locales +var locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } +}; + +// config options updatable by setOptions() and their default values +var defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, + // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0 +}; + +var range = document.createRange(); +function parseHTML(html) { + return range.createContextualFragment(html); +} +function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; +} +function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } +} +function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } +} +function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach(function (node) { + el.appendChild(node); + }); + } +} + +var defaultLang = defaultOptions.language, + defaultFormat = defaultOptions.format, + defaultWeekStart = defaultOptions.weekStart; + +// Reducer function to filter out invalid day-of-week from the input +function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow; +} +function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; +} + +// validate input date. if invalid, fallback to the original value +function validateDate(value, format, locale, origValue) { + var date = parseDate(value, format, locale); + return date !== undefined ? date : origValue; +} + +// Validate viewId. if invalid, fallback to the original value +function validateViewId(value, origValue) { + var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; + var viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; +} + +// Create Datepicker configuration to set +function processOptions(options, datepicker) { + var inOpts = Object.assign({}, options); + var config = {}; + var locales = datepicker.constructor.locales; + var _ref = datepicker.config || {}, + format = _ref.format, + language = _ref.language, + locale = _ref.locale, + maxDate = _ref.maxDate, + maxView = _ref.maxView, + minDate = _ref.minDate, + pickLevel = _ref.pickLevel, + startView = _ref.startView, + weekStart = _ref.weekStart; + if (inOpts.language) { + var lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + var origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + if (inOpts.format) { + var hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + var hasToValue = typeof inOpts.format.toValue === 'function'; + var validFormatString = reFormatTokens.test(inOpts.format); + if (hasToDisplay && hasToValue || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + var minDt = minDate; + var maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) { + var date = parseDate(dt, format, locale); + return date !== undefined ? pushUnique(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + var viewDate = parseDate(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + var wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + var newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + var newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + var newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + var prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + var nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + var orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(function (x) { + return x === 'left' || x === 'right'; + }) || 'auto', + y: orientation.find(function (y) { + return y === 'top' || y === 'bottom'; + }) || 'auto' + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch (inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach(function (key) { + if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + return config; +} + +var pickerTemplate = optimizeTemplateHTML("
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
"); + +var daysTemplate = optimizeTemplateHTML("
\n
".concat(createTagRepeat('span', 7, { + "class": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
").concat(createTagRepeat('span', 42, { + "class": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400' +}), "
\n
")); + +var calendarWeeksTemplate = optimizeTemplateHTML("
\n
\n
".concat(createTagRepeat('span', 6, { + "class": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
")); + +// Base class of the view classes +var View = /*#__PURE__*/function () { + function View(picker, config) { + _classCallCheck(this, View); + Object.assign(this, config, { + picker: picker, + element: parseHTML("
").firstChild, + selected: [] + }); + this.init(this.picker.datepicker.config); + } + return _createClass(View, [{ + key: "init", + value: function init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + }, { + key: "performBeforeHook", + value: function performBeforeHook(el, current, timeValue) { + var result = this.beforeShow(new Date(timeValue)); + switch (_typeof(result)) { + case 'boolean': + result = { + enabled: result + }; + break; + case 'string': + result = { + classes: result + }; + } + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + var _el$classList; + var extraClasses = result.classes.split(/\s+/); + (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses)); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } + }]); +}(); + +var DaysView = /*#__PURE__*/function (_View) { + function DaysView(picker) { + _classCallCheck(this, DaysView); + return _callSuper(this, DaysView, [picker, { + id: 0, + name: 'days', + cellClass: 'day' + }]); + } + _inherits(DaysView, _View); + return _createClass(DaysView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + var inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + _get(_getPrototypeOf(DaysView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + var _this = this; + var updateDOW; + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + var locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined; + } + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + var weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach(function (el, index) { + var dow = (_this.weekStart + index) % 7; + el.textContent = _this.dayNames[dow]; + el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var viewYear = viewDate.getFullYear(); + var viewMonth = viewDate.getMonth(); + var firstOfMonth = dateValue(viewYear, viewMonth, 1); + var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = _toConsumableArray(this.datesDisabled); + var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + var startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = addDays(_this2.start, index); + var date = new Date(current); + var day = date.getDay(); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + el.dataset.date = current; + el.textContent = date.getDate(); + if (current < _this2.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > _this2.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (_this2.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (_this2.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(_this2.disabled, current); + } + if (_this2.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.dataset.date); + var classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg'); + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + var _range = _slicedToArray(range, 2), + _range$ = _slicedToArray(_range[0], 2), + startY = _range$[0], + startM = _range$[1], + _range$2 = _slicedToArray(_range[1], 2), + endY = _range$2[0], + endM = _range$2[1]; + if (startY > thisYear || endY < thisYear) { + return; + } + return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12]; +} +var MonthsView = /*#__PURE__*/function (_View) { + function MonthsView(picker) { + _classCallCheck(this, MonthsView); + return _callSuper(this, MonthsView, [picker, { + id: 1, + name: 'months', + cellClass: 'month' + }]); + } + _inherits(MonthsView, _View); + return _createClass(MonthsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, { + 'data-month': function dataMonth(ix) { + return ix; + } + }))); + } + _get(_getPrototypeOf(MonthsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + var minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + var maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (selected, timeValue) { + var date = new Date(timeValue); + var year = date.getFullYear(); + var month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + var date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this = this; + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + var selected = this.selected[this.year] || []; + var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + var isMinYear = this.year === this.minYear; + var isMaxYear = this.year === this.maxYear; + var range = computeMonthRange(this.range, this.year); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var date = dateValue(_this.year, index, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this.cellClass); + if (_this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = _this.monthNames[index]; + if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) { + classList.add('disabled'); + } + if (range) { + var _range2 = _slicedToArray(range, 2), + rangeStart = _range2[0], + rangeEnd = _range2[1]; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this.focused) { + classList.add('focused'); + } + if (_this.beforeShow) { + _this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this2 = this; + var selected = this.selected[this.year] || []; + var _ref = computeMonthRange(this.range, this.year) || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this2.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } + }]); +}(View); + +function toTitleCase(word) { + return _toConsumableArray(word).reduce(function (str, ch, ix) { + return str += ix ? ch : ch.toUpperCase(); + }, ''); +} + +// Class representing the years and decades view elements +var YearsView = /*#__PURE__*/function (_View) { + function YearsView(picker, config) { + _classCallCheck(this, YearsView); + return _callSuper(this, YearsView, [picker, config]); + } + _inherits(YearsView, _View); + return _createClass(YearsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = "beforeShow".concat(toTitleCase(this.cellClass)); + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + _get(_getPrototypeOf(YearsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + var beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var first = startOfYearPeriod(viewDate, this.navStep); + var last = first + 9 * this.step; + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this = this; + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (years, timeValue) { + return pushUnique(years, startOfYearPeriod(timeValue, _this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, _this.step); + } + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel("".concat(this.first, "-").concat(this.last)); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = _this2.start + index * _this2.step; + var date = dateValue(current, 0, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + if (_this2.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < _this2.minYear || current > _this2.maxYear) { + classList.add('disabled'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.textContent); + var classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function triggerDatepickerEvent(datepicker, type) { + var detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker: datepicker + }; + datepicker.element.dispatchEvent(new CustomEvent(type, { + detail: detail + })); +} + +// direction: -1 (to previous), 1 (to next) +function goToPrevOrNext(datepicker, direction) { + var _datepicker$config = datepicker.config, + minDate = _datepicker$config.minDate, + maxDate = _datepicker$config.maxDate; + var _datepicker$picker = datepicker.picker, + currentView = _datepicker$picker.currentView, + viewDate = _datepicker$picker.viewDate; + var newViewDate; + switch (currentView.id) { + case 0: + newViewDate = addMonths(viewDate, direction); + break; + case 1: + newViewDate = addYears(viewDate, direction); + break; + default: + newViewDate = addYears(viewDate, direction * currentView.navStep); + } + newViewDate = limitToRange(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); +} +function switchView(datepicker) { + var viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); +} +function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({ + autohide: true + }); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } +} + +function goToSelectedMonthOrYear(datepicker, selection) { + var picker = datepicker.picker; + var viewDate = new Date(picker.viewDate); + var viewId = picker.currentView.id; + var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear()); + picker.changeFocus(newDate).changeView(viewId - 1).render(); +} +function onClickTodayBtn(datepicker) { + var picker = datepicker.picker; + var currentDate = today(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, { + render: false + }); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); +} +function onClickClearBtn(datepicker) { + datepicker.setDate({ + clear: true + }); +} +function onClickViewSwitch(datepicker) { + switchView(datepicker); +} +function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); +} +function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); +} + +// For the picker's main block to delegete the events from `datepicker-cell`s +function onClickView(datepicker, ev) { + var target = findElementInEventPath(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + var _datepicker$picker$cu = datepicker.picker.currentView, + id = _datepicker$picker$cu.id, + isMinView = _datepicker$picker$cu.isMinView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } +} +function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } +} + +function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + var prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach(function (node) { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + var nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach(function (node) { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) { + var _picker$datepicker$co = picker.datepicker.config, + minDate = _picker$datepicker$co.minDate, + maxDate = _picker$datepicker$co.maxDate; + picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } +} + +// Compute view date to reset, which will be... +// - the last item of the selected dates or defaultViewDate if no selection +// - limitted to minDate or maxDate if it exceeds the range +function computeResetViewDate(datepicker) { + var dates = datepicker.dates, + config = datepicker.config; + var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate; + return limitToRange(viewDate, config.minDate, config.maxDate); +} + +// Change current view's view date +function setViewDate(picker, newDate) { + var oldViewDate = new Date(picker.viewDate); + var newViewDate = new Date(newDate); + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + year = _picker$currentView.year, + first = _picker$currentView.first, + last = _picker$currentView.last; + var viewYear = newViewDate.getFullYear(); + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } +} +function getTextDirection(el) { + return window.getComputedStyle(el).direction; +} + +// Class representing the picker UI +var Picker = /*#__PURE__*/function () { + function Picker(datepicker) { + _classCallCheck(this, Picker); + this.datepicker = datepicker; + var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + var element = this.element = parseHTML(template).firstChild; + var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3), + header = _element$firstChild$c[0], + main = _element$firstChild$c[1], + footer = _element$firstChild$c[2]; + var title = header.firstElementChild; + var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3), + prevBtn = _header$lastElementCh[0], + viewSwitch = _header$lastElementCh[1], + nextBtn = _header$lastElementCh[2]; + var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2), + todayBtn = _footer$firstChild$ch[0], + clearBtn = _footer$firstChild$ch[1]; + var controls = { + title: title, + prevBtn: prevBtn, + viewSwitch: viewSwitch, + nextBtn: nextBtn, + todayBtn: todayBtn, + clearBtn: clearBtn + }; + this.main = main; + this.controls = controls; + var elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add("datepicker-".concat(elementClass)); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), { + capture: true + }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]); + + // set up views + this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, { + id: 2, + name: 'years', + cellClass: 'year', + step: 1 + }), new YearsView(this, { + id: 3, + name: 'decades', + cellClass: 'decade', + step: 10 + })]; + this.currentView = this.views[datepicker.config.startView]; + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + return _createClass(Picker, [{ + key: "setOptions", + value: function setOptions(options) { + processPickerOptions(this, options); + this.views.forEach(function (view) { + view.init(options, false); + }); + this.currentView.render(); + } + }, { + key: "detach", + value: function detach() { + this.datepicker.config.container.removeChild(this.element); + } + }, { + key: "show", + value: function show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + var datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + var inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + }, { + key: "hide", + value: function hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + }, { + key: "place", + value: function place() { + var _this$element = this.element, + classList = _this$element.classList, + style = _this$element.style; + var _this$datepicker = this.datepicker, + config = _this$datepicker.config, + inputField = _this$datepicker.inputField; + var container = config.container; + var _this$element$getBoun = this.element.getBoundingClientRect(), + calendarWidth = _this$element$getBoun.width, + calendarHeight = _this$element$getBoun.height; + var _container$getBoundin = container.getBoundingClientRect(), + containerLeft = _container$getBoundin.left, + containerTop = _container$getBoundin.top, + containerWidth = _container$getBoundin.width; + var _inputField$getBoundi = inputField.getBoundingClientRect(), + inputLeft = _inputField$getBoundi.left, + inputTop = _inputField$getBoundi.top, + inputWidth = _inputField$getBoundi.width, + inputHeight = _inputField$getBoundi.height; + var _config$orientation = config.orientation, + orientX = _config$orientation.x, + orientY = _config$orientation.y; + var scrollTop; + var left; + var top; + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left'); + classList.add("datepicker-orient-".concat(orientY), "datepicker-orient-".concat(orientX)); + style.top = top ? "".concat(top, "px") : top; + style.left = left ? "".concat(left, "px") : left; + } + }, { + key: "setViewSwitchLabel", + value: function setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + }, { + key: "setPrevBtnDisabled", + value: function setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + }, { + key: "setNextBtnDisabled", + value: function setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + }, { + key: "changeView", + value: function changeView(viewId) { + var oldView = this.currentView; + var newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + }, { + key: "changeFocus", + value: function changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach(function (view) { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + }, { + key: "update", + value: function update() { + var newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach(function (view) { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + }, { + key: "render", + value: function render() { + var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var renderMethod = quickRender && this._renderMethod || 'render'; + delete this._renderMethod; + this.currentView[renderMethod](); + } + }]); +}(); + +// Find the closest date that doesn't meet the condition for unavailable date +// Returns undefined if no available date is found +// addFn: function to calculate the next date +// - args: time value, amount +// increase: amount to pass to addFn +// testFn: function to test the unavailablity of the date +// - args: time value; retun: true if unavailable +function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!isInRange(date, min, max)) { + return; + } + if (testFn(date)) { + var newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; +} + +// direction: -1 (left/up), 1 (right/down) +// vertical: true for up/down, false for left/right +function moveByArrowKey(datepicker, ev, direction, vertical) { + var picker = datepicker.picker; + var currentView = picker.currentView; + var step = currentView.step || 1; + var viewDate = picker.viewDate; + var addFn; + var testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = addDays(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = addYears(viewDate, direction); + } else { + viewDate = addDays(viewDate, direction); + } + addFn = addDays; + testFn = function testFn(date) { + return currentView.disabled.includes(date); + }; + break; + case 1: + viewDate = addMonths(viewDate, vertical ? direction * 4 : direction); + addFn = addMonths; + testFn = function testFn(date) { + var dt = new Date(date); + var year = currentView.year, + disabled = currentView.disabled; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = addYears; + testFn = function testFn(date) { + return currentView.disabled.includes(startOfYearPeriod(date, step)); + }; + } + viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } +} +function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + var picker = datepicker.picker; + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + isMinView = _picker$currentView.isMinView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({ + update: true, + autohide: datepicker.config.autohide + }); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); +} +function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } +} + +// for the prevention for entering edit mode while getting focus on click +function onMousedown(datepicker, ev) { + var el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(function () { + delete el._active; + delete el._clicking; + }, 2000); + } +} +function onClickInput(datepicker, ev) { + var el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + if (datepicker.config.showOnClick) { + datepicker.show(); + } +} +function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } +} + +// for the `document` to delegate the events from outside the picker/input field +function onClickOutside(datepicker, ev) { + var element = datepicker.element; + if (element !== document.activeElement) { + return; + } + var pickerElem = datepicker.picker.element; + if (findElementInEventPath(ev, function (el) { + return el === element || el === pickerElem; + })) { + return; + } + unfocus(datepicker); +} + +function stringifyDates(dates, config) { + return dates.map(function (dt) { + return formatDate(dt, config.format, config.locale); + }).join(config.dateDelimiter); +} + +// parse input dates and create an array of time values for selection +// returns undefined if there are no valid dates in inputDates +// when origDates (current selection) is passed, the function works to mix +// the input dates into the current selection +function processInputDates(datepicker, inputDates) { + var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var config = datepicker.config, + origDates = datepicker.dates, + rangepicker = datepicker.rangepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + var newDates = inputDates.reduce(function (dates, dt) { + var date = parseDate(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + var _dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1); + } else { + date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1); + } + } + if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce(function (dates, date) { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(function (date) { + return !newDates.includes(date); + })); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates; +} + +// refresh the UI elements +// modes: 1: input only, 2, picker only, 3 both +function refreshUI(datepicker) { + var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3; + var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var config = datepicker.config, + picker = datepicker.picker, + inputField = datepicker.inputField; + if (mode & 2) { + var newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } +} +function _setDate(datepicker, inputDates, options) { + var clear = options.clear, + render = options.render, + autohide = options.autohide; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + var newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } +} + +/** + * Class representing a date picker + */ +var Datepicker = /*#__PURE__*/function () { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + function Datepicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + _classCallCheck(this, Datepicker); + element.datepicker = this; + this.element = element; + + // set up config + var config = this.config = Object.assign({ + buttonClass: options.buttonClass && String(options.buttonClass) || 'button', + container: document.body, + defaultViewDate: today(), + maxDate: undefined, + minDate: undefined + }, processOptions(defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + var inline = this.inline = element.tagName !== 'INPUT'; + var inputField; + var initialDates; + if (inline) { + config.container = element; + initialDates = stringToArray(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + var container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = stringToArray(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + var index = rangepicker.inputs.indexOf(inputField); + var datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get: function get() { + return rangepicker; + } + }); + } + + // set initial dates + this.dates = []; + // process initial value + var inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + var picker = this.picker = new Picker(this); + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + var onMousedownDocument = onClickOutside.bind(null, this); + var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]]; + registerListeners(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + return _createClass(Datepicker, [{ + key: "active", + get: + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + function get() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + }, { + key: "pickerElement", + get: function get() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + var picker = this.picker; + var newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + }, { + key: "show", + value: function show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + }, { + key: "hide", + value: function hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.hide(); + unregisterListeners(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + }, { + key: "getDate", + value: function getDate() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.config.locale); + } : function (date) { + return new Date(date); + }; + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + }, { + key: "setDate", + value: function setDate() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + var dates = [].concat(args); + var opts = {}; + var lastArg = lastItemOf(args); + if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) { + Object.assign(opts, dates.pop()); + } + var inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + _setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + }, { + key: "update", + value: function update() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline) { + return; + } + var opts = { + clear: true, + autohide: !!(options && options.autohide) + }; + var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter); + _setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + }, { + key: "refresh", + value: function refresh() { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + var mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + }, { + key: "enterEditMode", + value: function enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + }, { + key: "exitEditMode", + value: function exitEditMode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline || !this.editMode) { + return; + } + var opts = Object.assign({ + update: false + }, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700'); + if (opts.update) { + this.update(opts); + } + } + }], [{ + key: "formatDate", + value: function formatDate$1(date, format, lang) { + return formatDate(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + }, { + key: "parseDate", + value: function parseDate$1(dateStr, format, lang) { + return parseDate(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + }, { + key: "locales", + get: function get() { + return locales; + } + }]); +}(); + +export { Datepicker as default }; diff --git a/node_modules/flowbite-datepicker/dist/css/datepicker-bs4.css b/node_modules/flowbite-datepicker/dist/css/datepicker-bs4.css new file mode 100644 index 0000000..f53ce70 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/css/datepicker-bs4.css @@ -0,0 +1,276 @@ +.datepicker { + display: none; +} + +.datepicker.active { + display: block; +} + +.datepicker-dropdown { + position: absolute; + top: 0; + left: 0; + z-index: 1000; + padding-top: 4px; +} + +.datepicker-dropdown.datepicker-orient-top { + padding-top: 0; + padding-bottom: 4px; +} + +.datepicker-picker { + display: inline-block; + border-radius: 0.25rem; + background-color: #fff; +} + +.datepicker-dropdown .datepicker-picker { + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175); +} + +.datepicker-picker span { + display: block; + flex: 1; + border: 0; + border-radius: 0.25rem; + cursor: default; + text-align: center; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.datepicker-main { + padding: 2px; +} + +.datepicker-footer { + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); + background-color: #f8f9fa; +} + +.datepicker-controls, .datepicker-view, .datepicker-view .days-of-week, .datepicker-grid { + display: flex; +} + +.datepicker-grid { + flex-wrap: wrap; +} + +.datepicker-view .dow, .datepicker-view .days .datepicker-cell { + flex-basis: 14.28571%; +} + +.datepicker-view.datepicker-grid .datepicker-cell { + flex-basis: 25%; +} + +.datepicker-view .week, .datepicker-cell { + height: 2.25rem; + line-height: 2.25rem; +} + +.datepicker-title { + box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.1); + background-color: #f8f9fa; + padding: 0.375rem 0.75rem; + text-align: center; + font-weight: 700; +} + +.datepicker-header .datepicker-controls { + padding: 2px 2px 0; +} + +.datepicker-controls .btn { + border-color: #f8f9fa; + background-color: #fff; +} + +.datepicker-controls .btn:hover { + border-color: #dae0e5; + background-color: #e2e6ea; + color: #212529; +} + +.datepicker-controls .btn:focus { + border-color: #dae0e5; + box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5); + background-color: #e2e6ea; + color: #212529; +} + +.datepicker-controls .btn:disabled { + border-color: #f8f9fa; + background-color: #f8f9fa; + color: #212529; +} + +.datepicker-controls .btn:not(:disabled):active { + border-color: #d3d9df; + background-color: #dae0e5; + color: #212529; +} + +.datepicker-controls .btn:not(:disabled):active:focus { + box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5); +} + +.datepicker-header .datepicker-controls .btn { + border-color: transparent; + font-weight: bold; +} + +.datepicker-footer .datepicker-controls .btn { + margin: calc(0.375rem - 1px) 0.375rem; + border-radius: 0.2rem; + width: 100%; + font-size: 0.875rem; +} + +.datepicker-controls .view-switch { + flex: auto; +} + +.datepicker-controls .prev-btn, +.datepicker-controls .next-btn { + padding-right: 0.375rem; + padding-left: 0.375rem; + width: 2.25rem; +} + +.datepicker-controls .prev-btn.disabled, +.datepicker-controls .next-btn.disabled { + visibility: hidden; +} + +.datepicker-view .dow { + height: 1.5rem; + line-height: 1.5rem; + font-size: 0.9375rem; + font-weight: 700; +} + +.datepicker-view .week { + width: 2.25rem; + color: #dee2e6; + font-size: 0.875rem; +} + +@media (max-width: 22.5rem) { + .datepicker-view .week { + width: 1.96875rem; + } +} + +.datepicker-grid { + width: 15.75rem; +} + +@media (max-width: 22.5rem) { + .calendar-weeks + .days .datepicker-grid { + width: 13.78125rem; + } +} + +.datepicker-cell:not(.disabled):hover { + background-color: #f9f9f9; + cursor: pointer; +} + +.datepicker-cell.focused:not(.selected) { + background-color: #f1f3f5; +} + +.datepicker-cell.selected, .datepicker-cell.selected:hover { + background-color: #007bff; + color: #fff; + font-weight: 600; +} + +.datepicker-cell.disabled { + color: #6c757d; +} + +.datepicker-cell.prev:not(.disabled), .datepicker-cell.next:not(.disabled) { + color: #6c757d; +} + +.datepicker-cell.prev.selected, .datepicker-cell.next.selected { + color: #e6e6e6; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today) { + border-radius: 0; + background-color: #f8f9fa; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover { + background-color: #f1f3f5; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused { + background-color: #f1f3f5; +} + +.datepicker-cell.today:not(.selected) { + background-color: #20c997; +} + +.datepicker-cell.today:not(.selected):not(.disabled) { + color: #fff; +} + +.datepicker-cell.today.focused:not(.selected) { + background-color: #1ebe8f; +} + +.datepicker-cell.range-start:not(.selected), .datepicker-cell.range-end:not(.selected) { + background-color: #6c757d; + color: #fff; +} + +.datepicker-cell.range-start.focused:not(.selected), .datepicker-cell.range-end.focused:not(.selected) { + background-color: #666f76; +} + +.datepicker-cell.range-start { + border-radius: 0.25rem 0 0 0.25rem; +} + +.datepicker-cell.range-end { + border-radius: 0 0.25rem 0.25rem 0; +} + +.datepicker-cell.range { + border-radius: 0; + background-color: #e9ecef; +} + +.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover { + background-color: #e2e6ea; +} + +.datepicker-cell.range.disabled { + color: #cbd3da; +} + +.datepicker-cell.range.focused { + background-color: #dadfe4; +} + +.datepicker-view.datepicker-grid .datepicker-cell { + height: 4.5rem; + line-height: 4.5rem; +} + +.datepicker-input.in-edit { + border-color: #66b0ff; +} + +.datepicker-input.in-edit:focus, .datepicker-input.in-edit:active { + box-shadow: 0 0 0.25em 0.25em rgba(102, 176, 255, 0.2); +} diff --git a/node_modules/flowbite-datepicker/dist/css/datepicker-bs4.min.css b/node_modules/flowbite-datepicker/dist/css/datepicker-bs4.min.css new file mode 100644 index 0000000..2ff561d --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/css/datepicker-bs4.min.css @@ -0,0 +1 @@ +.datepicker{display:none}.datepicker.active{display:block}.datepicker-dropdown{position:absolute;top:0;left:0;z-index:1000;padding-top:4px}.datepicker-dropdown.datepicker-orient-top{padding-top:0;padding-bottom:4px}.datepicker-picker{display:inline-block;border-radius:.25rem;background-color:#fff}.datepicker-dropdown .datepicker-picker{box-shadow:0 .5rem 1rem rgba(0,0,0,.175)}.datepicker-picker span{display:block;flex:1;border:0;border-radius:.25rem;cursor:default;text-align:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker-main{padding:2px}.datepicker-footer{box-shadow:inset 0 1px 1px rgba(0,0,0,.1);background-color:#f8f9fa}.datepicker-controls,.datepicker-grid,.datepicker-view,.datepicker-view .days-of-week{display:flex}.datepicker-grid{flex-wrap:wrap}.datepicker-view .days .datepicker-cell,.datepicker-view .dow{flex-basis:14.28571%}.datepicker-view.datepicker-grid .datepicker-cell{flex-basis:25%}.datepicker-cell,.datepicker-view .week{height:2.25rem;line-height:2.25rem}.datepicker-title{box-shadow:inset 0 -1px 1px rgba(0,0,0,.1);background-color:#f8f9fa;padding:.375rem .75rem;text-align:center;font-weight:700}.datepicker-header .datepicker-controls{padding:2px 2px 0}.datepicker-controls .btn{border-color:#f8f9fa;background-color:#fff}.datepicker-controls .btn:focus,.datepicker-controls .btn:hover{border-color:#dae0e5;background-color:#e2e6ea;color:#212529}.datepicker-controls .btn:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.datepicker-controls .btn:disabled{border-color:#f8f9fa;background-color:#f8f9fa;color:#212529}.datepicker-controls .btn:not(:disabled):active{border-color:#d3d9df;background-color:#dae0e5;color:#212529}.datepicker-controls .btn:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.datepicker-header .datepicker-controls .btn{border-color:transparent;font-weight:700}.datepicker-footer .datepicker-controls .btn{margin:calc(.375rem - 1px) .375rem;border-radius:.2rem;width:100%;font-size:.875rem}.datepicker-controls .view-switch{flex:auto}.datepicker-controls .next-btn,.datepicker-controls .prev-btn{padding-right:.375rem;padding-left:.375rem;width:2.25rem}.datepicker-controls .next-btn.disabled,.datepicker-controls .prev-btn.disabled{visibility:hidden}.datepicker-view .dow{height:1.5rem;line-height:1.5rem;font-size:.9375rem;font-weight:700}.datepicker-view .week{width:2.25rem;color:#dee2e6;font-size:.875rem}@media (max-width:22.5rem){.datepicker-view .week{width:1.96875rem}}.datepicker-grid{width:15.75rem}@media (max-width:22.5rem){.calendar-weeks+.days .datepicker-grid{width:13.78125rem}}.datepicker-cell:not(.disabled):hover{background-color:#f9f9f9;cursor:pointer}.datepicker-cell.focused:not(.selected){background-color:#f1f3f5}.datepicker-cell.selected,.datepicker-cell.selected:hover{background-color:#007bff;color:#fff;font-weight:600}.datepicker-cell.disabled,.datepicker-cell.next:not(.disabled),.datepicker-cell.prev:not(.disabled){color:#6c757d}.datepicker-cell.next.selected,.datepicker-cell.prev.selected{color:#e6e6e6}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today){border-radius:0;background-color:#f8f9fa}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused,.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover{background-color:#f1f3f5}.datepicker-cell.today:not(.selected){background-color:#20c997}.datepicker-cell.today:not(.selected):not(.disabled){color:#fff}.datepicker-cell.today.focused:not(.selected){background-color:#1ebe8f}.datepicker-cell.range-end:not(.selected),.datepicker-cell.range-start:not(.selected){background-color:#6c757d;color:#fff}.datepicker-cell.range-end.focused:not(.selected),.datepicker-cell.range-start.focused:not(.selected){background-color:#666f76}.datepicker-cell.range-start{border-radius:.25rem 0 0 .25rem}.datepicker-cell.range-end{border-radius:0 .25rem .25rem 0}.datepicker-cell.range{border-radius:0;background-color:#e9ecef}.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover{background-color:#e2e6ea}.datepicker-cell.range.disabled{color:#cbd3da}.datepicker-cell.range.focused{background-color:#dadfe4}.datepicker-view.datepicker-grid .datepicker-cell{height:4.5rem;line-height:4.5rem}.datepicker-input.in-edit{border-color:#66b0ff}.datepicker-input.in-edit:active,.datepicker-input.in-edit:focus{box-shadow:0 0 .25em .25em rgba(102,176,255,.2)} \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/dist/css/datepicker-bs5.css b/node_modules/flowbite-datepicker/dist/css/datepicker-bs5.css new file mode 100644 index 0000000..8cde292 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/css/datepicker-bs5.css @@ -0,0 +1,276 @@ +.datepicker { + display: none; +} + +.datepicker.active { + display: block; +} + +.datepicker-dropdown { + position: absolute; + top: 0; + left: 0; + z-index: 1000; + padding-top: 4px; +} + +.datepicker-dropdown.datepicker-orient-top { + padding-top: 0; + padding-bottom: 4px; +} + +.datepicker-picker { + display: inline-block; + border-radius: 0.25rem; + background-color: #fff; +} + +.datepicker-dropdown .datepicker-picker { + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); +} + +.datepicker-picker span { + display: block; + flex: 1; + border: 0; + border-radius: 0.25rem; + cursor: default; + text-align: center; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.datepicker-main { + padding: 2px; +} + +.datepicker-footer { + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); + background-color: #f8f9fa; +} + +.datepicker-controls, .datepicker-view, .datepicker-view .days-of-week, .datepicker-grid { + display: flex; +} + +.datepicker-grid { + flex-wrap: wrap; +} + +.datepicker-view .dow, .datepicker-view .days .datepicker-cell { + flex-basis: 14.28571%; +} + +.datepicker-view.datepicker-grid .datepicker-cell { + flex-basis: 25%; +} + +.datepicker-view .week, .datepicker-cell { + height: 2.25rem; + line-height: 2.25rem; +} + +.datepicker-title { + box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.1); + background-color: #f8f9fa; + padding: 0.375rem 0.75rem; + text-align: center; + font-weight: 700; +} + +.datepicker-header .datepicker-controls { + padding: 2px 2px 0; +} + +.datepicker-controls .btn { + border-color: #f8f9fa; + background-color: #fff; +} + +.datepicker-controls .btn:hover { + border-color: #dae0e5; + background-color: #e2e6ea; + color: #000; +} + +.datepicker-controls .btn:focus { + border-color: #dae0e5; + box-shadow: 0 0 0 0.25rem rgba(211, 212, 213, 0.5); + background-color: #e2e6ea; + color: #000; +} + +.datepicker-controls .btn:disabled { + border-color: #f8f9fa; + background-color: #f8f9fa; + color: #000; +} + +.datepicker-controls .btn:not(:disabled):active { + border-color: #d3d9df; + background-color: #dae0e5; + color: #000; +} + +.datepicker-controls .btn:not(:disabled):active:focus { + box-shadow: 0 0 0 0.25rem rgba(211, 212, 213, 0.5); +} + +.datepicker-header .datepicker-controls .btn { + border-color: transparent; + font-weight: bold; +} + +.datepicker-footer .datepicker-controls .btn { + margin: calc(0.375rem - 1px) 0.375rem; + border-radius: 0.2rem; + width: 100%; + font-size: 0.875rem; +} + +.datepicker-controls .view-switch { + flex: auto; +} + +.datepicker-controls .prev-btn, +.datepicker-controls .next-btn { + padding-right: 0.375rem; + padding-left: 0.375rem; + width: 2.25rem; +} + +.datepicker-controls .prev-btn.disabled, +.datepicker-controls .next-btn.disabled { + visibility: hidden; +} + +.datepicker-view .dow { + height: 1.5rem; + line-height: 1.5rem; + font-size: 0.9375rem; + font-weight: 700; +} + +.datepicker-view .week { + width: 2.25rem; + color: #dee2e6; + font-size: 0.875rem; +} + +@media (max-width: 22.5rem) { + .datepicker-view .week { + width: 1.96875rem; + } +} + +.datepicker-grid { + width: 15.75rem; +} + +@media (max-width: 22.5rem) { + .calendar-weeks + .days .datepicker-grid { + width: 13.78125rem; + } +} + +.datepicker-cell:not(.disabled):hover { + background-color: #f9f9f9; + cursor: pointer; +} + +.datepicker-cell.focused:not(.selected) { + background-color: #e2e6ea; +} + +.datepicker-cell.selected, .datepicker-cell.selected:hover { + background-color: #0d6efd; + color: #fff; + font-weight: 600; +} + +.datepicker-cell.disabled { + color: #adb5bd; +} + +.datepicker-cell.prev:not(.disabled), .datepicker-cell.next:not(.disabled) { + color: color("gray"); +} + +.datepicker-cell.prev.selected, .datepicker-cell.next.selected { + color: #e6e6e6; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today) { + border-radius: 0; + background-color: #f8f9fa; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover { + background-color: #f1f3f5; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused { + background-color: #e2e6ea; +} + +.datepicker-cell.today:not(.selected) { + background-color: #20c997; +} + +.datepicker-cell.today:not(.selected):not(.disabled) { + color: #fff; +} + +.datepicker-cell.today.focused:not(.selected) { + background-color: #1ebe8f; +} + +.datepicker-cell.range-start:not(.selected), .datepicker-cell.range-end:not(.selected) { + background-color: #6c757d; + color: #fff; +} + +.datepicker-cell.range-start.focused:not(.selected), .datepicker-cell.range-end.focused:not(.selected) { + background-color: #666f76; +} + +.datepicker-cell.range-start { + border-radius: 0.25rem 0 0 0.25rem; +} + +.datepicker-cell.range-end { + border-radius: 0 0.25rem 0.25rem 0; +} + +.datepicker-cell.range { + border-radius: 0; + background-color: #e9ecef; +} + +.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover { + background-color: #e2e6ea; +} + +.datepicker-cell.range.disabled { + color: #cbd3da; +} + +.datepicker-cell.range.focused { + background-color: #dadfe4; +} + +.datepicker-view.datepicker-grid .datepicker-cell { + height: 4.5rem; + line-height: 4.5rem; +} + +.datepicker-input.in-edit { + border-color: #6da8fe; +} + +.datepicker-input.in-edit:focus, .datepicker-input.in-edit:active { + box-shadow: 0 0 0.25em 0.25em rgba(109, 168, 254, 0.2); +} diff --git a/node_modules/flowbite-datepicker/dist/css/datepicker-bs5.min.css b/node_modules/flowbite-datepicker/dist/css/datepicker-bs5.min.css new file mode 100644 index 0000000..1c6a57b --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/css/datepicker-bs5.min.css @@ -0,0 +1 @@ +.datepicker{display:none}.datepicker.active{display:block}.datepicker-dropdown{position:absolute;top:0;left:0;z-index:1000;padding-top:4px}.datepicker-dropdown.datepicker-orient-top{padding-top:0;padding-bottom:4px}.datepicker-picker{display:inline-block;border-radius:.25rem;background-color:#fff}.datepicker-dropdown .datepicker-picker{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)}.datepicker-picker span{display:block;flex:1;border:0;border-radius:.25rem;cursor:default;text-align:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker-main{padding:2px}.datepicker-footer{box-shadow:inset 0 1px 1px rgba(0,0,0,.1);background-color:#f8f9fa}.datepicker-controls,.datepicker-grid,.datepicker-view,.datepicker-view .days-of-week{display:flex}.datepicker-grid{flex-wrap:wrap}.datepicker-view .days .datepicker-cell,.datepicker-view .dow{flex-basis:14.28571%}.datepicker-view.datepicker-grid .datepicker-cell{flex-basis:25%}.datepicker-cell,.datepicker-view .week{height:2.25rem;line-height:2.25rem}.datepicker-title{box-shadow:inset 0 -1px 1px rgba(0,0,0,.1);background-color:#f8f9fa;padding:.375rem .75rem;text-align:center;font-weight:700}.datepicker-header .datepicker-controls{padding:2px 2px 0}.datepicker-controls .btn{border-color:#f8f9fa;background-color:#fff}.datepicker-controls .btn:focus,.datepicker-controls .btn:hover{border-color:#dae0e5;background-color:#e2e6ea;color:#000}.datepicker-controls .btn:focus{box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.datepicker-controls .btn:disabled{border-color:#f8f9fa;background-color:#f8f9fa;color:#000}.datepicker-controls .btn:not(:disabled):active{border-color:#d3d9df;background-color:#dae0e5;color:#000}.datepicker-controls .btn:not(:disabled):active:focus{box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.datepicker-header .datepicker-controls .btn{border-color:transparent;font-weight:700}.datepicker-footer .datepicker-controls .btn{margin:calc(.375rem - 1px) .375rem;border-radius:.2rem;width:100%;font-size:.875rem}.datepicker-controls .view-switch{flex:auto}.datepicker-controls .next-btn,.datepicker-controls .prev-btn{padding-right:.375rem;padding-left:.375rem;width:2.25rem}.datepicker-controls .next-btn.disabled,.datepicker-controls .prev-btn.disabled{visibility:hidden}.datepicker-view .dow{height:1.5rem;line-height:1.5rem;font-size:.9375rem;font-weight:700}.datepicker-view .week{width:2.25rem;color:#dee2e6;font-size:.875rem}@media (max-width:22.5rem){.datepicker-view .week{width:1.96875rem}}.datepicker-grid{width:15.75rem}@media (max-width:22.5rem){.calendar-weeks+.days .datepicker-grid{width:13.78125rem}}.datepicker-cell:not(.disabled):hover{background-color:#f9f9f9;cursor:pointer}.datepicker-cell.focused:not(.selected){background-color:#e2e6ea}.datepicker-cell.selected,.datepicker-cell.selected:hover{background-color:#0d6efd;color:#fff;font-weight:600}.datepicker-cell.disabled{color:#adb5bd}.datepicker-cell.next:not(.disabled),.datepicker-cell.prev:not(.disabled){color:color("gray")}.datepicker-cell.next.selected,.datepicker-cell.prev.selected{color:#e6e6e6}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today){border-radius:0;background-color:#f8f9fa}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover{background-color:#f1f3f5}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused{background-color:#e2e6ea}.datepicker-cell.today:not(.selected){background-color:#20c997}.datepicker-cell.today:not(.selected):not(.disabled){color:#fff}.datepicker-cell.today.focused:not(.selected){background-color:#1ebe8f}.datepicker-cell.range-end:not(.selected),.datepicker-cell.range-start:not(.selected){background-color:#6c757d;color:#fff}.datepicker-cell.range-end.focused:not(.selected),.datepicker-cell.range-start.focused:not(.selected){background-color:#666f76}.datepicker-cell.range-start{border-radius:.25rem 0 0 .25rem}.datepicker-cell.range-end{border-radius:0 .25rem .25rem 0}.datepicker-cell.range{border-radius:0;background-color:#e9ecef}.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover{background-color:#e2e6ea}.datepicker-cell.range.disabled{color:#cbd3da}.datepicker-cell.range.focused{background-color:#dadfe4}.datepicker-view.datepicker-grid .datepicker-cell{height:4.5rem;line-height:4.5rem}.datepicker-input.in-edit{border-color:#6da8fe}.datepicker-input.in-edit:active,.datepicker-input.in-edit:focus{box-shadow:0 0 .25em .25em rgba(109,168,254,.2)} \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/dist/css/datepicker-bulma.css b/node_modules/flowbite-datepicker/dist/css/datepicker-bulma.css new file mode 100644 index 0000000..7462c3b --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/css/datepicker-bulma.css @@ -0,0 +1,258 @@ +.datepicker { + display: none; +} + +.datepicker.active { + display: block; +} + +.datepicker-dropdown { + position: absolute; + top: 0; + left: 0; + z-index: 20; + padding-top: 4px; +} + +.datepicker-dropdown.datepicker-orient-top { + padding-top: 0; + padding-bottom: 4px; +} + +.datepicker-picker { + display: inline-block; + border-radius: 4px; + background-color: white; +} + +.datepicker-dropdown .datepicker-picker { + box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1); +} + +.datepicker-picker span { + display: block; + flex: 1; + border: 0; + border-radius: 4px; + cursor: default; + text-align: center; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.datepicker-main { + padding: 2px; +} + +.datepicker-footer { + box-shadow: inset 0 1px 1px rgba(10, 10, 10, 0.1); + background-color: whitesmoke; +} + +.datepicker-controls, .datepicker-view, .datepicker-view .days-of-week, .datepicker-grid { + display: flex; +} + +.datepicker-grid { + flex-wrap: wrap; +} + +.datepicker-view .dow, .datepicker-view .days .datepicker-cell { + flex-basis: 14.28571%; +} + +.datepicker-view.datepicker-grid .datepicker-cell { + flex-basis: 25%; +} + +.datepicker-view .week, .datepicker-cell { + height: 2.25rem; + line-height: 2.25rem; +} + +.datepicker-title { + box-shadow: inset 0 -1px 1px rgba(10, 10, 10, 0.1); + background-color: whitesmoke; + padding: 0.375rem 0.75rem; + text-align: center; + font-weight: 700; +} + +.datepicker-header .datepicker-controls { + padding: 2px 2px 0; +} + +.datepicker-header .datepicker-controls .button { + border-color: transparent; + font-weight: bold; +} + +.datepicker-header .datepicker-controls .button:hover { + background-color: #f9f9f9; +} + +.datepicker-header .datepicker-controls .button:focus:not(:active) { + box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25); +} + +.datepicker-header .datepicker-controls .button:active { + background-color: #f2f2f2; +} + +.datepicker-header .datepicker-controls .button[disabled] { + box-shadow: none; +} + +.datepicker-footer .datepicker-controls .button { + margin: calc(0.375rem - 1px) 0.375rem; + border-radius: 2px; + width: 100%; + font-size: 0.75rem; +} + +.datepicker-controls .view-switch { + flex: auto; +} + +.datepicker-controls .prev-btn, +.datepicker-controls .next-btn { + padding-right: 0.375rem; + padding-left: 0.375rem; + width: 2.25rem; +} + +.datepicker-controls .prev-btn.disabled, +.datepicker-controls .next-btn.disabled { + visibility: hidden; +} + +.datepicker-view .dow { + height: 1.5rem; + line-height: 1.5rem; + font-size: 0.875rem; + font-weight: 700; +} + +.datepicker-view .week { + width: 2.25rem; + color: #b5b5b5; + font-size: 0.75rem; +} + +@media (max-width: 22.5rem) { + .datepicker-view .week { + width: 1.96875rem; + } +} + +.datepicker-grid { + width: 15.75rem; +} + +@media (max-width: 22.5rem) { + .calendar-weeks + .days .datepicker-grid { + width: 13.78125rem; + } +} + +.datepicker-cell:not(.disabled):hover { + background-color: #f9f9f9; + cursor: pointer; +} + +.datepicker-cell.focused:not(.selected) { + background-color: #e8e8e8; +} + +.datepicker-cell.selected, .datepicker-cell.selected:hover { + background-color: #3273dc; + color: #fff; + font-weight: 600; +} + +.datepicker-cell.disabled { + color: #dbdbdb; +} + +.datepicker-cell.prev:not(.disabled), .datepicker-cell.next:not(.disabled) { + color: #7a7a7a; +} + +.datepicker-cell.prev.selected, .datepicker-cell.next.selected { + color: #e6e6e6; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today) { + border-radius: 0; + background-color: whitesmoke; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover { + background-color: #eeeeee; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused { + background-color: #e8e8e8; +} + +.datepicker-cell.today:not(.selected) { + background-color: #00d1b2; +} + +.datepicker-cell.today:not(.selected):not(.disabled) { + color: #fff; +} + +.datepicker-cell.today.focused:not(.selected) { + background-color: #00c4a7; +} + +.datepicker-cell.range-start:not(.selected), .datepicker-cell.range-end:not(.selected) { + background-color: #b5b5b5; + color: #fff; +} + +.datepicker-cell.range-start.focused:not(.selected), .datepicker-cell.range-end.focused:not(.selected) { + background-color: #afafaf; +} + +.datepicker-cell.range-start { + border-radius: 4px 0 0 4px; +} + +.datepicker-cell.range-end { + border-radius: 0 4px 4px 0; +} + +.datepicker-cell.range { + border-radius: 0; + background-color: #dbdbdb; +} + +.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover { + background-color: #d5d5d5; +} + +.datepicker-cell.range.disabled { + color: #c2c2c2; +} + +.datepicker-cell.range.focused { + background-color: #cfcfcf; +} + +.datepicker-view.datepicker-grid .datepicker-cell { + height: 4.5rem; + line-height: 4.5rem; +} + +.datepicker-input.in-edit { + border-color: #2366d1; +} + +.datepicker-input.in-edit:focus, .datepicker-input.in-edit:active { + box-shadow: 0 0 0.25em 0.25em rgba(35, 102, 209, 0.2); +} diff --git a/node_modules/flowbite-datepicker/dist/css/datepicker-bulma.min.css b/node_modules/flowbite-datepicker/dist/css/datepicker-bulma.min.css new file mode 100644 index 0000000..a50f510 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/css/datepicker-bulma.min.css @@ -0,0 +1 @@ +.datepicker{display:none}.datepicker.active{display:block}.datepicker-dropdown{position:absolute;top:0;left:0;z-index:20;padding-top:4px}.datepicker-dropdown.datepicker-orient-top{padding-top:0;padding-bottom:4px}.datepicker-picker{display:inline-block;border-radius:4px;background-color:#fff}.datepicker-dropdown .datepicker-picker{box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1)}.datepicker-picker span{display:block;flex:1;border:0;border-radius:4px;cursor:default;text-align:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker-main{padding:2px}.datepicker-footer{box-shadow:inset 0 1px 1px rgba(10,10,10,.1);background-color:#f5f5f5}.datepicker-controls,.datepicker-grid,.datepicker-view,.datepicker-view .days-of-week{display:flex}.datepicker-grid{flex-wrap:wrap}.datepicker-view .days .datepicker-cell,.datepicker-view .dow{flex-basis:14.28571%}.datepicker-view.datepicker-grid .datepicker-cell{flex-basis:25%}.datepicker-cell,.datepicker-view .week{height:2.25rem;line-height:2.25rem}.datepicker-title{box-shadow:inset 0 -1px 1px rgba(10,10,10,.1);background-color:#f5f5f5;padding:.375rem .75rem;text-align:center;font-weight:700}.datepicker-header .datepicker-controls{padding:2px 2px 0}.datepicker-header .datepicker-controls .button{border-color:transparent;font-weight:700}.datepicker-header .datepicker-controls .button:hover{background-color:#f9f9f9}.datepicker-header .datepicker-controls .button:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.datepicker-header .datepicker-controls .button:active{background-color:#f2f2f2}.datepicker-header .datepicker-controls .button[disabled]{box-shadow:none}.datepicker-footer .datepicker-controls .button{margin:calc(.375rem - 1px) .375rem;border-radius:2px;width:100%;font-size:.75rem}.datepicker-controls .view-switch{flex:auto}.datepicker-controls .next-btn,.datepicker-controls .prev-btn{padding-right:.375rem;padding-left:.375rem;width:2.25rem}.datepicker-controls .next-btn.disabled,.datepicker-controls .prev-btn.disabled{visibility:hidden}.datepicker-view .dow{height:1.5rem;line-height:1.5rem;font-size:.875rem;font-weight:700}.datepicker-view .week{width:2.25rem;color:#b5b5b5;font-size:.75rem}@media (max-width:22.5rem){.datepicker-view .week{width:1.96875rem}}.datepicker-grid{width:15.75rem}@media (max-width:22.5rem){.calendar-weeks+.days .datepicker-grid{width:13.78125rem}}.datepicker-cell:not(.disabled):hover{background-color:#f9f9f9;cursor:pointer}.datepicker-cell.focused:not(.selected){background-color:#e8e8e8}.datepicker-cell.selected,.datepicker-cell.selected:hover{background-color:#3273dc;color:#fff;font-weight:600}.datepicker-cell.disabled{color:#dbdbdb}.datepicker-cell.next:not(.disabled),.datepicker-cell.prev:not(.disabled){color:#7a7a7a}.datepicker-cell.next.selected,.datepicker-cell.prev.selected{color:#e6e6e6}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today){border-radius:0;background-color:#f5f5f5}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover{background-color:#eee}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused{background-color:#e8e8e8}.datepicker-cell.today:not(.selected){background-color:#00d1b2}.datepicker-cell.today:not(.selected):not(.disabled){color:#fff}.datepicker-cell.today.focused:not(.selected){background-color:#00c4a7}.datepicker-cell.range-end:not(.selected),.datepicker-cell.range-start:not(.selected){background-color:#b5b5b5;color:#fff}.datepicker-cell.range-end.focused:not(.selected),.datepicker-cell.range-start.focused:not(.selected){background-color:#afafaf}.datepicker-cell.range-start{border-radius:4px 0 0 4px}.datepicker-cell.range-end{border-radius:0 4px 4px 0}.datepicker-cell.range{border-radius:0;background-color:#dbdbdb}.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover{background-color:#d5d5d5}.datepicker-cell.range.disabled{color:#c2c2c2}.datepicker-cell.range.focused{background-color:#cfcfcf}.datepicker-view.datepicker-grid .datepicker-cell{height:4.5rem;line-height:4.5rem}.datepicker-input.in-edit{border-color:#2366d1}.datepicker-input.in-edit:active,.datepicker-input.in-edit:focus{box-shadow:0 0 .25em .25em rgba(35,102,209,.2)} \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/dist/css/datepicker-foundation.css b/node_modules/flowbite-datepicker/dist/css/datepicker-foundation.css new file mode 100644 index 0000000..985d391 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/css/datepicker-foundation.css @@ -0,0 +1,262 @@ +.datepicker { + display: none; +} + +.datepicker.active { + display: block; +} + +.datepicker-dropdown { + position: absolute; + top: 0; + left: 0; + z-index: 10; + padding-top: 4px; +} + +.datepicker-dropdown.datepicker-orient-top { + padding-top: 0; + padding-bottom: 4px; +} + +.datepicker-picker { + display: inline-block; + border-radius: 0; + background-color: #fefefe; +} + +.datepicker-dropdown .datepicker-picker { + box-shadow: 0 0 0 1px #cacaca; +} + +.datepicker-picker span { + display: block; + flex: 1; + border: 0; + border-radius: 0; + cursor: default; + text-align: center; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.datepicker-main { + padding: 2px; +} + +.datepicker-footer { + box-shadow: inset 0 1px 1px rgba(10, 10, 10, 0.1); + background-color: #e6e6e6; +} + +.datepicker-controls, .datepicker-view, .datepicker-view .days-of-week, .datepicker-grid { + display: flex; +} + +.datepicker-grid { + flex-wrap: wrap; +} + +.datepicker-view .dow, .datepicker-view .days .datepicker-cell { + flex-basis: 14.28571%; +} + +.datepicker-view.datepicker-grid .datepicker-cell { + flex-basis: 25%; +} + +.datepicker-view .week, .datepicker-cell { + height: 2.25rem; + line-height: 2.25rem; +} + +.datepicker-title { + box-shadow: inset 0 -1px 1px rgba(10, 10, 10, 0.1); + background-color: #e6e6e6; + padding: 0.375rem 0.75rem; + text-align: center; + font-weight: bold; +} + +.datepicker-header .datepicker-controls { + padding: 2px 2px 0; +} + +.datepicker-controls .button { + margin: 0; + background-color: #fefefe; + color: #0a0a0a; +} + +.datepicker-controls .button:hover, .datepicker-controls .button:focus { + background-color: #d8d8d8; +} + +.datepicker-controls .button:hover[disabled], .datepicker-controls .button:focus[disabled] { + opacity: 0.25; + background-color: #fefefe; + color: #0a0a0a; +} + +.datepicker-header .datepicker-controls .button { + border-color: transparent; + font-weight: bold; +} + +.datepicker-footer .datepicker-controls .button { + margin: calc(0.375rem - 1px) 0.375rem; + border-radius: 0; + width: 100%; + font-size: 0.75rem; +} + +.datepicker-controls .view-switch { + flex: auto; +} + +.datepicker-controls .prev-btn, +.datepicker-controls .next-btn { + padding-right: 0.375rem; + padding-left: 0.375rem; + width: 2.25rem; +} + +.datepicker-controls .prev-btn.disabled, +.datepicker-controls .next-btn.disabled { + visibility: hidden; +} + +.datepicker-view .dow { + height: 1.5rem; + line-height: 1.5rem; + font-size: 0.875rem; + font-weight: bold; +} + +.datepicker-view .week { + width: 2.25rem; + color: #8a8a8a; + font-size: 0.75rem; +} + +@media (max-width: 22.5rem) { + .datepicker-view .week { + width: 1.96875rem; + } +} + +.datepicker-grid { + width: 15.75rem; +} + +@media (max-width: 22.5rem) { + .calendar-weeks + .days .datepicker-grid { + width: 13.78125rem; + } +} + +.datepicker-cell:not(.disabled):hover { + background-color: #f8f8f8; + cursor: pointer; +} + +.datepicker-cell.focused:not(.selected) { + background-color: #f1f1f1; +} + +.datepicker-cell.selected, .datepicker-cell.selected:hover { + background-color: #1779ba; + color: #fefefe; + font-weight: semibold; +} + +.datepicker-cell.disabled { + color: #e6e6e6; +} + +.datepicker-cell.prev:not(.disabled), .datepicker-cell.next:not(.disabled) { + color: #cacaca; +} + +.datepicker-cell.prev.selected, .datepicker-cell.next.selected { + color: #e5e5e5; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today) { + border-radius: 0; + background-color: #f7f7f7; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover { + background-color: #f1f1f1; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused { + background-color: #f1f1f1; +} + +.datepicker-cell.today:not(.selected) { + background-color: #d7ecfa; +} + +.datepicker-cell.today:not(.selected):not(.disabled) { + color: #8a8a8a; +} + +.datepicker-cell.today.focused:not(.selected) { + background-color: #cbe7f9; +} + +.datepicker-cell.range-start:not(.selected), .datepicker-cell.range-end:not(.selected) { + background-color: #767676; + color: #fefefe; +} + +.datepicker-cell.range-start.focused:not(.selected), .datepicker-cell.range-end.focused:not(.selected) { + background-color: #707070; +} + +.datepicker-cell.range-start { + border-radius: 0 0 0 0; +} + +.datepicker-cell.range-end { + border-radius: 0 0 0 0; +} + +.datepicker-cell.range { + border-radius: 0; + background-color: #e6e6e6; +} + +.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover { + background-color: #e0e0e0; +} + +.datepicker-cell.range.disabled { + color: #cdcdcd; +} + +.datepicker-cell.range.focused { + background-color: #d9d9d9; +} + +.datepicker-cell.range.today { + background-color: #b3dbf6; +} + +.datepicker-view.datepicker-grid .datepicker-cell { + height: 4.5rem; + line-height: 4.5rem; +} + +.datepicker-input.in-edit { + border-color: #a4a4a4; +} + +.datepicker-input.in-edit:focus, .datepicker-input.in-edit:active { + box-shadow: 0 0 0.25em 0.25em rgba(164, 164, 164, 0.2); +} diff --git a/node_modules/flowbite-datepicker/dist/css/datepicker-foundation.min.css b/node_modules/flowbite-datepicker/dist/css/datepicker-foundation.min.css new file mode 100644 index 0000000..8304749 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/css/datepicker-foundation.min.css @@ -0,0 +1 @@ +.datepicker{display:none}.datepicker.active{display:block}.datepicker-dropdown{position:absolute;top:0;left:0;z-index:10;padding-top:4px}.datepicker-dropdown.datepicker-orient-top{padding-top:0;padding-bottom:4px}.datepicker-picker{display:inline-block;border-radius:0;background-color:#fefefe}.datepicker-dropdown .datepicker-picker{box-shadow:0 0 0 1px #cacaca}.datepicker-picker span{display:block;flex:1;border:0;border-radius:0;cursor:default;text-align:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker-main{padding:2px}.datepicker-footer{box-shadow:inset 0 1px 1px rgba(10,10,10,.1);background-color:#e6e6e6}.datepicker-controls,.datepicker-grid,.datepicker-view,.datepicker-view .days-of-week{display:flex}.datepicker-grid{flex-wrap:wrap}.datepicker-view .days .datepicker-cell,.datepicker-view .dow{flex-basis:14.28571%}.datepicker-view.datepicker-grid .datepicker-cell{flex-basis:25%}.datepicker-cell,.datepicker-view .week{height:2.25rem;line-height:2.25rem}.datepicker-title{box-shadow:inset 0 -1px 1px rgba(10,10,10,.1);background-color:#e6e6e6;padding:.375rem .75rem;text-align:center;font-weight:700}.datepicker-header .datepicker-controls{padding:2px 2px 0}.datepicker-controls .button{margin:0;background-color:#fefefe;color:#0a0a0a}.datepicker-controls .button:focus,.datepicker-controls .button:hover{background-color:#d8d8d8}.datepicker-controls .button:focus[disabled],.datepicker-controls .button:hover[disabled]{opacity:.25;background-color:#fefefe;color:#0a0a0a}.datepicker-header .datepicker-controls .button{border-color:transparent;font-weight:700}.datepicker-footer .datepicker-controls .button{margin:calc(.375rem - 1px) .375rem;border-radius:0;width:100%;font-size:.75rem}.datepicker-controls .view-switch{flex:auto}.datepicker-controls .next-btn,.datepicker-controls .prev-btn{padding-right:.375rem;padding-left:.375rem;width:2.25rem}.datepicker-controls .next-btn.disabled,.datepicker-controls .prev-btn.disabled{visibility:hidden}.datepicker-view .dow{height:1.5rem;line-height:1.5rem;font-size:.875rem;font-weight:700}.datepicker-view .week{width:2.25rem;color:#8a8a8a;font-size:.75rem}@media (max-width:22.5rem){.datepicker-view .week{width:1.96875rem}}.datepicker-grid{width:15.75rem}@media (max-width:22.5rem){.calendar-weeks+.days .datepicker-grid{width:13.78125rem}}.datepicker-cell:not(.disabled):hover{background-color:#f8f8f8;cursor:pointer}.datepicker-cell.focused:not(.selected){background-color:#f1f1f1}.datepicker-cell.selected,.datepicker-cell.selected:hover{background-color:#1779ba;color:#fefefe;font-weight:semibold}.datepicker-cell.disabled{color:#e6e6e6}.datepicker-cell.next:not(.disabled),.datepicker-cell.prev:not(.disabled){color:#cacaca}.datepicker-cell.next.selected,.datepicker-cell.prev.selected{color:#e5e5e5}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today){border-radius:0;background-color:#f7f7f7}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused,.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover{background-color:#f1f1f1}.datepicker-cell.today:not(.selected){background-color:#d7ecfa}.datepicker-cell.today:not(.selected):not(.disabled){color:#8a8a8a}.datepicker-cell.today.focused:not(.selected){background-color:#cbe7f9}.datepicker-cell.range-end:not(.selected),.datepicker-cell.range-start:not(.selected){background-color:#767676;color:#fefefe}.datepicker-cell.range-end.focused:not(.selected),.datepicker-cell.range-start.focused:not(.selected){background-color:#707070}.datepicker-cell.range-end,.datepicker-cell.range-start{border-radius:0 0 0 0}.datepicker-cell.range{border-radius:0;background-color:#e6e6e6}.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover{background-color:#e0e0e0}.datepicker-cell.range.disabled{color:#cdcdcd}.datepicker-cell.range.focused{background-color:#d9d9d9}.datepicker-cell.range.today{background-color:#b3dbf6}.datepicker-view.datepicker-grid .datepicker-cell{height:4.5rem;line-height:4.5rem}.datepicker-input.in-edit{border-color:#a4a4a4}.datepicker-input.in-edit:active,.datepicker-input.in-edit:focus{box-shadow:0 0 .25em .25em hsla(0,0%,64.3%,.2)} \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/dist/css/datepicker.css b/node_modules/flowbite-datepicker/dist/css/datepicker.css new file mode 100644 index 0000000..2f1d3b4 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/css/datepicker.css @@ -0,0 +1,306 @@ +.datepicker { + display: none; +} + +.datepicker.active { + display: block; +} + +.datepicker-dropdown { + position: absolute; + top: 0; + left: 0; + z-index: 20; + padding-top: 4px; +} + +.datepicker-dropdown.datepicker-orient-top { + padding-top: 0; + padding-bottom: 4px; +} + +.datepicker-picker { + display: inline-block; + border-radius: 4px; + background-color: white; +} + +.datepicker-dropdown .datepicker-picker { + box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1); +} + +.datepicker-picker span { + display: block; + flex: 1; + border: 0; + border-radius: 4px; + cursor: default; + text-align: center; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.datepicker-main { + padding: 2px; +} + +.datepicker-footer { + box-shadow: inset 0 1px 1px rgba(10, 10, 10, 0.1); + background-color: whitesmoke; +} + +.datepicker-controls, .datepicker-view, .datepicker-view .days-of-week, .datepicker-grid { + display: flex; +} + +.datepicker-grid { + flex-wrap: wrap; +} + +.datepicker-view .dow, .datepicker-view .days .datepicker-cell { + flex-basis: 14.28571%; +} + +.datepicker-view.datepicker-grid .datepicker-cell { + flex-basis: 25%; +} + +.datepicker-view .week, .datepicker-cell { + height: 2.25rem; + line-height: 2.25rem; +} + +.datepicker-title { + box-shadow: inset 0 -1px 1px rgba(10, 10, 10, 0.1); + background-color: whitesmoke; + padding: 0.375rem 0.75rem; + text-align: center; + font-weight: 700; +} + +.datepicker-header .datepicker-controls { + padding: 2px 2px 0; +} + +.datepicker-controls .button { + display: inline-flex; + position: relative; + align-items: center; + justify-content: center; + margin: 0; + border: 1px solid #dbdbdb; + border-radius: 4px; + box-shadow: none; + background-color: white; + cursor: pointer; + padding: calc(0.375em - 1px) 0.75em; + height: 2.25em; + vertical-align: top; + text-align: center; + line-height: 1.5; + white-space: nowrap; + color: #363636; + font-size: 1rem; +} + +.datepicker-controls .button:focus, .datepicker-controls .button:active { + outline: none; +} + +.datepicker-controls .button:hover { + border-color: #b5b5b5; + color: #363636; +} + +.datepicker-controls .button:focus { + border-color: #3273dc; + color: #363636; +} + +.datepicker-controls .button:focus:not(:active) { + box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25); +} + +.datepicker-controls .button:active { + border-color: #4a4a4a; + color: #363636; +} + +.datepicker-controls .button[disabled] { + cursor: not-allowed; +} + +.datepicker-header .datepicker-controls .button { + border-color: transparent; + font-weight: bold; +} + +.datepicker-header .datepicker-controls .button:hover { + background-color: #f9f9f9; +} + +.datepicker-header .datepicker-controls .button:focus:not(:active) { + box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25); +} + +.datepicker-header .datepicker-controls .button:active { + background-color: #f2f2f2; +} + +.datepicker-header .datepicker-controls .button[disabled] { + box-shadow: none; +} + +.datepicker-footer .datepicker-controls .button { + margin: calc(0.375rem - 1px) 0.375rem; + border-radius: 2px; + width: 100%; + font-size: 0.75rem; +} + +.datepicker-controls .view-switch { + flex: auto; +} + +.datepicker-controls .prev-btn, +.datepicker-controls .next-btn { + padding-right: 0.375rem; + padding-left: 0.375rem; + width: 2.25rem; +} + +.datepicker-controls .prev-btn.disabled, +.datepicker-controls .next-btn.disabled { + visibility: hidden; +} + +.datepicker-view .dow { + height: 1.5rem; + line-height: 1.5rem; + font-size: 0.875rem; + font-weight: 700; +} + +.datepicker-view .week { + width: 2.25rem; + color: #b5b5b5; + font-size: 0.75rem; +} + +@media (max-width: 22.5rem) { + .datepicker-view .week { + width: 1.96875rem; + } +} + +.datepicker-grid { + width: 15.75rem; +} + +@media (max-width: 22.5rem) { + .calendar-weeks + .days .datepicker-grid { + width: 13.78125rem; + } +} + +.datepicker-cell:not(.disabled):hover { + background-color: #f9f9f9; + cursor: pointer; +} + +.datepicker-cell.focused:not(.selected) { + background-color: #e8e8e8; +} + +.datepicker-cell.selected, .datepicker-cell.selected:hover { + background-color: #3273dc; + color: #fff; + font-weight: 600; +} + +.datepicker-cell.disabled { + color: #dbdbdb; +} + +.datepicker-cell.prev:not(.disabled), .datepicker-cell.next:not(.disabled) { + color: #7a7a7a; +} + +.datepicker-cell.prev.selected, .datepicker-cell.next.selected { + color: #e6e6e6; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today) { + border-radius: 0; + background-color: whitesmoke; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover { + background-color: #eeeeee; +} + +.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused { + background-color: #e8e8e8; +} + +.datepicker-cell.today:not(.selected) { + background-color: #00d1b2; +} + +.datepicker-cell.today:not(.selected):not(.disabled) { + color: #fff; +} + +.datepicker-cell.today.focused:not(.selected) { + background-color: #00c4a7; +} + +.datepicker-cell.range-start:not(.selected), .datepicker-cell.range-end:not(.selected) { + background-color: #b5b5b5; + color: #fff; +} + +.datepicker-cell.range-start.focused:not(.selected), .datepicker-cell.range-end.focused:not(.selected) { + background-color: #afafaf; +} + +.datepicker-cell.range-start { + border-radius: 4px 0 0 4px; +} + +.datepicker-cell.range-end { + border-radius: 0 4px 4px 0; +} + +.datepicker-cell.range { + border-radius: 0; + background-color: #dbdbdb; +} + +.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover { + background-color: #d5d5d5; +} + +.datepicker-cell.range.disabled { + color: #c2c2c2; +} + +.datepicker-cell.range.focused { + background-color: #cfcfcf; +} + +.datepicker-view.datepicker-grid .datepicker-cell { + height: 4.5rem; + line-height: 4.5rem; +} + +.datepicker-input.in-edit { + border-color: #2366d1; +} + +.datepicker-input.in-edit:focus, .datepicker-input.in-edit:active { + box-shadow: 0 0 0.25em 0.25em rgba(35, 102, 209, 0.2); +} diff --git a/node_modules/flowbite-datepicker/dist/css/datepicker.min.css b/node_modules/flowbite-datepicker/dist/css/datepicker.min.css new file mode 100644 index 0000000..e709ac0 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/css/datepicker.min.css @@ -0,0 +1 @@ +.datepicker{display:none}.datepicker.active{display:block}.datepicker-dropdown{position:absolute;top:0;left:0;z-index:20;padding-top:4px}.datepicker-dropdown.datepicker-orient-top{padding-top:0;padding-bottom:4px}.datepicker-picker{display:inline-block;border-radius:4px;background-color:#fff}.datepicker-dropdown .datepicker-picker{box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1)}.datepicker-picker span{display:block;flex:1;border:0;border-radius:4px;cursor:default;text-align:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker-main{padding:2px}.datepicker-footer{box-shadow:inset 0 1px 1px rgba(10,10,10,.1);background-color:#f5f5f5}.datepicker-controls,.datepicker-grid,.datepicker-view,.datepicker-view .days-of-week{display:flex}.datepicker-grid{flex-wrap:wrap}.datepicker-view .days .datepicker-cell,.datepicker-view .dow{flex-basis:14.28571%}.datepicker-view.datepicker-grid .datepicker-cell{flex-basis:25%}.datepicker-cell,.datepicker-view .week{height:2.25rem;line-height:2.25rem}.datepicker-title{box-shadow:inset 0 -1px 1px rgba(10,10,10,.1);background-color:#f5f5f5;padding:.375rem .75rem;text-align:center;font-weight:700}.datepicker-header .datepicker-controls{padding:2px 2px 0}.datepicker-controls .button{display:inline-flex;position:relative;align-items:center;justify-content:center;margin:0;border:1px solid #dbdbdb;border-radius:4px;box-shadow:none;background-color:#fff;cursor:pointer;padding:calc(.375em - 1px) .75em;height:2.25em;vertical-align:top;text-align:center;line-height:1.5;white-space:nowrap;color:#363636;font-size:1rem}.datepicker-controls .button:active,.datepicker-controls .button:focus{outline:none}.datepicker-controls .button:hover{border-color:#b5b5b5;color:#363636}.datepicker-controls .button:focus{border-color:#3273dc;color:#363636}.datepicker-controls .button:focus:not(:active){box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.datepicker-controls .button:active{border-color:#4a4a4a;color:#363636}.datepicker-controls .button[disabled]{cursor:not-allowed}.datepicker-header .datepicker-controls .button{border-color:transparent;font-weight:700}.datepicker-header .datepicker-controls .button:hover{background-color:#f9f9f9}.datepicker-header .datepicker-controls .button:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.datepicker-header .datepicker-controls .button:active{background-color:#f2f2f2}.datepicker-header .datepicker-controls .button[disabled]{box-shadow:none}.datepicker-footer .datepicker-controls .button{margin:calc(.375rem - 1px) .375rem;border-radius:2px;width:100%;font-size:.75rem}.datepicker-controls .view-switch{flex:auto}.datepicker-controls .next-btn,.datepicker-controls .prev-btn{padding-right:.375rem;padding-left:.375rem;width:2.25rem}.datepicker-controls .next-btn.disabled,.datepicker-controls .prev-btn.disabled{visibility:hidden}.datepicker-view .dow{height:1.5rem;line-height:1.5rem;font-size:.875rem;font-weight:700}.datepicker-view .week{width:2.25rem;color:#b5b5b5;font-size:.75rem}@media (max-width:22.5rem){.datepicker-view .week{width:1.96875rem}}.datepicker-grid{width:15.75rem}@media (max-width:22.5rem){.calendar-weeks+.days .datepicker-grid{width:13.78125rem}}.datepicker-cell:not(.disabled):hover{background-color:#f9f9f9;cursor:pointer}.datepicker-cell.focused:not(.selected){background-color:#e8e8e8}.datepicker-cell.selected,.datepicker-cell.selected:hover{background-color:#3273dc;color:#fff;font-weight:600}.datepicker-cell.disabled{color:#dbdbdb}.datepicker-cell.next:not(.disabled),.datepicker-cell.prev:not(.disabled){color:#7a7a7a}.datepicker-cell.next.selected,.datepicker-cell.prev.selected{color:#e6e6e6}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today){border-radius:0;background-color:#f5f5f5}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover{background-color:#eee}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused{background-color:#e8e8e8}.datepicker-cell.today:not(.selected){background-color:#00d1b2}.datepicker-cell.today:not(.selected):not(.disabled){color:#fff}.datepicker-cell.today.focused:not(.selected){background-color:#00c4a7}.datepicker-cell.range-end:not(.selected),.datepicker-cell.range-start:not(.selected){background-color:#b5b5b5;color:#fff}.datepicker-cell.range-end.focused:not(.selected),.datepicker-cell.range-start.focused:not(.selected){background-color:#afafaf}.datepicker-cell.range-start{border-radius:4px 0 0 4px}.datepicker-cell.range-end{border-radius:0 4px 4px 0}.datepicker-cell.range{border-radius:0;background-color:#dbdbdb}.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover{background-color:#d5d5d5}.datepicker-cell.range.disabled{color:#c2c2c2}.datepicker-cell.range.focused{background-color:#cfcfcf}.datepicker-view.datepicker-grid .datepicker-cell{height:4.5rem;line-height:4.5rem}.datepicker-input.in-edit{border-color:#2366d1}.datepicker-input.in-edit:active,.datepicker-input.in-edit:focus{box-shadow:0 0 .25em .25em rgba(35,102,209,.2)} \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/dist/js/datepicker-full.js b/node_modules/flowbite-datepicker/dist/js/datepicker-full.js new file mode 100644 index 0000000..c1be263 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/datepicker-full.js @@ -0,0 +1,2777 @@ +(function () { + 'use strict'; + + function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + function lastItemOf(arr) { + return arr[arr.length - 1]; + } + + // push only the items not included in the array + function pushUnique(arr, ...items) { + items.forEach((item) => { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; + } + + function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; + } + + function isInRange(testVal, min, max) { + const minOK = min === undefined || testVal >= min; + const maxOK = max === undefined || testVal <= max; + return minOK && maxOK; + } + + function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; + } + + function createTagRepeat(tagName, repeat, attributes = {}, index = 0, html = '') { + const openTagSrc = Object.keys(attributes).reduce((src, attr) => { + let val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return `${src} ${attr}="${val}"`; + }, tagName); + html += `<${openTagSrc}>`; + + const next = index + 1; + return next < repeat + ? createTagRepeat(tagName, repeat, attributes, next, html) + : html; + } + + // Remove the spacing surrounding tags for HTML parser not to create text nodes + // before/after elements + function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ name.toLowerCase().startsWith(monthName); + // compare with both short and full names because some locales have periods + // in the short names (not equal to the first X letters of the full names) + monthIndex = locale.monthsShort.findIndex(compareNames); + if (monthIndex < 0) { + monthIndex = locale.months.findIndex(compareNames); + } + if (monthIndex < 0) { + return NaN; + } + } + + newDate.setMonth(monthIndex); + return newDate.getMonth() !== normalizeMonth(monthIndex) + ? newDate.setDate(0) + : newDate.getTime(); + }, + d(date, day) { + return new Date(date).setDate(parseInt(day, 10)); + }, + }; + // format functions for date parts + const formatFns = { + d(date) { + return date.getDate(); + }, + dd(date) { + return padZero(date.getDate(), 2); + }, + D(date, locale) { + return locale.daysShort[date.getDay()]; + }, + DD(date, locale) { + return locale.days[date.getDay()]; + }, + m(date) { + return date.getMonth() + 1; + }, + mm(date) { + return padZero(date.getMonth() + 1, 2); + }, + M(date, locale) { + return locale.monthsShort[date.getMonth()]; + }, + MM(date, locale) { + return locale.months[date.getMonth()]; + }, + y(date) { + return date.getFullYear(); + }, + yy(date) { + return padZero(date.getFullYear(), 2).slice(-2); + }, + yyyy(date) { + return padZero(date.getFullYear(), 4); + }, + }; + + // get month index in normal range (0 - 11) from any number + function normalizeMonth(monthIndex) { + return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); + } + + function padZero(num, length) { + return num.toString().padStart(length, '0'); + } + + function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + const separators = format.split(reFormatTokens); + const parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + const partFormatters = parts.map(token => formatFns[token]); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + const partParserKeys = Object.keys(parseFns).reduce((keys, key) => { + const token = parts.find(part => part[0] !== 'D' && part[0].toLowerCase() === key); + if (token) { + keys.push(key); + } + return keys; + }, []); + + return knownFormats[format] = { + parser(dateStr, locale) { + const dateParts = dateStr.split(reNonDateParts).reduce((dtParts, part, index) => { + if (part.length > 0 && parts[index]) { + const token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce((origDate, key) => { + const newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, today()); + }, + formatter(date, locale) { + let dateStr = partFormatters.reduce((str, fn, index) => { + return str += `${separators[index]}${fn(date, locale)}`; + }, ''); + // separators' length is always parts' length + 1, + return dateStr += lastItemOf(separators); + }, + }; + } + + function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + const date = stripTime(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return today(); + } + + if (format && format.toValue) { + const date = format.toValue(dateStr, format, locale); + return isNaN(date) ? undefined : stripTime(date); + } + + return parseFormatString(format).parser(dateStr, locale); + } + + function formatDate(date, format, locale) { + if (isNaN(date) || (!date && date !== 0)) { + return ''; + } + + const dateObj = typeof date === 'number' ? new Date(date) : date; + + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + + return parseFormatString(format).formatter(dateObj, locale); + } + + const listenerRegistry = new WeakMap(); + const {addEventListener, removeEventListener} = EventTarget.prototype; + + // Register event listeners to a key object + // listeners: array of listener definitions; + // - each definition must be a flat array of event target and the arguments + // used to call addEventListener() on the target + function registerListeners(keyObj, listeners) { + let registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach((listener) => { + addEventListener.call(...listener); + registered.push(listener); + }); + } + + function unregisterListeners(keyObj) { + let listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach((listener) => { + removeEventListener.call(...listener); + }); + listenerRegistry.delete(keyObj); + } + + // Event.composedPath() polyfill for Edge + // based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec + if (!Event.prototype.composedPath) { + const getComposedPath = (node, path = []) => { + path.push(node); + + let parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { // ShadowRoot + parent = node.host; + } else if (node.defaultView) { // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; + } + + function findFromPath(path, criteria, currentTarget, index = 0) { + const el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); + } + + // Search for the actual target of a delegated event + function findElementInEventPath(ev, selector) { + const criteria = typeof selector === 'function' ? selector : el => el.matches(selector); + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); + } + + // default locales + const locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } + }; + + // config options updatable by setOptions() and their default values + const defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0, + }; + + const range = document.createRange(); + + function parseHTML(html) { + return range.createContextualFragment(html); + } + + function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; + } + + function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } + } + + function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } + } + + function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach((node) => { + el.appendChild(node); + }); + } + } + + const { + language: defaultLang, + format: defaultFormat, + weekStart: defaultWeekStart, + } = defaultOptions; + + // Reducer function to filter out invalid day-of-week from the input + function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 + ? pushUnique(dow, day) + : dow; + } + + function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; + } + + // validate input date. if invalid, fallback to the original value + function validateDate(value, format, locale, origValue) { + const date = parseDate(value, format, locale); + return date !== undefined ? date : origValue; + } + + // Validate viewId. if invalid, fallback to the original value + function validateViewId(value, origValue, max = 3) { + const viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; + } + + // Create Datepicker configuration to set + function processOptions(options, datepicker) { + const inOpts = Object.assign({}, options); + const config = {}; + const locales = datepicker.constructor.locales; + let { + format, + language, + locale, + maxDate, + maxView, + minDate, + pickLevel, + startView, + weekStart, + } = datepicker.config || {}; + + if (inOpts.language) { + let lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + const origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + + if (inOpts.format) { + const hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + const hasToValue = typeof inOpts.format.toValue === 'function'; + const validFormatString = reFormatTokens.test(inOpts.format); + if ((hasToDisplay && hasToValue) || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + let minDt = minDate; + let maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null + ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null + ? undefined + : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce((dates, dt) => { + const date = parseDate(dt, format, locale); + return date !== undefined ? pushUnique(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + const viewDate = parseDate(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + const wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + const maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + let newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + + let newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + + let newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + const prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + const nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + const orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(x => (x === 'left' || x === 'right')) || 'auto', + y: orientation.find(y => (y === 'top' || y === 'bottom')) || 'auto', + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch(inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach((key) => { + if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + + return config; + } + + const pickerTemplate = optimizeTemplateHTML(``); + + const daysTemplate = optimizeTemplateHTML(`
+
${createTagRepeat('span', 7, {class: 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
+
${createTagRepeat('span', 42 , {class: 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'})}
+
`); + + const calendarWeeksTemplate = optimizeTemplateHTML(`
+
+
${createTagRepeat('span', 6, {class: 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
+
`); + + // Base class of the view classes + class View { + constructor(picker, config) { + Object.assign(this, config, { + picker, + element: parseHTML(`
`).firstChild, + selected: [], + }); + this.init(this.picker.datepicker.config); + } + + init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + performBeforeHook(el, current, timeValue) { + let result = this.beforeShow(new Date(timeValue)); + switch (typeof result) { + case 'boolean': + result = {enabled: result}; + break; + case 'string': + result = {classes: result}; + } + + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + const extraClasses = result.classes.split(/\s+/); + el.classList.add(...extraClasses); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } + } + + class DaysView extends View { + constructor(picker) { + super(picker, { + id: 0, + name: 'days', + cellClass: 'day', + }); + } + + init(options, onConstruction = true) { + if (onConstruction) { + const inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + super.init(options); + } + + setOptions(options) { + let updateDOW; + + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + const locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' + ? options.beforeShowDay + : undefined; + } + + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + const weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild, + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach((el, index) => { + const dow = (this.weekStart + index) % 7; + el.textContent = this.dayNames[dow]; + el.className = this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + const viewYear = viewDate.getFullYear(); + const viewMonth = viewDate.getMonth(); + const firstOfMonth = dateValue(viewYear, viewMonth, 1); + const start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + render() { + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = [...this.datesDisabled]; + + const switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + const startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach((el, index) => { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const current = addDays(this.start, index); + const date = new Date(current); + const day = date.getDay(); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + el.dataset.date = current; + el.textContent = date.getDate(); + + if (current < this.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > this.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (this.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < this.minDate || current > this.maxDate || this.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (this.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(this.disabled, current); + } + if (this.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (this.range) { + const [rangeStart, rangeEnd] = this.range; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const [rangeStart, rangeEnd] = this.range || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach((el) => { + const current = Number(el.dataset.date); + const classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg'); + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg',); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg',); + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + const index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + } + + function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + + const [[startY, startM], [endY, endM]] = range; + if (startY > thisYear || endY < thisYear) { + return; + } + return [ + startY === thisYear ? startM : -1, + endY === thisYear ? endM : 12, + ]; + } + + class MonthsView extends View { + constructor(picker) { + super(picker, { + id: 1, + name: 'months', + cellClass: 'month', + }); + } + + init(options, onConstruction = true) { + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {'data-month': ix => ix}))); + } + super.init(options); + } + + setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + const minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + const maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' + ? options.beforeShowMonth + : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates.reduce((selected, timeValue) => { + const date = new Date(timeValue); + const year = date.getFullYear(); + const month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(timeValue => { + const date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + render() { + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + + const selected = this.selected[this.year] || []; + const yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + const isMinYear = this.year === this.minYear; + const isMaxYear = this.year === this.maxYear; + const range = computeMonthRange(this.range, this.year); + + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const date = dateValue(this.year, index, 1); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + if (this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = this.monthNames[index]; + + if ( + yrOutOfRange + || isMinYear && index < this.minMonth + || isMaxYear && index > this.maxMonth + ) { + classList.add('disabled'); + } + if (range) { + const [rangeStart, rangeEnd] = range; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const selected = this.selected[this.year] || []; + const [rangeStart, rangeEnd] = computeMonthRange(this.range, this.year) || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } + } + + function toTitleCase(word) { + return [...word].reduce((str, ch, ix) => str += ix ? ch : ch.toUpperCase(), ''); + } + + // Class representing the years and decades view elements + class YearsView extends View { + constructor(picker, config) { + super(picker, config); + } + + init(options, onConstruction = true) { + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = `beforeShow${toTitleCase(this.cellClass)}`; + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + super.init(options); + } + + setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + const beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + const first = startOfYearPeriod(viewDate, this.navStep); + const last = first + 9 * this.step; + + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates.reduce((years, timeValue) => { + return pushUnique(years, startOfYearPeriod(timeValue, this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(timeValue => { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, this.step); + } + }); + } + } + + // Update the entire view UI + render() { + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + + this.picker.setViewSwitchLabel(`${this.first}-${this.last}`); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const current = this.start + (index * this.step); + const date = dateValue(current, 0, 1); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + if (this.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < this.minYear || current > this.maxYear) { + classList.add('disabled'); + } + if (this.range) { + const [rangeStart, rangeEnd] = this.range; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const [rangeStart, rangeEnd] = this.range || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach((el) => { + const current = Number(el.textContent); + const classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + const index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + } + + function triggerDatepickerEvent(datepicker, type) { + const detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker, + }; + datepicker.element.dispatchEvent(new CustomEvent(type, {detail})); + } + + // direction: -1 (to previous), 1 (to next) + function goToPrevOrNext(datepicker, direction) { + const {minDate, maxDate} = datepicker.config; + const {currentView, viewDate} = datepicker.picker; + let newViewDate; + switch (currentView.id) { + case 0: + newViewDate = addMonths(viewDate, direction); + break; + case 1: + newViewDate = addYears(viewDate, direction); + break; + default: + newViewDate = addYears(viewDate, direction * currentView.navStep); + } + newViewDate = limitToRange(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); + } + + function switchView(datepicker) { + const viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); + } + + function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({autohide: true}); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } + } + + function goToSelectedMonthOrYear(datepicker, selection) { + const picker = datepicker.picker; + const viewDate = new Date(picker.viewDate); + const viewId = picker.currentView.id; + const newDate = viewId === 1 + ? addMonths(viewDate, selection - viewDate.getMonth()) + : addYears(viewDate, selection - viewDate.getFullYear()); + + picker.changeFocus(newDate).changeView(viewId - 1).render(); + } + + function onClickTodayBtn(datepicker) { + const picker = datepicker.picker; + const currentDate = today(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, {render: false}); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); + } + + function onClickClearBtn(datepicker) { + datepicker.setDate({clear: true}); + } + + function onClickViewSwitch(datepicker) { + switchView(datepicker); + } + + function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); + } + + function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); + } + + // For the picker's main block to delegete the events from `datepicker-cell`s + function onClickView(datepicker, ev) { + const target = findElementInEventPath(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + + const {id, isMinView} = datepicker.picker.currentView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } + } + + function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } + } + + function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + const prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach((node) => { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + const nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach((node) => { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) { + const {minDate, maxDate} = picker.datepicker.config; + picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } + } + + // Compute view date to reset, which will be... + // - the last item of the selected dates or defaultViewDate if no selection + // - limitted to minDate or maxDate if it exceeds the range + function computeResetViewDate(datepicker) { + const {dates, config} = datepicker; + const viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate; + return limitToRange(viewDate, config.minDate, config.maxDate); + } + + // Change current view's view date + function setViewDate(picker, newDate) { + const oldViewDate = new Date(picker.viewDate); + const newViewDate = new Date(newDate); + const {id, year, first, last} = picker.currentView; + const viewYear = newViewDate.getFullYear(); + + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } + } + + function getTextDirection(el) { + return window.getComputedStyle(el).direction; + } + + // Class representing the picker UI + class Picker { + constructor(datepicker) { + this.datepicker = datepicker; + + const template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + const element = this.element = parseHTML(template).firstChild; + const [header, main, footer] = element.firstChild.children; + const title = header.firstElementChild; + const [prevBtn, viewSwitch, nextBtn] = header.lastElementChild.children; + const [todayBtn, clearBtn] = footer.firstChild.children; + const controls = { + title, + prevBtn, + viewSwitch, + nextBtn, + todayBtn, + clearBtn, + }; + this.main = main; + this.controls = controls; + + const elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add(`datepicker-${elementClass}`); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + registerListeners(datepicker, [ + [element, 'click', onClickPicker.bind(null, datepicker), {capture: true}], + [main, 'click', onClickView.bind(null, datepicker)], + [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], + [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], + [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], + [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], + [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)], + ]); + + // set up views + this.views = [ + new DaysView(this), + new MonthsView(this), + new YearsView(this, {id: 2, name: 'years', cellClass: 'year', step: 1}), + new YearsView(this, {id: 3, name: 'decades', cellClass: 'decade', step: 10}), + ]; + this.currentView = this.views[datepicker.config.startView]; + + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + + setOptions(options) { + processPickerOptions(this, options); + this.views.forEach((view) => { + view.init(options, false); + }); + this.currentView.render(); + } + + detach() { + this.datepicker.config.container.removeChild(this.element); + } + + show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + + const datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + const inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + + hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + + place() { + const {classList, style} = this.element; + const {config, inputField} = this.datepicker; + const container = config.container; + const { + width: calendarWidth, + height: calendarHeight, + } = this.element.getBoundingClientRect(); + const { + left: containerLeft, + top: containerTop, + width: containerWidth, + } = container.getBoundingClientRect(); + const { + left: inputLeft, + top: inputTop, + width: inputWidth, + height: inputHeight + } = inputField.getBoundingClientRect(); + let {x: orientX, y: orientY} = config.orientation; + let scrollTop; + let left; + let top; + + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + + classList.remove( + 'datepicker-orient-top', + 'datepicker-orient-bottom', + 'datepicker-orient-right', + 'datepicker-orient-left' + ); + classList.add(`datepicker-orient-${orientY}`, `datepicker-orient-${orientX}`); + + style.top = top ? `${top}px` : top; + style.left = left ? `${left}px` : left; + } + + setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + + setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + + setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + + changeView(viewId) { + const oldView = this.currentView; + const newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach((view) => { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + update() { + const newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach((view) => { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + render(quickRender = true) { + const renderMethod = (quickRender && this._renderMethod) || 'render'; + delete this._renderMethod; + + this.currentView[renderMethod](); + } + } + + // Find the closest date that doesn't meet the condition for unavailable date + // Returns undefined if no available date is found + // addFn: function to calculate the next date + // - args: time value, amount + // increase: amount to pass to addFn + // testFn: function to test the unavailablity of the date + // - args: time value; retun: true if unavailable + function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!isInRange(date, min, max)) { + return; + } + if (testFn(date)) { + const newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; + } + + // direction: -1 (left/up), 1 (right/down) + // vertical: true for up/down, false for left/right + function moveByArrowKey(datepicker, ev, direction, vertical) { + const picker = datepicker.picker; + const currentView = picker.currentView; + const step = currentView.step || 1; + let viewDate = picker.viewDate; + let addFn; + let testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = addDays(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = addYears(viewDate, direction); + } else { + viewDate = addDays(viewDate, direction); + } + addFn = addDays; + testFn = (date) => currentView.disabled.includes(date); + break; + case 1: + viewDate = addMonths(viewDate, vertical ? direction * 4 : direction); + addFn = addMonths; + testFn = (date) => { + const dt = new Date(date); + const {year, disabled} = currentView; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = addYears; + testFn = date => currentView.disabled.includes(startOfYearPeriod(date, step)); + } + viewDate = findNextAvailableOne( + viewDate, + addFn, + direction < 0 ? -step : step, + testFn, + currentView.minDate, + currentView.maxDate + ); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } + } + + function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + + const picker = datepicker.picker; + const {id, isMinView} = picker.currentView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({update: true, autohide: datepicker.config.autohide}); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); + } + + function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } + } + + // for the prevention for entering edit mode while getting focus on click + function onMousedown(datepicker, ev) { + const el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(() => { + delete el._active; + delete el._clicking; + }, 2000); + } + } + + function onClickInput(datepicker, ev) { + const el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + + if (datepicker.config.showOnClick) { + datepicker.show(); + } + } + + function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } + } + + // for the `document` to delegate the events from outside the picker/input field + function onClickOutside(datepicker, ev) { + const element = datepicker.element; + if (element !== document.activeElement) { + return; + } + const pickerElem = datepicker.picker.element; + if (findElementInEventPath(ev, el => el === element || el === pickerElem)) { + return; + } + unfocus(datepicker); + } + + function stringifyDates(dates, config) { + return dates + .map(dt => formatDate(dt, config.format, config.locale)) + .join(config.dateDelimiter); + } + + // parse input dates and create an array of time values for selection + // returns undefined if there are no valid dates in inputDates + // when origDates (current selection) is passed, the function works to mix + // the input dates into the current selection + function processInputDates(datepicker, inputDates, clear = false) { + const {config, dates: origDates, rangepicker} = datepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + + const rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + let newDates = inputDates.reduce((dates, dt) => { + let date = parseDate(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + const dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd + ? dt.setMonth(dt.getMonth() + 1, 0) + : dt.setDate(1); + } else { + date = rangeEnd + ? dt.setFullYear(dt.getFullYear() + 1, 0, 0) + : dt.setMonth(0, 1); + } + } + if ( + isInRange(date, config.minDate, config.maxDate) + && !dates.includes(date) + && !config.datesDisabled.includes(date) + && !config.daysOfWeekDisabled.includes(new Date(date).getDay()) + ) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce((dates, date) => { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(date => !newDates.includes(date))); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates + ? newDates.slice(config.maxNumberOfDates * -1) + : newDates; + } + + // refresh the UI elements + // modes: 1: input only, 2, picker only, 3 both + function refreshUI(datepicker, mode = 3, quickRender = true) { + const {config, picker, inputField} = datepicker; + if (mode & 2) { + const newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } + } + + function setDate(datepicker, inputDates, options) { + let {clear, render, autohide} = options; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + + const newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } + } + + /** + * Class representing a date picker + */ + class Datepicker { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + constructor(element, options = {}, rangepicker = undefined) { + element.datepicker = this; + this.element = element; + + // set up config + const config = this.config = Object.assign({ + buttonClass: (options.buttonClass && String(options.buttonClass)) || 'button', + container: document.body, + defaultViewDate: today(), + maxDate: undefined, + minDate: undefined, + }, processOptions(defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + const inline = this.inline = element.tagName !== 'INPUT'; + let inputField; + let initialDates; + + if (inline) { + config.container = element; + initialDates = stringToArray(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + const container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = stringToArray(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + const index = rangepicker.inputs.indexOf(inputField); + const datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get() { + return rangepicker; + }, + }); + } + + // set initial dates + this.dates = []; + // process initial value + const inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + + const picker = this.picker = new Picker(this); + + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + const onMousedownDocument = onClickOutside.bind(null, this); + const listeners = [ + [inputField, 'keydown', onKeydown.bind(null, this)], + [inputField, 'focus', onFocus.bind(null, this)], + [inputField, 'mousedown', onMousedown.bind(null, this)], + [inputField, 'click', onClickInput.bind(null, this)], + [inputField, 'paste', onPaste.bind(null, this)], + [document, 'mousedown', onMousedownDocument], + [document, 'touchstart', onMousedownDocument], + [window, 'resize', picker.place.bind(picker)] + ]; + registerListeners(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + static formatDate(date, format, lang) { + return formatDate(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + static parseDate(dateStr, format, lang) { + return parseDate(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + static get locales() { + return locales; + } + + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + get active() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + get pickerElement() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + setOptions(options) { + const picker = this.picker; + const newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + destroy() { + this.hide(); + unregisterListeners(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + getDate(format = undefined) { + const callback = format + ? date => formatDate(date, format, this.config.locale) + : date => new Date(date); + + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + setDate(...args) { + const dates = [...args]; + const opts = {}; + const lastArg = lastItemOf(args); + if ( + typeof lastArg === 'object' + && !Array.isArray(lastArg) + && !(lastArg instanceof Date) + && lastArg + ) { + Object.assign(opts, dates.pop()); + } + + const inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + update(options = undefined) { + if (this.inline) { + return; + } + + const opts = {clear: true, autohide: !!(options && options.autohide)}; + const inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter); + setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + refresh(target = undefined, forceRender = false) { + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + + let mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + exitEditMode(options = undefined) { + if (this.inline || !this.editMode) { + return; + } + const opts = Object.assign({update: false}, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700'); + if (opts.update) { + this.update(opts); + } + } + } + + // filter out the config options inapproprite to pass to Datepicker + function filterOptions(options) { + const newOpts = Object.assign({}, options); + + delete newOpts.inputs; + delete newOpts.allowOneSidedRange; + delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date + + return newOpts; + } + + function setupDatepicker(rangepicker, changeDateListener, el, options) { + registerListeners(rangepicker, [ + [el, 'changeDate', changeDateListener], + ]); + new Datepicker(el, options, rangepicker); + } + + function onChangeDate(rangepicker, ev) { + // to prevent both datepickers trigger the other side's update each other + if (rangepicker._updating) { + return; + } + rangepicker._updating = true; + + const target = ev.target; + if (target.datepicker === undefined) { + return; + } + + const datepickers = rangepicker.datepickers; + const setDateOptions = {render: false}; + const changedSide = rangepicker.inputs.indexOf(target); + const otherSide = changedSide === 0 ? 1 : 0; + const changedDate = datepickers[changedSide].dates[0]; + const otherDate = datepickers[otherSide].dates[0]; + + if (changedDate !== undefined && otherDate !== undefined) { + // if the start of the range > the end, swap them + if (changedSide === 0 && changedDate > otherDate) { + datepickers[0].setDate(otherDate, setDateOptions); + datepickers[1].setDate(changedDate, setDateOptions); + } else if (changedSide === 1 && changedDate < otherDate) { + datepickers[0].setDate(changedDate, setDateOptions); + datepickers[1].setDate(otherDate, setDateOptions); + } + } else if (!rangepicker.allowOneSidedRange) { + // to prevent the range from becoming one-sided, copy changed side's + // selection (no matter if it's empty) to the other side + if (changedDate !== undefined || otherDate !== undefined) { + setDateOptions.clear = true; + datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions); + } + } + datepickers[0].picker.update().render(); + datepickers[1].picker.update().render(); + delete rangepicker._updating; + } + + /** + * Class representing a date range picker + */ + class DateRangePicker { + /** + * Create a date range picker + * @param {Element} element - element to bind a date range picker + * @param {Object} [options] - config options + */ + constructor(element, options = {}) { + const inputs = Array.isArray(options.inputs) + ? options.inputs + : Array.from(element.querySelectorAll('input')); + if (inputs.length < 2) { + return; + } + + element.rangepicker = this; + this.element = element; + this.inputs = inputs.slice(0, 2); + this.allowOneSidedRange = !!options.allowOneSidedRange; + + const changeDateListener = onChangeDate.bind(null, this); + const cleanOptions = filterOptions(options); + // in order for initial date setup to work right when pcicLvel > 0, + // let Datepicker constructor add the instance to the rangepicker + const datepickers = []; + Object.defineProperty(this, 'datepickers', { + get() { + return datepickers; + }, + }); + setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions); + setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions); + Object.freeze(datepickers); + // normalize the range if inital dates are given + if (datepickers[0].dates.length > 0) { + onChangeDate(this, {target: this.inputs[0]}); + } else if (datepickers[1].dates.length > 0) { + onChangeDate(this, {target: this.inputs[1]}); + } + } + + /** + * @type {Array} - selected date of the linked date pickers + */ + get dates() { + return this.datepickers.length === 2 + ? [ + this.datepickers[0].dates[0], + this.datepickers[1].dates[0], + ] + : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + setOptions(options) { + this.allowOneSidedRange = !!options.allowOneSidedRange; + + const cleanOptions = filterOptions(options); + this.datepickers[0].setOptions(cleanOptions); + this.datepickers[1].setOptions(cleanOptions); + } + + /** + * Destroy the DateRangePicker instance + * @return {DateRangePicker} - the instance destroyed + */ + destroy() { + this.datepickers[0].destroy(); + this.datepickers[1].destroy(); + unregisterListeners(this); + delete this.element.rangepicker; + } + + /** + * Get the start and end dates of the date range + * + * The method returns Date objects by default. If format string is passed, + * it returns date strings formatted in given format. + * The result array always contains 2 items (start date/end date) and + * undefined is used for unselected side. (e.g. If none is selected, + * the result will be [undefined, undefined]. If only the end date is set + * when allowOneSidedRange config option is true, [undefined, endDate] will + * be returned.) + * + * @param {String} [format] - Format string to stringify the dates + * @return {Array} - Start and end dates + */ + getDates(format = undefined) { + const callback = format + ? date => formatDate(date, format, this.datepickers[0].config.locale) + : date => new Date(date); + + return this.dates.map(date => date === undefined ? date : callback(date)); + } + + /** + * Set the start and end dates of the date range + * + * The method calls datepicker.setDate() internally using each of the + * arguments in start→end order. + * + * When a clear: true option object is passed instead of a date, the method + * clears the date. + * + * If an invalid date, the same date as the current one or an option object + * without clear: true is passed, the method considers that argument as an + * "ineffective" argument because calling datepicker.setDate() with those + * values makes no changes to the date selection. + * + * When the allowOneSidedRange config option is false, passing {clear: true} + * to clear the range works only when it is done to the last effective + * argument (in other words, passed to rangeEnd or to rangeStart along with + * ineffective rangeEnd). This is because when the date range is changed, + * it gets normalized based on the last change at the end of the changing + * process. + * + * @param {Date|Number|String|Object} rangeStart - Start date of the range + * or {clear: true} to clear the date + * @param {Date|Number|String|Object} rangeEnd - End date of the range + * or {clear: true} to clear the date + */ + setDates(rangeStart, rangeEnd) { + const [datepicker0, datepicker1] = this.datepickers; + const origDates = this.dates; + + // If range normalization runs on every change, we can't set a new range + // that starts after the end of the current range correctly because the + // normalization process swaps start↔︎end right after setting the new start + // date. To prevent this, the normalization process needs to run once after + // both of the new dates are set. + this._updating = true; + datepicker0.setDate(rangeStart); + datepicker1.setDate(rangeEnd); + delete this._updating; + + if (datepicker1.dates[0] !== origDates[1]) { + onChangeDate(this, {target: this.inputs[1]}); + } else if (datepicker0.dates[0] !== origDates[0]) { + onChangeDate(this, {target: this.inputs[0]}); + } + } + } + + window.Datepicker = Datepicker; + window.DateRangePicker = DateRangePicker; + +})(); diff --git a/node_modules/flowbite-datepicker/dist/js/datepicker-full.min.js b/node_modules/flowbite-datepicker/dist/js/datepicker-full.min.js new file mode 100644 index 0000000..4b1b1ac --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/datepicker-full.min.js @@ -0,0 +1 @@ +!function(){"use strict";function e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function t(e){return e[e.length-1]}function i(e,...t){return t.forEach(t=>{e.includes(t)||e.push(t)}),e}function r(e,t){return e?e.split(t):[]}function a(e,t,i){return(void 0===t||e>=t)&&(void 0===i||e<=i)}function s(e,t,i){return ei?i:e}function n(e,t,i={},r=0,a=""){a+=`<${Object.keys(i).reduce((e,t)=>{let a=i[t];return"function"==typeof a&&(a=a(r)),`${e} ${t}="${a}"`},e)}>`;const s=r+1;return s\s+/g,">").replace(/\s+new Date(e).setFullYear(parseInt(t,10)),m(e,t,i){const r=new Date(e);let a=parseInt(t,10)-1;if(isNaN(a)){if(!t)return NaN;const e=t.toLowerCase(),r=t=>t.toLowerCase().startsWith(e);if((a=i.monthsShort.findIndex(r))<0&&(a=i.months.findIndex(r)),a<0)return NaN}return r.setMonth(a),r.getMonth()!==function e(t){return t>-1?t%12:e(t+12)}(a)?r.setDate(0):r.getTime()},d:(e,t)=>new Date(e).setDate(parseInt(t,10))},v={d:e=>e.getDate(),dd:e=>D(e.getDate(),2),D:(e,t)=>t.daysShort[e.getDay()],DD:(e,t)=>t.days[e.getDay()],m:e=>e.getMonth()+1,mm:e=>D(e.getMonth()+1,2),M:(e,t)=>t.monthsShort[e.getMonth()],MM:(e,t)=>t.months[e.getMonth()],y:e=>e.getFullYear(),yy:e=>D(e.getFullYear(),2).slice(-2),yyyy:e=>D(e.getFullYear(),4)};function D(e,t){return e.toString().padStart(t,"0")}function x(e){if("string"!=typeof e)throw new Error("Invalid date format.");if(e in w)return w[e];const i=e.split(b),r=e.match(new RegExp(b,"g"));if(0===i.length||!r)throw new Error("Invalid date format.");const a=r.map(e=>v[e]),s=Object.keys(k).reduce((e,t)=>{return r.find(e=>"D"!==e[0]&&e[0].toLowerCase()===t)&&e.push(t),e},[]);return w[e]={parser(e,t){const i=e.split(y).reduce((e,t,i)=>{if(t.length>0&&r[i]){const a=r[i][0];"M"===a?e.m=t:"D"!==a&&(e[a]=t)}return e},{});return s.reduce((e,r)=>{const a=k[r](e,i[r],t);return isNaN(a)?e:a},c())},formatter:(e,r)=>a.reduce((t,a,s)=>t+`${i[s]}${a(e,r)}`,"")+t(i)}}function M(e,t,i){if(e instanceof Date||"number"==typeof e){const t=o(e);return isNaN(t)?void 0:t}if(e){if("today"===e)return c();if(t&&t.toValue){const r=t.toValue(e,t,i);return isNaN(r)?void 0:o(r)}return x(t).parser(e,i)}}function S(e,t,i){if(isNaN(e)||!e&&0!==e)return"";const r="number"==typeof e?new Date(e):e;return t.toDisplay?t.toDisplay(r,t,i):x(t).formatter(r,i)}const O=new WeakMap,{addEventListener:C,removeEventListener:E}=EventTarget.prototype;function F(e,t){let i=O.get(e);i||(i=[],O.set(e,i)),t.forEach(e=>{C.call(...e),i.push(e)})}function V(e){let t=O.get(e);t&&(t.forEach(e=>{E.call(...e)}),O.delete(e))}if(!Event.prototype.composedPath){const e=(t,i=[])=>{let r;return i.push(t),t.parentNode?r=t.parentNode:t.host?r=t.host:t.defaultView&&(r=t.defaultView),r?e(r,i):i};Event.prototype.composedPath=function(){return e(this.target)}}function L(e,t){const i="function"==typeof t?t:e=>e.matches(t);return function e(t,i,r,a=0){const s=t[a];return i(s)?s:s!==r&&s.parentElement?e(t,i,r,a+1):void 0}(e.composedPath(),i,e.currentTarget)}const N={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}},B={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:'',orientation:"auto",pickLevel:0,prevArrow:'',showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},A=document.createRange();function Y(e){return A.createContextualFragment(e)}function W(e){"none"!==e.style.display&&(e.style.display&&(e.dataset.styleDisplay=e.style.display),e.style.display="none")}function j(e){"none"===e.style.display&&(e.dataset.styleDisplay?(e.style.display=e.dataset.styleDisplay,delete e.dataset.styleDisplay):e.style.display="")}function _(e){e.firstChild&&(e.removeChild(e.firstChild),_(e))}const{language:K,format:H,weekStart:T}=B;function $(e,t){return e.length<6&&t>=0&&t<7?i(e,t):e}function P(e){return(e+6)%7}function R(e,t,i,r){const a=M(e,t,i);return void 0!==a?a:r}function I(e,t,i=3){const r=parseInt(e,10);return r>=0&&r<=i?r:t}function q(t,r){const a=Object.assign({},t),s={},n=r.constructor.locales;let{format:d,language:o,locale:c,maxDate:h,maxView:u,minDate:g,pickLevel:f,startView:p,weekStart:m}=r.config||{};if(a.language){let e;if(a.language!==o&&(n[a.language]?e=a.language:void 0===n[e=a.language.split("-")[0]]&&(e=!1)),delete a.language,e){o=s.language=e;const t=c||n[K];c=Object.assign({format:H,weekStart:T},n[K]),o!==K&&Object.assign(c,n[o]),s.locale=c,d===t.format&&(d=s.format=c.format),m===t.weekStart&&(m=s.weekStart=c.weekStart,s.weekEnd=P(c.weekStart))}}if(a.format){const e="function"==typeof a.format.toDisplay,t="function"==typeof a.format.toValue,i=b.test(a.format);(e&&t||i)&&(d=s.format=a.format),delete a.format}let y=g,w=h;if(void 0!==a.minDate&&(y=null===a.minDate?l(0,0,1):R(a.minDate,d,c,y),delete a.minDate),void 0!==a.maxDate&&(w=null===a.maxDate?void 0:R(a.maxDate,d,c,w),delete a.maxDate),w{const r=M(t,d,c);return void 0!==r?i(e,r):e},[]),delete a.datesDisabled),void 0!==a.defaultViewDate){const e=M(a.defaultViewDate,d,c);void 0!==e&&(s.defaultViewDate=e),delete a.defaultViewDate}if(void 0!==a.weekStart){const e=Number(a.weekStart)%7;isNaN(e)||(m=s.weekStart=e,s.weekEnd=P(e)),delete a.weekStart}if(a.daysOfWeekDisabled&&(s.daysOfWeekDisabled=a.daysOfWeekDisabled.reduce($,[]),delete a.daysOfWeekDisabled),a.daysOfWeekHighlighted&&(s.daysOfWeekHighlighted=a.daysOfWeekHighlighted.reduce($,[]),delete a.daysOfWeekHighlighted),void 0!==a.maxNumberOfDates){const e=parseInt(a.maxNumberOfDates,10);e>=0&&(s.maxNumberOfDates=e,s.multidate=1!==e),delete a.maxNumberOfDates}a.dateDelimiter&&(s.dateDelimiter=String(a.dateDelimiter),delete a.dateDelimiter);let k=f;void 0!==a.pickLevel&&(k=I(a.pickLevel,2),delete a.pickLevel),k!==f&&(f=s.pickLevel=k);let v=u;void 0!==a.maxView&&(v=I(a.maxView,u),delete a.maxView),(v=f>v?f:v)!==u&&(u=s.maxView=v);let D=p;if(void 0!==a.startView&&(D=I(a.startView,D),delete a.startView),Du&&(D=u),D!==p&&(s.startView=D),a.prevArrow){const e=Y(a.prevArrow);e.childNodes.length>0&&(s.prevArrow=e.childNodes),delete a.prevArrow}if(a.nextArrow){const e=Y(a.nextArrow);e.childNodes.length>0&&(s.nextArrow=e.childNodes),delete a.nextArrow}if(void 0!==a.disableTouchKeyboard&&(s.disableTouchKeyboard="ontouchstart"in document&&!!a.disableTouchKeyboard,delete a.disableTouchKeyboard),a.orientation){const e=a.orientation.toLowerCase().split(/\s+/g);s.orientation={x:e.find(e=>"left"===e||"right"===e)||"auto",y:e.find(e=>"top"===e||"bottom"===e)||"auto"},delete a.orientation}if(void 0!==a.todayBtnMode){switch(a.todayBtnMode){case 0:case 1:s.todayBtnMode=a.todayBtnMode}delete a.todayBtnMode}return Object.keys(a).forEach(t=>{void 0!==a[t]&&e(B,t)&&(s[t]=a[t])}),s}const J=d(''),z=d(`
\n
${n("span",7,{class:"dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"})}
\n
${n("span",42,{class:"block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"})}
\n
`),U=d(`
\n
\n
${n("span",6,{class:"week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"})}
\n
`);class X{constructor(e,t){Object.assign(this,t,{picker:e,element:Y('
').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}init(e){void 0!==e.pickLevel&&(this.isMinView=this.id===e.pickLevel),this.setOptions(e),this.updateFocus(),this.updateSelection()}performBeforeHook(e,t,r){let a=this.beforeShow(new Date(r));switch(typeof a){case"boolean":a={enabled:a};break;case"string":a={classes:a}}if(a){if(!1===a.enabled&&(e.classList.add("disabled"),i(this.disabled,t)),a.classes){const r=a.classes.split(/\s+/);e.classList.add(...r),r.includes("disabled")&&i(this.disabled,t)}a.content&&function(e,t){_(e),t instanceof DocumentFragment?e.appendChild(t):"string"==typeof t?e.appendChild(Y(t)):"function"==typeof t.forEach&&t.forEach(t=>{e.appendChild(t)})}(e,a.content)}}}class G extends X{constructor(e){super(e,{id:0,name:"days",cellClass:"day"})}init(e,t=!0){if(t){const e=Y(z).firstChild;this.dow=e.firstChild,this.grid=e.lastChild,this.element.appendChild(e)}super.init(e)}setOptions(t){let i;if(e(t,"minDate")&&(this.minDate=t.minDate),e(t,"maxDate")&&(this.maxDate=t.maxDate),t.datesDisabled&&(this.datesDisabled=t.datesDisabled),t.daysOfWeekDisabled&&(this.daysOfWeekDisabled=t.daysOfWeekDisabled,i=!0),t.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=t.daysOfWeekHighlighted),void 0!==t.todayHighlight&&(this.todayHighlight=t.todayHighlight),void 0!==t.weekStart&&(this.weekStart=t.weekStart,this.weekEnd=t.weekEnd,i=!0),t.locale){const e=this.locale=t.locale;this.dayNames=e.daysMin,this.switchLabelFormat=e.titleFormat,i=!0}if(void 0!==t.beforeShowDay&&(this.beforeShow="function"==typeof t.beforeShowDay?t.beforeShowDay:void 0),void 0!==t.calendarWeeks)if(t.calendarWeeks&&!this.calendarWeeks){const e=Y(U).firstChild;this.calendarWeeks={element:e,dow:e.firstChild,weeks:e.lastChild},this.element.insertBefore(e,this.element.firstChild)}else this.calendarWeeks&&!t.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==t.showDaysOfWeek&&(t.showDaysOfWeek?(j(this.dow),this.calendarWeeks&&j(this.calendarWeeks.dow)):(W(this.dow),this.calendarWeeks&&W(this.calendarWeeks.dow))),i&&Array.from(this.dow.children).forEach((e,t)=>{const i=(this.weekStart+t)%7;e.textContent=this.dayNames[i],e.className=this.daysOfWeekDisabled.includes(i)?"dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed":"dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"})}updateFocus(){const e=new Date(this.picker.viewDate),t=e.getFullYear(),i=e.getMonth(),r=l(t,i,1),a=p(r,this.weekStart,this.weekStart);this.first=r,this.last=l(t,i+1,0),this.start=a,this.focused=this.picker.viewDate}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e,t&&(this.range=t.dates)}render(){this.today=this.todayHighlight?c():void 0,this.disabled=[...this.datesDisabled];const e=S(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(e),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){const e=p(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((t,i)=>{t.textContent=function(e){const t=p(e,4,1),i=p(new Date(t).setMonth(0,4),4,1);return Math.round((t-i)/6048e5)+1}(h(e,7*i))})}Array.from(this.grid.children).forEach((e,t)=>{const r=e.classList,a=h(this.start,t),s=new Date(a),n=s.getDay();if(e.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,e.dataset.date=a,e.textContent=s.getDate(),athis.last&&r.add("next","text-gray-500","dark:text-white"),this.today===a&&r.add("today","bg-gray-100","dark:bg-gray-600"),(athis.maxDate||this.disabled.includes(a))&&r.add("disabled","cursor-not-allowed"),this.daysOfWeekDisabled.includes(n)&&(r.add("disabled","cursor-not-allowed"),i(this.disabled,a)),this.daysOfWeekHighlighted.includes(n)&&r.add("highlighted"),this.range){const[e,t]=this.range;a>e&&a{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark:!bg-primary-600","dark:text-white","focused"),e.classList.add("text-gray-900","rounded-lg","dark:text-white")}),Array.from(this.grid.children).forEach(i=>{const r=Number(i.dataset.date),a=i.classList;a.remove("bg-gray-200","dark:bg-gray-600","rounded-l-lg","rounded-r-lg"),r>e&&r{e.classList.remove("focused")}),this.grid.children[e].classList.add("focused")}}function Q(e,t){if(!e||!e[0]||!e[1])return;const[[i,r],[a,s]]=e;return i>t||ae})))),super.init(e)}setOptions(t){if(t.locale&&(this.monthNames=t.locale.monthsShort),e(t,"minDate"))if(void 0===t.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{const e=new Date(t.minDate);this.minYear=e.getFullYear(),this.minMonth=e.getMonth(),this.minDate=e.setDate(1)}if(e(t,"maxDate"))if(void 0===t.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{const e=new Date(t.maxDate);this.maxYear=e.getFullYear(),this.maxMonth=e.getMonth(),this.maxDate=l(this.maxYear,this.maxMonth+1,0)}void 0!==t.beforeShowMonth&&(this.beforeShow="function"==typeof t.beforeShowMonth?t.beforeShowMonth:void 0)}updateFocus(){const e=new Date(this.picker.viewDate);this.year=e.getFullYear(),this.focused=e.getMonth()}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce((e,t)=>{const r=new Date(t),a=r.getFullYear(),s=r.getMonth();return void 0===e[a]?e[a]=[s]:i(e[a],s),e},{}),t&&t.dates&&(this.range=t.dates.map(e=>{const t=new Date(e);return isNaN(t)?void 0:[t.getFullYear(),t.getMonth()]}))}render(){this.disabled=[],this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);const e=this.selected[this.year]||[],t=this.yearthis.maxYear,i=this.year===this.minYear,r=this.year===this.maxYear,a=Q(this.range,this.year);Array.from(this.grid.children).forEach((s,n)=>{const d=s.classList,o=l(this.year,n,1);if(s.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,this.isMinView&&(s.dataset.date=o),s.textContent=this.monthNames[n],(t||i&&nthis.maxMonth)&&d.add("disabled"),a){const[e,t]=a;n>e&&n{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","dark:bg-blue-600","dark:!bg-primary-700","dark:text-white","text-white","focused"),e.classList.add("text-gray-900","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600")}),Array.from(this.grid.children).forEach((r,a)=>{const s=r.classList;a>t&&a{e.classList.remove("focused")}),this.grid.children[this.focused].classList.add("focused")}}class ee extends X{constructor(e,t){super(e,t)}init(e,t=!0){var i;t&&(this.navStep=10*this.step,this.beforeShowOption=`beforeShow${i=this.cellClass,[...i].reduce((e,t,i)=>e+=i?t:t.toUpperCase(),"")}`,this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(Y(n("span",12)))),super.init(e)}setOptions(t){if(e(t,"minDate")&&(void 0===t.minDate?this.minYear=this.minDate=void 0:(this.minYear=m(t.minDate,this.step),this.minDate=l(this.minYear,0,1))),e(t,"maxDate")&&(void 0===t.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=m(t.maxDate,this.step),this.maxDate=l(this.maxYear,11,31))),void 0!==t[this.beforeShowOption]){const e=t[this.beforeShowOption];this.beforeShow="function"==typeof e?e:void 0}}updateFocus(){const e=new Date(this.picker.viewDate),t=m(e,this.navStep),i=t+9*this.step;this.first=t,this.last=i,this.start=t-this.step,this.focused=m(e,this.step)}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce((e,t)=>i(e,m(t,this.step)),[]),t&&t.dates&&(this.range=t.dates.map(e=>{if(void 0!==e)return m(e,this.step)}))}render(){this.disabled=[],this.picker.setViewSwitchLabel(`${this.first}-${this.last}`),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((e,t)=>{const i=e.classList,r=this.start+t*this.step,a=l(r,0,1);if(e.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,this.isMinView&&(e.dataset.date=a),e.textContent=e.dataset.year=r,0===t?i.add("prev"):11===t&&i.add("next"),(rthis.maxYear)&&i.add("disabled"),this.range){const[e,t]=this.range;r>e&&r{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark!bg-primary-600","dark:text-white","focused")}),Array.from(this.grid.children).forEach(i=>{const r=Number(i.textContent),a=i.classList;r>e&&r{e.classList.remove("focused")}),this.grid.children[e].classList.add("focused")}}function te(e,t){const i={date:e.getDate(),viewDate:new Date(e.picker.viewDate),viewId:e.picker.currentView.id,datepicker:e};e.element.dispatchEvent(new CustomEvent(t,{detail:i}))}function ie(e,t){const{minDate:i,maxDate:r}=e.config,{currentView:a,viewDate:n}=e.picker;let d;switch(a.id){case 0:d=u(n,t);break;case 1:d=g(n,t);break;default:d=g(n,t*a.navStep)}d=s(d,i,r),e.picker.changeFocus(d).render()}function re(e){const t=e.picker.currentView.id;t!==e.config.maxView&&e.picker.changeView(t+1).render()}function ae(e){e.config.updateOnBlur?e.update({autohide:!0}):(e.refresh("input"),e.hide())}function se(e,t){const i=e.picker,r=new Date(i.viewDate),a=i.currentView.id,s=1===a?u(r,t-r.getMonth()):g(r,t-r.getFullYear());i.changeFocus(s).changeView(a-1).render()}function ne(t,i){if(void 0!==i.title&&(i.title?(t.controls.title.textContent=i.title,j(t.controls.title)):(t.controls.title.textContent="",W(t.controls.title))),i.prevArrow){const e=t.controls.prevBtn;_(e),i.prevArrow.forEach(t=>{e.appendChild(t.cloneNode(!0))})}if(i.nextArrow){const e=t.controls.nextBtn;_(e),i.nextArrow.forEach(t=>{e.appendChild(t.cloneNode(!0))})}if(i.locale&&(t.controls.todayBtn.textContent=i.locale.today,t.controls.clearBtn.textContent=i.locale.clear),void 0!==i.todayBtn&&(i.todayBtn?j(t.controls.todayBtn):W(t.controls.todayBtn)),e(i,"minDate")||e(i,"maxDate")){const{minDate:e,maxDate:i}=t.datepicker.config;t.controls.todayBtn.disabled=!a(c(),e,i)}void 0!==i.clearBtn&&(i.clearBtn?j(t.controls.clearBtn):W(t.controls.clearBtn))}function de(e){const{dates:i,config:r}=e;return s(i.length>0?t(i):r.defaultViewDate,r.minDate,r.maxDate)}function oe(e,t){const i=new Date(e.viewDate),r=new Date(t),{id:a,year:s,first:n,last:d}=e.currentView,o=r.getFullYear();switch(e.viewDate=t,o!==i.getFullYear()&&te(e.datepicker,"changeYear"),r.getMonth()!==i.getMonth()&&te(e.datepicker,"changeMonth"),a){case 0:return td;case 1:return o!==s;default:return od}}function ce(e){return window.getComputedStyle(e).direction}class le{constructor(e){this.datepicker=e;const t=J.replace(/%buttonClass%/g,e.config.buttonClass),i=this.element=Y(t).firstChild,[r,a,s]=i.firstChild.children,n=r.firstElementChild,[d,o,l]=r.lastElementChild.children,[h,u]=s.firstChild.children,g={title:n,prevBtn:d,viewSwitch:o,nextBtn:l,todayBtn:h,clearBtn:u};this.main=a,this.controls=g;const f=e.inline?"inline":"dropdown";i.classList.add(`datepicker-${f}`),"dropdown"===f&&i.classList.add("dropdown","absolute","top-0","left-0","z-50","pt-2"),ne(this,e.config),this.viewDate=de(e),F(e,[[i,"click",function(e){e.inline||e.config.disableTouchKeyboard||e.inputField.focus()}.bind(null,e),{capture:!0}],[a,"click",function(e,t){const i=L(t,".datepicker-cell");if(!i||i.classList.contains("disabled"))return;const{id:r,isMinView:a}=e.picker.currentView;a?e.setDate(Number(i.dataset.date)):se(e,1===r?Number(i.dataset.month):Number(i.dataset.year))}.bind(null,e)],[g.viewSwitch,"click",function(e){re(e)}.bind(null,e)],[g.prevBtn,"click",function(e){ie(e,-1)}.bind(null,e)],[g.nextBtn,"click",function(e){ie(e,1)}.bind(null,e)],[g.todayBtn,"click",function(e){const t=e.picker,i=c();if(1===e.config.todayBtnMode){if(e.config.autohide)return void e.setDate(i);e.setDate(i,{render:!1}),t.update()}t.viewDate!==i&&t.changeFocus(i),t.changeView(0).render()}.bind(null,e)],[g.clearBtn,"click",function(e){e.setDate({clear:!0})}.bind(null,e)]]),this.views=[new G(this),new Z(this),new ee(this,{id:2,name:"years",cellClass:"year",step:1}),new ee(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[e.config.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),e.config.container.appendChild(this.element)}setOptions(e){ne(this,e),this.views.forEach(t=>{t.init(e,!1)}),this.currentView.render()}detach(){this.datepicker.config.container.removeChild(this.element)}show(){if(this.active)return;this.element.classList.add("active","block"),this.element.classList.remove("hidden"),this.active=!0;const e=this.datepicker;if(!e.inline){const t=ce(e.inputField);t!==ce(e.config.container)?this.element.dir=t:this.element.dir&&this.element.removeAttribute("dir"),this.place(),e.config.disableTouchKeyboard&&e.inputField.blur()}te(e,"show")}hide(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active","block"),this.element.classList.add("active","block","hidden"),this.active=!1,te(this.datepicker,"hide"))}place(){const{classList:e,style:t}=this.element,{config:i,inputField:r}=this.datepicker,a=i.container,{width:s,height:n}=this.element.getBoundingClientRect(),{left:d,top:o,width:c}=a.getBoundingClientRect(),{left:l,top:h,width:u,height:g}=r.getBoundingClientRect();let f,p,m,{x:b,y:y}=i.orientation;a===document.body?(f=window.scrollY,p=l+window.scrollX,m=h+f):(p=l-d,m=h-o+(f=a.scrollTop)),"auto"===b&&(p<0?(b="left",p=10):b=p+s>c?"right":"rtl"===ce(r)?"right":"left"),"right"===b&&(p-=s-u),"auto"===y&&(y=m-n{e.updateFocus()}),this}update(){const e=de(this.datepicker);return this._renderMethod=oe(this,e)?"render":"refresh",this.views.forEach(e=>{e.updateFocus(),e.updateSelection()}),this}render(e=!0){const t=e&&this._renderMethod||"render";delete this._renderMethod,this.currentView[t]()}}function he(e,t,i,r){const s=e.picker,n=s.currentView,d=n.step||1;let o,c,l=s.viewDate;switch(n.id){case 0:l=r?h(l,7*i):t.ctrlKey||t.metaKey?g(l,i):h(l,i),o=h,c=(e=>n.disabled.includes(e));break;case 1:l=u(l,r?4*i:i),o=u,c=(e=>{const t=new Date(e),{year:i,disabled:r}=n;return t.getFullYear()===i&&r.includes(t.getMonth())});break;default:l=g(l,i*(r?4:1)*d),o=g,c=(e=>n.disabled.includes(m(e,d)))}void 0!==(l=function e(t,i,r,s,n,d){if(a(t,n,d))return s(t)?e(i(t,r),i,r,s,n,d):t}(l,o,i<0?-d:d,c,n.minDate,n.maxDate))&&s.changeFocus(l).render()}function ue(e,t){return e.map(e=>S(e,t.format,t.locale)).join(t.dateDelimiter)}function ge(e,t,i=!1){const{config:r,dates:s,rangepicker:n}=e;if(0===t.length)return i?[]:void 0;const d=n&&e===n.datepickers[1];let o=t.reduce((e,t)=>{let i=M(t,r.format,r.locale);if(void 0===i)return e;if(r.pickLevel>0){const e=new Date(i);i=1===r.pickLevel?d?e.setMonth(e.getMonth()+1,0):e.setDate(1):d?e.setFullYear(e.getFullYear()+1,0,0):e.setMonth(0,1)}return!a(i,r.minDate,r.maxDate)||e.includes(i)||r.datesDisabled.includes(i)||r.daysOfWeekDisabled.includes(new Date(i).getDay())||e.push(i),e},[]);return 0!==o.length?(r.multidate&&!i&&(o=o.reduce((e,t)=>(s.includes(t)||e.push(t),e),s.filter(e=>!o.includes(e)))),r.maxNumberOfDates&&o.length>r.maxNumberOfDates?o.slice(-1*r.maxNumberOfDates):o):void 0}function fe(e,t=3,i=!0){const{config:r,picker:a,inputField:s}=e;if(2&t){const e=a.active?r.pickLevel:r.startView;a.update().changeView(e).render(i)}1&t&&s&&(s.value=ue(e.dates,r))}function pe(e,t,i){let{clear:r,render:a,autohide:s}=i;void 0===a&&(a=!0),a?void 0===s&&(s=e.config.autohide):s=!1;const n=ge(e,t,r);n&&(n.toString()!==e.dates.toString()?(e.dates=n,fe(e,a?3:1),te(e,"changeDate")):fe(e,1),s&&e.hide())}class me{constructor(e,t={},i){e.datepicker=this,this.element=e;const a=this.config=Object.assign({buttonClass:t.buttonClass&&String(t.buttonClass)||"button",container:document.body,defaultViewDate:c(),maxDate:void 0,minDate:void 0},q(B,this));this._options=t,Object.assign(a,q(t,this));const s=this.inline="INPUT"!==e.tagName;let n,d;if(s)a.container=e,d=r(e.dataset.date,a.dateDelimiter),delete e.dataset.date;else{const i=t.container?document.querySelector(t.container):null;i&&(a.container=i),(n=this.inputField=e).classList.add("datepicker-input"),d=r(n.value,a.dateDelimiter)}if(i){const e=i.inputs.indexOf(n),t=i.datepickers;if(e<0||e>1||!Array.isArray(t))throw Error("Invalid rangepicker object.");t[e]=this,Object.defineProperty(this,"rangepicker",{get:()=>i})}this.dates=[];const o=ge(this,d);o&&o.length>0&&(this.dates=o),n&&(n.value=ue(this.dates,a));const l=this.picker=new le(this);if(s)this.show();else{const e=function(e,t){const i=e.element;if(i!==document.activeElement)return;const r=e.picker.element;L(t,e=>e===i||e===r)||ae(e)}.bind(null,this);F(this,[[n,"keydown",function(e,t){if("Tab"===t.key)return void ae(e);const i=e.picker,{id:r,isMinView:a}=i.currentView;if(i.active)if(e.editMode)switch(t.key){case"Escape":i.hide();break;case"Enter":e.exitEditMode({update:!0,autohide:e.config.autohide});break;default:return}else switch(t.key){case"Escape":i.hide();break;case"ArrowLeft":if(t.ctrlKey||t.metaKey)ie(e,-1);else{if(t.shiftKey)return void e.enterEditMode();he(e,t,-1,!1)}break;case"ArrowRight":if(t.ctrlKey||t.metaKey)ie(e,1);else{if(t.shiftKey)return void e.enterEditMode();he(e,t,1,!1)}break;case"ArrowUp":if(t.ctrlKey||t.metaKey)re(e);else{if(t.shiftKey)return void e.enterEditMode();he(e,t,-1,!0)}break;case"ArrowDown":if(t.shiftKey&&!t.ctrlKey&&!t.metaKey)return void e.enterEditMode();he(e,t,1,!0);break;case"Enter":a?e.setDate(i.viewDate):i.changeView(r-1).render();break;case"Backspace":case"Delete":return void e.enterEditMode();default:return void(1!==t.key.length||t.ctrlKey||t.metaKey||e.enterEditMode())}else switch(t.key){case"ArrowDown":case"Escape":i.show();break;case"Enter":e.update();break;default:return}t.preventDefault(),t.stopPropagation()}.bind(null,this)],[n,"focus",function(e){e.config.showOnFocus&&!e._showing&&e.show()}.bind(null,this)],[n,"mousedown",function(e,t){const i=t.target;(e.picker.active||e.config.showOnClick)&&(i._active=i===document.activeElement,i._clicking=setTimeout(()=>{delete i._active,delete i._clicking},2e3))}.bind(null,this)],[n,"click",function(e,t){const i=t.target;i._clicking&&(clearTimeout(i._clicking),delete i._clicking,i._active&&e.enterEditMode(),delete i._active,e.config.showOnClick&&e.show())}.bind(null,this)],[n,"paste",function(e,t){t.clipboardData.types.includes("text/plain")&&e.enterEditMode()}.bind(null,this)],[document,"mousedown",e],[document,"touchstart",e],[window,"resize",l.place.bind(l)]])}}static formatDate(e,t,i){return S(e,t,i&&N[i]||N.en)}static parseDate(e,t,i){return M(e,t,i&&N[i]||N.en)}static get locales(){return N}get active(){return!(!this.picker||!this.picker.active)}get pickerElement(){return this.picker?this.picker.element:void 0}setOptions(e){const t=this.picker,i=q(e,this);Object.assign(this._options,e),Object.assign(this.config,i),t.setOptions(i),fe(this,3)}show(){if(this.inputField){if(this.inputField.disabled)return;this.inputField!==document.activeElement&&(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}destroy(){return this.hide(),V(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}getDate(e){const t=e?t=>S(t,e,this.config.locale):e=>new Date(e);return this.config.multidate?this.dates.map(t):this.dates.length>0?t(this.dates[0]):void 0}setDate(...e){const i=[...e],r={},a=t(e);"object"!=typeof a||Array.isArray(a)||a instanceof Date||!a||Object.assign(r,i.pop()),pe(this,Array.isArray(i[0])?i[0]:i,r)}update(e){if(this.inline)return;const t={clear:!0,autohide:!(!e||!e.autohide)};pe(this,r(this.inputField.value,this.config.dateDelimiter),t)}refresh(e,t=!1){let i;e&&"string"!=typeof e&&(t=e,e=void 0),fe(this,i="picker"===e?2:"input"===e?1:3,!t)}enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit","border-blue-700","!border-primary-700"))}exitEditMode(e){if(this.inline||!this.editMode)return;const t=Object.assign({update:!1},e);delete this.editMode,this.inputField.classList.remove("in-edit","border-blue-700","!border-primary-700"),t.update&&this.update(t)}}function be(e){const t=Object.assign({},e);return delete t.inputs,delete t.allowOneSidedRange,delete t.maxNumberOfDates,t}function ye(e,t,i,r){F(e,[[i,"changeDate",t]]),new me(i,r,e)}function we(e,t){if(e._updating)return;e._updating=!0;const i=t.target;if(void 0===i.datepicker)return;const r=e.datepickers,a={render:!1},s=e.inputs.indexOf(i),n=0===s?1:0,d=r[s].dates[0],o=r[n].dates[0];void 0!==d&&void 0!==o?0===s&&d>o?(r[0].setDate(o,a),r[1].setDate(d,a)):1===s&&ds}),ye(this,r,this.inputs[0],a),ye(this,r,this.inputs[1],a),Object.freeze(s),s[0].dates.length>0?we(this,{target:this.inputs[0]}):s[1].dates.length>0&&we(this,{target:this.inputs[1]})}get dates(){return 2===this.datepickers.length?[this.datepickers[0].dates[0],this.datepickers[1].dates[0]]:void 0}setOptions(e){this.allowOneSidedRange=!!e.allowOneSidedRange;const t=be(e);this.datepickers[0].setOptions(t),this.datepickers[1].setOptions(t)}destroy(){this.datepickers[0].destroy(),this.datepickers[1].destroy(),V(this),delete this.element.rangepicker}getDates(e){const t=e?t=>S(t,e,this.datepickers[0].config.locale):e=>new Date(e);return this.dates.map(e=>void 0===e?e:t(e))}setDates(e,t){const[i,r]=this.datepickers,a=this.dates;this._updating=!0,i.setDate(e),r.setDate(t),delete this._updating,r.dates[0]!==a[1]?we(this,{target:this.inputs[1]}):i.dates[0]!==a[0]&&we(this,{target:this.inputs[0]})}}}(); \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/dist/js/datepicker.js b/node_modules/flowbite-datepicker/dist/js/datepicker.js new file mode 100644 index 0000000..3d4155f --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/datepicker.js @@ -0,0 +1,2569 @@ +var Datepicker = (function () { + 'use strict'; + + function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + function lastItemOf(arr) { + return arr[arr.length - 1]; + } + + // push only the items not included in the array + function pushUnique(arr, ...items) { + items.forEach((item) => { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; + } + + function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; + } + + function isInRange(testVal, min, max) { + const minOK = min === undefined || testVal >= min; + const maxOK = max === undefined || testVal <= max; + return minOK && maxOK; + } + + function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; + } + + function createTagRepeat(tagName, repeat, attributes = {}, index = 0, html = '') { + const openTagSrc = Object.keys(attributes).reduce((src, attr) => { + let val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return `${src} ${attr}="${val}"`; + }, tagName); + html += `<${openTagSrc}>`; + + const next = index + 1; + return next < repeat + ? createTagRepeat(tagName, repeat, attributes, next, html) + : html; + } + + // Remove the spacing surrounding tags for HTML parser not to create text nodes + // before/after elements + function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ name.toLowerCase().startsWith(monthName); + // compare with both short and full names because some locales have periods + // in the short names (not equal to the first X letters of the full names) + monthIndex = locale.monthsShort.findIndex(compareNames); + if (monthIndex < 0) { + monthIndex = locale.months.findIndex(compareNames); + } + if (monthIndex < 0) { + return NaN; + } + } + + newDate.setMonth(monthIndex); + return newDate.getMonth() !== normalizeMonth(monthIndex) + ? newDate.setDate(0) + : newDate.getTime(); + }, + d(date, day) { + return new Date(date).setDate(parseInt(day, 10)); + }, + }; + // format functions for date parts + const formatFns = { + d(date) { + return date.getDate(); + }, + dd(date) { + return padZero(date.getDate(), 2); + }, + D(date, locale) { + return locale.daysShort[date.getDay()]; + }, + DD(date, locale) { + return locale.days[date.getDay()]; + }, + m(date) { + return date.getMonth() + 1; + }, + mm(date) { + return padZero(date.getMonth() + 1, 2); + }, + M(date, locale) { + return locale.monthsShort[date.getMonth()]; + }, + MM(date, locale) { + return locale.months[date.getMonth()]; + }, + y(date) { + return date.getFullYear(); + }, + yy(date) { + return padZero(date.getFullYear(), 2).slice(-2); + }, + yyyy(date) { + return padZero(date.getFullYear(), 4); + }, + }; + + // get month index in normal range (0 - 11) from any number + function normalizeMonth(monthIndex) { + return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); + } + + function padZero(num, length) { + return num.toString().padStart(length, '0'); + } + + function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + const separators = format.split(reFormatTokens); + const parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + const partFormatters = parts.map(token => formatFns[token]); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + const partParserKeys = Object.keys(parseFns).reduce((keys, key) => { + const token = parts.find(part => part[0] !== 'D' && part[0].toLowerCase() === key); + if (token) { + keys.push(key); + } + return keys; + }, []); + + return knownFormats[format] = { + parser(dateStr, locale) { + const dateParts = dateStr.split(reNonDateParts).reduce((dtParts, part, index) => { + if (part.length > 0 && parts[index]) { + const token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce((origDate, key) => { + const newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, today()); + }, + formatter(date, locale) { + let dateStr = partFormatters.reduce((str, fn, index) => { + return str += `${separators[index]}${fn(date, locale)}`; + }, ''); + // separators' length is always parts' length + 1, + return dateStr += lastItemOf(separators); + }, + }; + } + + function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + const date = stripTime(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return today(); + } + + if (format && format.toValue) { + const date = format.toValue(dateStr, format, locale); + return isNaN(date) ? undefined : stripTime(date); + } + + return parseFormatString(format).parser(dateStr, locale); + } + + function formatDate(date, format, locale) { + if (isNaN(date) || (!date && date !== 0)) { + return ''; + } + + const dateObj = typeof date === 'number' ? new Date(date) : date; + + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + + return parseFormatString(format).formatter(dateObj, locale); + } + + const listenerRegistry = new WeakMap(); + const {addEventListener, removeEventListener} = EventTarget.prototype; + + // Register event listeners to a key object + // listeners: array of listener definitions; + // - each definition must be a flat array of event target and the arguments + // used to call addEventListener() on the target + function registerListeners(keyObj, listeners) { + let registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach((listener) => { + addEventListener.call(...listener); + registered.push(listener); + }); + } + + function unregisterListeners(keyObj) { + let listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach((listener) => { + removeEventListener.call(...listener); + }); + listenerRegistry.delete(keyObj); + } + + // Event.composedPath() polyfill for Edge + // based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec + if (!Event.prototype.composedPath) { + const getComposedPath = (node, path = []) => { + path.push(node); + + let parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { // ShadowRoot + parent = node.host; + } else if (node.defaultView) { // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; + } + + function findFromPath(path, criteria, currentTarget, index = 0) { + const el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); + } + + // Search for the actual target of a delegated event + function findElementInEventPath(ev, selector) { + const criteria = typeof selector === 'function' ? selector : el => el.matches(selector); + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); + } + + // default locales + const locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } + }; + + // config options updatable by setOptions() and their default values + const defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0, + }; + + const range = document.createRange(); + + function parseHTML(html) { + return range.createContextualFragment(html); + } + + function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; + } + + function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } + } + + function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } + } + + function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach((node) => { + el.appendChild(node); + }); + } + } + + const { + language: defaultLang, + format: defaultFormat, + weekStart: defaultWeekStart, + } = defaultOptions; + + // Reducer function to filter out invalid day-of-week from the input + function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 + ? pushUnique(dow, day) + : dow; + } + + function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; + } + + // validate input date. if invalid, fallback to the original value + function validateDate(value, format, locale, origValue) { + const date = parseDate(value, format, locale); + return date !== undefined ? date : origValue; + } + + // Validate viewId. if invalid, fallback to the original value + function validateViewId(value, origValue, max = 3) { + const viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; + } + + // Create Datepicker configuration to set + function processOptions(options, datepicker) { + const inOpts = Object.assign({}, options); + const config = {}; + const locales = datepicker.constructor.locales; + let { + format, + language, + locale, + maxDate, + maxView, + minDate, + pickLevel, + startView, + weekStart, + } = datepicker.config || {}; + + if (inOpts.language) { + let lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + const origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + + if (inOpts.format) { + const hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + const hasToValue = typeof inOpts.format.toValue === 'function'; + const validFormatString = reFormatTokens.test(inOpts.format); + if ((hasToDisplay && hasToValue) || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + let minDt = minDate; + let maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null + ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null + ? undefined + : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce((dates, dt) => { + const date = parseDate(dt, format, locale); + return date !== undefined ? pushUnique(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + const viewDate = parseDate(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + const wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + const maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + let newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + + let newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + + let newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + const prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + const nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + const orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(x => (x === 'left' || x === 'right')) || 'auto', + y: orientation.find(y => (y === 'top' || y === 'bottom')) || 'auto', + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch(inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach((key) => { + if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + + return config; + } + + const pickerTemplate = optimizeTemplateHTML(``); + + const daysTemplate = optimizeTemplateHTML(`
+
${createTagRepeat('span', 7, {class: 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
+
${createTagRepeat('span', 42 , {class: 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'})}
+
`); + + const calendarWeeksTemplate = optimizeTemplateHTML(`
+
+
${createTagRepeat('span', 6, {class: 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'})}
+
`); + + // Base class of the view classes + class View { + constructor(picker, config) { + Object.assign(this, config, { + picker, + element: parseHTML(`
`).firstChild, + selected: [], + }); + this.init(this.picker.datepicker.config); + } + + init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + performBeforeHook(el, current, timeValue) { + let result = this.beforeShow(new Date(timeValue)); + switch (typeof result) { + case 'boolean': + result = {enabled: result}; + break; + case 'string': + result = {classes: result}; + } + + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + const extraClasses = result.classes.split(/\s+/); + el.classList.add(...extraClasses); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } + } + + class DaysView extends View { + constructor(picker) { + super(picker, { + id: 0, + name: 'days', + cellClass: 'day', + }); + } + + init(options, onConstruction = true) { + if (onConstruction) { + const inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + super.init(options); + } + + setOptions(options) { + let updateDOW; + + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + const locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' + ? options.beforeShowDay + : undefined; + } + + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + const weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild, + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach((el, index) => { + const dow = (this.weekStart + index) % 7; + el.textContent = this.dayNames[dow]; + el.className = this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + const viewYear = viewDate.getFullYear(); + const viewMonth = viewDate.getMonth(); + const firstOfMonth = dateValue(viewYear, viewMonth, 1); + const start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + render() { + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = [...this.datesDisabled]; + + const switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + const startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach((el, index) => { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const current = addDays(this.start, index); + const date = new Date(current); + const day = date.getDay(); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + el.dataset.date = current; + el.textContent = date.getDate(); + + if (current < this.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > this.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (this.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < this.minDate || current > this.maxDate || this.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (this.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(this.disabled, current); + } + if (this.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (this.range) { + const [rangeStart, rangeEnd] = this.range; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const [rangeStart, rangeEnd] = this.range || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach((el) => { + const current = Number(el.dataset.date); + const classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg'); + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg',); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg',); + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + const index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + } + + function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + + const [[startY, startM], [endY, endM]] = range; + if (startY > thisYear || endY < thisYear) { + return; + } + return [ + startY === thisYear ? startM : -1, + endY === thisYear ? endM : 12, + ]; + } + + class MonthsView extends View { + constructor(picker) { + super(picker, { + id: 1, + name: 'months', + cellClass: 'month', + }); + } + + init(options, onConstruction = true) { + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {'data-month': ix => ix}))); + } + super.init(options); + } + + setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + const minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + const maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' + ? options.beforeShowMonth + : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates.reduce((selected, timeValue) => { + const date = new Date(timeValue); + const year = date.getFullYear(); + const month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(timeValue => { + const date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + render() { + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + + const selected = this.selected[this.year] || []; + const yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + const isMinYear = this.year === this.minYear; + const isMaxYear = this.year === this.maxYear; + const range = computeMonthRange(this.range, this.year); + + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const date = dateValue(this.year, index, 1); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + if (this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = this.monthNames[index]; + + if ( + yrOutOfRange + || isMinYear && index < this.minMonth + || isMaxYear && index > this.maxMonth + ) { + classList.add('disabled'); + } + if (range) { + const [rangeStart, rangeEnd] = range; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const selected = this.selected[this.year] || []; + const [rangeStart, rangeEnd] = computeMonthRange(this.range, this.year) || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } + } + + function toTitleCase(word) { + return [...word].reduce((str, ch, ix) => str += ix ? ch : ch.toUpperCase(), ''); + } + + // Class representing the years and decades view elements + class YearsView extends View { + constructor(picker, config) { + super(picker, config); + } + + init(options, onConstruction = true) { + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = `beforeShow${toTitleCase(this.cellClass)}`; + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + super.init(options); + } + + setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + const beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + const first = startOfYearPeriod(viewDate, this.navStep); + const last = first + 9 * this.step; + + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates.reduce((years, timeValue) => { + return pushUnique(years, startOfYearPeriod(timeValue, this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(timeValue => { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, this.step); + } + }); + } + } + + // Update the entire view UI + render() { + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + + this.picker.setViewSwitchLabel(`${this.first}-${this.last}`); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const current = this.start + (index * this.step); + const date = dateValue(current, 0, 1); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + if (this.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < this.minYear || current > this.maxYear) { + classList.add('disabled'); + } + if (this.range) { + const [rangeStart, rangeEnd] = this.range; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const [rangeStart, rangeEnd] = this.range || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach((el) => { + const current = Number(el.textContent); + const classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + const index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + } + + function triggerDatepickerEvent(datepicker, type) { + const detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker, + }; + datepicker.element.dispatchEvent(new CustomEvent(type, {detail})); + } + + // direction: -1 (to previous), 1 (to next) + function goToPrevOrNext(datepicker, direction) { + const {minDate, maxDate} = datepicker.config; + const {currentView, viewDate} = datepicker.picker; + let newViewDate; + switch (currentView.id) { + case 0: + newViewDate = addMonths(viewDate, direction); + break; + case 1: + newViewDate = addYears(viewDate, direction); + break; + default: + newViewDate = addYears(viewDate, direction * currentView.navStep); + } + newViewDate = limitToRange(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); + } + + function switchView(datepicker) { + const viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); + } + + function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({autohide: true}); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } + } + + function goToSelectedMonthOrYear(datepicker, selection) { + const picker = datepicker.picker; + const viewDate = new Date(picker.viewDate); + const viewId = picker.currentView.id; + const newDate = viewId === 1 + ? addMonths(viewDate, selection - viewDate.getMonth()) + : addYears(viewDate, selection - viewDate.getFullYear()); + + picker.changeFocus(newDate).changeView(viewId - 1).render(); + } + + function onClickTodayBtn(datepicker) { + const picker = datepicker.picker; + const currentDate = today(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, {render: false}); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); + } + + function onClickClearBtn(datepicker) { + datepicker.setDate({clear: true}); + } + + function onClickViewSwitch(datepicker) { + switchView(datepicker); + } + + function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); + } + + function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); + } + + // For the picker's main block to delegete the events from `datepicker-cell`s + function onClickView(datepicker, ev) { + const target = findElementInEventPath(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + + const {id, isMinView} = datepicker.picker.currentView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } + } + + function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } + } + + function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + const prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach((node) => { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + const nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach((node) => { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) { + const {minDate, maxDate} = picker.datepicker.config; + picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } + } + + // Compute view date to reset, which will be... + // - the last item of the selected dates or defaultViewDate if no selection + // - limitted to minDate or maxDate if it exceeds the range + function computeResetViewDate(datepicker) { + const {dates, config} = datepicker; + const viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate; + return limitToRange(viewDate, config.minDate, config.maxDate); + } + + // Change current view's view date + function setViewDate(picker, newDate) { + const oldViewDate = new Date(picker.viewDate); + const newViewDate = new Date(newDate); + const {id, year, first, last} = picker.currentView; + const viewYear = newViewDate.getFullYear(); + + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } + } + + function getTextDirection(el) { + return window.getComputedStyle(el).direction; + } + + // Class representing the picker UI + class Picker { + constructor(datepicker) { + this.datepicker = datepicker; + + const template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + const element = this.element = parseHTML(template).firstChild; + const [header, main, footer] = element.firstChild.children; + const title = header.firstElementChild; + const [prevBtn, viewSwitch, nextBtn] = header.lastElementChild.children; + const [todayBtn, clearBtn] = footer.firstChild.children; + const controls = { + title, + prevBtn, + viewSwitch, + nextBtn, + todayBtn, + clearBtn, + }; + this.main = main; + this.controls = controls; + + const elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add(`datepicker-${elementClass}`); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + registerListeners(datepicker, [ + [element, 'click', onClickPicker.bind(null, datepicker), {capture: true}], + [main, 'click', onClickView.bind(null, datepicker)], + [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], + [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], + [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], + [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], + [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)], + ]); + + // set up views + this.views = [ + new DaysView(this), + new MonthsView(this), + new YearsView(this, {id: 2, name: 'years', cellClass: 'year', step: 1}), + new YearsView(this, {id: 3, name: 'decades', cellClass: 'decade', step: 10}), + ]; + this.currentView = this.views[datepicker.config.startView]; + + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + + setOptions(options) { + processPickerOptions(this, options); + this.views.forEach((view) => { + view.init(options, false); + }); + this.currentView.render(); + } + + detach() { + this.datepicker.config.container.removeChild(this.element); + } + + show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + + const datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + const inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + + hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + + place() { + const {classList, style} = this.element; + const {config, inputField} = this.datepicker; + const container = config.container; + const { + width: calendarWidth, + height: calendarHeight, + } = this.element.getBoundingClientRect(); + const { + left: containerLeft, + top: containerTop, + width: containerWidth, + } = container.getBoundingClientRect(); + const { + left: inputLeft, + top: inputTop, + width: inputWidth, + height: inputHeight + } = inputField.getBoundingClientRect(); + let {x: orientX, y: orientY} = config.orientation; + let scrollTop; + let left; + let top; + + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + + classList.remove( + 'datepicker-orient-top', + 'datepicker-orient-bottom', + 'datepicker-orient-right', + 'datepicker-orient-left' + ); + classList.add(`datepicker-orient-${orientY}`, `datepicker-orient-${orientX}`); + + style.top = top ? `${top}px` : top; + style.left = left ? `${left}px` : left; + } + + setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + + setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + + setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + + changeView(viewId) { + const oldView = this.currentView; + const newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach((view) => { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + update() { + const newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach((view) => { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + render(quickRender = true) { + const renderMethod = (quickRender && this._renderMethod) || 'render'; + delete this._renderMethod; + + this.currentView[renderMethod](); + } + } + + // Find the closest date that doesn't meet the condition for unavailable date + // Returns undefined if no available date is found + // addFn: function to calculate the next date + // - args: time value, amount + // increase: amount to pass to addFn + // testFn: function to test the unavailablity of the date + // - args: time value; retun: true if unavailable + function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!isInRange(date, min, max)) { + return; + } + if (testFn(date)) { + const newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; + } + + // direction: -1 (left/up), 1 (right/down) + // vertical: true for up/down, false for left/right + function moveByArrowKey(datepicker, ev, direction, vertical) { + const picker = datepicker.picker; + const currentView = picker.currentView; + const step = currentView.step || 1; + let viewDate = picker.viewDate; + let addFn; + let testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = addDays(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = addYears(viewDate, direction); + } else { + viewDate = addDays(viewDate, direction); + } + addFn = addDays; + testFn = (date) => currentView.disabled.includes(date); + break; + case 1: + viewDate = addMonths(viewDate, vertical ? direction * 4 : direction); + addFn = addMonths; + testFn = (date) => { + const dt = new Date(date); + const {year, disabled} = currentView; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = addYears; + testFn = date => currentView.disabled.includes(startOfYearPeriod(date, step)); + } + viewDate = findNextAvailableOne( + viewDate, + addFn, + direction < 0 ? -step : step, + testFn, + currentView.minDate, + currentView.maxDate + ); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } + } + + function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + + const picker = datepicker.picker; + const {id, isMinView} = picker.currentView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({update: true, autohide: datepicker.config.autohide}); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); + } + + function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } + } + + // for the prevention for entering edit mode while getting focus on click + function onMousedown(datepicker, ev) { + const el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(() => { + delete el._active; + delete el._clicking; + }, 2000); + } + } + + function onClickInput(datepicker, ev) { + const el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + + if (datepicker.config.showOnClick) { + datepicker.show(); + } + } + + function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } + } + + // for the `document` to delegate the events from outside the picker/input field + function onClickOutside(datepicker, ev) { + const element = datepicker.element; + if (element !== document.activeElement) { + return; + } + const pickerElem = datepicker.picker.element; + if (findElementInEventPath(ev, el => el === element || el === pickerElem)) { + return; + } + unfocus(datepicker); + } + + function stringifyDates(dates, config) { + return dates + .map(dt => formatDate(dt, config.format, config.locale)) + .join(config.dateDelimiter); + } + + // parse input dates and create an array of time values for selection + // returns undefined if there are no valid dates in inputDates + // when origDates (current selection) is passed, the function works to mix + // the input dates into the current selection + function processInputDates(datepicker, inputDates, clear = false) { + const {config, dates: origDates, rangepicker} = datepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + + const rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + let newDates = inputDates.reduce((dates, dt) => { + let date = parseDate(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + const dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd + ? dt.setMonth(dt.getMonth() + 1, 0) + : dt.setDate(1); + } else { + date = rangeEnd + ? dt.setFullYear(dt.getFullYear() + 1, 0, 0) + : dt.setMonth(0, 1); + } + } + if ( + isInRange(date, config.minDate, config.maxDate) + && !dates.includes(date) + && !config.datesDisabled.includes(date) + && !config.daysOfWeekDisabled.includes(new Date(date).getDay()) + ) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce((dates, date) => { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(date => !newDates.includes(date))); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates + ? newDates.slice(config.maxNumberOfDates * -1) + : newDates; + } + + // refresh the UI elements + // modes: 1: input only, 2, picker only, 3 both + function refreshUI(datepicker, mode = 3, quickRender = true) { + const {config, picker, inputField} = datepicker; + if (mode & 2) { + const newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } + } + + function setDate(datepicker, inputDates, options) { + let {clear, render, autohide} = options; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + + const newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } + } + + /** + * Class representing a date picker + */ + class Datepicker { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + constructor(element, options = {}, rangepicker = undefined) { + element.datepicker = this; + this.element = element; + + // set up config + const config = this.config = Object.assign({ + buttonClass: (options.buttonClass && String(options.buttonClass)) || 'button', + container: document.body, + defaultViewDate: today(), + maxDate: undefined, + minDate: undefined, + }, processOptions(defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + const inline = this.inline = element.tagName !== 'INPUT'; + let inputField; + let initialDates; + + if (inline) { + config.container = element; + initialDates = stringToArray(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + const container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = stringToArray(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + const index = rangepicker.inputs.indexOf(inputField); + const datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get() { + return rangepicker; + }, + }); + } + + // set initial dates + this.dates = []; + // process initial value + const inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + + const picker = this.picker = new Picker(this); + + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + const onMousedownDocument = onClickOutside.bind(null, this); + const listeners = [ + [inputField, 'keydown', onKeydown.bind(null, this)], + [inputField, 'focus', onFocus.bind(null, this)], + [inputField, 'mousedown', onMousedown.bind(null, this)], + [inputField, 'click', onClickInput.bind(null, this)], + [inputField, 'paste', onPaste.bind(null, this)], + [document, 'mousedown', onMousedownDocument], + [document, 'touchstart', onMousedownDocument], + [window, 'resize', picker.place.bind(picker)] + ]; + registerListeners(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + static formatDate(date, format, lang) { + return formatDate(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + static parseDate(dateStr, format, lang) { + return parseDate(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + static get locales() { + return locales; + } + + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + get active() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + get pickerElement() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + setOptions(options) { + const picker = this.picker; + const newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + destroy() { + this.hide(); + unregisterListeners(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + getDate(format = undefined) { + const callback = format + ? date => formatDate(date, format, this.config.locale) + : date => new Date(date); + + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + setDate(...args) { + const dates = [...args]; + const opts = {}; + const lastArg = lastItemOf(args); + if ( + typeof lastArg === 'object' + && !Array.isArray(lastArg) + && !(lastArg instanceof Date) + && lastArg + ) { + Object.assign(opts, dates.pop()); + } + + const inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + update(options = undefined) { + if (this.inline) { + return; + } + + const opts = {clear: true, autohide: !!(options && options.autohide)}; + const inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter); + setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + refresh(target = undefined, forceRender = false) { + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + + let mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + exitEditMode(options = undefined) { + if (this.inline || !this.editMode) { + return; + } + const opts = Object.assign({update: false}, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700'); + if (opts.update) { + this.update(opts); + } + } + } + + return Datepicker; + +})(); diff --git a/node_modules/flowbite-datepicker/dist/js/datepicker.min.js b/node_modules/flowbite-datepicker/dist/js/datepicker.min.js new file mode 100644 index 0000000..0c3a840 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/datepicker.min.js @@ -0,0 +1 @@ +var Datepicker=function(){"use strict";function e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function t(e){return e[e.length-1]}function i(e,...t){return t.forEach(t=>{e.includes(t)||e.push(t)}),e}function r(e,t){return e?e.split(t):[]}function a(e,t,i){return(void 0===t||e>=t)&&(void 0===i||e<=i)}function s(e,t,i){return ei?i:e}function n(e,t,i={},r=0,a=""){a+=`<${Object.keys(i).reduce((e,t)=>{let a=i[t];return"function"==typeof a&&(a=a(r)),`${e} ${t}="${a}"`},e)}>`;const s=r+1;return s\s+/g,">").replace(/\s+new Date(e).setFullYear(parseInt(t,10)),m(e,t,i){const r=new Date(e);let a=parseInt(t,10)-1;if(isNaN(a)){if(!t)return NaN;const e=t.toLowerCase(),r=t=>t.toLowerCase().startsWith(e);if((a=i.monthsShort.findIndex(r))<0&&(a=i.months.findIndex(r)),a<0)return NaN}return r.setMonth(a),r.getMonth()!==function e(t){return t>-1?t%12:e(t+12)}(a)?r.setDate(0):r.getTime()},d:(e,t)=>new Date(e).setDate(parseInt(t,10))},v={d:e=>e.getDate(),dd:e=>x(e.getDate(),2),D:(e,t)=>t.daysShort[e.getDay()],DD:(e,t)=>t.days[e.getDay()],m:e=>e.getMonth()+1,mm:e=>x(e.getMonth()+1,2),M:(e,t)=>t.monthsShort[e.getMonth()],MM:(e,t)=>t.months[e.getMonth()],y:e=>e.getFullYear(),yy:e=>x(e.getFullYear(),2).slice(-2),yyyy:e=>x(e.getFullYear(),4)};function x(e,t){return e.toString().padStart(t,"0")}function D(e){if("string"!=typeof e)throw new Error("Invalid date format.");if(e in w)return w[e];const i=e.split(b),r=e.match(new RegExp(b,"g"));if(0===i.length||!r)throw new Error("Invalid date format.");const a=r.map(e=>v[e]),s=Object.keys(k).reduce((e,t)=>{return r.find(e=>"D"!==e[0]&&e[0].toLowerCase()===t)&&e.push(t),e},[]);return w[e]={parser(e,t){const i=e.split(y).reduce((e,t,i)=>{if(t.length>0&&r[i]){const a=r[i][0];"M"===a?e.m=t:"D"!==a&&(e[a]=t)}return e},{});return s.reduce((e,r)=>{const a=k[r](e,i[r],t);return isNaN(a)?e:a},c())},formatter:(e,r)=>a.reduce((t,a,s)=>t+`${i[s]}${a(e,r)}`,"")+t(i)}}function M(e,t,i){if(e instanceof Date||"number"==typeof e){const t=o(e);return isNaN(t)?void 0:t}if(e){if("today"===e)return c();if(t&&t.toValue){const r=t.toValue(e,t,i);return isNaN(r)?void 0:o(r)}return D(t).parser(e,i)}}function S(e,t,i){if(isNaN(e)||!e&&0!==e)return"";const r="number"==typeof e?new Date(e):e;return t.toDisplay?t.toDisplay(r,t,i):D(t).formatter(r,i)}const C=new WeakMap,{addEventListener:O,removeEventListener:E}=EventTarget.prototype;function F(e,t){let i=C.get(e);i||(i=[],C.set(e,i)),t.forEach(e=>{O.call(...e),i.push(e)})}if(!Event.prototype.composedPath){const e=(t,i=[])=>{let r;return i.push(t),t.parentNode?r=t.parentNode:t.host?r=t.host:t.defaultView&&(r=t.defaultView),r?e(r,i):i};Event.prototype.composedPath=function(){return e(this.target)}}function V(e,t){const i="function"==typeof t?t:e=>e.matches(t);return function e(t,i,r,a=0){const s=t[a];return i(s)?s:s!==r&&s.parentElement?e(t,i,r,a+1):void 0}(e.composedPath(),i,e.currentTarget)}const L={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}},N={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:'',orientation:"auto",pickLevel:0,prevArrow:'',showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},B=document.createRange();function A(e){return B.createContextualFragment(e)}function Y(e){"none"!==e.style.display&&(e.style.display&&(e.dataset.styleDisplay=e.style.display),e.style.display="none")}function W(e){"none"===e.style.display&&(e.dataset.styleDisplay?(e.style.display=e.dataset.styleDisplay,delete e.dataset.styleDisplay):e.style.display="")}function K(e){e.firstChild&&(e.removeChild(e.firstChild),K(e))}const{language:H,format:T,weekStart:j}=N;function $(e,t){return e.length<6&&t>=0&&t<7?i(e,t):e}function _(e){return(e+6)%7}function I(e,t,i,r){const a=M(e,t,i);return void 0!==a?a:r}function P(e,t,i=3){const r=parseInt(e,10);return r>=0&&r<=i?r:t}function q(t,r){const a=Object.assign({},t),s={},n=r.constructor.locales;let{format:d,language:o,locale:c,maxDate:h,maxView:u,minDate:g,pickLevel:f,startView:p,weekStart:m}=r.config||{};if(a.language){let e;if(a.language!==o&&(n[a.language]?e=a.language:void 0===n[e=a.language.split("-")[0]]&&(e=!1)),delete a.language,e){o=s.language=e;const t=c||n[H];c=Object.assign({format:T,weekStart:j},n[H]),o!==H&&Object.assign(c,n[o]),s.locale=c,d===t.format&&(d=s.format=c.format),m===t.weekStart&&(m=s.weekStart=c.weekStart,s.weekEnd=_(c.weekStart))}}if(a.format){const e="function"==typeof a.format.toDisplay,t="function"==typeof a.format.toValue,i=b.test(a.format);(e&&t||i)&&(d=s.format=a.format),delete a.format}let y=g,w=h;if(void 0!==a.minDate&&(y=null===a.minDate?l(0,0,1):I(a.minDate,d,c,y),delete a.minDate),void 0!==a.maxDate&&(w=null===a.maxDate?void 0:I(a.maxDate,d,c,w),delete a.maxDate),w{const r=M(t,d,c);return void 0!==r?i(e,r):e},[]),delete a.datesDisabled),void 0!==a.defaultViewDate){const e=M(a.defaultViewDate,d,c);void 0!==e&&(s.defaultViewDate=e),delete a.defaultViewDate}if(void 0!==a.weekStart){const e=Number(a.weekStart)%7;isNaN(e)||(m=s.weekStart=e,s.weekEnd=_(e)),delete a.weekStart}if(a.daysOfWeekDisabled&&(s.daysOfWeekDisabled=a.daysOfWeekDisabled.reduce($,[]),delete a.daysOfWeekDisabled),a.daysOfWeekHighlighted&&(s.daysOfWeekHighlighted=a.daysOfWeekHighlighted.reduce($,[]),delete a.daysOfWeekHighlighted),void 0!==a.maxNumberOfDates){const e=parseInt(a.maxNumberOfDates,10);e>=0&&(s.maxNumberOfDates=e,s.multidate=1!==e),delete a.maxNumberOfDates}a.dateDelimiter&&(s.dateDelimiter=String(a.dateDelimiter),delete a.dateDelimiter);let k=f;void 0!==a.pickLevel&&(k=P(a.pickLevel,2),delete a.pickLevel),k!==f&&(f=s.pickLevel=k);let v=u;void 0!==a.maxView&&(v=P(a.maxView,u),delete a.maxView),(v=f>v?f:v)!==u&&(u=s.maxView=v);let x=p;if(void 0!==a.startView&&(x=P(a.startView,x),delete a.startView),xu&&(x=u),x!==p&&(s.startView=x),a.prevArrow){const e=A(a.prevArrow);e.childNodes.length>0&&(s.prevArrow=e.childNodes),delete a.prevArrow}if(a.nextArrow){const e=A(a.nextArrow);e.childNodes.length>0&&(s.nextArrow=e.childNodes),delete a.nextArrow}if(void 0!==a.disableTouchKeyboard&&(s.disableTouchKeyboard="ontouchstart"in document&&!!a.disableTouchKeyboard,delete a.disableTouchKeyboard),a.orientation){const e=a.orientation.toLowerCase().split(/\s+/g);s.orientation={x:e.find(e=>"left"===e||"right"===e)||"auto",y:e.find(e=>"top"===e||"bottom"===e)||"auto"},delete a.orientation}if(void 0!==a.todayBtnMode){switch(a.todayBtnMode){case 0:case 1:s.todayBtnMode=a.todayBtnMode}delete a.todayBtnMode}return Object.keys(a).forEach(t=>{void 0!==a[t]&&e(N,t)&&(s[t]=a[t])}),s}const J=d(''),R=d(`
\n
${n("span",7,{class:"dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"})}
\n
${n("span",42,{class:"block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"})}
\n
`),U=d(`
\n
\n
${n("span",6,{class:"week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"})}
\n
`);class z{constructor(e,t){Object.assign(this,t,{picker:e,element:A('
').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}init(e){void 0!==e.pickLevel&&(this.isMinView=this.id===e.pickLevel),this.setOptions(e),this.updateFocus(),this.updateSelection()}performBeforeHook(e,t,r){let a=this.beforeShow(new Date(r));switch(typeof a){case"boolean":a={enabled:a};break;case"string":a={classes:a}}if(a){if(!1===a.enabled&&(e.classList.add("disabled"),i(this.disabled,t)),a.classes){const r=a.classes.split(/\s+/);e.classList.add(...r),r.includes("disabled")&&i(this.disabled,t)}a.content&&function(e,t){K(e),t instanceof DocumentFragment?e.appendChild(t):"string"==typeof t?e.appendChild(A(t)):"function"==typeof t.forEach&&t.forEach(t=>{e.appendChild(t)})}(e,a.content)}}}class X extends z{constructor(e){super(e,{id:0,name:"days",cellClass:"day"})}init(e,t=!0){if(t){const e=A(R).firstChild;this.dow=e.firstChild,this.grid=e.lastChild,this.element.appendChild(e)}super.init(e)}setOptions(t){let i;if(e(t,"minDate")&&(this.minDate=t.minDate),e(t,"maxDate")&&(this.maxDate=t.maxDate),t.datesDisabled&&(this.datesDisabled=t.datesDisabled),t.daysOfWeekDisabled&&(this.daysOfWeekDisabled=t.daysOfWeekDisabled,i=!0),t.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=t.daysOfWeekHighlighted),void 0!==t.todayHighlight&&(this.todayHighlight=t.todayHighlight),void 0!==t.weekStart&&(this.weekStart=t.weekStart,this.weekEnd=t.weekEnd,i=!0),t.locale){const e=this.locale=t.locale;this.dayNames=e.daysMin,this.switchLabelFormat=e.titleFormat,i=!0}if(void 0!==t.beforeShowDay&&(this.beforeShow="function"==typeof t.beforeShowDay?t.beforeShowDay:void 0),void 0!==t.calendarWeeks)if(t.calendarWeeks&&!this.calendarWeeks){const e=A(U).firstChild;this.calendarWeeks={element:e,dow:e.firstChild,weeks:e.lastChild},this.element.insertBefore(e,this.element.firstChild)}else this.calendarWeeks&&!t.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==t.showDaysOfWeek&&(t.showDaysOfWeek?(W(this.dow),this.calendarWeeks&&W(this.calendarWeeks.dow)):(Y(this.dow),this.calendarWeeks&&Y(this.calendarWeeks.dow))),i&&Array.from(this.dow.children).forEach((e,t)=>{const i=(this.weekStart+t)%7;e.textContent=this.dayNames[i],e.className=this.daysOfWeekDisabled.includes(i)?"dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed":"dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"})}updateFocus(){const e=new Date(this.picker.viewDate),t=e.getFullYear(),i=e.getMonth(),r=l(t,i,1),a=p(r,this.weekStart,this.weekStart);this.first=r,this.last=l(t,i+1,0),this.start=a,this.focused=this.picker.viewDate}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e,t&&(this.range=t.dates)}render(){this.today=this.todayHighlight?c():void 0,this.disabled=[...this.datesDisabled];const e=S(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(e),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){const e=p(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((t,i)=>{t.textContent=function(e){const t=p(e,4,1),i=p(new Date(t).setMonth(0,4),4,1);return Math.round((t-i)/6048e5)+1}(h(e,7*i))})}Array.from(this.grid.children).forEach((e,t)=>{const r=e.classList,a=h(this.start,t),s=new Date(a),n=s.getDay();if(e.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,e.dataset.date=a,e.textContent=s.getDate(),athis.last&&r.add("next","text-gray-500","dark:text-white"),this.today===a&&r.add("today","bg-gray-100","dark:bg-gray-600"),(athis.maxDate||this.disabled.includes(a))&&r.add("disabled","cursor-not-allowed"),this.daysOfWeekDisabled.includes(n)&&(r.add("disabled","cursor-not-allowed"),i(this.disabled,a)),this.daysOfWeekHighlighted.includes(n)&&r.add("highlighted"),this.range){const[e,t]=this.range;a>e&&a{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark:!bg-primary-600","dark:text-white","focused"),e.classList.add("text-gray-900","rounded-lg","dark:text-white")}),Array.from(this.grid.children).forEach(i=>{const r=Number(i.dataset.date),a=i.classList;a.remove("bg-gray-200","dark:bg-gray-600","rounded-l-lg","rounded-r-lg"),r>e&&r{e.classList.remove("focused")}),this.grid.children[e].classList.add("focused")}}function G(e,t){if(!e||!e[0]||!e[1])return;const[[i,r],[a,s]]=e;return i>t||ae})))),super.init(e)}setOptions(t){if(t.locale&&(this.monthNames=t.locale.monthsShort),e(t,"minDate"))if(void 0===t.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{const e=new Date(t.minDate);this.minYear=e.getFullYear(),this.minMonth=e.getMonth(),this.minDate=e.setDate(1)}if(e(t,"maxDate"))if(void 0===t.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{const e=new Date(t.maxDate);this.maxYear=e.getFullYear(),this.maxMonth=e.getMonth(),this.maxDate=l(this.maxYear,this.maxMonth+1,0)}void 0!==t.beforeShowMonth&&(this.beforeShow="function"==typeof t.beforeShowMonth?t.beforeShowMonth:void 0)}updateFocus(){const e=new Date(this.picker.viewDate);this.year=e.getFullYear(),this.focused=e.getMonth()}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce((e,t)=>{const r=new Date(t),a=r.getFullYear(),s=r.getMonth();return void 0===e[a]?e[a]=[s]:i(e[a],s),e},{}),t&&t.dates&&(this.range=t.dates.map(e=>{const t=new Date(e);return isNaN(t)?void 0:[t.getFullYear(),t.getMonth()]}))}render(){this.disabled=[],this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);const e=this.selected[this.year]||[],t=this.yearthis.maxYear,i=this.year===this.minYear,r=this.year===this.maxYear,a=G(this.range,this.year);Array.from(this.grid.children).forEach((s,n)=>{const d=s.classList,o=l(this.year,n,1);if(s.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,this.isMinView&&(s.dataset.date=o),s.textContent=this.monthNames[n],(t||i&&nthis.maxMonth)&&d.add("disabled"),a){const[e,t]=a;n>e&&n{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","dark:bg-blue-600","dark:!bg-primary-700","dark:text-white","text-white","focused"),e.classList.add("text-gray-900","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600")}),Array.from(this.grid.children).forEach((r,a)=>{const s=r.classList;a>t&&a{e.classList.remove("focused")}),this.grid.children[this.focused].classList.add("focused")}}class Z extends z{constructor(e,t){super(e,t)}init(e,t=!0){var i;t&&(this.navStep=10*this.step,this.beforeShowOption=`beforeShow${i=this.cellClass,[...i].reduce((e,t,i)=>e+=i?t:t.toUpperCase(),"")}`,this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(A(n("span",12)))),super.init(e)}setOptions(t){if(e(t,"minDate")&&(void 0===t.minDate?this.minYear=this.minDate=void 0:(this.minYear=m(t.minDate,this.step),this.minDate=l(this.minYear,0,1))),e(t,"maxDate")&&(void 0===t.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=m(t.maxDate,this.step),this.maxDate=l(this.maxYear,11,31))),void 0!==t[this.beforeShowOption]){const e=t[this.beforeShowOption];this.beforeShow="function"==typeof e?e:void 0}}updateFocus(){const e=new Date(this.picker.viewDate),t=m(e,this.navStep),i=t+9*this.step;this.first=t,this.last=i,this.start=t-this.step,this.focused=m(e,this.step)}updateSelection(){const{dates:e,rangepicker:t}=this.picker.datepicker;this.selected=e.reduce((e,t)=>i(e,m(t,this.step)),[]),t&&t.dates&&(this.range=t.dates.map(e=>{if(void 0!==e)return m(e,this.step)}))}render(){this.disabled=[],this.picker.setViewSwitchLabel(`${this.first}-${this.last}`),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((e,t)=>{const i=e.classList,r=this.start+t*this.step,a=l(r,0,1);if(e.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,this.isMinView&&(e.dataset.date=a),e.textContent=e.dataset.year=r,0===t?i.add("prev"):11===t&&i.add("next"),(rthis.maxYear)&&i.add("disabled"),this.range){const[e,t]=this.range;r>e&&r{e.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark!bg-primary-600","dark:text-white","focused")}),Array.from(this.grid.children).forEach(i=>{const r=Number(i.textContent),a=i.classList;r>e&&r{e.classList.remove("focused")}),this.grid.children[e].classList.add("focused")}}function ee(e,t){const i={date:e.getDate(),viewDate:new Date(e.picker.viewDate),viewId:e.picker.currentView.id,datepicker:e};e.element.dispatchEvent(new CustomEvent(t,{detail:i}))}function te(e,t){const{minDate:i,maxDate:r}=e.config,{currentView:a,viewDate:n}=e.picker;let d;switch(a.id){case 0:d=u(n,t);break;case 1:d=g(n,t);break;default:d=g(n,t*a.navStep)}d=s(d,i,r),e.picker.changeFocus(d).render()}function ie(e){const t=e.picker.currentView.id;t!==e.config.maxView&&e.picker.changeView(t+1).render()}function re(e){e.config.updateOnBlur?e.update({autohide:!0}):(e.refresh("input"),e.hide())}function ae(e,t){const i=e.picker,r=new Date(i.viewDate),a=i.currentView.id,s=1===a?u(r,t-r.getMonth()):g(r,t-r.getFullYear());i.changeFocus(s).changeView(a-1).render()}function se(t,i){if(void 0!==i.title&&(i.title?(t.controls.title.textContent=i.title,W(t.controls.title)):(t.controls.title.textContent="",Y(t.controls.title))),i.prevArrow){const e=t.controls.prevBtn;K(e),i.prevArrow.forEach(t=>{e.appendChild(t.cloneNode(!0))})}if(i.nextArrow){const e=t.controls.nextBtn;K(e),i.nextArrow.forEach(t=>{e.appendChild(t.cloneNode(!0))})}if(i.locale&&(t.controls.todayBtn.textContent=i.locale.today,t.controls.clearBtn.textContent=i.locale.clear),void 0!==i.todayBtn&&(i.todayBtn?W(t.controls.todayBtn):Y(t.controls.todayBtn)),e(i,"minDate")||e(i,"maxDate")){const{minDate:e,maxDate:i}=t.datepicker.config;t.controls.todayBtn.disabled=!a(c(),e,i)}void 0!==i.clearBtn&&(i.clearBtn?W(t.controls.clearBtn):Y(t.controls.clearBtn))}function ne(e){const{dates:i,config:r}=e;return s(i.length>0?t(i):r.defaultViewDate,r.minDate,r.maxDate)}function de(e,t){const i=new Date(e.viewDate),r=new Date(t),{id:a,year:s,first:n,last:d}=e.currentView,o=r.getFullYear();switch(e.viewDate=t,o!==i.getFullYear()&&ee(e.datepicker,"changeYear"),r.getMonth()!==i.getMonth()&&ee(e.datepicker,"changeMonth"),a){case 0:return td;case 1:return o!==s;default:return od}}function oe(e){return window.getComputedStyle(e).direction}class ce{constructor(e){this.datepicker=e;const t=J.replace(/%buttonClass%/g,e.config.buttonClass),i=this.element=A(t).firstChild,[r,a,s]=i.firstChild.children,n=r.firstElementChild,[d,o,l]=r.lastElementChild.children,[h,u]=s.firstChild.children,g={title:n,prevBtn:d,viewSwitch:o,nextBtn:l,todayBtn:h,clearBtn:u};this.main=a,this.controls=g;const f=e.inline?"inline":"dropdown";i.classList.add(`datepicker-${f}`),"dropdown"===f&&i.classList.add("dropdown","absolute","top-0","left-0","z-50","pt-2"),se(this,e.config),this.viewDate=ne(e),F(e,[[i,"click",function(e){e.inline||e.config.disableTouchKeyboard||e.inputField.focus()}.bind(null,e),{capture:!0}],[a,"click",function(e,t){const i=V(t,".datepicker-cell");if(!i||i.classList.contains("disabled"))return;const{id:r,isMinView:a}=e.picker.currentView;a?e.setDate(Number(i.dataset.date)):ae(e,1===r?Number(i.dataset.month):Number(i.dataset.year))}.bind(null,e)],[g.viewSwitch,"click",function(e){ie(e)}.bind(null,e)],[g.prevBtn,"click",function(e){te(e,-1)}.bind(null,e)],[g.nextBtn,"click",function(e){te(e,1)}.bind(null,e)],[g.todayBtn,"click",function(e){const t=e.picker,i=c();if(1===e.config.todayBtnMode){if(e.config.autohide)return void e.setDate(i);e.setDate(i,{render:!1}),t.update()}t.viewDate!==i&&t.changeFocus(i),t.changeView(0).render()}.bind(null,e)],[g.clearBtn,"click",function(e){e.setDate({clear:!0})}.bind(null,e)]]),this.views=[new X(this),new Q(this),new Z(this,{id:2,name:"years",cellClass:"year",step:1}),new Z(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[e.config.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),e.config.container.appendChild(this.element)}setOptions(e){se(this,e),this.views.forEach(t=>{t.init(e,!1)}),this.currentView.render()}detach(){this.datepicker.config.container.removeChild(this.element)}show(){if(this.active)return;this.element.classList.add("active","block"),this.element.classList.remove("hidden"),this.active=!0;const e=this.datepicker;if(!e.inline){const t=oe(e.inputField);t!==oe(e.config.container)?this.element.dir=t:this.element.dir&&this.element.removeAttribute("dir"),this.place(),e.config.disableTouchKeyboard&&e.inputField.blur()}ee(e,"show")}hide(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active","block"),this.element.classList.add("active","block","hidden"),this.active=!1,ee(this.datepicker,"hide"))}place(){const{classList:e,style:t}=this.element,{config:i,inputField:r}=this.datepicker,a=i.container,{width:s,height:n}=this.element.getBoundingClientRect(),{left:d,top:o,width:c}=a.getBoundingClientRect(),{left:l,top:h,width:u,height:g}=r.getBoundingClientRect();let f,p,m,{x:b,y:y}=i.orientation;a===document.body?(f=window.scrollY,p=l+window.scrollX,m=h+f):(p=l-d,m=h-o+(f=a.scrollTop)),"auto"===b&&(p<0?(b="left",p=10):b=p+s>c?"right":"rtl"===oe(r)?"right":"left"),"right"===b&&(p-=s-u),"auto"===y&&(y=m-n{e.updateFocus()}),this}update(){const e=ne(this.datepicker);return this._renderMethod=de(this,e)?"render":"refresh",this.views.forEach(e=>{e.updateFocus(),e.updateSelection()}),this}render(e=!0){const t=e&&this._renderMethod||"render";delete this._renderMethod,this.currentView[t]()}}function le(e,t,i,r){const s=e.picker,n=s.currentView,d=n.step||1;let o,c,l=s.viewDate;switch(n.id){case 0:l=r?h(l,7*i):t.ctrlKey||t.metaKey?g(l,i):h(l,i),o=h,c=(e=>n.disabled.includes(e));break;case 1:l=u(l,r?4*i:i),o=u,c=(e=>{const t=new Date(e),{year:i,disabled:r}=n;return t.getFullYear()===i&&r.includes(t.getMonth())});break;default:l=g(l,i*(r?4:1)*d),o=g,c=(e=>n.disabled.includes(m(e,d)))}void 0!==(l=function e(t,i,r,s,n,d){if(a(t,n,d))return s(t)?e(i(t,r),i,r,s,n,d):t}(l,o,i<0?-d:d,c,n.minDate,n.maxDate))&&s.changeFocus(l).render()}function he(e,t){return e.map(e=>S(e,t.format,t.locale)).join(t.dateDelimiter)}function ue(e,t,i=!1){const{config:r,dates:s,rangepicker:n}=e;if(0===t.length)return i?[]:void 0;const d=n&&e===n.datepickers[1];let o=t.reduce((e,t)=>{let i=M(t,r.format,r.locale);if(void 0===i)return e;if(r.pickLevel>0){const e=new Date(i);i=1===r.pickLevel?d?e.setMonth(e.getMonth()+1,0):e.setDate(1):d?e.setFullYear(e.getFullYear()+1,0,0):e.setMonth(0,1)}return!a(i,r.minDate,r.maxDate)||e.includes(i)||r.datesDisabled.includes(i)||r.daysOfWeekDisabled.includes(new Date(i).getDay())||e.push(i),e},[]);return 0!==o.length?(r.multidate&&!i&&(o=o.reduce((e,t)=>(s.includes(t)||e.push(t),e),s.filter(e=>!o.includes(e)))),r.maxNumberOfDates&&o.length>r.maxNumberOfDates?o.slice(-1*r.maxNumberOfDates):o):void 0}function ge(e,t=3,i=!0){const{config:r,picker:a,inputField:s}=e;if(2&t){const e=a.active?r.pickLevel:r.startView;a.update().changeView(e).render(i)}1&t&&s&&(s.value=he(e.dates,r))}function fe(e,t,i){let{clear:r,render:a,autohide:s}=i;void 0===a&&(a=!0),a?void 0===s&&(s=e.config.autohide):s=!1;const n=ue(e,t,r);n&&(n.toString()!==e.dates.toString()?(e.dates=n,ge(e,a?3:1),ee(e,"changeDate")):ge(e,1),s&&e.hide())}return class{constructor(e,t={},i){e.datepicker=this,this.element=e;const a=this.config=Object.assign({buttonClass:t.buttonClass&&String(t.buttonClass)||"button",container:document.body,defaultViewDate:c(),maxDate:void 0,minDate:void 0},q(N,this));this._options=t,Object.assign(a,q(t,this));const s=this.inline="INPUT"!==e.tagName;let n,d;if(s)a.container=e,d=r(e.dataset.date,a.dateDelimiter),delete e.dataset.date;else{const i=t.container?document.querySelector(t.container):null;i&&(a.container=i),(n=this.inputField=e).classList.add("datepicker-input"),d=r(n.value,a.dateDelimiter)}if(i){const e=i.inputs.indexOf(n),t=i.datepickers;if(e<0||e>1||!Array.isArray(t))throw Error("Invalid rangepicker object.");t[e]=this,Object.defineProperty(this,"rangepicker",{get:()=>i})}this.dates=[];const o=ue(this,d);o&&o.length>0&&(this.dates=o),n&&(n.value=he(this.dates,a));const l=this.picker=new ce(this);if(s)this.show();else{const e=function(e,t){const i=e.element;if(i!==document.activeElement)return;const r=e.picker.element;V(t,e=>e===i||e===r)||re(e)}.bind(null,this);F(this,[[n,"keydown",function(e,t){if("Tab"===t.key)return void re(e);const i=e.picker,{id:r,isMinView:a}=i.currentView;if(i.active)if(e.editMode)switch(t.key){case"Escape":i.hide();break;case"Enter":e.exitEditMode({update:!0,autohide:e.config.autohide});break;default:return}else switch(t.key){case"Escape":i.hide();break;case"ArrowLeft":if(t.ctrlKey||t.metaKey)te(e,-1);else{if(t.shiftKey)return void e.enterEditMode();le(e,t,-1,!1)}break;case"ArrowRight":if(t.ctrlKey||t.metaKey)te(e,1);else{if(t.shiftKey)return void e.enterEditMode();le(e,t,1,!1)}break;case"ArrowUp":if(t.ctrlKey||t.metaKey)ie(e);else{if(t.shiftKey)return void e.enterEditMode();le(e,t,-1,!0)}break;case"ArrowDown":if(t.shiftKey&&!t.ctrlKey&&!t.metaKey)return void e.enterEditMode();le(e,t,1,!0);break;case"Enter":a?e.setDate(i.viewDate):i.changeView(r-1).render();break;case"Backspace":case"Delete":return void e.enterEditMode();default:return void(1!==t.key.length||t.ctrlKey||t.metaKey||e.enterEditMode())}else switch(t.key){case"ArrowDown":case"Escape":i.show();break;case"Enter":e.update();break;default:return}t.preventDefault(),t.stopPropagation()}.bind(null,this)],[n,"focus",function(e){e.config.showOnFocus&&!e._showing&&e.show()}.bind(null,this)],[n,"mousedown",function(e,t){const i=t.target;(e.picker.active||e.config.showOnClick)&&(i._active=i===document.activeElement,i._clicking=setTimeout(()=>{delete i._active,delete i._clicking},2e3))}.bind(null,this)],[n,"click",function(e,t){const i=t.target;i._clicking&&(clearTimeout(i._clicking),delete i._clicking,i._active&&e.enterEditMode(),delete i._active,e.config.showOnClick&&e.show())}.bind(null,this)],[n,"paste",function(e,t){t.clipboardData.types.includes("text/plain")&&e.enterEditMode()}.bind(null,this)],[document,"mousedown",e],[document,"touchstart",e],[window,"resize",l.place.bind(l)]])}}static formatDate(e,t,i){return S(e,t,i&&L[i]||L.en)}static parseDate(e,t,i){return M(e,t,i&&L[i]||L.en)}static get locales(){return L}get active(){return!(!this.picker||!this.picker.active)}get pickerElement(){return this.picker?this.picker.element:void 0}setOptions(e){const t=this.picker,i=q(e,this);Object.assign(this._options,e),Object.assign(this.config,i),t.setOptions(i),ge(this,3)}show(){if(this.inputField){if(this.inputField.disabled)return;this.inputField!==document.activeElement&&(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}destroy(){return this.hide(),function(e){let t=C.get(e);t&&(t.forEach(e=>{E.call(...e)}),C.delete(e))}(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}getDate(e){const t=e?t=>S(t,e,this.config.locale):e=>new Date(e);return this.config.multidate?this.dates.map(t):this.dates.length>0?t(this.dates[0]):void 0}setDate(...e){const i=[...e],r={},a=t(e);"object"!=typeof a||Array.isArray(a)||a instanceof Date||!a||Object.assign(r,i.pop()),fe(this,Array.isArray(i[0])?i[0]:i,r)}update(e){if(this.inline)return;const t={clear:!0,autohide:!(!e||!e.autohide)};fe(this,r(this.inputField.value,this.config.dateDelimiter),t)}refresh(e,t=!1){let i;e&&"string"!=typeof e&&(t=e,e=void 0),ge(this,i="picker"===e?2:"input"===e?1:3,!t)}enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit","border-blue-700","!border-primary-700"))}exitEditMode(e){if(this.inline||!this.editMode)return;const t=Object.assign({update:!1},e);delete this.editMode,this.inputField.classList.remove("in-edit","border-blue-700","!border-primary-700"),t.update&&this.update(t)}}}(); \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/dist/js/locales/ar-tn.js b/node_modules/flowbite-datepicker/dist/js/locales/ar-tn.js new file mode 100644 index 0000000..d94df17 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/ar-tn.js @@ -0,0 +1,15 @@ +/** + * Arabic-Tunisia translation for bootstrap-datepicker + * Souhaieb Besbes + */ +(function () { + Datepicker.locales['ar-tn'] = { + days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], + daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], + daysMin: ["ح", "ن", "ث", "ع", "خ", "ج", "س", "ح"], + months: ["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويليه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"], + monthsShort: ["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويليه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"], + today: "هذا اليوم", + rtl: true + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/ar.js b/node_modules/flowbite-datepicker/dist/js/locales/ar.js new file mode 100644 index 0000000..608fe0d --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/ar.js @@ -0,0 +1,15 @@ +/** + * Arabic translation for bootstrap-datepicker + * Mohammed Alshehri + */ +(function () { + Datepicker.locales.ar = { + days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], + daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], + daysMin: ["ح", "ن", "ث", "ع", "خ", "ج", "س", "ح"], + months: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], + monthsShort: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], + today: "هذا اليوم", + rtl: true + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/az.js b/node_modules/flowbite-datepicker/dist/js/locales/az.js new file mode 100644 index 0000000..ae3d4de --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/az.js @@ -0,0 +1,14 @@ +// Azerbaijani +(function () { + Datepicker.locales.az = { + days: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə"], + daysShort: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş."], + daysMin: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş."], + months: ["Yanvar", "Fevral", "Mart", "Aprel", "May", "İyun", "İyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"], + monthsShort: ["Yan", "Fev", "Mar", "Apr", "May", "İyun", "İyul", "Avq", "Sen", "Okt", "Noy", "Dek"], + today: "Bu gün", + weekStart: 1, + clear: "Təmizlə", + monthsTitle: 'Aylar' + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/bg.js b/node_modules/flowbite-datepicker/dist/js/locales/bg.js new file mode 100644 index 0000000..81d649e --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/bg.js @@ -0,0 +1,14 @@ +/** + * Bulgarian translation for bootstrap-datepicker + * Apostol Apostolov + */ +(function () { + Datepicker.locales.bg = { + days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"], + daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "Съб"], + daysMin: ["Н", "П", "В", "С", "Ч", "П", "С"], + months: ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"], + monthsShort: ["Ян", "Фев", "Мар", "Апр", "Май", "Юни", "Юли", "Авг", "Сеп", "Окт", "Ное", "Дек"], + today: "днес" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/bm.js b/node_modules/flowbite-datepicker/dist/js/locales/bm.js new file mode 100644 index 0000000..57550b8 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/bm.js @@ -0,0 +1,18 @@ +/** + * Bamanankan (bm) translation for bootstrap-datepicker + * Fatou Fall + */ +(function () { + Datepicker.locales.bm = { + days: ["Kari","Ntɛnɛn","Tarata","Araba","Alamisa","Juma","Sibiri"], + daysShort: ["Kar","Ntɛ","Tar","Ara","Ala","Jum","Sib"], + daysMin: ["Ka","Nt","Ta","Ar","Al","Ju","Si"], + months: ["Zanwuyekalo","Fewuruyekalo","Marisikalo","Awirilikalo","Mɛkalo","Zuwɛnkalo","Zuluyekalo","Utikalo","Sɛtanburukalo","ɔkutɔburukalo","Nowanburukalo","Desanburukalo"], + monthsShort: ["Zan","Few","Mar","Awi","Mɛ","Zuw","Zul","Uti","Sɛt","ɔku","Now","Des"], + today: "Bi", + monthsTitle: "Kalo", + clear: "Ka jɔsi", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/bn.js b/node_modules/flowbite-datepicker/dist/js/locales/bn.js new file mode 100644 index 0000000..6143362 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/bn.js @@ -0,0 +1,19 @@ +/** + * Bengali (Bangla) translation for bootstrap-datepicker + * Karim Khan + * Orif N. Jr. + */ +(function () { + Datepicker.locales.bn = { + days: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"], + daysShort: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"], + daysMin: ["রবি","সোম","মঙ্গল","বুধ","বৃহস্পতি","শুক্র","শনি"], + months: ["জানুয়ারী","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","অগাস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"], + monthsShort: ["জানুয়ারী","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","অগাস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"], + today: "আজ", + monthsTitle: "মাস", + clear: "পরিষ্কার", + weekStart: 0, + format: "mm/dd/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/br.js b/node_modules/flowbite-datepicker/dist/js/locales/br.js new file mode 100644 index 0000000..f6419a5 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/br.js @@ -0,0 +1,18 @@ +/** + * Breton translation for bootstrap-datepicker + * Gwenn Meynier + */ +(function () { + Datepicker.locales.br = { + days: ["Sul", "Lun", "Meurzh", "Merc'her", "Yaou", "Gwener", "Sadorn"], + daysShort: ["Sul", "Lun", "Meu.", "Mer.", "Yao.", "Gwe.", "Sad."], + daysMin: ["Su", "L", "Meu", "Mer", "Y", "G", "Sa"], + months: ["Genver", "C'hwevrer", "Meurzh", "Ebrel", "Mae", "Mezheven", "Gouere", "Eost", "Gwengolo", "Here", "Du", "Kerzu"], + monthsShort: ["Genv.", "C'hw.", "Meur.", "Ebre.", "Mae", "Mezh.", "Goue.", "Eost", "Gwen.", "Here", "Du", "Kerz."], + today: "Hiziv", + monthsTitle: "Miz", + clear: "Dilemel", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/bs.js b/node_modules/flowbite-datepicker/dist/js/locales/bs.js new file mode 100644 index 0000000..306f163 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/bs.js @@ -0,0 +1,15 @@ +/** + * Bosnian translation for bootstrap-datepicker + */ +(function () { + Datepicker.locales.bs = { + days: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], + daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], + daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su"], + months: ["Januar", "Februar", "Mart", "April", "Maj", "Juni", "Juli", "August", "Septembar", "Oktobar", "Novembar", "Decembar"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], + today: "Danas", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/ca.js b/node_modules/flowbite-datepicker/dist/js/locales/ca.js new file mode 100644 index 0000000..93e130b --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/ca.js @@ -0,0 +1,18 @@ +/** + * Catalan translation for bootstrap-datepicker + * J. Garcia + */ +(function () { + Datepicker.locales.ca = { + days: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"], + daysShort: ["Diu", "Dil", "Dmt", "Dmc", "Dij", "Div", "Dis"], + daysMin: ["dg", "dl", "dt", "dc", "dj", "dv", "ds"], + months: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"], + monthsShort: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"], + today: "Avui", + monthsTitle: "Mesos", + clear: "Esborrar", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/cs.js b/node_modules/flowbite-datepicker/dist/js/locales/cs.js new file mode 100644 index 0000000..7531dda --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/cs.js @@ -0,0 +1,19 @@ +/** + * Czech translation for bootstrap-datepicker + * Matěj Koubík + * Fixes by Michal Remiš + */ +(function () { + Datepicker.locales.cs = { + days: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"], + daysShort: ["Ned", "Pon", "Úte", "Stř", "Čtv", "Pát", "Sob"], + daysMin: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"], + months: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], + monthsShort: ["Led", "Úno", "Bře", "Dub", "Kvě", "Čer", "Čnc", "Srp", "Zář", "Říj", "Lis", "Pro"], + today: "Dnes", + clear: "Vymazat", + monthsTitle: "Měsíc", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/cy.js b/node_modules/flowbite-datepicker/dist/js/locales/cy.js new file mode 100644 index 0000000..7c60999 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/cy.js @@ -0,0 +1,14 @@ +/** + * Welsh translation for bootstrap-datepicker + * S. Morris + */ +(function () { + Datepicker.locales.cy = { + days: ["Sul", "Llun", "Mawrth", "Mercher", "Iau", "Gwener", "Sadwrn"], + daysShort: ["Sul", "Llu", "Maw", "Mer", "Iau", "Gwe", "Sad"], + daysMin: ["Su", "Ll", "Ma", "Me", "Ia", "Gwe", "Sa"], + months: ["Ionawr", "Chewfror", "Mawrth", "Ebrill", "Mai", "Mehefin", "Gorfennaf", "Awst", "Medi", "Hydref", "Tachwedd", "Rhagfyr"], + monthsShort: ["Ion", "Chw", "Maw", "Ebr", "Mai", "Meh", "Gor", "Aws", "Med", "Hyd", "Tach", "Rha"], + today: "Heddiw" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/da.js b/node_modules/flowbite-datepicker/dist/js/locales/da.js new file mode 100644 index 0000000..fb7a189 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/da.js @@ -0,0 +1,19 @@ +/** + * Danish translation for bootstrap-datepicker + * Christian Pedersen + * Ivan Mylyanyk + */ +(function () { + Datepicker.locales.da = { + days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], + daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"], + daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø"], + months: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], + today: "I Dag", + weekStart: 1, + clear: "Nulstil", + format: "dd/mm/yyyy", + monthsTitle: "Måneder" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/de.js b/node_modules/flowbite-datepicker/dist/js/locales/de.js new file mode 100644 index 0000000..60c87be --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/de.js @@ -0,0 +1,18 @@ +/** + * German translation for bootstrap-datepicker + * Sam Zurcher + */ +(function () { + Datepicker.locales.de = { + days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], + daysShort: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], + daysMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], + months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], + monthsShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], + today: "Heute", + monthsTitle: "Monate", + clear: "Löschen", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/el.js b/node_modules/flowbite-datepicker/dist/js/locales/el.js new file mode 100644 index 0000000..a65a21d --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/el.js @@ -0,0 +1,16 @@ +/** + * Greek translation for bootstrap-datepicker + */ +(function () { + Datepicker.locales.el = { + days: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"], + daysShort: ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"], + daysMin: ["Κυ", "Δε", "Τρ", "Τε", "Πε", "Πα", "Σα"], + months: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], + monthsShort: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"], + today: "Σήμερα", + clear: "Καθαρισμός", + weekStart: 1, + format: "d/m/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/en-AU.js b/node_modules/flowbite-datepicker/dist/js/locales/en-AU.js new file mode 100644 index 0000000..6d84556 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/en-AU.js @@ -0,0 +1,18 @@ +/** + * Australian English translation for bootstrap-datepicker + * Steve Chapman + */ +(function () { + Datepicker.locales['en-AU'] = { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + monthsTitle: "Months", + clear: "Clear", + weekStart: 1, + format: "d/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/en-CA.js b/node_modules/flowbite-datepicker/dist/js/locales/en-CA.js new file mode 100644 index 0000000..3a35c32 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/en-CA.js @@ -0,0 +1,18 @@ +/** + * Canadian English translation for bootstrap-datepicker + * Mike Nacey + */ +(function () { + Datepicker.locales['en-CA'] = { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + monthsTitle: "Months", + clear: "Clear", + weekStart: 0, + format: "yyyy-mm-dd" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/en-GB.js b/node_modules/flowbite-datepicker/dist/js/locales/en-GB.js new file mode 100644 index 0000000..da848f9 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/en-GB.js @@ -0,0 +1,18 @@ +/** + * British English translation for bootstrap-datepicker + * Xavier Dutreilh + */ +(function () { + Datepicker.locales['en-GB'] = { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + monthsTitle: "Months", + clear: "Clear", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/en-IE.js b/node_modules/flowbite-datepicker/dist/js/locales/en-IE.js new file mode 100644 index 0000000..1a41302 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/en-IE.js @@ -0,0 +1,17 @@ +/** + * Irish English translation for bootstrap-datepicker + */ +(function () { + Datepicker.locales['en-IE'] = { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + monthsTitle: "Months", + clear: "Clear", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/en-NZ.js b/node_modules/flowbite-datepicker/dist/js/locales/en-NZ.js new file mode 100644 index 0000000..dd34ac4 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/en-NZ.js @@ -0,0 +1,17 @@ +/** + * New Zealand English translation for bootstrap-datepicker + */ +(function () { + Datepicker.locales['en-NZ'] = { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + monthsTitle: "Months", + clear: "Clear", + weekStart: 1, + format: "d/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/en-ZA.js b/node_modules/flowbite-datepicker/dist/js/locales/en-ZA.js new file mode 100644 index 0000000..6455097 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/en-ZA.js @@ -0,0 +1,17 @@ +/** + * South African English translation for bootstrap-datepicker + */ +(function () { + Datepicker.locales['en-ZA'] = { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + monthsTitle: "Months", + clear: "Clear", + weekStart: 1, + format: "yyyy/mm/d" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/eo.js b/node_modules/flowbite-datepicker/dist/js/locales/eo.js new file mode 100644 index 0000000..f683065 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/eo.js @@ -0,0 +1,17 @@ +/** + * Esperanto translation for bootstrap-datepicker + * Emmanuel Debanne + */ +(function () { + Datepicker.locales.eo = { + days: ["dimanĉo", "lundo", "mardo", "merkredo", "ĵaŭdo", "vendredo", "sabato"], + daysShort: ["dim.", "lun.", "mar.", "mer.", "ĵaŭ.", "ven.", "sam."], + daysMin: ["d", "l", "ma", "me", "ĵ", "v", "s"], + months: ["januaro", "februaro", "marto", "aprilo", "majo", "junio", "julio", "aŭgusto", "septembro", "oktobro", "novembro", "decembro"], + monthsShort: ["jan.", "feb.", "mar.", "apr.", "majo", "jun.", "jul.", "aŭg.", "sep.", "okt.", "nov.", "dec."], + today: "Hodiaŭ", + clear: "Nuligi", + weekStart: 1, + format: "yyyy-mm-dd" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/es.js b/node_modules/flowbite-datepicker/dist/js/locales/es.js new file mode 100644 index 0000000..d2be3f8 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/es.js @@ -0,0 +1,18 @@ +/** + * Spanish translation for bootstrap-datepicker + * Bruno Bonamin + */ +(function () { + Datepicker.locales.es = { + days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"], + daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], + daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"], + months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], + monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], + today: "Hoy", + monthsTitle: "Meses", + clear: "Borrar", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/et.js b/node_modules/flowbite-datepicker/dist/js/locales/et.js new file mode 100644 index 0000000..35a71de --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/et.js @@ -0,0 +1,18 @@ +/** + * Estonian translation for bootstrap-datepicker + * Ando Roots + * Fixes by Illimar Tambek < + */ +(function () { + Datepicker.locales.et = { + days: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev"], + daysShort: ["Pühap", "Esmasp", "Teisip", "Kolmap", "Neljap", "Reede", "Laup"], + daysMin: ["P", "E", "T", "K", "N", "R", "L"], + months: ["Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"], + monthsShort: ["Jaan", "Veebr", "Märts", "Apr", "Mai", "Juuni", "Juuli", "Aug", "Sept", "Okt", "Nov", "Dets"], + today: "Täna", + clear: "Tühjenda", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/eu.js b/node_modules/flowbite-datepicker/dist/js/locales/eu.js new file mode 100644 index 0000000..fd664f2 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/eu.js @@ -0,0 +1,18 @@ +/** + * Basque translation for bootstrap-datepicker + * Arkaitz Etxeberria + */ +(function () { + Datepicker.locales.eu = { + days: ['Igandea', 'Astelehena', 'Asteartea', 'Asteazkena', 'Osteguna', 'Ostirala', 'Larunbata'], + daysShort: ['Ig', 'Al', 'Ar', 'Az', 'Og', 'Ol', 'Lr'], + daysMin: ['Ig', 'Al', 'Ar', 'Az', 'Og', 'Ol', 'Lr'], + months: ['Urtarrila', 'Otsaila', 'Martxoa', 'Apirila', 'Maiatza', 'Ekaina', 'Uztaila', 'Abuztua', 'Iraila', 'Urria', 'Azaroa', 'Abendua'], + monthsShort: ['Urt', 'Ots', 'Mar', 'Api', 'Mai', 'Eka', 'Uzt', 'Abu', 'Ira', 'Urr', 'Aza', 'Abe'], + today: "Gaur", + monthsTitle: "Hilabeteak", + clear: "Ezabatu", + weekStart: 1, + format: "yyyy/mm/dd" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/fa.js b/node_modules/flowbite-datepicker/dist/js/locales/fa.js new file mode 100644 index 0000000..3e1e43e --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/fa.js @@ -0,0 +1,17 @@ +/** + * Persian translation for bootstrap-datepicker + * Mostafa Rokooie + */ +(function () { + Datepicker.locales.fa = { + days: ["یک‌شنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "جمعه", "شنبه", "یک‌شنبه"], + daysShort: ["یک", "دو", "سه", "چهار", "پنج", "جمعه", "شنبه", "یک"], + daysMin: ["ی", "د", "س", "چ", "پ", "ج", "ش", "ی"], + months: ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"], + monthsShort: ["ژان", "فور", "مار", "آور", "مه", "ژون", "ژوی", "اوت", "سپت", "اکت", "نوا", "دسا"], + today: "امروز", + clear: "پاک کن", + weekStart: 1, + format: "yyyy/mm/dd" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/fi.js b/node_modules/flowbite-datepicker/dist/js/locales/fi.js new file mode 100644 index 0000000..c5e35cf --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/fi.js @@ -0,0 +1,17 @@ +/** + * Finnish translation for bootstrap-datepicker + * Jaakko Salonen + */ +(function () { + Datepicker.locales.fi = { + days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"], + daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "lau"], + daysMin: ["su", "ma", "ti", "ke", "to", "pe", "la"], + months: ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"], + monthsShort: ["tam", "hel", "maa", "huh", "tou", "kes", "hei", "elo", "syy", "lok", "mar", "jou"], + today: "tänään", + clear: "Tyhjennä", + weekStart: 1, + format: "d.m.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/fo.js b/node_modules/flowbite-datepicker/dist/js/locales/fo.js new file mode 100644 index 0000000..18d1949 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/fo.js @@ -0,0 +1,15 @@ +/** + * Faroese translation for bootstrap-datepicker + * Theodor Johannesen + */ +(function () { + Datepicker.locales.fo = { + days: ["Sunnudagur", "Mánadagur", "Týsdagur", "Mikudagur", "Hósdagur", "Fríggjadagur", "Leygardagur"], + daysShort: ["Sun", "Mán", "Týs", "Mik", "Hós", "Frí", "Ley"], + daysMin: ["Su", "Má", "Tý", "Mi", "Hó", "Fr", "Le"], + months: ["Januar", "Februar", "Marts", "Apríl", "Mei", "Juni", "Juli", "August", "Septembur", "Oktobur", "Novembur", "Desembur"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], + today: "Í Dag", + clear: "Reinsa" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/fr-CH.js b/node_modules/flowbite-datepicker/dist/js/locales/fr-CH.js new file mode 100644 index 0000000..278a638 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/fr-CH.js @@ -0,0 +1,21 @@ +/** + * French (Switzerland) translation for bootstrap-datepicker + * Christoph Jossi + * Based on + * French translation for bootstrap-datepicker + * Nico Mollet + */ +(function () { + Datepicker.locales['fr-CH'] = { + days: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"], + daysShort: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"], + daysMin: ["D", "L", "Ma", "Me", "J", "V", "S"], + months: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], + monthsShort: ["Jan", "Fév", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Déc"], + today: "Aujourd'hui", + monthsTitle: "Mois", + clear: "Effacer", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/fr.js b/node_modules/flowbite-datepicker/dist/js/locales/fr.js new file mode 100644 index 0000000..86323f8 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/fr.js @@ -0,0 +1,18 @@ +/** + * French translation for bootstrap-datepicker + * Nico Mollet + */ +(function () { + Datepicker.locales.fr = { + days: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], + daysShort: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."], + daysMin: ["d", "l", "ma", "me", "j", "v", "s"], + months: ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], + monthsShort: ["janv.", "févr.", "mars", "avril", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."], + today: "Aujourd'hui", + monthsTitle: "Mois", + clear: "Effacer", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/gl.js b/node_modules/flowbite-datepicker/dist/js/locales/gl.js new file mode 100644 index 0000000..1b52b5a --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/gl.js @@ -0,0 +1,16 @@ +/** + * Galician translation + */ +(function () { + Datepicker.locales.gl = { + days: ["Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado"], + daysShort: ["Dom", "Lun", "Mar", "Mér", "Xov", "Ven", "Sáb"], + daysMin: ["Do", "Lu", "Ma", "Me", "Xo", "Ve", "Sa"], + months: ["Xaneiro", "Febreiro", "Marzo", "Abril", "Maio", "Xuño", "Xullo", "Agosto", "Setembro", "Outubro", "Novembro", "Decembro"], + monthsShort: ["Xan", "Feb", "Mar", "Abr", "Mai", "Xun", "Xul", "Ago", "Sep", "Out", "Nov", "Dec"], + today: "Hoxe", + clear: "Limpar", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/he.js b/node_modules/flowbite-datepicker/dist/js/locales/he.js new file mode 100644 index 0000000..4c1138f --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/he.js @@ -0,0 +1,15 @@ +/** + * Hebrew translation for bootstrap-datepicker + * Sagie Maoz + */ +(function () { + Datepicker.locales.he = { + days: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"], + daysShort: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], + daysMin: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], + months: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], + monthsShort: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"], + today: "היום", + rtl: true + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/hi.js b/node_modules/flowbite-datepicker/dist/js/locales/hi.js new file mode 100644 index 0000000..48e41cc --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/hi.js @@ -0,0 +1,18 @@ +/** + * Hindi translation for bootstrap-datepicker + * Visar Uruqi + */ +(function () { + Datepicker.locales.hi = { + days: ["रविवार", "सोमवार", "मंगलवार", "बुधवार", "गुरुवार", "शुक्रवार", "शनिवार"], + daysShort: ["सूर्य", "सोम", "मंगल", "बुध", "गुरु", "शुक्र", "शनि"], + daysMin: ["र", "सो", "मं", "बु", "गु", "शु", "श"], + months: ["जनवरी", "फ़रवरी", "मार्च", "अप्रैल", "मई", "जून", "जुलाई", "अगस्त", "सितम्बर", "अक्टूबर", "नवंबर", "दिसम्बर"], + monthsShort: ["जन", "फ़रवरी", "मार्च", "अप्रैल", "मई", "जून", "जुलाई", "अगस्त", "सितं", "अक्टूबर", "नवं", "दिसम्बर"], + today: "आज", + monthsTitle: "महीने", + clear: "साफ", + weekStart: 1, + format: "dd / mm / yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/hr.js b/node_modules/flowbite-datepicker/dist/js/locales/hr.js new file mode 100644 index 0000000..18544a0 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/hr.js @@ -0,0 +1,13 @@ +/** + * Croatian localisation + */ +(function () { + Datepicker.locales.hr = { + days: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], + daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], + daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su"], + months: ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"], + monthsShort: ["Sij", "Velj", "Ožu", "Tra", "Svi", "Lip", "Srp", "Kol", "Ruj", "Lis", "Stu", "Pro"], + today: "Danas" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/hu.js b/node_modules/flowbite-datepicker/dist/js/locales/hu.js new file mode 100644 index 0000000..5eaffa6 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/hu.js @@ -0,0 +1,18 @@ +/** + * Hungarian translation for bootstrap-datepicker + * Sotus László + */ +(function () { + Datepicker.locales.hu = { + days: ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"], + daysShort: ["vas", "hét", "ked", "sze", "csü", "pén", "szo"], + daysMin: ["V", "H", "K", "Sze", "Cs", "P", "Szo"], + months: ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"], + monthsShort: ["jan", "feb", "már", "ápr", "máj", "jún", "júl", "aug", "sze", "okt", "nov", "dec"], + today: "ma", + weekStart: 1, + clear: "töröl", + titleFormat: "y. MM", + format: "yyyy.mm.dd" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/hy.js b/node_modules/flowbite-datepicker/dist/js/locales/hy.js new file mode 100644 index 0000000..dd662d0 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/hy.js @@ -0,0 +1,18 @@ +/** + * Armenian translation for bootstrap-datepicker + * Hayk Chamyan + */ +(function () { + Datepicker.locales.hy = { + days: ["Կիրակի", "Երկուշաբթի", "Երեքշաբթի", "Չորեքշաբթի", "Հինգշաբթի", "Ուրբաթ", "Շաբաթ"], + daysShort: ["Կիր", "Երկ", "Երե", "Չոր", "Հին", "Ուրբ", "Շաբ"], + daysMin: ["Կի", "Եկ", "Եք", "Չո", "Հի", "Ու", "Շա"], + months: ["Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"], + monthsShort: ["Հնվ", "Փետ", "Մար", "Ապր", "Մայ", "Հուն", "Հուլ", "Օգս", "Սեպ", "Հոկ", "Նոյ", "Դեկ"], + today: "Այսօր", + clear: "Ջնջել", + format: "dd.mm.yyyy", + weekStart: 1, + monthsTitle: 'Ամիսնէր' + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/id.js b/node_modules/flowbite-datepicker/dist/js/locales/id.js new file mode 100644 index 0000000..c19beb1 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/id.js @@ -0,0 +1,15 @@ +/** + * Bahasa translation for bootstrap-datepicker + * Azwar Akbar + */ +(function () { + Datepicker.locales.id = { + days: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"], + daysShort: ["Mgu", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"], + daysMin: ["Mg", "Sn", "Sl", "Ra", "Ka", "Ju", "Sa"], + months: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ags", "Sep", "Okt", "Nov", "Des"], + today: "Hari Ini", + clear: "Kosongkan" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/is.js b/node_modules/flowbite-datepicker/dist/js/locales/is.js new file mode 100644 index 0000000..18f818d --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/is.js @@ -0,0 +1,14 @@ +/** + * Icelandic translation for bootstrap-datepicker + * Hinrik Örn Sigurðsson + */ +(function () { + Datepicker.locales.is = { + days: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur"], + daysShort: ["Sun", "Mán", "Þri", "Mið", "Fim", "Fös", "Lau"], + daysMin: ["Su", "Má", "Þr", "Mi", "Fi", "Fö", "La"], + months: ["Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maí", "Jún", "Júl", "Ágú", "Sep", "Okt", "Nóv", "Des"], + today: "Í Dag" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/it-CH.js b/node_modules/flowbite-datepicker/dist/js/locales/it-CH.js new file mode 100644 index 0000000..b1081cd --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/it-CH.js @@ -0,0 +1,20 @@ +/** + * Italian (Switzerland) translation for bootstrap-datepicker + * Christoph Jossi + * Based on + * Italian translation for bootstrap-datepicker + * Enrico Rubboli + */ +(function () { + Datepicker.locales['it-CH'] = { + days: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], + daysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], + daysMin: ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa"], + months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], + monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], + today: "Oggi", + clear: "Cancella", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/it.js b/node_modules/flowbite-datepicker/dist/js/locales/it.js new file mode 100644 index 0000000..70d98ab --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/it.js @@ -0,0 +1,18 @@ +/** + * Italian translation for bootstrap-datepicker + * Enrico Rubboli + */ +(function () { + Datepicker.locales.it = { + days: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], + daysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], + daysMin: ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa"], + months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], + monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], + today: "Oggi", + monthsTitle: "Mesi", + clear: "Cancella", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/ja.js b/node_modules/flowbite-datepicker/dist/js/locales/ja.js new file mode 100644 index 0000000..f1c1b30 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/ja.js @@ -0,0 +1,17 @@ +/** + * Japanese translation for bootstrap-datepicker + * Norio Suzuki + */ +(function () { + Datepicker.locales.ja = { + days: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜"], + daysShort: ["日", "月", "火", "水", "木", "金", "土"], + daysMin: ["日", "月", "火", "水", "木", "金", "土"], + months: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + today: "今日", + format: "yyyy/mm/dd", + titleFormat: "y年mm月", + clear: "クリア" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/ka.js b/node_modules/flowbite-datepicker/dist/js/locales/ka.js new file mode 100644 index 0000000..b0cd474 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/ka.js @@ -0,0 +1,17 @@ +/** + * Georgian translation for bootstrap-datepicker + * Levan Melikishvili + */ +(function () { + Datepicker.locales.ka = { + days: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი"], + daysShort: ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ"], + daysMin: ["კვ", "ორ", "სა", "ოთ", "ხუ", "პა", "შა"], + months: ["იანვარი", "თებერვალი", "მარტი", "აპრილი", "მაისი", "ივნისი", "ივლისი", "აგვისტო", "სექტემბერი", "ოქტომბერი", "ნოემბერი", "დეკემბერი"], + monthsShort: ["იან", "თებ", "მარ", "აპრ", "მაი", "ივნ", "ივლ", "აგვ", "სექ", "ოქტ", "ნოე", "დეკ"], + today: "დღეს", + clear: "გასუფთავება", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/kk.js b/node_modules/flowbite-datepicker/dist/js/locales/kk.js new file mode 100644 index 0000000..9b85f8c --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/kk.js @@ -0,0 +1,15 @@ +/** + * Kazakh translation for bootstrap-datepicker + * Yerzhan Tolekov + */ +(function () { + Datepicker.locales.kk = { + days: ["Жексенбі", "Дүйсенбі", "Сейсенбі", "Сәрсенбі", "Бейсенбі", "Жұма", "Сенбі"], + daysShort: ["Жек", "Дүй", "Сей", "Сәр", "Бей", "Жұм", "Сен"], + daysMin: ["Жк", "Дс", "Сс", "Ср", "Бс", "Жм", "Сн"], + months: ["Қаңтар", "Ақпан", "Наурыз", "Сәуір", "Мамыр", "Маусым", "Шілде", "Тамыз", "Қыркүйек", "Қазан", "Қараша", "Желтоқсан"], + monthsShort: ["Қаң", "Ақп", "Нау", "Сәу", "Мам", "Мау", "Шіл", "Там", "Қыр", "Қаз", "Қар", "Жел"], + today: "Бүгін", + weekStart: 1 + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/km.js b/node_modules/flowbite-datepicker/dist/js/locales/km.js new file mode 100644 index 0000000..71e294c --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/km.js @@ -0,0 +1,15 @@ +/** + * Khmer translation for bootstrap-datepicker + * This is the Updated Version of: https: //github.com/uxsolutions/bootstrap-datepicker/blob/71308d42cce9524284c50c6fac50422d1790ac0f/js/locales/bootstrap-datepicker.kh.js + */ +(function () { + Datepicker.locales.km = { + days: ["អាទិត្យ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រហស្បតិ៍", "សុក្រ", "សៅរ៍"], + daysShort: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍"], + daysMin: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍"], + months: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"], + monthsShort: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"], + today: "ថ្ងៃនេះ", + clear: "សំអាត" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/ko.js b/node_modules/flowbite-datepicker/dist/js/locales/ko.js new file mode 100644 index 0000000..3be9400 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/ko.js @@ -0,0 +1,18 @@ +/** + * Korean translation for bootstrap-datepicker + * This is a port from https: //github.com/moment/moment/blob/develop/src/locale/ko.js + */ +(function () { + Datepicker.locales.ko = { + days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], + daysShort: ["일", "월", "화", "수", "목", "금", "토"], + daysMin: ["일", "월", "화", "수", "목", "금", "토"], + months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], + monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], + today: "오늘", + clear: "삭제", + format: "yyyy-mm-dd", + titleFormat: "y년mm월", + weekStart: 0 + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/lt.js b/node_modules/flowbite-datepicker/dist/js/locales/lt.js new file mode 100644 index 0000000..894e8cb --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/lt.js @@ -0,0 +1,19 @@ +/** + * Lithuanian translation for bootstrap-datepicker + * Šarūnas Gliebus + */ + +(function () { + Datepicker.locales.lt = { + days: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis"], + daysShort: ["S", "Pr", "A", "T", "K", "Pn", "Š"], + daysMin: ["Sk", "Pr", "An", "Tr", "Ke", "Pn", "Št"], + months: ["Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"], + monthsShort: ["Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rugp", "Rugs", "Spa", "Lap", "Gru"], + today: "Šiandien", + monthsTitle: "Mėnesiai", + clear: "Išvalyti", + weekStart: 1, + format: "yyyy-mm-dd" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/lv.js b/node_modules/flowbite-datepicker/dist/js/locales/lv.js new file mode 100644 index 0000000..109014b --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/lv.js @@ -0,0 +1,18 @@ +/** + * Latvian translation for bootstrap-datepicker + * Artis Avotins + */ + +(function () { + Datepicker.locales.lv = { + days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena"], + daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S"], + daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "Se"], + months: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec"], + monthsTitle: "Mēneši", + today: "Šodien", + clear: "Nodzēst", + weekStart: 1 + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/me.js b/node_modules/flowbite-datepicker/dist/js/locales/me.js new file mode 100644 index 0000000..6ecc097 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/me.js @@ -0,0 +1,17 @@ +/** + * Montenegrin translation for bootstrap-datepicker + * Miodrag Nikač + */ +(function () { + Datepicker.locales.me = { + days: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], + daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], + daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su"], + months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], + today: "Danas", + weekStart: 1, + clear: "Izbriši", + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/mk.js b/node_modules/flowbite-datepicker/dist/js/locales/mk.js new file mode 100644 index 0000000..df87e2d --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/mk.js @@ -0,0 +1,15 @@ +/** + * Macedonian translation for bootstrap-datepicker + * Marko Aleksic + */ +(function () { + Datepicker.locales.mk = { + days: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота"], + daysShort: ["Нед", "Пон", "Вто", "Сре", "Чет", "Пет", "Саб"], + daysMin: ["Не", "По", "Вт", "Ср", "Че", "Пе", "Са"], + months: ["Јануари", "Февруари", "Март", "Април", "Мај", "Јуни", "Јули", "Август", "Септември", "Октомври", "Ноември", "Декември"], + monthsShort: ["Јан", "Фев", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Ное", "Дек"], + today: "Денес", + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/mn.js b/node_modules/flowbite-datepicker/dist/js/locales/mn.js new file mode 100644 index 0000000..c080280 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/mn.js @@ -0,0 +1,17 @@ +/** + * Mongolian translation for bootstrap-datepicker + * Andrey Torsunov + */ +(function () { + Datepicker.locales.mn = { + days: ["Ням", "Даваа", "Мягмар", "Лхагва", "Пүрэв", "Баасан", "Бямба"], + daysShort: ["Ням", "Дав", "Мяг", "Лха", "Пүр", "Баа", "Бям"], + daysMin: ["Ня", "Да", "Мя", "Лх", "Пү", "Ба", "Бя"], + months: ["Хулгана", "Үхэр", "Бар", "Туулай", "Луу", "Могой", "Морь", "Хонь", "Бич", "Тахиа", "Нохой", "Гахай"], + monthsShort: ["Хул", "Үхэ", "Бар", "Туу", "Луу", "Мог", "Мор", "Хон", "Бич", "Тах", "Нох", "Гах"], + today: "Өнөөдөр", + clear: "Тодорхой", + format: "yyyy.mm.dd", + weekStart: 1 + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/mr.js b/node_modules/flowbite-datepicker/dist/js/locales/mr.js new file mode 100644 index 0000000..67289df --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/mr.js @@ -0,0 +1,18 @@ +/** + * Marathi translation for bootstrap-datepicker + * Sushant Pimple + */ +(function () { + Datepicker.locales.mr = { + days: ["रविवार", "सोमवार", "मंगळवार", "बुधवार", "गुरुवार", "शुक्रवार", "शनिवार"], + daysShort: ["रवि", "सोम", "मंगळ", "बुध", "गुरु", "शुक्र", "शनि"], + daysMin: ["र", "सो", "मं", "बु", "गु", "शु", "श"], + months: ["जानेवारी", "फेब्रुवारी", "मार्च", "एप्रिल", "मे", "जून", "जुलै", "ऑगस्ट", "सप्टेंबर", "ऑक्टोबर", "नोव्हेंबर", "डिसेंबर"], + monthsShort: ["जाने.", "फेब्रु.", "मार्च", "एप्रिल", "मे", "जून", "जुलै", "ऑगस्ट", "सप्टें.", "ऑक्टो.", "नोव्हें.", "डिसें."], + today: "आज", + monthsTitle: "महीने", + clear: "हटवा", + weekStart: 1, + format: "dd / mm / yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/ms.js b/node_modules/flowbite-datepicker/dist/js/locales/ms.js new file mode 100644 index 0000000..20283bd --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/ms.js @@ -0,0 +1,15 @@ +/** + * Malay translation for bootstrap-datepicker + * Ateman Faiz + */ +(function () { + Datepicker.locales.ms = { + days: ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu"], + daysShort: ["Aha", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab"], + daysMin: ["Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa"], + months: ["Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"], + today: "Hari Ini", + clear: "Bersihkan" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/nl-BE.js b/node_modules/flowbite-datepicker/dist/js/locales/nl-BE.js new file mode 100644 index 0000000..6cf3d56 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/nl-BE.js @@ -0,0 +1,18 @@ +/** + * Belgium-Dutch translation for bootstrap-datepicker + * Julien Poulin + */ +(function () { + Datepicker.locales['nl-BE'] = { + days: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"], + daysShort: ["zo", "ma", "di", "wo", "do", "vr", "za"], + daysMin: ["zo", "ma", "di", "wo", "do", "vr", "za"], + months: ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"], + monthsShort: ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"], + today: "Vandaag", + monthsTitle: "Maanden", + clear: "Leegmaken", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/nl.js b/node_modules/flowbite-datepicker/dist/js/locales/nl.js new file mode 100644 index 0000000..1bc12ea --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/nl.js @@ -0,0 +1,18 @@ +/** + * Dutch translation for bootstrap-datepicker + * Reinier Goltstein + */ +(function () { + Datepicker.locales.nl = { + days: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"], + daysShort: ["zo", "ma", "di", "wo", "do", "vr", "za"], + daysMin: ["zo", "ma", "di", "wo", "do", "vr", "za"], + months: ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"], + monthsShort: ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"], + today: "Vandaag", + monthsTitle: "Maanden", + clear: "Wissen", + weekStart: 1, + format: "dd-mm-yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/no.js b/node_modules/flowbite-datepicker/dist/js/locales/no.js new file mode 100644 index 0000000..d9c55fe --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/no.js @@ -0,0 +1,18 @@ +/** + * Norwegian translation for bootstrap-datepicker + * George Gooding + */ +(function () { + Datepicker.locales.no = { + days: ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'], + daysShort: ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'], + daysMin: ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], + months: ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], + monthsShort: ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], + today: 'i dag', + monthsTitle: 'Måneder', + clear: 'Nullstill', + weekStart: 1, + format: 'dd.mm.yyyy' + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/oc.js b/node_modules/flowbite-datepicker/dist/js/locales/oc.js new file mode 100644 index 0000000..c1d6007 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/oc.js @@ -0,0 +1,17 @@ +/** + * Occitan translation for bootstrap-datepicker + */ +(function () { + Datepicker.locales.oc = { + days: ["Dimenge", "Diluns", "Dimars", "Dimècres", "Dijòus", "Divendres", "Dissabte"], + daysShort: ["Dim", "Dil", "Dmr", "Dmc", "Dij", "Div", "Dis"], + daysMin: ["dg", "dl", "dr", "dc", "dj", "dv", "ds"], + months: ["Genièr", "Febrièr", "Març", "Abrial", "Mai", "Junh", "Julhet", "Agost", "Setembre", "Octobre", "Novembre", "Decembre"], + monthsShort: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Dec"], + today: "Uèi", + monthsTitle: "Meses", + clear: "Escafar", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/pl.js b/node_modules/flowbite-datepicker/dist/js/locales/pl.js new file mode 100644 index 0000000..55444af --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/pl.js @@ -0,0 +1,17 @@ +/** + * Polish translation for bootstrap-datepicker + * Robert + */ +(function () { + Datepicker.locales.pl = { + days: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"], + daysShort: ["Niedz.", "Pon.", "Wt.", "Śr.", "Czw.", "Piąt.", "Sob."], + daysMin: ["Ndz.", "Pn.", "Wt.", "Śr.", "Czw.", "Pt.", "Sob."], + months: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"], + monthsShort: ["Sty.", "Lut.", "Mar.", "Kwi.", "Maj", "Cze.", "Lip.", "Sie.", "Wrz.", "Paź.", "Lis.", "Gru."], + today: "Dzisiaj", + weekStart: 1, + clear: "Wyczyść", + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/pt-BR.js b/node_modules/flowbite-datepicker/dist/js/locales/pt-BR.js new file mode 100644 index 0000000..fb855c9 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/pt-BR.js @@ -0,0 +1,17 @@ +/** + * Brazilian translation for bootstrap-datepicker + * Cauan Cabral + */ +(function () { + Datepicker.locales['pt-BR'] = { + days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], + daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], + daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa"], + months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], + monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], + today: "Hoje", + monthsTitle: "Meses", + clear: "Limpar", + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/pt.js b/node_modules/flowbite-datepicker/dist/js/locales/pt.js new file mode 100644 index 0000000..f25cf9b --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/pt.js @@ -0,0 +1,18 @@ +/** + * Portuguese translation for bootstrap-datepicker + * Original code: Cauan Cabral + * Tiago Melo + */ +(function () { + Datepicker.locales.pt = { + days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], + daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], + daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa"], + months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], + monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], + today: "Hoje", + monthsTitle: "Meses", + clear: "Limpar", + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/ro.js b/node_modules/flowbite-datepicker/dist/js/locales/ro.js new file mode 100644 index 0000000..0b98838 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/ro.js @@ -0,0 +1,17 @@ +/** + * Romanian translation for bootstrap-datepicker + * Cristian Vasile + */ +(function () { + Datepicker.locales.ro = { + days: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă"], + daysShort: ["Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm"], + daysMin: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ"], + months: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"], + monthsShort: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Astăzi", + clear: "Șterge", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/ru.js b/node_modules/flowbite-datepicker/dist/js/locales/ru.js new file mode 100644 index 0000000..f85cc51 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/ru.js @@ -0,0 +1,18 @@ +/** + * Russian translation for bootstrap-datepicker + * Victor Taranenko + */ +(function () { + Datepicker.locales.ru = { + days: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"], + daysShort: ["Вск", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб"], + daysMin: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], + months: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"], + monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"], + today: "Сегодня", + clear: "Очистить", + format: "dd.mm.yyyy", + weekStart: 1, + monthsTitle: 'Месяцы' + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/si.js b/node_modules/flowbite-datepicker/dist/js/locales/si.js new file mode 100644 index 0000000..04bf43f --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/si.js @@ -0,0 +1,18 @@ +/** + * Sinhala translation for bootstrap-datepicker + * Chanaka Fernando + */ +(function () { + Datepicker.locales.si = { + days: ["ඉරිදා", "සඳුදා", "අඟහරුවාදා", "බදාදා", "බ්‍රහස්පතින්දා", "සිකුරාදා", "සෙනසුරාදා"], + daysShort: ["ඉරි", "සඳු", "අඟ", "බදා", "බ්‍රහ", "සිකු", "සෙන"], + daysMin: ["ඉ", "ස", "අ", "බ", "බ්‍ර", "සි", "සෙ"], + months: ["ජනවාරි", "පෙබරවාරි", "මාර්තු", "අප්‍රේල්", "මැයි", "ජුනි", "ජූලි", "අගෝස්තු", "සැප්තැම්බර්", "ඔක්තෝබර්", "නොවැම්බර්", "දෙසැම්බර්"], + monthsShort: ["ජන", "පෙබ", "මාර්", "අප්‍රේ", "මැයි", "ජුනි", "ජූලි", "අගෝ", "සැප්", "ඔක්", "නොවැ", "දෙසැ"], + today: "අද", + monthsTitle: "මාස", + clear: "මකන්න", + weekStart: 0, + format: "yyyy-mm-dd" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/sk.js b/node_modules/flowbite-datepicker/dist/js/locales/sk.js new file mode 100644 index 0000000..0f813ab --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/sk.js @@ -0,0 +1,18 @@ +/** + * Slovak translation for bootstrap-datepicker + * Marek Lichtner + * Fixes by Michal Remiš + */ +(function () { + Datepicker.locales.sk = { + days: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"], + daysShort: ["Ned", "Pon", "Uto", "Str", "Štv", "Pia", "Sob"], + daysMin: ["Ne", "Po", "Ut", "St", "Št", "Pia", "So"], + months: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"], + today: "Dnes", + clear: "Vymazať", + weekStart: 1, + format: "d.m.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/sl.js b/node_modules/flowbite-datepicker/dist/js/locales/sl.js new file mode 100644 index 0000000..6fae7fd --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/sl.js @@ -0,0 +1,15 @@ +/** + * Slovene translation for bootstrap-datepicker + * Gregor Rudolf + */ +(function () { + Datepicker.locales.sl = { + days: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"], + daysShort: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"], + daysMin: ["Ne", "Po", "To", "Sr", "Če", "Pe", "So"], + months: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], + today: "Danes", + weekStart: 1 + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/sq.js b/node_modules/flowbite-datepicker/dist/js/locales/sq.js new file mode 100644 index 0000000..32b2f1d --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/sq.js @@ -0,0 +1,18 @@ +/** + * Albanian translation for bootstrap-datepicker + * Tomor Pupovci + */ +(function () { + Datepicker.locales.sq = { + days: ["E Diel", "E Hënë", "E Martē", "E Mërkurë", "E Enjte", "E Premte", "E Shtunë"], + daysShort: ["Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Shtu"], + daysMin: ["Di", "Hë", "Ma", "Më", "En", "Pr", "Sht"], + months: ["Janar", "Shkurt", "Mars", "Prill", "Maj", "Qershor", "Korrik", "Gusht", "Shtator", "Tetor", "Nëntor", "Dhjetor"], + monthsShort: ["Jan", "Shk", "Mar", "Pri", "Maj", "Qer", "Korr", "Gu", "Sht", "Tet", "Nën", "Dhjet"], + monthsTitle: "Muaj", + today: "Sot", + weekStart: 1, + format: "dd/mm/yyyy", + clear: "Pastro" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/sr-latn.js b/node_modules/flowbite-datepicker/dist/js/locales/sr-latn.js new file mode 100644 index 0000000..65281d4 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/sr-latn.js @@ -0,0 +1,16 @@ +/** + * Serbian latin translation for bootstrap-datepicker + * Bojan Milosavlević + */ +(function () { + Datepicker.locales['sr-latn'] = { + days: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"], + daysShort: ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub"], + daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su"], + months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], + today: "Danas", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/sr.js b/node_modules/flowbite-datepicker/dist/js/locales/sr.js new file mode 100644 index 0000000..275edd7 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/sr.js @@ -0,0 +1,16 @@ +/** + * Serbian cyrillic translation for bootstrap-datepicker + * Bojan Milosavlević + */ +(function () { + Datepicker.locales.sr = { + days: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"], + daysShort: ["Нед", "Пон", "Уто", "Сре", "Чет", "Пет", "Суб"], + daysMin: ["Н", "По", "У", "Ср", "Ч", "Пе", "Су"], + months: ["Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"], + monthsShort: ["Јан", "Феб", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Нов", "Дец"], + today: "Данас", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/sv.js b/node_modules/flowbite-datepicker/dist/js/locales/sv.js new file mode 100644 index 0000000..955ff67 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/sv.js @@ -0,0 +1,17 @@ +/** + * Swedish translation for bootstrap-datepicker + * Patrik Ragnarsson + */ +(function () { + Datepicker.locales.sv = { + days: ["söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"], + daysShort: ["sön", "mån", "tis", "ons", "tor", "fre", "lör"], + daysMin: ["sö", "må", "ti", "on", "to", "fr", "lö"], + months: ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"], + monthsShort: ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"], + today: "Idag", + format: "yyyy-mm-dd", + weekStart: 1, + clear: "Rensa" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/sw.js b/node_modules/flowbite-datepicker/dist/js/locales/sw.js new file mode 100644 index 0000000..e67b01f --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/sw.js @@ -0,0 +1,15 @@ +/** + * Swahili translation for bootstrap-datepicker + * Edwin Mugendi + * Source: http: //scriptsource.org/cms/scripts/page.php?item_id=entry_detail&uid=xnfaqyzcku + */ +(function () { + Datepicker.locales.sw = { + days: ["Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"], + daysShort: ["J2", "J3", "J4", "J5", "Alh", "Ij", "J1"], + daysMin: ["2", "3", "4", "5", "A", "I", "1"], + months: ["Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"], + monthsShort: ["Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"], + today: "Leo" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/ta.js b/node_modules/flowbite-datepicker/dist/js/locales/ta.js new file mode 100644 index 0000000..ff33892 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/ta.js @@ -0,0 +1,18 @@ +/** + * Tamil translation for bootstrap-datepicker + * Abubacker Siddik A + */ +(function () { + Datepicker.locales.ta = { + days: ["ஞாயிறு", "திங்கள்", "செவ்வாய்", "புதன்", "வியாழன்", "வெள்ளி", "சனி"], + daysShort: ["ஞாயி", "திங்", "செவ்", "புத", "வியா", "வெள்", "சனி"], + daysMin: ["ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"], + months: ["ஜனவரி", "பிப்ரவரி", "மார்ச்", "ஏப்ரல்", "மே", "ஜூன்", "ஜூலை", "ஆகஸ்டு", "செப்டம்பர்", "அக்டோபர்", "நவம்பர்", "டிசம்பர்"], + monthsShort: ["ஜன", "பிப்", "மார்", "ஏப்", "மே", "ஜூன்", "ஜூலை", "ஆக", "செப்", "அக்", "நவ", "டிச"], + today: "இன்று", + monthsTitle: "மாதங்கள்", + clear: "நீக்கு", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/tg.js b/node_modules/flowbite-datepicker/dist/js/locales/tg.js new file mode 100644 index 0000000..497c837 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/tg.js @@ -0,0 +1,19 @@ +/** + * Tajik (cyrillic) translation for bootstrap-datepicker + * Bakhtiyor Bahritidinov + * Orif N. Jr. + */ +(function () { + Datepicker.locales.tg = { + days: ["Якшанбе", "Душанбе", "Сешанбе", "Чоршанбе", "Панҷшанбе", "Ҷумъа", "Шанбе"], + daysShort: ["Яшб", "Дшб", "Сшб", "Чшб", "Пшб", "Ҷум", "Шнб"], + daysMin: ["Яш", "Дш", "Сш", "Чш", "Пш", "Ҷм", "Шб"], + months: ["Январ", "Феврал", "Март", "Апрел", "Май", "Июн", "Июл", "Август", "Сентябр", "Октябр", "Ноябр", "Декабр"], + monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"], + today: "Имрӯз", + monthsTitle: "Моҳҳо", + clear: "Тоза намудан", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/th.js b/node_modules/flowbite-datepicker/dist/js/locales/th.js new file mode 100644 index 0000000..bdeb790 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/th.js @@ -0,0 +1,14 @@ +/** + * Thai translation for bootstrap-datepicker + * Suchau Jiraprapot + */ +(function () { + Datepicker.locales.th = { + days: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"], + daysShort: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], + daysMin: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], + months: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"], + monthsShort: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."], + today: "วันนี้" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/tk.js b/node_modules/flowbite-datepicker/dist/js/locales/tk.js new file mode 100644 index 0000000..4c8affd --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/tk.js @@ -0,0 +1,18 @@ +/** + * Turkmen translation for bootstrap-datepicker + * N'Bayramberdiyev + */ +(function () { + Datepicker.locales.tk = { + days: ["Ýekşenbe", "Duşenbe", "Sişenbe", "Çarşenbe", "Penşenbe", "Anna", "Şenbe"], + daysShort: ["Ýek", "Duş", "Siş", "Çar", "Pen", "Ann", "Şen"], + daysMin: ["Ýe", "Du", "Si", "Ça", "Pe", "An", "Şe"], + months: ["Ýanwar", "Fewral", "Mart", "Aprel", "Maý", "Iýun", "Iýul", "Awgust", "Sentýabr", "Oktýabr", "Noýabr", "Dekabr"], + monthsShort: ["Ýan", "Few", "Mar", "Apr", "Maý", "Iýn", "Iýl", "Awg", "Sen", "Okt", "Noý", "Dek"], + today: "Bu gün", + monthsTitle: "Aýlar", + clear: "Aýyr", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/tr.js b/node_modules/flowbite-datepicker/dist/js/locales/tr.js new file mode 100644 index 0000000..5a97ed7 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/tr.js @@ -0,0 +1,17 @@ +/** + * Turkish translation for bootstrap-datepicker + * Serkan Algur + */ +(function () { + Datepicker.locales.tr = { + days: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"], + daysShort: ["Pz", "Pzt", "Sal", "Çrş", "Prş", "Cu", "Cts"], + daysMin: ["Pz", "Pzt", "Sa", "Çr", "Pr", "Cu", "Ct"], + months: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], + monthsShort: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"], + today: "Bugün", + clear: "Temizle", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/uk.js b/node_modules/flowbite-datepicker/dist/js/locales/uk.js new file mode 100644 index 0000000..3821035 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/uk.js @@ -0,0 +1,17 @@ +/** + * Ukrainian translation for bootstrap-datepicker + * Igor Polynets + */ +(function () { + Datepicker.locales.uk = { + days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"], + daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб"], + daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], + months: ["Cічень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], + monthsShort: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"], + today: "Сьогодні", + clear: "Очистити", + format: "dd.mm.yyyy", + weekStart: 1 + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/uz-cyrl.js b/node_modules/flowbite-datepicker/dist/js/locales/uz-cyrl.js new file mode 100644 index 0000000..3dd8dde --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/uz-cyrl.js @@ -0,0 +1,18 @@ +/** + * Uzbek cyrillic translation for bootstrap-datepicker + * Kakhramonov Javlonbek + */ +(function () { + Datepicker.locales['uz-cyrl'] = { + days: ["Якшанба", "Душанба", "Сешанба", "Чоршанба", "Пайшанба", "Жума", "Шанба"], + daysShort: ["Якш", "Ду", "Се", "Чор", "Пай", "Жу", "Ша"], + daysMin: ["Як", "Ду", "Се", "Чо", "Па", "Жу", "Ша"], + months: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"], + monthsShort: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"], + today: "Бугун", + clear: "Ўчириш", + format: "dd.mm.yyyy", + weekStart: 1, + monthsTitle: 'Ойлар' + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/uz-latn.js b/node_modules/flowbite-datepicker/dist/js/locales/uz-latn.js new file mode 100644 index 0000000..8f18dac --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/uz-latn.js @@ -0,0 +1,18 @@ +/** + * Uzbek latin translation for bootstrap-datepicker + * Kakhramonov Javlonbek + */ +(function () { + Datepicker.locales['uz-latn'] = { + days: ["Yakshanba", "Dushanba", "Seshanba", "Chorshanba", "Payshanba", "Juma", "Shanba"], + daysShort: ["Yak", "Du", "Se", "Chor", "Pay", "Ju", "Sha"], + daysMin: ["Ya", "Du", "Se", "Cho", "Pa", "Ju", "Sha"], + months: ["Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avgust", "Sentabr", "Oktabr", "Noyabr", "Dekabr"], + monthsShort: ["Yan", "Fev", "Mar", "Apr", "May", "Iyn", "Iyl", "Avg", "Sen", "Okt", "Noy", "Dek"], + today: "Bugun", + clear: "O'chirish", + format: "dd.mm.yyyy", + weekStart: 1, + monthsTitle: 'Oylar' + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/vi.js b/node_modules/flowbite-datepicker/dist/js/locales/vi.js new file mode 100644 index 0000000..90b5cb8 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/vi.js @@ -0,0 +1,16 @@ +/** + * Vietnamese translation for bootstrap-datepicker + * An Vo + */ +(function () { + Datepicker.locales.vi = { + days: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"], + daysShort: ["CN", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7"], + daysMin: ["CN", "T2", "T3", "T4", "T5", "T6", "T7"], + months: ["Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"], + monthsShort: ["Th1", "Th2", "Th3", "Th4", "Th5", "Th6", "Th7", "Th8", "Th9", "Th10", "Th11", "Th12"], + today: "Hôm nay", + clear: "Xóa", + format: "dd/mm/yyyy" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/zh-CN.js b/node_modules/flowbite-datepicker/dist/js/locales/zh-CN.js new file mode 100644 index 0000000..adec7d2 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/zh-CN.js @@ -0,0 +1,19 @@ +/** + * Simplified Chinese translation for bootstrap-datepicker + * Yuan Cheung + */ +(function () { + Datepicker.locales['zh-CN'] = { + days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], + daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], + daysMin: ["日", "一", "二", "三", "四", "五", "六"], + months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + today: "今天", + monthsTitle: "选择月份", + clear: "清除", + format: "yyyy-mm-dd", + titleFormat: "y年mm月", + weekStart: 1 + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/js/locales/zh-TW.js b/node_modules/flowbite-datepicker/dist/js/locales/zh-TW.js new file mode 100644 index 0000000..d8e249a --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/js/locales/zh-TW.js @@ -0,0 +1,18 @@ +/** + * Traditional Chinese translation for bootstrap-datepicker + * Rung-Sheng Jang + * FrankWu Fix more appropriate use of Traditional Chinese habit + */ +(function () { + Datepicker.locales['zh-TW'] = { + days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], + daysShort: ["週日", "週一", "週二", "週三", "週四", "週五", "週六"], + daysMin: ["日", "一", "二", "三", "四", "五", "六"], + months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + today: "今天", + format: "yyyy年mm月dd日", + weekStart: 1, + clear: "清除" + }; +}()); diff --git a/node_modules/flowbite-datepicker/dist/main.cjs.js b/node_modules/flowbite-datepicker/dist/main.cjs.js new file mode 100644 index 0000000..0f1787e --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/main.cjs.js @@ -0,0 +1,2996 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; +} +function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); +} +function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); +} +function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); + } +} +function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; +} +function _get() { + return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { + var p = _superPropBase(e, t); + if (p) { + var n = Object.getOwnPropertyDescriptor(p, t); + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; + } + }, _get.apply(null, arguments); +} +function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, _getPrototypeOf(t); +} +function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), Object.defineProperty(t, "prototype", { + writable: !1 + }), e && _setPrototypeOf(t, e); +} +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function () { + return !!t; + })(); +} +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _possibleConstructorReturn(t, e) { + if (e && ("object" == typeof e || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t); +} +function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { + return t.__proto__ = e, t; + }, _setPrototypeOf(t, e); +} +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); +} +function _superPropBase(t, o) { + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); + return t; +} +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; +} +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } +} + +function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +function lastItemOf(arr) { + return arr[arr.length - 1]; +} + +// push only the items not included in the array +function pushUnique(arr) { + for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + items[_key - 1] = arguments[_key]; + } + items.forEach(function (item) { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; +} +function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; +} +function isInRange(testVal, min, max) { + var minOK = min === undefined || testVal >= min; + var maxOK = max === undefined || testVal <= max; + return minOK && maxOK; +} +function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +} +function createTagRepeat(tagName, repeat) { + var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ''; + var openTagSrc = Object.keys(attributes).reduce(function (src, attr) { + var val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return "".concat(src, " ").concat(attr, "=\"").concat(val, "\""); + }, tagName); + html += "<".concat(openTagSrc, ">"); + var next = index + 1; + return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html; +} + +// Remove the spacing surrounding tags for HTML parser not to create text nodes +// before/after elements +function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0; + var baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); +} + +// Get the ISO week of a date +function getWeek(date) { + // start of ISO week is Monday + var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; +} + +// Get the start year of the period of years that includes given date +// years: length of the year period +function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + var year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; +} + +// pattern for format parts +var reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/; +// pattern for non date parts +var reNonDateParts = /[\s!-/:-@[-`{-~年月日]+/; +// cache for persed formats +var knownFormats = {}; +// parse funtions for date parts +var parseFns = { + y: function y(date, year) { + return new Date(date).setFullYear(parseInt(year, 10)); + }, + m: function m(date, month, locale) { + var newDate = new Date(date); + var monthIndex = parseInt(month, 10) - 1; + if (isNaN(monthIndex)) { + if (!month) { + return NaN; + } + var monthName = month.toLowerCase(); + var compareNames = function compareNames(name) { + return name.toLowerCase().startsWith(monthName); + }; + // compare with both short and full names because some locales have periods + // in the short names (not equal to the first X letters of the full names) + monthIndex = locale.monthsShort.findIndex(compareNames); + if (monthIndex < 0) { + monthIndex = locale.months.findIndex(compareNames); + } + if (monthIndex < 0) { + return NaN; + } + } + newDate.setMonth(monthIndex); + return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime(); + }, + d: function d(date, day) { + return new Date(date).setDate(parseInt(day, 10)); + } +}; +// format functions for date parts +var formatFns = { + d: function d(date) { + return date.getDate(); + }, + dd: function dd(date) { + return padZero(date.getDate(), 2); + }, + D: function D(date, locale) { + return locale.daysShort[date.getDay()]; + }, + DD: function DD(date, locale) { + return locale.days[date.getDay()]; + }, + m: function m(date) { + return date.getMonth() + 1; + }, + mm: function mm(date) { + return padZero(date.getMonth() + 1, 2); + }, + M: function M(date, locale) { + return locale.monthsShort[date.getMonth()]; + }, + MM: function MM(date, locale) { + return locale.months[date.getMonth()]; + }, + y: function y(date) { + return date.getFullYear(); + }, + yy: function yy(date) { + return padZero(date.getFullYear(), 2).slice(-2); + }, + yyyy: function yyyy(date) { + return padZero(date.getFullYear(), 4); + } +}; + +// get month index in normal range (0 - 11) from any number +function normalizeMonth(monthIndex) { + return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); +} +function padZero(num, length) { + return num.toString().padStart(length, '0'); +} +function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + var separators = format.split(reFormatTokens); + var parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + var partFormatters = parts.map(function (token) { + return formatFns[token]; + }); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) { + var token = parts.find(function (part) { + return part[0] !== 'D' && part[0].toLowerCase() === key; + }); + if (token) { + keys.push(key); + } + return keys; + }, []); + return knownFormats[format] = { + parser: function parser(dateStr, locale) { + var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) { + if (part.length > 0 && parts[index]) { + var token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce(function (origDate, key) { + var newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, today()); + }, + formatter: function formatter(date, locale) { + var dateStr = partFormatters.reduce(function (str, fn, index) { + return str += "".concat(separators[index]).concat(fn(date, locale)); + }, ''); + // separators' length is always parts' length + 1, + return dateStr += lastItemOf(separators); + } + }; +} +function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + var date = stripTime(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return today(); + } + if (format && format.toValue) { + var _date = format.toValue(dateStr, format, locale); + return isNaN(_date) ? undefined : stripTime(_date); + } + return parseFormatString(format).parser(dateStr, locale); +} +function formatDate(date, format, locale) { + if (isNaN(date) || !date && date !== 0) { + return ''; + } + var dateObj = typeof date === 'number' ? new Date(date) : date; + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + return parseFormatString(format).formatter(dateObj, locale); +} + +var listenerRegistry = new WeakMap(); +var _EventTarget$prototyp = EventTarget.prototype, + addEventListener = _EventTarget$prototyp.addEventListener, + removeEventListener = _EventTarget$prototyp.removeEventListener; + +// Register event listeners to a key object +// listeners: array of listener definitions; +// - each definition must be a flat array of event target and the arguments +// used to call addEventListener() on the target +function registerListeners(keyObj, listeners) { + var registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach(function (listener) { + addEventListener.call.apply(addEventListener, _toConsumableArray(listener)); + registered.push(listener); + }); +} +function unregisterListeners(keyObj) { + var listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach(function (listener) { + removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener)); + }); + listenerRegistry["delete"](keyObj); +} + +// Event.composedPath() polyfill for Edge +// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec +if (!Event.prototype.composedPath) { + var getComposedPath = function getComposedPath(node) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + path.push(node); + var parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { + // ShadowRoot + parent = node.host; + } else if (node.defaultView) { + // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; +} +function findFromPath(path, criteria, currentTarget) { + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); +} + +// Search for the actual target of a delegated event +function findElementInEventPath(ev, selector) { + var criteria = typeof selector === 'function' ? selector : function (el) { + return el.matches(selector); + }; + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); +} + +// default locales +var locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } +}; + +// config options updatable by setOptions() and their default values +var defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, + // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0 +}; + +var range = document.createRange(); +function parseHTML(html) { + return range.createContextualFragment(html); +} +function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; +} +function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } +} +function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } +} +function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach(function (node) { + el.appendChild(node); + }); + } +} + +var defaultLang = defaultOptions.language, + defaultFormat = defaultOptions.format, + defaultWeekStart = defaultOptions.weekStart; + +// Reducer function to filter out invalid day-of-week from the input +function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow; +} +function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; +} + +// validate input date. if invalid, fallback to the original value +function validateDate(value, format, locale, origValue) { + var date = parseDate(value, format, locale); + return date !== undefined ? date : origValue; +} + +// Validate viewId. if invalid, fallback to the original value +function validateViewId(value, origValue) { + var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; + var viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; +} + +// Create Datepicker configuration to set +function processOptions(options, datepicker) { + var inOpts = Object.assign({}, options); + var config = {}; + var locales = datepicker.constructor.locales; + var _ref = datepicker.config || {}, + format = _ref.format, + language = _ref.language, + locale = _ref.locale, + maxDate = _ref.maxDate, + maxView = _ref.maxView, + minDate = _ref.minDate, + pickLevel = _ref.pickLevel, + startView = _ref.startView, + weekStart = _ref.weekStart; + if (inOpts.language) { + var lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + var origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + if (inOpts.format) { + var hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + var hasToValue = typeof inOpts.format.toValue === 'function'; + var validFormatString = reFormatTokens.test(inOpts.format); + if (hasToDisplay && hasToValue || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + var minDt = minDate; + var maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) { + var date = parseDate(dt, format, locale); + return date !== undefined ? pushUnique(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + var viewDate = parseDate(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + var wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + var newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + var newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + var newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + var prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + var nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + var orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(function (x) { + return x === 'left' || x === 'right'; + }) || 'auto', + y: orientation.find(function (y) { + return y === 'top' || y === 'bottom'; + }) || 'auto' + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch (inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach(function (key) { + if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + return config; +} + +var pickerTemplate = optimizeTemplateHTML("
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
"); + +var daysTemplate = optimizeTemplateHTML("
\n
".concat(createTagRepeat('span', 7, { + "class": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
").concat(createTagRepeat('span', 42, { + "class": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400' +}), "
\n
")); + +var calendarWeeksTemplate = optimizeTemplateHTML("
\n
\n
".concat(createTagRepeat('span', 6, { + "class": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
")); + +// Base class of the view classes +var View = /*#__PURE__*/function () { + function View(picker, config) { + _classCallCheck(this, View); + Object.assign(this, config, { + picker: picker, + element: parseHTML("
").firstChild, + selected: [] + }); + this.init(this.picker.datepicker.config); + } + return _createClass(View, [{ + key: "init", + value: function init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + }, { + key: "performBeforeHook", + value: function performBeforeHook(el, current, timeValue) { + var result = this.beforeShow(new Date(timeValue)); + switch (_typeof(result)) { + case 'boolean': + result = { + enabled: result + }; + break; + case 'string': + result = { + classes: result + }; + } + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + var _el$classList; + var extraClasses = result.classes.split(/\s+/); + (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses)); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } + }]); +}(); + +var DaysView = /*#__PURE__*/function (_View) { + function DaysView(picker) { + _classCallCheck(this, DaysView); + return _callSuper(this, DaysView, [picker, { + id: 0, + name: 'days', + cellClass: 'day' + }]); + } + _inherits(DaysView, _View); + return _createClass(DaysView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + var inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + _get(_getPrototypeOf(DaysView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + var _this = this; + var updateDOW; + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + var locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined; + } + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + var weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach(function (el, index) { + var dow = (_this.weekStart + index) % 7; + el.textContent = _this.dayNames[dow]; + el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var viewYear = viewDate.getFullYear(); + var viewMonth = viewDate.getMonth(); + var firstOfMonth = dateValue(viewYear, viewMonth, 1); + var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = _toConsumableArray(this.datesDisabled); + var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + var startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = addDays(_this2.start, index); + var date = new Date(current); + var day = date.getDay(); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + el.dataset.date = current; + el.textContent = date.getDate(); + if (current < _this2.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > _this2.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (_this2.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (_this2.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(_this2.disabled, current); + } + if (_this2.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.dataset.date); + var classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg'); + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + var _range = _slicedToArray(range, 2), + _range$ = _slicedToArray(_range[0], 2), + startY = _range$[0], + startM = _range$[1], + _range$2 = _slicedToArray(_range[1], 2), + endY = _range$2[0], + endM = _range$2[1]; + if (startY > thisYear || endY < thisYear) { + return; + } + return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12]; +} +var MonthsView = /*#__PURE__*/function (_View) { + function MonthsView(picker) { + _classCallCheck(this, MonthsView); + return _callSuper(this, MonthsView, [picker, { + id: 1, + name: 'months', + cellClass: 'month' + }]); + } + _inherits(MonthsView, _View); + return _createClass(MonthsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, { + 'data-month': function dataMonth(ix) { + return ix; + } + }))); + } + _get(_getPrototypeOf(MonthsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + var minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + var maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (selected, timeValue) { + var date = new Date(timeValue); + var year = date.getFullYear(); + var month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + var date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this = this; + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + var selected = this.selected[this.year] || []; + var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + var isMinYear = this.year === this.minYear; + var isMaxYear = this.year === this.maxYear; + var range = computeMonthRange(this.range, this.year); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var date = dateValue(_this.year, index, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this.cellClass); + if (_this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = _this.monthNames[index]; + if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) { + classList.add('disabled'); + } + if (range) { + var _range2 = _slicedToArray(range, 2), + rangeStart = _range2[0], + rangeEnd = _range2[1]; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this.focused) { + classList.add('focused'); + } + if (_this.beforeShow) { + _this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this2 = this; + var selected = this.selected[this.year] || []; + var _ref = computeMonthRange(this.range, this.year) || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this2.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } + }]); +}(View); + +function toTitleCase(word) { + return _toConsumableArray(word).reduce(function (str, ch, ix) { + return str += ix ? ch : ch.toUpperCase(); + }, ''); +} + +// Class representing the years and decades view elements +var YearsView = /*#__PURE__*/function (_View) { + function YearsView(picker, config) { + _classCallCheck(this, YearsView); + return _callSuper(this, YearsView, [picker, config]); + } + _inherits(YearsView, _View); + return _createClass(YearsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = "beforeShow".concat(toTitleCase(this.cellClass)); + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + _get(_getPrototypeOf(YearsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + var beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var first = startOfYearPeriod(viewDate, this.navStep); + var last = first + 9 * this.step; + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this = this; + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (years, timeValue) { + return pushUnique(years, startOfYearPeriod(timeValue, _this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, _this.step); + } + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel("".concat(this.first, "-").concat(this.last)); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = _this2.start + index * _this2.step; + var date = dateValue(current, 0, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + if (_this2.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < _this2.minYear || current > _this2.maxYear) { + classList.add('disabled'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.textContent); + var classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function triggerDatepickerEvent(datepicker, type) { + var detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker: datepicker + }; + datepicker.element.dispatchEvent(new CustomEvent(type, { + detail: detail + })); +} + +// direction: -1 (to previous), 1 (to next) +function goToPrevOrNext(datepicker, direction) { + var _datepicker$config = datepicker.config, + minDate = _datepicker$config.minDate, + maxDate = _datepicker$config.maxDate; + var _datepicker$picker = datepicker.picker, + currentView = _datepicker$picker.currentView, + viewDate = _datepicker$picker.viewDate; + var newViewDate; + switch (currentView.id) { + case 0: + newViewDate = addMonths(viewDate, direction); + break; + case 1: + newViewDate = addYears(viewDate, direction); + break; + default: + newViewDate = addYears(viewDate, direction * currentView.navStep); + } + newViewDate = limitToRange(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); +} +function switchView(datepicker) { + var viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); +} +function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({ + autohide: true + }); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } +} + +function goToSelectedMonthOrYear(datepicker, selection) { + var picker = datepicker.picker; + var viewDate = new Date(picker.viewDate); + var viewId = picker.currentView.id; + var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear()); + picker.changeFocus(newDate).changeView(viewId - 1).render(); +} +function onClickTodayBtn(datepicker) { + var picker = datepicker.picker; + var currentDate = today(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, { + render: false + }); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); +} +function onClickClearBtn(datepicker) { + datepicker.setDate({ + clear: true + }); +} +function onClickViewSwitch(datepicker) { + switchView(datepicker); +} +function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); +} +function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); +} + +// For the picker's main block to delegete the events from `datepicker-cell`s +function onClickView(datepicker, ev) { + var target = findElementInEventPath(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + var _datepicker$picker$cu = datepicker.picker.currentView, + id = _datepicker$picker$cu.id, + isMinView = _datepicker$picker$cu.isMinView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } +} +function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } +} + +function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + var prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach(function (node) { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + var nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach(function (node) { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) { + var _picker$datepicker$co = picker.datepicker.config, + minDate = _picker$datepicker$co.minDate, + maxDate = _picker$datepicker$co.maxDate; + picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } +} + +// Compute view date to reset, which will be... +// - the last item of the selected dates or defaultViewDate if no selection +// - limitted to minDate or maxDate if it exceeds the range +function computeResetViewDate(datepicker) { + var dates = datepicker.dates, + config = datepicker.config; + var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate; + return limitToRange(viewDate, config.minDate, config.maxDate); +} + +// Change current view's view date +function setViewDate(picker, newDate) { + var oldViewDate = new Date(picker.viewDate); + var newViewDate = new Date(newDate); + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + year = _picker$currentView.year, + first = _picker$currentView.first, + last = _picker$currentView.last; + var viewYear = newViewDate.getFullYear(); + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } +} +function getTextDirection(el) { + return window.getComputedStyle(el).direction; +} + +// Class representing the picker UI +var Picker = /*#__PURE__*/function () { + function Picker(datepicker) { + _classCallCheck(this, Picker); + this.datepicker = datepicker; + var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + var element = this.element = parseHTML(template).firstChild; + var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3), + header = _element$firstChild$c[0], + main = _element$firstChild$c[1], + footer = _element$firstChild$c[2]; + var title = header.firstElementChild; + var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3), + prevBtn = _header$lastElementCh[0], + viewSwitch = _header$lastElementCh[1], + nextBtn = _header$lastElementCh[2]; + var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2), + todayBtn = _footer$firstChild$ch[0], + clearBtn = _footer$firstChild$ch[1]; + var controls = { + title: title, + prevBtn: prevBtn, + viewSwitch: viewSwitch, + nextBtn: nextBtn, + todayBtn: todayBtn, + clearBtn: clearBtn + }; + this.main = main; + this.controls = controls; + var elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add("datepicker-".concat(elementClass)); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), { + capture: true + }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]); + + // set up views + this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, { + id: 2, + name: 'years', + cellClass: 'year', + step: 1 + }), new YearsView(this, { + id: 3, + name: 'decades', + cellClass: 'decade', + step: 10 + })]; + this.currentView = this.views[datepicker.config.startView]; + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + return _createClass(Picker, [{ + key: "setOptions", + value: function setOptions(options) { + processPickerOptions(this, options); + this.views.forEach(function (view) { + view.init(options, false); + }); + this.currentView.render(); + } + }, { + key: "detach", + value: function detach() { + this.datepicker.config.container.removeChild(this.element); + } + }, { + key: "show", + value: function show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + var datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + var inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + }, { + key: "hide", + value: function hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + }, { + key: "place", + value: function place() { + var _this$element = this.element, + classList = _this$element.classList, + style = _this$element.style; + var _this$datepicker = this.datepicker, + config = _this$datepicker.config, + inputField = _this$datepicker.inputField; + var container = config.container; + var _this$element$getBoun = this.element.getBoundingClientRect(), + calendarWidth = _this$element$getBoun.width, + calendarHeight = _this$element$getBoun.height; + var _container$getBoundin = container.getBoundingClientRect(), + containerLeft = _container$getBoundin.left, + containerTop = _container$getBoundin.top, + containerWidth = _container$getBoundin.width; + var _inputField$getBoundi = inputField.getBoundingClientRect(), + inputLeft = _inputField$getBoundi.left, + inputTop = _inputField$getBoundi.top, + inputWidth = _inputField$getBoundi.width, + inputHeight = _inputField$getBoundi.height; + var _config$orientation = config.orientation, + orientX = _config$orientation.x, + orientY = _config$orientation.y; + var scrollTop; + var left; + var top; + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left'); + classList.add("datepicker-orient-".concat(orientY), "datepicker-orient-".concat(orientX)); + style.top = top ? "".concat(top, "px") : top; + style.left = left ? "".concat(left, "px") : left; + } + }, { + key: "setViewSwitchLabel", + value: function setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + }, { + key: "setPrevBtnDisabled", + value: function setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + }, { + key: "setNextBtnDisabled", + value: function setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + }, { + key: "changeView", + value: function changeView(viewId) { + var oldView = this.currentView; + var newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + }, { + key: "changeFocus", + value: function changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach(function (view) { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + }, { + key: "update", + value: function update() { + var newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach(function (view) { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + }, { + key: "render", + value: function render() { + var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var renderMethod = quickRender && this._renderMethod || 'render'; + delete this._renderMethod; + this.currentView[renderMethod](); + } + }]); +}(); + +// Find the closest date that doesn't meet the condition for unavailable date +// Returns undefined if no available date is found +// addFn: function to calculate the next date +// - args: time value, amount +// increase: amount to pass to addFn +// testFn: function to test the unavailablity of the date +// - args: time value; retun: true if unavailable +function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!isInRange(date, min, max)) { + return; + } + if (testFn(date)) { + var newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; +} + +// direction: -1 (left/up), 1 (right/down) +// vertical: true for up/down, false for left/right +function moveByArrowKey(datepicker, ev, direction, vertical) { + var picker = datepicker.picker; + var currentView = picker.currentView; + var step = currentView.step || 1; + var viewDate = picker.viewDate; + var addFn; + var testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = addDays(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = addYears(viewDate, direction); + } else { + viewDate = addDays(viewDate, direction); + } + addFn = addDays; + testFn = function testFn(date) { + return currentView.disabled.includes(date); + }; + break; + case 1: + viewDate = addMonths(viewDate, vertical ? direction * 4 : direction); + addFn = addMonths; + testFn = function testFn(date) { + var dt = new Date(date); + var year = currentView.year, + disabled = currentView.disabled; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = addYears; + testFn = function testFn(date) { + return currentView.disabled.includes(startOfYearPeriod(date, step)); + }; + } + viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } +} +function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + var picker = datepicker.picker; + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + isMinView = _picker$currentView.isMinView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({ + update: true, + autohide: datepicker.config.autohide + }); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); +} +function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } +} + +// for the prevention for entering edit mode while getting focus on click +function onMousedown(datepicker, ev) { + var el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(function () { + delete el._active; + delete el._clicking; + }, 2000); + } +} +function onClickInput(datepicker, ev) { + var el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + if (datepicker.config.showOnClick) { + datepicker.show(); + } +} +function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } +} + +// for the `document` to delegate the events from outside the picker/input field +function onClickOutside(datepicker, ev) { + var element = datepicker.element; + if (element !== document.activeElement) { + return; + } + var pickerElem = datepicker.picker.element; + if (findElementInEventPath(ev, function (el) { + return el === element || el === pickerElem; + })) { + return; + } + unfocus(datepicker); +} + +function stringifyDates(dates, config) { + return dates.map(function (dt) { + return formatDate(dt, config.format, config.locale); + }).join(config.dateDelimiter); +} + +// parse input dates and create an array of time values for selection +// returns undefined if there are no valid dates in inputDates +// when origDates (current selection) is passed, the function works to mix +// the input dates into the current selection +function processInputDates(datepicker, inputDates) { + var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var config = datepicker.config, + origDates = datepicker.dates, + rangepicker = datepicker.rangepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + var newDates = inputDates.reduce(function (dates, dt) { + var date = parseDate(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + var _dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1); + } else { + date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1); + } + } + if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce(function (dates, date) { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(function (date) { + return !newDates.includes(date); + })); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates; +} + +// refresh the UI elements +// modes: 1: input only, 2, picker only, 3 both +function refreshUI(datepicker) { + var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3; + var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var config = datepicker.config, + picker = datepicker.picker, + inputField = datepicker.inputField; + if (mode & 2) { + var newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } +} +function _setDate(datepicker, inputDates, options) { + var clear = options.clear, + render = options.render, + autohide = options.autohide; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + var newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } +} + +/** + * Class representing a date picker + */ +var Datepicker = /*#__PURE__*/function () { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + function Datepicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + _classCallCheck(this, Datepicker); + element.datepicker = this; + this.element = element; + + // set up config + var config = this.config = Object.assign({ + buttonClass: options.buttonClass && String(options.buttonClass) || 'button', + container: document.body, + defaultViewDate: today(), + maxDate: undefined, + minDate: undefined + }, processOptions(defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + var inline = this.inline = element.tagName !== 'INPUT'; + var inputField; + var initialDates; + if (inline) { + config.container = element; + initialDates = stringToArray(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + var container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = stringToArray(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + var index = rangepicker.inputs.indexOf(inputField); + var datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get: function get() { + return rangepicker; + } + }); + } + + // set initial dates + this.dates = []; + // process initial value + var inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + var picker = this.picker = new Picker(this); + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + var onMousedownDocument = onClickOutside.bind(null, this); + var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]]; + registerListeners(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + return _createClass(Datepicker, [{ + key: "active", + get: + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + function get() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + }, { + key: "pickerElement", + get: function get() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + var picker = this.picker; + var newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + }, { + key: "show", + value: function show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + }, { + key: "hide", + value: function hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.hide(); + unregisterListeners(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + }, { + key: "getDate", + value: function getDate() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.config.locale); + } : function (date) { + return new Date(date); + }; + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + }, { + key: "setDate", + value: function setDate() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + var dates = [].concat(args); + var opts = {}; + var lastArg = lastItemOf(args); + if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) { + Object.assign(opts, dates.pop()); + } + var inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + _setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + }, { + key: "update", + value: function update() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline) { + return; + } + var opts = { + clear: true, + autohide: !!(options && options.autohide) + }; + var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter); + _setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + }, { + key: "refresh", + value: function refresh() { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + var mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + }, { + key: "enterEditMode", + value: function enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + }, { + key: "exitEditMode", + value: function exitEditMode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline || !this.editMode) { + return; + } + var opts = Object.assign({ + update: false + }, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700'); + if (opts.update) { + this.update(opts); + } + } + }], [{ + key: "formatDate", + value: function formatDate$1(date, format, lang) { + return formatDate(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + }, { + key: "parseDate", + value: function parseDate$1(dateStr, format, lang) { + return parseDate(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + }, { + key: "locales", + get: function get() { + return locales; + } + }]); +}(); + +// filter out the config options inapproprite to pass to Datepicker +function filterOptions(options) { + var newOpts = Object.assign({}, options); + delete newOpts.inputs; + delete newOpts.allowOneSidedRange; + delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date + + return newOpts; +} +function setupDatepicker(rangepicker, changeDateListener, el, options) { + registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]); + new Datepicker(el, options, rangepicker); +} +function onChangeDate(rangepicker, ev) { + // to prevent both datepickers trigger the other side's update each other + if (rangepicker._updating) { + return; + } + rangepicker._updating = true; + var target = ev.target; + if (target.datepicker === undefined) { + return; + } + var datepickers = rangepicker.datepickers; + var setDateOptions = { + render: false + }; + var changedSide = rangepicker.inputs.indexOf(target); + var otherSide = changedSide === 0 ? 1 : 0; + var changedDate = datepickers[changedSide].dates[0]; + var otherDate = datepickers[otherSide].dates[0]; + if (changedDate !== undefined && otherDate !== undefined) { + // if the start of the range > the end, swap them + if (changedSide === 0 && changedDate > otherDate) { + datepickers[0].setDate(otherDate, setDateOptions); + datepickers[1].setDate(changedDate, setDateOptions); + } else if (changedSide === 1 && changedDate < otherDate) { + datepickers[0].setDate(changedDate, setDateOptions); + datepickers[1].setDate(otherDate, setDateOptions); + } + } else if (!rangepicker.allowOneSidedRange) { + // to prevent the range from becoming one-sided, copy changed side's + // selection (no matter if it's empty) to the other side + if (changedDate !== undefined || otherDate !== undefined) { + setDateOptions.clear = true; + datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions); + } + } + datepickers[0].picker.update().render(); + datepickers[1].picker.update().render(); + delete rangepicker._updating; +} + +/** + * Class representing a date range picker + */ +var DateRangePicker = /*#__PURE__*/function () { + /** + * Create a date range picker + * @param {Element} element - element to bind a date range picker + * @param {Object} [options] - config options + */ + function DateRangePicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + _classCallCheck(this, DateRangePicker); + var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input')); + if (inputs.length < 2) { + return; + } + element.rangepicker = this; + this.element = element; + this.inputs = inputs.slice(0, 2); + this.allowOneSidedRange = !!options.allowOneSidedRange; + var changeDateListener = onChangeDate.bind(null, this); + var cleanOptions = filterOptions(options); + // in order for initial date setup to work right when pcicLvel > 0, + // let Datepicker constructor add the instance to the rangepicker + var datepickers = []; + Object.defineProperty(this, 'datepickers', { + get: function get() { + return datepickers; + } + }); + setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions); + setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions); + Object.freeze(datepickers); + // normalize the range if inital dates are given + if (datepickers[0].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[0] + }); + } else if (datepickers[1].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[1] + }); + } + } + + /** + * @type {Array} - selected date of the linked date pickers + */ + return _createClass(DateRangePicker, [{ + key: "dates", + get: function get() { + return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + this.allowOneSidedRange = !!options.allowOneSidedRange; + var cleanOptions = filterOptions(options); + this.datepickers[0].setOptions(cleanOptions); + this.datepickers[1].setOptions(cleanOptions); + } + + /** + * Destroy the DateRangePicker instance + * @return {DateRangePicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.datepickers[0].destroy(); + this.datepickers[1].destroy(); + unregisterListeners(this); + delete this.element.rangepicker; + } + + /** + * Get the start and end dates of the date range + * + * The method returns Date objects by default. If format string is passed, + * it returns date strings formatted in given format. + * The result array always contains 2 items (start date/end date) and + * undefined is used for unselected side. (e.g. If none is selected, + * the result will be [undefined, undefined]. If only the end date is set + * when allowOneSidedRange config option is true, [undefined, endDate] will + * be returned.) + * + * @param {String} [format] - Format string to stringify the dates + * @return {Array} - Start and end dates + */ + }, { + key: "getDates", + value: function getDates() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.datepickers[0].config.locale); + } : function (date) { + return new Date(date); + }; + return this.dates.map(function (date) { + return date === undefined ? date : callback(date); + }); + } + + /** + * Set the start and end dates of the date range + * + * The method calls datepicker.setDate() internally using each of the + * arguments in start→end order. + * + * When a clear: true option object is passed instead of a date, the method + * clears the date. + * + * If an invalid date, the same date as the current one or an option object + * without clear: true is passed, the method considers that argument as an + * "ineffective" argument because calling datepicker.setDate() with those + * values makes no changes to the date selection. + * + * When the allowOneSidedRange config option is false, passing {clear: true} + * to clear the range works only when it is done to the last effective + * argument (in other words, passed to rangeEnd or to rangeStart along with + * ineffective rangeEnd). This is because when the date range is changed, + * it gets normalized based on the last change at the end of the changing + * process. + * + * @param {Date|Number|String|Object} rangeStart - Start date of the range + * or {clear: true} to clear the date + * @param {Date|Number|String|Object} rangeEnd - End date of the range + * or {clear: true} to clear the date + */ + }, { + key: "setDates", + value: function setDates(rangeStart, rangeEnd) { + var _this$datepickers = _slicedToArray(this.datepickers, 2), + datepicker0 = _this$datepickers[0], + datepicker1 = _this$datepickers[1]; + var origDates = this.dates; + + // If range normalization runs on every change, we can't set a new range + // that starts after the end of the current range correctly because the + // normalization process swaps start↔︎end right after setting the new start + // date. To prevent this, the normalization process needs to run once after + // both of the new dates are set. + this._updating = true; + datepicker0.setDate(rangeStart); + datepicker1.setDate(rangeEnd); + delete this._updating; + if (datepicker1.dates[0] !== origDates[1]) { + onChangeDate(this, { + target: this.inputs[1] + }); + } else if (datepicker0.dates[0] !== origDates[0]) { + onChangeDate(this, { + target: this.inputs[0] + }); + } + } + }]); +}(); + +exports.DateRangePicker = DateRangePicker; +exports.Datepicker = Datepicker; diff --git a/node_modules/flowbite-datepicker/dist/main.esm.js b/node_modules/flowbite-datepicker/dist/main.esm.js new file mode 100644 index 0000000..04cb054 --- /dev/null +++ b/node_modules/flowbite-datepicker/dist/main.esm.js @@ -0,0 +1,2991 @@ +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; +} +function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); +} +function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); +} +function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); + } +} +function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; +} +function _get() { + return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { + var p = _superPropBase(e, t); + if (p) { + var n = Object.getOwnPropertyDescriptor(p, t); + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; + } + }, _get.apply(null, arguments); +} +function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, _getPrototypeOf(t); +} +function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), Object.defineProperty(t, "prototype", { + writable: !1 + }), e && _setPrototypeOf(t, e); +} +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function () { + return !!t; + })(); +} +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _possibleConstructorReturn(t, e) { + if (e && ("object" == typeof e || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t); +} +function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { + return t.__proto__ = e, t; + }, _setPrototypeOf(t, e); +} +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); +} +function _superPropBase(t, o) { + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); + return t; +} +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; +} +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } +} + +function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +function lastItemOf(arr) { + return arr[arr.length - 1]; +} + +// push only the items not included in the array +function pushUnique(arr) { + for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + items[_key - 1] = arguments[_key]; + } + items.forEach(function (item) { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; +} +function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; +} +function isInRange(testVal, min, max) { + var minOK = min === undefined || testVal >= min; + var maxOK = max === undefined || testVal <= max; + return minOK && maxOK; +} +function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +} +function createTagRepeat(tagName, repeat) { + var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ''; + var openTagSrc = Object.keys(attributes).reduce(function (src, attr) { + var val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return "".concat(src, " ").concat(attr, "=\"").concat(val, "\""); + }, tagName); + html += "<".concat(openTagSrc, ">"); + var next = index + 1; + return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html; +} + +// Remove the spacing surrounding tags for HTML parser not to create text nodes +// before/after elements +function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0; + var baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); +} + +// Get the ISO week of a date +function getWeek(date) { + // start of ISO week is Monday + var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; +} + +// Get the start year of the period of years that includes given date +// years: length of the year period +function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + var year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; +} + +// pattern for format parts +var reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/; +// pattern for non date parts +var reNonDateParts = /[\s!-/:-@[-`{-~年月日]+/; +// cache for persed formats +var knownFormats = {}; +// parse funtions for date parts +var parseFns = { + y: function y(date, year) { + return new Date(date).setFullYear(parseInt(year, 10)); + }, + m: function m(date, month, locale) { + var newDate = new Date(date); + var monthIndex = parseInt(month, 10) - 1; + if (isNaN(monthIndex)) { + if (!month) { + return NaN; + } + var monthName = month.toLowerCase(); + var compareNames = function compareNames(name) { + return name.toLowerCase().startsWith(monthName); + }; + // compare with both short and full names because some locales have periods + // in the short names (not equal to the first X letters of the full names) + monthIndex = locale.monthsShort.findIndex(compareNames); + if (monthIndex < 0) { + monthIndex = locale.months.findIndex(compareNames); + } + if (monthIndex < 0) { + return NaN; + } + } + newDate.setMonth(monthIndex); + return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime(); + }, + d: function d(date, day) { + return new Date(date).setDate(parseInt(day, 10)); + } +}; +// format functions for date parts +var formatFns = { + d: function d(date) { + return date.getDate(); + }, + dd: function dd(date) { + return padZero(date.getDate(), 2); + }, + D: function D(date, locale) { + return locale.daysShort[date.getDay()]; + }, + DD: function DD(date, locale) { + return locale.days[date.getDay()]; + }, + m: function m(date) { + return date.getMonth() + 1; + }, + mm: function mm(date) { + return padZero(date.getMonth() + 1, 2); + }, + M: function M(date, locale) { + return locale.monthsShort[date.getMonth()]; + }, + MM: function MM(date, locale) { + return locale.months[date.getMonth()]; + }, + y: function y(date) { + return date.getFullYear(); + }, + yy: function yy(date) { + return padZero(date.getFullYear(), 2).slice(-2); + }, + yyyy: function yyyy(date) { + return padZero(date.getFullYear(), 4); + } +}; + +// get month index in normal range (0 - 11) from any number +function normalizeMonth(monthIndex) { + return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); +} +function padZero(num, length) { + return num.toString().padStart(length, '0'); +} +function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + var separators = format.split(reFormatTokens); + var parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + var partFormatters = parts.map(function (token) { + return formatFns[token]; + }); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) { + var token = parts.find(function (part) { + return part[0] !== 'D' && part[0].toLowerCase() === key; + }); + if (token) { + keys.push(key); + } + return keys; + }, []); + return knownFormats[format] = { + parser: function parser(dateStr, locale) { + var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) { + if (part.length > 0 && parts[index]) { + var token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce(function (origDate, key) { + var newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, today()); + }, + formatter: function formatter(date, locale) { + var dateStr = partFormatters.reduce(function (str, fn, index) { + return str += "".concat(separators[index]).concat(fn(date, locale)); + }, ''); + // separators' length is always parts' length + 1, + return dateStr += lastItemOf(separators); + } + }; +} +function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + var date = stripTime(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return today(); + } + if (format && format.toValue) { + var _date = format.toValue(dateStr, format, locale); + return isNaN(_date) ? undefined : stripTime(_date); + } + return parseFormatString(format).parser(dateStr, locale); +} +function formatDate(date, format, locale) { + if (isNaN(date) || !date && date !== 0) { + return ''; + } + var dateObj = typeof date === 'number' ? new Date(date) : date; + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + return parseFormatString(format).formatter(dateObj, locale); +} + +var listenerRegistry = new WeakMap(); +var _EventTarget$prototyp = EventTarget.prototype, + addEventListener = _EventTarget$prototyp.addEventListener, + removeEventListener = _EventTarget$prototyp.removeEventListener; + +// Register event listeners to a key object +// listeners: array of listener definitions; +// - each definition must be a flat array of event target and the arguments +// used to call addEventListener() on the target +function registerListeners(keyObj, listeners) { + var registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach(function (listener) { + addEventListener.call.apply(addEventListener, _toConsumableArray(listener)); + registered.push(listener); + }); +} +function unregisterListeners(keyObj) { + var listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach(function (listener) { + removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener)); + }); + listenerRegistry["delete"](keyObj); +} + +// Event.composedPath() polyfill for Edge +// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec +if (!Event.prototype.composedPath) { + var getComposedPath = function getComposedPath(node) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + path.push(node); + var parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { + // ShadowRoot + parent = node.host; + } else if (node.defaultView) { + // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; +} +function findFromPath(path, criteria, currentTarget) { + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); +} + +// Search for the actual target of a delegated event +function findElementInEventPath(ev, selector) { + var criteria = typeof selector === 'function' ? selector : function (el) { + return el.matches(selector); + }; + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); +} + +// default locales +var locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } +}; + +// config options updatable by setOptions() and their default values +var defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, + // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0 +}; + +var range = document.createRange(); +function parseHTML(html) { + return range.createContextualFragment(html); +} +function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; +} +function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } +} +function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } +} +function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach(function (node) { + el.appendChild(node); + }); + } +} + +var defaultLang = defaultOptions.language, + defaultFormat = defaultOptions.format, + defaultWeekStart = defaultOptions.weekStart; + +// Reducer function to filter out invalid day-of-week from the input +function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow; +} +function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; +} + +// validate input date. if invalid, fallback to the original value +function validateDate(value, format, locale, origValue) { + var date = parseDate(value, format, locale); + return date !== undefined ? date : origValue; +} + +// Validate viewId. if invalid, fallback to the original value +function validateViewId(value, origValue) { + var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; + var viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; +} + +// Create Datepicker configuration to set +function processOptions(options, datepicker) { + var inOpts = Object.assign({}, options); + var config = {}; + var locales = datepicker.constructor.locales; + var _ref = datepicker.config || {}, + format = _ref.format, + language = _ref.language, + locale = _ref.locale, + maxDate = _ref.maxDate, + maxView = _ref.maxView, + minDate = _ref.minDate, + pickLevel = _ref.pickLevel, + startView = _ref.startView, + weekStart = _ref.weekStart; + if (inOpts.language) { + var lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + var origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + if (inOpts.format) { + var hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + var hasToValue = typeof inOpts.format.toValue === 'function'; + var validFormatString = reFormatTokens.test(inOpts.format); + if (hasToDisplay && hasToValue || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + var minDt = minDate; + var maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) { + var date = parseDate(dt, format, locale); + return date !== undefined ? pushUnique(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + var viewDate = parseDate(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + var wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + var newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + var newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + var newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + var prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + var nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + var orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(function (x) { + return x === 'left' || x === 'right'; + }) || 'auto', + y: orientation.find(function (y) { + return y === 'top' || y === 'bottom'; + }) || 'auto' + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch (inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach(function (key) { + if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + return config; +} + +var pickerTemplate = optimizeTemplateHTML("
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
"); + +var daysTemplate = optimizeTemplateHTML("
\n
".concat(createTagRepeat('span', 7, { + "class": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
").concat(createTagRepeat('span', 42, { + "class": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400' +}), "
\n
")); + +var calendarWeeksTemplate = optimizeTemplateHTML("
\n
\n
".concat(createTagRepeat('span', 6, { + "class": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
\n
")); + +// Base class of the view classes +var View = /*#__PURE__*/function () { + function View(picker, config) { + _classCallCheck(this, View); + Object.assign(this, config, { + picker: picker, + element: parseHTML("
").firstChild, + selected: [] + }); + this.init(this.picker.datepicker.config); + } + return _createClass(View, [{ + key: "init", + value: function init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + }, { + key: "performBeforeHook", + value: function performBeforeHook(el, current, timeValue) { + var result = this.beforeShow(new Date(timeValue)); + switch (_typeof(result)) { + case 'boolean': + result = { + enabled: result + }; + break; + case 'string': + result = { + classes: result + }; + } + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + var _el$classList; + var extraClasses = result.classes.split(/\s+/); + (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses)); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } + }]); +}(); + +var DaysView = /*#__PURE__*/function (_View) { + function DaysView(picker) { + _classCallCheck(this, DaysView); + return _callSuper(this, DaysView, [picker, { + id: 0, + name: 'days', + cellClass: 'day' + }]); + } + _inherits(DaysView, _View); + return _createClass(DaysView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + var inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + _get(_getPrototypeOf(DaysView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + var _this = this; + var updateDOW; + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + var locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined; + } + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + var weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach(function (el, index) { + var dow = (_this.weekStart + index) % 7; + el.textContent = _this.dayNames[dow]; + el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var viewYear = viewDate.getFullYear(); + var viewMonth = viewDate.getMonth(); + var firstOfMonth = dateValue(viewYear, viewMonth, 1); + var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = _toConsumableArray(this.datesDisabled); + var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + var startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = addDays(_this2.start, index); + var date = new Date(current); + var day = date.getDay(); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + el.dataset.date = current; + el.textContent = date.getDate(); + if (current < _this2.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > _this2.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (_this2.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (_this2.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(_this2.disabled, current); + } + if (_this2.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.dataset.date); + var classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg'); + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + var _range = _slicedToArray(range, 2), + _range$ = _slicedToArray(_range[0], 2), + startY = _range$[0], + startM = _range$[1], + _range$2 = _slicedToArray(_range[1], 2), + endY = _range$2[0], + endM = _range$2[1]; + if (startY > thisYear || endY < thisYear) { + return; + } + return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12]; +} +var MonthsView = /*#__PURE__*/function (_View) { + function MonthsView(picker) { + _classCallCheck(this, MonthsView); + return _callSuper(this, MonthsView, [picker, { + id: 1, + name: 'months', + cellClass: 'month' + }]); + } + _inherits(MonthsView, _View); + return _createClass(MonthsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, { + 'data-month': function dataMonth(ix) { + return ix; + } + }))); + } + _get(_getPrototypeOf(MonthsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + var minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + var maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (selected, timeValue) { + var date = new Date(timeValue); + var year = date.getFullYear(); + var month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + var date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this = this; + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + var selected = this.selected[this.year] || []; + var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + var isMinYear = this.year === this.minYear; + var isMaxYear = this.year === this.maxYear; + var range = computeMonthRange(this.range, this.year); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var date = dateValue(_this.year, index, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this.cellClass); + if (_this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = _this.monthNames[index]; + if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) { + classList.add('disabled'); + } + if (range) { + var _range2 = _slicedToArray(range, 2), + rangeStart = _range2[0], + rangeEnd = _range2[1]; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this.focused) { + classList.add('focused'); + } + if (_this.beforeShow) { + _this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this2 = this; + var selected = this.selected[this.year] || []; + var _ref = computeMonthRange(this.range, this.year) || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this2.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } + }]); +}(View); + +function toTitleCase(word) { + return _toConsumableArray(word).reduce(function (str, ch, ix) { + return str += ix ? ch : ch.toUpperCase(); + }, ''); +} + +// Class representing the years and decades view elements +var YearsView = /*#__PURE__*/function (_View) { + function YearsView(picker, config) { + _classCallCheck(this, YearsView); + return _callSuper(this, YearsView, [picker, config]); + } + _inherits(YearsView, _View); + return _createClass(YearsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = "beforeShow".concat(toTitleCase(this.cellClass)); + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + _get(_getPrototypeOf(YearsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + var beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var first = startOfYearPeriod(viewDate, this.navStep); + var last = first + 9 * this.step; + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this = this; + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (years, timeValue) { + return pushUnique(years, startOfYearPeriod(timeValue, _this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, _this.step); + } + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel("".concat(this.first, "-").concat(this.last)); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = _this2.start + index * _this2.step; + var date = dateValue(current, 0, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + if (_this2.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < _this2.minYear || current > _this2.maxYear) { + classList.add('disabled'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.textContent); + var classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function triggerDatepickerEvent(datepicker, type) { + var detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker: datepicker + }; + datepicker.element.dispatchEvent(new CustomEvent(type, { + detail: detail + })); +} + +// direction: -1 (to previous), 1 (to next) +function goToPrevOrNext(datepicker, direction) { + var _datepicker$config = datepicker.config, + minDate = _datepicker$config.minDate, + maxDate = _datepicker$config.maxDate; + var _datepicker$picker = datepicker.picker, + currentView = _datepicker$picker.currentView, + viewDate = _datepicker$picker.viewDate; + var newViewDate; + switch (currentView.id) { + case 0: + newViewDate = addMonths(viewDate, direction); + break; + case 1: + newViewDate = addYears(viewDate, direction); + break; + default: + newViewDate = addYears(viewDate, direction * currentView.navStep); + } + newViewDate = limitToRange(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); +} +function switchView(datepicker) { + var viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); +} +function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({ + autohide: true + }); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } +} + +function goToSelectedMonthOrYear(datepicker, selection) { + var picker = datepicker.picker; + var viewDate = new Date(picker.viewDate); + var viewId = picker.currentView.id; + var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear()); + picker.changeFocus(newDate).changeView(viewId - 1).render(); +} +function onClickTodayBtn(datepicker) { + var picker = datepicker.picker; + var currentDate = today(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, { + render: false + }); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); +} +function onClickClearBtn(datepicker) { + datepicker.setDate({ + clear: true + }); +} +function onClickViewSwitch(datepicker) { + switchView(datepicker); +} +function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); +} +function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); +} + +// For the picker's main block to delegete the events from `datepicker-cell`s +function onClickView(datepicker, ev) { + var target = findElementInEventPath(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + var _datepicker$picker$cu = datepicker.picker.currentView, + id = _datepicker$picker$cu.id, + isMinView = _datepicker$picker$cu.isMinView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } +} +function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } +} + +function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + var prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach(function (node) { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + var nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach(function (node) { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) { + var _picker$datepicker$co = picker.datepicker.config, + minDate = _picker$datepicker$co.minDate, + maxDate = _picker$datepicker$co.maxDate; + picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } +} + +// Compute view date to reset, which will be... +// - the last item of the selected dates or defaultViewDate if no selection +// - limitted to minDate or maxDate if it exceeds the range +function computeResetViewDate(datepicker) { + var dates = datepicker.dates, + config = datepicker.config; + var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate; + return limitToRange(viewDate, config.minDate, config.maxDate); +} + +// Change current view's view date +function setViewDate(picker, newDate) { + var oldViewDate = new Date(picker.viewDate); + var newViewDate = new Date(newDate); + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + year = _picker$currentView.year, + first = _picker$currentView.first, + last = _picker$currentView.last; + var viewYear = newViewDate.getFullYear(); + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } +} +function getTextDirection(el) { + return window.getComputedStyle(el).direction; +} + +// Class representing the picker UI +var Picker = /*#__PURE__*/function () { + function Picker(datepicker) { + _classCallCheck(this, Picker); + this.datepicker = datepicker; + var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + var element = this.element = parseHTML(template).firstChild; + var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3), + header = _element$firstChild$c[0], + main = _element$firstChild$c[1], + footer = _element$firstChild$c[2]; + var title = header.firstElementChild; + var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3), + prevBtn = _header$lastElementCh[0], + viewSwitch = _header$lastElementCh[1], + nextBtn = _header$lastElementCh[2]; + var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2), + todayBtn = _footer$firstChild$ch[0], + clearBtn = _footer$firstChild$ch[1]; + var controls = { + title: title, + prevBtn: prevBtn, + viewSwitch: viewSwitch, + nextBtn: nextBtn, + todayBtn: todayBtn, + clearBtn: clearBtn + }; + this.main = main; + this.controls = controls; + var elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add("datepicker-".concat(elementClass)); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), { + capture: true + }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]); + + // set up views + this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, { + id: 2, + name: 'years', + cellClass: 'year', + step: 1 + }), new YearsView(this, { + id: 3, + name: 'decades', + cellClass: 'decade', + step: 10 + })]; + this.currentView = this.views[datepicker.config.startView]; + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + return _createClass(Picker, [{ + key: "setOptions", + value: function setOptions(options) { + processPickerOptions(this, options); + this.views.forEach(function (view) { + view.init(options, false); + }); + this.currentView.render(); + } + }, { + key: "detach", + value: function detach() { + this.datepicker.config.container.removeChild(this.element); + } + }, { + key: "show", + value: function show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + var datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + var inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + }, { + key: "hide", + value: function hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + }, { + key: "place", + value: function place() { + var _this$element = this.element, + classList = _this$element.classList, + style = _this$element.style; + var _this$datepicker = this.datepicker, + config = _this$datepicker.config, + inputField = _this$datepicker.inputField; + var container = config.container; + var _this$element$getBoun = this.element.getBoundingClientRect(), + calendarWidth = _this$element$getBoun.width, + calendarHeight = _this$element$getBoun.height; + var _container$getBoundin = container.getBoundingClientRect(), + containerLeft = _container$getBoundin.left, + containerTop = _container$getBoundin.top, + containerWidth = _container$getBoundin.width; + var _inputField$getBoundi = inputField.getBoundingClientRect(), + inputLeft = _inputField$getBoundi.left, + inputTop = _inputField$getBoundi.top, + inputWidth = _inputField$getBoundi.width, + inputHeight = _inputField$getBoundi.height; + var _config$orientation = config.orientation, + orientX = _config$orientation.x, + orientY = _config$orientation.y; + var scrollTop; + var left; + var top; + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left'); + classList.add("datepicker-orient-".concat(orientY), "datepicker-orient-".concat(orientX)); + style.top = top ? "".concat(top, "px") : top; + style.left = left ? "".concat(left, "px") : left; + } + }, { + key: "setViewSwitchLabel", + value: function setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + }, { + key: "setPrevBtnDisabled", + value: function setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + }, { + key: "setNextBtnDisabled", + value: function setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + }, { + key: "changeView", + value: function changeView(viewId) { + var oldView = this.currentView; + var newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + }, { + key: "changeFocus", + value: function changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach(function (view) { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + }, { + key: "update", + value: function update() { + var newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach(function (view) { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + }, { + key: "render", + value: function render() { + var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var renderMethod = quickRender && this._renderMethod || 'render'; + delete this._renderMethod; + this.currentView[renderMethod](); + } + }]); +}(); + +// Find the closest date that doesn't meet the condition for unavailable date +// Returns undefined if no available date is found +// addFn: function to calculate the next date +// - args: time value, amount +// increase: amount to pass to addFn +// testFn: function to test the unavailablity of the date +// - args: time value; retun: true if unavailable +function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!isInRange(date, min, max)) { + return; + } + if (testFn(date)) { + var newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; +} + +// direction: -1 (left/up), 1 (right/down) +// vertical: true for up/down, false for left/right +function moveByArrowKey(datepicker, ev, direction, vertical) { + var picker = datepicker.picker; + var currentView = picker.currentView; + var step = currentView.step || 1; + var viewDate = picker.viewDate; + var addFn; + var testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = addDays(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = addYears(viewDate, direction); + } else { + viewDate = addDays(viewDate, direction); + } + addFn = addDays; + testFn = function testFn(date) { + return currentView.disabled.includes(date); + }; + break; + case 1: + viewDate = addMonths(viewDate, vertical ? direction * 4 : direction); + addFn = addMonths; + testFn = function testFn(date) { + var dt = new Date(date); + var year = currentView.year, + disabled = currentView.disabled; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = addYears; + testFn = function testFn(date) { + return currentView.disabled.includes(startOfYearPeriod(date, step)); + }; + } + viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } +} +function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + var picker = datepicker.picker; + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + isMinView = _picker$currentView.isMinView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({ + update: true, + autohide: datepicker.config.autohide + }); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); +} +function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } +} + +// for the prevention for entering edit mode while getting focus on click +function onMousedown(datepicker, ev) { + var el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(function () { + delete el._active; + delete el._clicking; + }, 2000); + } +} +function onClickInput(datepicker, ev) { + var el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + if (datepicker.config.showOnClick) { + datepicker.show(); + } +} +function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } +} + +// for the `document` to delegate the events from outside the picker/input field +function onClickOutside(datepicker, ev) { + var element = datepicker.element; + if (element !== document.activeElement) { + return; + } + var pickerElem = datepicker.picker.element; + if (findElementInEventPath(ev, function (el) { + return el === element || el === pickerElem; + })) { + return; + } + unfocus(datepicker); +} + +function stringifyDates(dates, config) { + return dates.map(function (dt) { + return formatDate(dt, config.format, config.locale); + }).join(config.dateDelimiter); +} + +// parse input dates and create an array of time values for selection +// returns undefined if there are no valid dates in inputDates +// when origDates (current selection) is passed, the function works to mix +// the input dates into the current selection +function processInputDates(datepicker, inputDates) { + var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var config = datepicker.config, + origDates = datepicker.dates, + rangepicker = datepicker.rangepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + var newDates = inputDates.reduce(function (dates, dt) { + var date = parseDate(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + var _dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1); + } else { + date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1); + } + } + if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce(function (dates, date) { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(function (date) { + return !newDates.includes(date); + })); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates; +} + +// refresh the UI elements +// modes: 1: input only, 2, picker only, 3 both +function refreshUI(datepicker) { + var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3; + var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var config = datepicker.config, + picker = datepicker.picker, + inputField = datepicker.inputField; + if (mode & 2) { + var newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } +} +function _setDate(datepicker, inputDates, options) { + var clear = options.clear, + render = options.render, + autohide = options.autohide; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + var newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } +} + +/** + * Class representing a date picker + */ +var Datepicker = /*#__PURE__*/function () { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + function Datepicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + _classCallCheck(this, Datepicker); + element.datepicker = this; + this.element = element; + + // set up config + var config = this.config = Object.assign({ + buttonClass: options.buttonClass && String(options.buttonClass) || 'button', + container: document.body, + defaultViewDate: today(), + maxDate: undefined, + minDate: undefined + }, processOptions(defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + var inline = this.inline = element.tagName !== 'INPUT'; + var inputField; + var initialDates; + if (inline) { + config.container = element; + initialDates = stringToArray(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + var container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = stringToArray(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + var index = rangepicker.inputs.indexOf(inputField); + var datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get: function get() { + return rangepicker; + } + }); + } + + // set initial dates + this.dates = []; + // process initial value + var inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + var picker = this.picker = new Picker(this); + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + var onMousedownDocument = onClickOutside.bind(null, this); + var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]]; + registerListeners(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + return _createClass(Datepicker, [{ + key: "active", + get: + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + function get() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + }, { + key: "pickerElement", + get: function get() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + var picker = this.picker; + var newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + }, { + key: "show", + value: function show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + }, { + key: "hide", + value: function hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.hide(); + unregisterListeners(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + }, { + key: "getDate", + value: function getDate() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.config.locale); + } : function (date) { + return new Date(date); + }; + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + }, { + key: "setDate", + value: function setDate() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + var dates = [].concat(args); + var opts = {}; + var lastArg = lastItemOf(args); + if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) { + Object.assign(opts, dates.pop()); + } + var inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + _setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + }, { + key: "update", + value: function update() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline) { + return; + } + var opts = { + clear: true, + autohide: !!(options && options.autohide) + }; + var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter); + _setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + }, { + key: "refresh", + value: function refresh() { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + var mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + }, { + key: "enterEditMode", + value: function enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + }, { + key: "exitEditMode", + value: function exitEditMode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline || !this.editMode) { + return; + } + var opts = Object.assign({ + update: false + }, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700'); + if (opts.update) { + this.update(opts); + } + } + }], [{ + key: "formatDate", + value: function formatDate$1(date, format, lang) { + return formatDate(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + }, { + key: "parseDate", + value: function parseDate$1(dateStr, format, lang) { + return parseDate(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + }, { + key: "locales", + get: function get() { + return locales; + } + }]); +}(); + +// filter out the config options inapproprite to pass to Datepicker +function filterOptions(options) { + var newOpts = Object.assign({}, options); + delete newOpts.inputs; + delete newOpts.allowOneSidedRange; + delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date + + return newOpts; +} +function setupDatepicker(rangepicker, changeDateListener, el, options) { + registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]); + new Datepicker(el, options, rangepicker); +} +function onChangeDate(rangepicker, ev) { + // to prevent both datepickers trigger the other side's update each other + if (rangepicker._updating) { + return; + } + rangepicker._updating = true; + var target = ev.target; + if (target.datepicker === undefined) { + return; + } + var datepickers = rangepicker.datepickers; + var setDateOptions = { + render: false + }; + var changedSide = rangepicker.inputs.indexOf(target); + var otherSide = changedSide === 0 ? 1 : 0; + var changedDate = datepickers[changedSide].dates[0]; + var otherDate = datepickers[otherSide].dates[0]; + if (changedDate !== undefined && otherDate !== undefined) { + // if the start of the range > the end, swap them + if (changedSide === 0 && changedDate > otherDate) { + datepickers[0].setDate(otherDate, setDateOptions); + datepickers[1].setDate(changedDate, setDateOptions); + } else if (changedSide === 1 && changedDate < otherDate) { + datepickers[0].setDate(changedDate, setDateOptions); + datepickers[1].setDate(otherDate, setDateOptions); + } + } else if (!rangepicker.allowOneSidedRange) { + // to prevent the range from becoming one-sided, copy changed side's + // selection (no matter if it's empty) to the other side + if (changedDate !== undefined || otherDate !== undefined) { + setDateOptions.clear = true; + datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions); + } + } + datepickers[0].picker.update().render(); + datepickers[1].picker.update().render(); + delete rangepicker._updating; +} + +/** + * Class representing a date range picker + */ +var DateRangePicker = /*#__PURE__*/function () { + /** + * Create a date range picker + * @param {Element} element - element to bind a date range picker + * @param {Object} [options] - config options + */ + function DateRangePicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + _classCallCheck(this, DateRangePicker); + var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input')); + if (inputs.length < 2) { + return; + } + element.rangepicker = this; + this.element = element; + this.inputs = inputs.slice(0, 2); + this.allowOneSidedRange = !!options.allowOneSidedRange; + var changeDateListener = onChangeDate.bind(null, this); + var cleanOptions = filterOptions(options); + // in order for initial date setup to work right when pcicLvel > 0, + // let Datepicker constructor add the instance to the rangepicker + var datepickers = []; + Object.defineProperty(this, 'datepickers', { + get: function get() { + return datepickers; + } + }); + setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions); + setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions); + Object.freeze(datepickers); + // normalize the range if inital dates are given + if (datepickers[0].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[0] + }); + } else if (datepickers[1].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[1] + }); + } + } + + /** + * @type {Array} - selected date of the linked date pickers + */ + return _createClass(DateRangePicker, [{ + key: "dates", + get: function get() { + return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + this.allowOneSidedRange = !!options.allowOneSidedRange; + var cleanOptions = filterOptions(options); + this.datepickers[0].setOptions(cleanOptions); + this.datepickers[1].setOptions(cleanOptions); + } + + /** + * Destroy the DateRangePicker instance + * @return {DateRangePicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.datepickers[0].destroy(); + this.datepickers[1].destroy(); + unregisterListeners(this); + delete this.element.rangepicker; + } + + /** + * Get the start and end dates of the date range + * + * The method returns Date objects by default. If format string is passed, + * it returns date strings formatted in given format. + * The result array always contains 2 items (start date/end date) and + * undefined is used for unselected side. (e.g. If none is selected, + * the result will be [undefined, undefined]. If only the end date is set + * when allowOneSidedRange config option is true, [undefined, endDate] will + * be returned.) + * + * @param {String} [format] - Format string to stringify the dates + * @return {Array} - Start and end dates + */ + }, { + key: "getDates", + value: function getDates() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.datepickers[0].config.locale); + } : function (date) { + return new Date(date); + }; + return this.dates.map(function (date) { + return date === undefined ? date : callback(date); + }); + } + + /** + * Set the start and end dates of the date range + * + * The method calls datepicker.setDate() internally using each of the + * arguments in start→end order. + * + * When a clear: true option object is passed instead of a date, the method + * clears the date. + * + * If an invalid date, the same date as the current one or an option object + * without clear: true is passed, the method considers that argument as an + * "ineffective" argument because calling datepicker.setDate() with those + * values makes no changes to the date selection. + * + * When the allowOneSidedRange config option is false, passing {clear: true} + * to clear the range works only when it is done to the last effective + * argument (in other words, passed to rangeEnd or to rangeStart along with + * ineffective rangeEnd). This is because when the date range is changed, + * it gets normalized based on the last change at the end of the changing + * process. + * + * @param {Date|Number|String|Object} rangeStart - Start date of the range + * or {clear: true} to clear the date + * @param {Date|Number|String|Object} rangeEnd - End date of the range + * or {clear: true} to clear the date + */ + }, { + key: "setDates", + value: function setDates(rangeStart, rangeEnd) { + var _this$datepickers = _slicedToArray(this.datepickers, 2), + datepicker0 = _this$datepickers[0], + datepicker1 = _this$datepickers[1]; + var origDates = this.dates; + + // If range normalization runs on every change, we can't set a new range + // that starts after the end of the current range correctly because the + // normalization process swaps start↔︎end right after setting the new start + // date. To prevent this, the normalization process needs to run once after + // both of the new dates are set. + this._updating = true; + datepicker0.setDate(rangeStart); + datepicker1.setDate(rangeEnd); + delete this._updating; + if (datepicker1.dates[0] !== origDates[1]) { + onChangeDate(this, { + target: this.inputs[1] + }); + } else if (datepicker0.dates[0] !== origDates[0]) { + onChangeDate(this, { + target: this.inputs[0] + }); + } + } + }]); +}(); + +export { DateRangePicker, Datepicker }; diff --git a/node_modules/flowbite-datepicker/docs/.nojekyll b/node_modules/flowbite-datepicker/docs/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/flowbite-datepicker/docs/README.md b/node_modules/flowbite-datepicker/docs/README.md new file mode 100644 index 0000000..9ceb99c --- /dev/null +++ b/node_modules/flowbite-datepicker/docs/README.md @@ -0,0 +1,266 @@ +# Vanilla JS Datepicker + +A vanilla JavaScript remake of [bootstrap-datepicker](https://github.com/uxsolutions/bootstrap-datepicker) for [Bulma](https://bulma.io) and other CSS frameworks + +This package is written from scratch as ECMAScript modules/[Sass](https://sass-lang.com) stylesheets to reproduce similar usability to bootstrap-datepicker. +It can work either standalone or with CSS framework (e.g. [Bootstrap](https://getbootstrap.com), [Foundation](https://get.foundation)), but works best with [Bulma](https://bulma.io) as it's developed primarily for Bulma. + +The package also includes pre-built js/css files for those who like to use it directly on browser. + +##### Features + +- Date picker (input-dropdown, inline), date range picker +- Keyboard operation support (navigation by arrow keys, editing on input field) +- i18n support (locales, CSS-based text direction detection) +- Easily customizable to adapt stylesheet for various CSS frameworks +- Dependency free +- Made for modern browsers — no IE support +- Lightweight (well, relatively…) — 33kB (minified, uncompressed) + +##### Demo + +[Live Online Demo](https://raw.githack.com/mymth/vanillajs-datepicker/v1.1.4/demo/) + +## Quick Start + +Install the package using npm. + +```bash +npm install --save-dev vanillajs-datepicker +``` + +##### Date picker + +– **Input picker** + +1. create a text input element. + +```html + +``` + +2. import the `Datepicker` module. + +```javascript +import Datepicker from 'path/to/node_modules/vanillajs-datepicker/js/Datepicker.js'; +``` + +_Or if you use a bundler that supports [pkg.module](https://github.com/rollup/rollup/wiki/pkg.module) (e.g. [Rollup](https://rollupjs.org/) with [node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve) plugin, [webpack](https://webpack.js.org/))_ + +```javascript +import { Datepicker } from 'vanillajs-datepicker'; +``` + +_Or if your bundler supports [package entry points](https://nodejs.org/api/packages.html#packages_package_entry_points) (e.g. Rollup with node-resolve plugin v8.4+, webpack v5+), you can also do this._ + +```javascript +import Datepicker from 'vanillajs-datepicker/Datepicker'; +``` + +3. call `Datepicker` constructor with the input element and, optionally, [config options](options). + +```javascript +const elem = document.querySelector('input[name="foo"]'); +const datepicker = new Datepicker(elem, { + // ...options +}); +``` + +![](./images/datepicker.jpg) + + +– **Inline picker** + +1. create a block element. + +```html +
+``` + +2. import the `Datepicker` module in the same way as Input picker. + + +3. call `Datepicker` constructor with the block element and, optionally, [config options](options). + +```javascript +const elem = document.getElementById('foo'); +const datepicker = new Datepicker(elem, { + // ...options +}); +``` + +![](./images/datepicker-inline.jpg) + + +##### Date range picker + +1. create a block element that contains 2 text input elements. + +```html +
+ + to + +
+``` + +2. import the `DateRangePicker` module. + +```javascript +import DateRangePicker from 'path/to/node_modules/vanillajs-datepicker/js/DateRangePicker.js'; +``` + +_Or if you use a bundler that supports [pkg.module](https://github.com/rollup/rollup/wiki/pkg.module) (e.g. [Rollup](https://rollupjs.org/) with [node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve) plugin, [webpack](https://webpack.js.org/))_ + +```javascript +import { DateRangePicker } from 'vanillajs-datepicker'; +``` + +_Or if your bundler supports [package entry points](https://nodejs.org/api/packages.html#packages_package_entry_points) (e.g. Rollup with node-resolve plugin v8.4+, webpack v5+), you can also do this._ + +```javascript +import DateRangePicker from 'vanillajs-datepicker/DateRangePicker'; +``` + +3. call `DateRangePicker` constructor with the block element and, optionally, [config options](options). + +```javascript +const elem = document.getElementById('foo'); +const rangepicker = new DateRangePicker(elem, { + // ...options +}); +``` + +![](./images/rangepicker.jpg) + +##### Stylesheet + +1. import scss file. + +```scss +@import 'path/to/node_modules/vanillajs-datepicker/sass/datepicker'; +``` + +### Using with CSS framework + +#### Bulma + +1. import scss file for Bulma instead. + +```scss +@import 'path/to/node_modules/vanillajs-datepicker/sass/datepicker-bulma'; +``` + +#### Bootstrap + +1. use `buttonClass: 'btn'` option to call `Datepicker`/`DateRangePicker` constructor. + +```javascript +const datepicker = new Datepicker(elem, { + buttonClass: 'btn', +}); +``` + +2. import scss file for Bootstrap instead. + +```scss +@import 'path/to/node_modules/vanillajs-datepicker/sass/datepicker-bs4'; +``` + +#### Foundation + +1. import scss file for Foundation instead. + +```scss +@import 'path/to/node_modules/vanillajs-datepicker/sass/datepicker-foundation'; +``` + +#### Other frameworks + + 1. If the framework uses a specific class for button elements, set it to the `buttonClass` option to call `Datepicker`/`DateRangePicker` constructor. + +```javascript +const datepicker = new Datepicker(elem, { + buttonClass: 'uk-button', +}); +``` + +2. Copy the following template into your sass stylesheet, and edit the node_module path, the variables, button class and button style adjustments to match your environment. + +```scss +/*** + Copy the datepicker variables (the ones with `dp-` prefix and `!default` flag) + from `sass/Datepicker.scss` to here + Then, edit them using your framework's variables/values + e.g.: + $dp-background-color: $background !default; + $dp-border-color: $border !default; + ... + ***/ + +@import '../node_modules/vanillajs-datepicker/sass/mixins'; + +@mixin dp-button { + .button { + /*** + Place style adjustment for date picker's buttons here, if needed + ***/ + + .datepicker-header & { + @include dp-header-button-common; + + /*** + Place style adjustment specific to the header buttons here, if needed + ***/ + } + + .datepicker-footer & { + @include dp-footer-button-common; + + /*** + Place style adjustment specific to the footer buttons here, if needed + ***/ + } + } +} + +@import '../node_modules/vanillajs-datepicker/sass/datepicker'; +``` + +### Using from Browser + +1. From CDN, load css and js files. + +```html + + +... + + +``` + +_If you use Bulma, Bootstrap or Foundation, you can use the css for your framework instead._ + +```html + + + + + +``` + +_And if don't need date range, you can use the datepicker-only version of js file._ + +```html + +``` + +2. Call `Datepicker`/`DateRangePicker` constructor in the same way as explained [above](?id=quick-start). (The classes are exposed to global scope.) + +```javascript +const elem = document.querySelector('input[name="foo"]'); +const datepicker = new Datepicker(elem, { + // ...options +}); +``` + diff --git a/node_modules/flowbite-datepicker/docs/_sidebar.md b/node_modules/flowbite-datepicker/docs/_sidebar.md new file mode 100644 index 0000000..a691bce --- /dev/null +++ b/node_modules/flowbite-datepicker/docs/_sidebar.md @@ -0,0 +1,6 @@ +* [Home](/) +* [Overview](overview.md) +* [Options](options.md) +* [API](api.md) +* [Date String & Format](date-string+format.md) +* [i18n](i18n.md) diff --git a/node_modules/flowbite-datepicker/docs/api.md b/node_modules/flowbite-datepicker/docs/api.md new file mode 100644 index 0000000..057a4b4 --- /dev/null +++ b/node_modules/flowbite-datepicker/docs/api.md @@ -0,0 +1,284 @@ +# API + +## Datepicker + +### Static Properties + +#### Datepicker.locales +- Type: `Object` + +Installed locales in `[languageCode]: localeObject` format. `en`:_English (US)_ is pre-installed. + +> See [i18n](i18n) for the details. + +### Static Methods + +#### Datepicker.formatDate() + +Format a Date object or a time value using given format and language + +```javascript +Datepicker.formatDate( date , format [, lang ] ) +``` +- **Arguments:** + - `date`: {`Date`|`Number`} - Date or time value to format + - `format`: {`String`|`Object`} - Format string or object that contains `toDisplay()` custom formatter + See [Options ≻ format](options?id=format) + - [`lang`] : {`String`} - Language code for the locale to use + – Default: `'en'` +- **Return:** + - {`String`} - Formatted date + +#### Datepicker.parseDate() + +Parse date string (or Date/time value) using given format and language + +```javascript +Datepicker.parseDate( dateStr , format [, lang ] ) +``` +- **Arguments:** + - `dateStr`: {`String`|`Date`|`Number`} - Date string, Date object or time value to parse + - `format`: {`String`|`Object`} - Format string or object that contains `toValue()` custom parser + See [Options ≻ format](options?id=format) + - [`lang`] : {`String`} - Language code for the locale to use + – Default: `'en'` +- **Return:** + - {`Number`} - Time value of parsed date + + +### Instance Properties + +#### datepicker.active +- Type: `Boolean` + +Whether the picker element is shown +(Read-only) + +#### datepicker.pickerElement +- Type: `HTMLDivElement` + +DOM object of picker element +(Read-only) + +#### datepicker.rangepicker +- Type: `DateRangePicker` + +DateRangePicker instance that the datepicker belongs to +Only avalable when the datepicker is a part of date range picker +(Read-only) + + +### Instance Methods + +#### datepicker.destroy() + +Destroy the Datepicker instance + +```javascript +datepicker.destroy() +``` +- **Return:** + - {`Detepicker`} - The instance destroyed + +#### datepicker.getDate() + +Get selected date(s) + +The method returns a Date object of selected date by default, and returns an array of selected dates in multidate mode. If format string is passed, it returns date string(s) formatted in given format. + +```javascript +datepicker.getDate( [ format ] ) +``` +- **Arguments:** + - [`format`] : {`String`} - Format string to stringify the date(s) +- **Return:** + - {`Date`|`String`} - Selected date (or `undefined` if none is selected) + - {`Date[]`|`String[]`} - Array of selected dates (or empty array if none is selected) + +#### datepicker.hide() + +Hide the picker element +Not available on inline picker + +```javascript +datepicker.hide() +``` + +#### datepicker.refresh() + +Refresh the picker element and the associated input field + +```javascript +datepicker.refresh( [ target ], [ forceRender ] ) +``` +- **Arguments:** + - [`target`] : {`String`} - Target item when refreshing one item only. `'picker'` or `'input'` + - [`forceRender`] : {`Boolean`} - Whether to re-render the picker element regardless of its state instead of optimized refresh + – Default: `'false'` + +#### datepicker.setDate() + +Set selected date(s) + +In multidate mode, you can pass multiple dates as a series of arguments or an array. (Since each date is parsed individually, the type of the dates doesn't have to be the same.) +The given dates are used to toggle the select status of each date. The number of selected dates is kept from exceeding the length set to `maxNumberOfDates`. See [Multidate Mode](overview?id=multidate-mode) for more details. + +With `clear: true` option, the method can be used to clear the selection and to replace the selection instead of toggling in multidate mode. If the option is passed with no date arguments or an empty dates array, it works as "clear" (clear the selection then set nothing), and if the option is passed with new dates to select, it works as "replace" (clear the selection then set the given dates) + +When `render: false` option is used, the method omits re-rendering the picker element. In this case, you need to call [`refresh()`](api?id=datepickerrefresh) method later in order for the picker element to reflect the changes. The input field is refreshed always regardless of this option. + +When invalid (unparsable, repeated, disabled or out-of-range) dates are passed, the method ignores them and applies only valid ones. In the case that all the given dates are invalid, which is distinguished from passing no dates, the method considers it as an error and leaves the selection untouched. + +```javascript +datepicker.setDate( date1 [, date2 [, ... dateN ]][, options ] ) +datepicker.setDate( dates [, options ] ) +datepicker.setDate( [ options ] ) +``` +- **Arguments:** + - [`...dates`] : {...(`String`|`Date`|`Number`)|`Array`} - Date strings, Date objects, time values or mix of those for new selection + - [`options`] : {`Object`} - Function options: + - `clear`: {`Boolean`} - Whether to clear the existing selection + – Default: `false` + - `render`: {`Boolean`} - Whether to re-render the picker element + – Default: `true` + - `autohide`: {`Boolean`} - Whether to hide the picker element after re-render + Ignored when used with `render: false` + – Default: the value of `autohide` config option + +#### datepicker.setOptions() + +Set new values to the config options + +```javascript +datepicker.setOptions( options ) +``` +- **Arguments:** + - `options`: {`Object`} - Config options to update + +#### datepicker.show() + +Show the picker element + +```javascript +datepicker.show() +``` + +#### datepicker.update() + +Update the selected date(s) with input field's value +Not available on inline picker + +The input field will be refreshed with properly formatted date string. + +```javascript +datepicker.update( [ options ] ) +``` +- **Arguments:** + - [`options`] : {`Object`} - Function options: + - `autohide`: {`Boolean`} - Whether to hide the picker element after update + – Default: `false` + + +### Events + +All Datepicker-event objects are `CustomEvent` instances and dispatched to the associated `` element (for inline picker, the block element). +They include the following extra data in the `detail` property. + +- `date`: {`Date`} - Selected date(s) (see [getDate()](api?id=datepickergetdate)) +- `viewDate`: {`Date`} - Focused date +- `viewId`: {`Number`} - ID of the current view +- `datepicker`: {`Datepicker`} - Datepicker instance + +#### changeDate + +Fired when the selected dates are changed. + +#### changeMonth + +Fired when the focused date is changed to a different month's date. + +#### changeView + +Fired when the current view is changed. + +#### changeYear + +Fired when the focused date is changed to a different year's date. + +#### hide + +Fired when the date picker becomes hidden. + +#### show + +Fired when the date picker becomes visible. + + +## DateRangePicker + +### Instance Properties + +#### rangepicker.datepickers +- Type: `Array` + +Array of associated Datepicker instances +(Read-only) + + +### Instance Methods + +#### rangepicker.destroy() + +Destroy the DateRangePicker instance + +```javascript +rangepicker.destroy() +``` +- **Return:** + - {`DateRangePicker`} - The instance destroyed + +#### rangepicker.getDates() + +Get the start and end dates of the date-range + +The method returns Date objects by default. If format string is passed, it returns date strings formatted in given format. +The result array always contains 2 items (start date/end date) and `undefined` is used for unselected side. (e.g. If none is selected, the result will be `[undefined, undefined]`. If only the end date is set when `allowOneSidedRange` config option is `true`, `[undefined, endDate]` will be returned.) + +```javascript +rangepicker.getDates( [ format ] ) +``` +- **Arguments:** + - [`format`] : {`String`} - Format string to stringify the dates +- **Return:** + - {`Date[]`|`String[]`} - Start and end dates + +#### rangepicker.setDates() + +Set the start and end dates of the date range + +The method calls [`datepicker.setDate()`](api?id=datepickersetdate) internally using each of the arguments in start→end order. + +When a `clear: true` option object is passed instead of a date, the method clears the date. + +If an invalid date, the same date as the current one or an option object without `clear: true` is passed, the method considers that argument as an "ineffective" argument because calling [`datepicker.setDate()`](api?id=datepickersetdate) with those values makes no changes to the date selection. + +When the [`allowOneSidedRange`](options?id=allowonesidedrange) config option is `false`, passing `{clear: true}` to clear the range works only when it is done to the last effective argument (in other words, passed to `rangeEnd` or to `rangeStart` along with ineffective `rangeEnd`). This is because when the date range is changed, it gets normalized based on the last change at the end of the changing process. + +```javascript +rangepicker.setDates( rangeStart , rangeEnd ) +``` +- **Arguments:** + - `rangeStart` : {`Date`|`Number`|`String)`|`Object`} - Start date of the range or `{clear: true}` to clear the date + - `rangeEnd` : {`Date`|`Number`|`String)`|`Object`} - End date of the range or `{clear: true}` to clear the date + +#### rangepicker.setOptions() + +Set new values to the config options + +```javascript +rangepicker.setOptions( options ) +``` +- **Arguments:** + - `options`: {`Object`} - Config options to update + + diff --git a/node_modules/flowbite-datepicker/docs/date-string+format.md b/node_modules/flowbite-datepicker/docs/date-string+format.md new file mode 100644 index 0000000..9f68f41 --- /dev/null +++ b/node_modules/flowbite-datepicker/docs/date-string+format.md @@ -0,0 +1,90 @@ +# Date String & Format + +## Date format + +Date format must be declared using the combination of the predefined tokens and separators. + +**– Tokens:** + +Token | Description | Example +--|--|-- +`d` | day of the month without leading zero | 1, 2, ..., 31 +`dd` | day of the month with leading zero | 01, 02, ..., 31 +`D` | shortened day name of the week | Sum, Mon, ..., Sat +`DD` | full day name of the week | Sunday, Monday, ..., Saturday +`m` | numeric month without leading zero | 1, 2, ..., 12 +`mm` | numeric month with leading zero | 01, 02, ..., 12 +`M` | shortened month name | Jan, Feb, ..., Dec +`MM` | full month name | January, February, ..., December +`y` | year without leading zero | 1, 645, 1900, 2020 +`yy` | 2-digit year with leading zero | 01, 45, 00, 20 +`yyyy` | 4-digit year with leading zero | 0001, 0645, 1900, 2020 + +**– Separators:** + +All printable ASCII characters other than numbers and alphabets, `年`, `月` and `日` + +**Notes** + +- Since the built-in parser extracts the parts of the date by splitting the string with the separators, formats without separators (e.g. `yyyymmdd`) are not supported. +- 2-digit year (`yy`) is only supported by the built-in formatter; the built-in parser doesn't. + +> You can write your custom parser/formatter to handle arbitrary format including the above. See [`format` config option](options?id=format) for the details. + +- Date format must not include the string set in the [`dateDelimiter`](options?id=datedelimiter) config option. + +## Date string + +Date strings are expected to be formatted in the date format set in the [`format`](options?id=format) config option (default: `mm/dd/yyyy`), but it isn't necessary to match the format strictly. + +##### How Built-in Parser parses + +The built-in parser uses the format string only to determine the sequence in which the date parts (year/month/day/day-of-the-week) and separators appear in the date string. The differences in separator characters, whether to have leading zeros and whether month name (full or short) or month number is used are ignored. Therefore, as long as the parts of a date string appear in the same order as the format's, the variations of the same date's date string are equally parsed to the same date. + +There are some cases the parser treats the parts in specific way: +- year is treated as full year _(1-/2-digit years are not mapped to nearby century's)_ +- month number not between 1 and 12 is treated in the similar way to [`Date.prototype.setMonth()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth) +- month name is evaluated in case-insensitive begin-with match +- day not between 1 and last-day-of-the-month is treated in the same way as [`Date.prototype.setDate()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setDate) +- day-of-the-week is not evaluated _(not totally ignored, the existence is respected)_ +- if a part is omitted from the format, missing in the date string or parsed unsuccessfully, current date's value is used to complement. + +Here are some examples of how irregular date strings are parsed. + +- Different separators from the format: + - if format is `yyyy-mm-dd`, `2020/04/22` ⟹ _April 22nd, 2020_ + - if format is `m.d.y`, `1/15 (2018)` ⟹ _January 15th, 2018_ +- With/without leading zeros: + - if format is `d/m/y`, `05/06/07` ⟹ _June 5th, 0007_ + - if format is `yyyy-mm-dd`, `20-5-4` ⟹ _May 4th, 0020_ +- Number for the month name: + - if format is `M-d-y`, `7-14-2020` ⟹ _July 14th, 2020_ +- Incomplete month name/full name for short name: + - if format is `M-d-y`, + - `ap-22-2020` ⟹ _April 22nd, 2020_ + - `sept-22-2020` ⟹ _September 22nd, 2020_ + - `Ju-4-2020` ⟹ _June 4th, 2020_ + - `July-4-2020` ⟹ _July 4th, 2020_ +- Month/day outside the normal range: + - if format is `mm/dd/yyyy`, + - `14/31/2019` ⟹ _March 2nd, 2020_ + - `0/0/2020` ⟹ _November 30th, 2019_ +- Omitted/missing/invalid parts: + - if format is `mm/yyyy` and current date is _January 15th, 2020_, + - `04/2022` ⟹ _April 15th, 2022_ + - if format is `m/d/y` and current date is _January 15th, 2020_, + - `4/22` ⟹ _April 22nd, 2020_ + - `/22/2016` ⟹ _January 22nd, 2016_ + - `7/xx/2016` ⟹ _July 15th, 2016_ +- Day-of-the-week: + - if format is `D m/d y` and current date is _January 15th, 2020_, + - `xx 5/4 2022` ⟹ _May 4th, 2022_ + - `5/4 2022` ⟹ _October 13th, 2025 (= April 2022nd, 2020)_ + +##### 'Today' shortcut + +You can use `'today'` as a shortcut to the current date. + +##### Multiple dates + +You can combine multiple dates into a single date string by joining the dates with the delimiter set in the [dateDelimiter](options?id=datedelimiter) config option. diff --git a/node_modules/flowbite-datepicker/docs/i18n.md b/node_modules/flowbite-datepicker/docs/i18n.md new file mode 100644 index 0000000..4ee6f4b --- /dev/null +++ b/node_modules/flowbite-datepicker/docs/i18n.md @@ -0,0 +1,99 @@ +# Internationalization (i18n) + +Internationalization of Datepicker is done by adding languages' locales (month and day names, button labels, date format and start of the week) to `Datepicker.locales`. +`en`:_English (US)_ is the pre-installed default language and also used as the fallback language. + +> The package includes locale files taken from [bootstrap-datepicker](https://github.com/uxsolutions/bootstrap-datepicker). + +## Adding languages + +Import the ones you need and merge them with `Datepicker.locales`. + +```javascript +import Datepicker from 'path/to/node_modules/vanillajs-datepicker/js/Datepicker.js'; +import es from 'path/to/node_modules/vanillajs-datepicker/js/i18n/locales/es.js'; +import fr from 'path/to/node_modules/vanillajs-datepicker/js/i18n/locales/fr.js'; +import zhCN from 'path/to/node_modules/vanillajs-datepicker/js/i18n/locales/zh-CN.js'; + +Object.assign(Datepicker.locales, es, fr, zhCN); +``` + +_Or if you use a bundler that supports [package entry points](https://nodejs.org/api/packages.html#packages_package_entry_points) (e.g. [Rollup](https://rollupjs.org/) with [node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve) plugin v8.4+, [webpack](https://webpack.js.org/) v5+)_ + +```javascript +import Datepicker from 'vanillajs-datepicker/Datepicker'; +import es from 'vanillajs-datepicker/locales/es'; +import fr from 'vanillajs-datepicker/locales/fr'; +import zhCN from 'vanillajs-datepicker/locales/zh-CN'; + +Object.assign(Datepicker.locales, es, fr, zhCN); +``` + +##### for browser + +Load the locale files you need after Datepicker + +```html + + + + +``` + +### Custom locale + +If needed, you can create your custom locale file by modifying the following template. + +```javascript +/** + * English translation + */ +export default { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y", + format: "mm/dd/yyyy", + weekStart: 0 + } +}; +``` +> You can omit properties that can fallback to `en`:_English (US)_. +> +> **for browser:** +> ```javascript +> /** +> * English translation +> */ +> (function () { +> Datepicker.locales.en = { +> //... same properties as the above +> } +> })(); +> ``` + + +Locale must be named with language code. The code can be arbitrary, but should comply with [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag). + + +## Text Direction + +Text direction handling of Datepicker is mainly done by stylesheet and completely separated from its language configuration. + +The picker element is styled to follow the container element's text direction. If the direction of the associated input field is different from it, date picker automatically detects the difference and sets the picker element's `dir` attribute so that the direction matches the input field's. + +> **When customizing the prev/next button** +> +> The default of the prev/next button arrows are a pair of a parenthesis variant, which automatically flip according to text direction. If you customize the arrows with something other than parenthesis characters, you may need to add a style like below to your project's CSS in order for the arrows to flip automatically. +> +> ```css +> [dir="rtl"] .datepicker-controls .prev-btn, +> [dir="rtl"] .datepicker-controls .next-btn { +> transform: scaleX(-1); +> } +>``` diff --git a/node_modules/flowbite-datepicker/docs/images/datepicker-inline.jpg b/node_modules/flowbite-datepicker/docs/images/datepicker-inline.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4a2c505757aba81df939d6cc1c1999058c2b0353 GIT binary patch literal 10357 zcmch7by!?Ix9EAH+-6ff>BMO&b_OL2EA4sD^7_VB*% zcfR|b|IYp6-nE}6YbDuhCBN(>E6L8Er9WE$9GJY4JOBs;0u-Mfz@Jq>7ytqSgTWxk zQviWLkWnyDQJx6<*)uc@Tx>i%Tx?uid?E^Bd;&5;TwD@b5;96kYHDhHVmc@t6_kRC znhN-&hJuWOg^G$rMSx2{^?yx&J_B%3fm}cm5D*uDgbM`W0{`>_C;&hJ66mk0{+l4k zATSCN5cSUr0QH~r$Mk<^{v~jmu0TYs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l58h1ydZ^Eu96*eALG!%yALmUI5&!@I literal 0 HcmV?d00001 diff --git a/node_modules/flowbite-datepicker/docs/images/multidate.jpg b/node_modules/flowbite-datepicker/docs/images/multidate.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3d20ce3ea59794a36f9a2d1389a5436ee7a4785a GIT binary patch literal 24666 zcmeFZ2UJu|)-HUy8)$Myat1+i&KXG}f+$&X&N-(B6_hBTpeR8B0TGa#K_#h3PD;)> zG)NB3J>aYJe)GLEbLaclzwWy0PP4kt?mBglxfu2u9%g@8d3rNZOxtUu!T6-~ASlimW zNHcBLH8C;RTS+tN32X3axG7rO*{cS4SlFevu<15JH>S4>vFD@?5%O}7qAixdg;P&))@iO=0cJXBXRl-$kPfHJbH!piv z7l!i^%`IHLy`-7InlDsxvvc)w^|W(!`(5~dvB2-!7k2pd5ZJ1}&i>0_f6Az#@z1k5 zJD*$OLKjajB_B|=f7TP8xBcC$d9|%QUA;Xlt(APNUA&l?7=CLhq3G)5>Y?FkWi8Dl z_~&#rMMW(SR~vgL@WxepPd6uX|MObiB*47(HvU)5y}%pigNU1-pPOIk_OC(2%_l6u z$M;88u*a;-z0Chr=JSqscGJ+1P__5;a`o{4qbqM&yZ<3M*)v=;Rl?lzyj!H1+&o;Z zye+M*nEpujbhYvFHTSTVw*}iL%_MJQWA9?`<Z`btbr~MuDQ8~ zEdbygfawfAmbPFyxS%Hj@VQvogB}g;xfdg2X=iQ)$`3%9%h}oWTrLM?c8foiWBVuB z+}z@KndauUzvZ880iOgb{sZk^d^!IPTm|d_Prwau0?YybU&;U9ug*^1p#3ghOyDQ3 zorkLS`4zNbo};V!Z`sA-hUTwyd$5JSWIJzFonNx0ry^+EpU+yEUseAldpqjL|B}r; zK_FihYf5{%M+P}+pak_CnUM_U7vsU{pTYD>{+;e%e(iiLU*vc5()w*5Kmhzx0^|W< zK+wzD4;+U8py=x6?_qCi=fxoJ=H_J0pyp!9!*%XohyuX*JUq_>06)H6%rD3#%)h0% zApk%EY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FE=W#NfYA6(+f_SislqxwTr?=+-6AS?O)6ZWF#H0hf_&1%_8j#boE$jHvX0-J7!` zYpxjNJl%NAS(9Dfi(%ozSm5;8*13M~-iPhl-S_ayg2|_UZZMp7YcVh!WlcdNGVGEo zGv_JqzWmOFebeQCr)_TjF7Z>oHG6ygYUcMJuUou#knPb>ZdGQP&?Te*hF&ngk06z9&mJ2pmg+AXm=6Pj3+l r;lQ|6-oqZWhldVRw~FEf#RDfXp}&C{eLYlu|*T{r{T)WyJsq literal 0 HcmV?d00001 diff --git a/node_modules/flowbite-datepicker/docs/images/picker-structure.jpg b/node_modules/flowbite-datepicker/docs/images/picker-structure.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f1eaeea607f73ad56bc73bd83ad12cd955276219 GIT binary patch literal 21964 zcmeFYbChMxwlBETsI*mS+qP}nwr$(Cv(i~<+qNrJ$x7Ru-*?VE@0{-YdfXnP|9or5 z2>xP5?73pjm=P=DbMkBEqjhJ%ibf`y8Rh(UmX_5C{@9v(6}Au%B?F%B*sF3?vs2yh5E zNJuzb6hsu<|Ig27KL8ODs0~ON1PBoTj0gmR2=qA!zySaOfI

c1W^a1c-kAYjPP zbpYf)^3QX;aUE-_0DzGhPIgG>S_u@bSzeA$fDiy+lz)ehIO{rxmuHNyfDeGQi2rg* zw*2#94gP?y5M?8tq6PoU0ibP0!Glf0Q8vO+Cei^gE?V}`Hj{WLTC)5~HMssjs&&@> zWxA|FD8^vLh?=)$yzRRiV^}ho??s6qvE6+0`86fdpCidRVT9ZilR&u(;JsHc}F%e5;yyY#lD;l)9-m);n*80#_cTTMr&_ zsGpwq_;?1+5>KRDPzmEUHphY8$|{mCMhlPcLg5%57Yx+|LThdRdc%TV%ozHA_`hP1 znBQjy;28?)+m9UGkaO<{foTt)58lnIj<>KnYin`(XHwPN=~t@Qf10R}kc?8ySCdgc z73o2LG?m1rcu>A_v@{REI?n$^G-P`dhJIn^D+b-Ud}R=vJ(5I8rrLXx;f&ufNws=V zyp(7C;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9jg@;!IsM#}jd7fZ?frbUFHEpHem?p|^vhlB= zwMg#pr;$&^4zVIX+qaE3Gip?ocjX?2IQW9T%#dH^6Hy@AP#ajhDn zf@I2f0cqqfx_H#Gem4NjaB3KWH*CV^OVfj(c)1J-FLpU$q>OnV&Km ziTN=&POlDU)ND|-Sh|sWmJ#k3Xy`E1iEODAV*=HiFjJefNv>6U^R*V;CRbwmfqQPy zlwtk7{+g^C%i`DW$3eXla{}c4CQlvQEyC z2gq#$S7*apsa;q~uAOa^<|Z$kSk8;<(MRXXI1ZS%Yv+$$XNj zjkuetj|`qxjZlRyM(p}V`3t>PWSkq-PSa@APgI%iCy;*Oh;kaJkpBL}_wQ|s~i+vOHk z@f~2(SB+E1pj8P`vo9>q@W`wu!1tJg#qu+Zcwu8W{Evs0d~;OqU=EptW2aQ1ZX_6x zAV9t(bx|e)L+8^I_uHDq6!sB#WvzEB@v?04cRf8dVEK!=J6ba zBBX3-zJNzs6*z8+fOH}UhL_5Nq*GBS6CdoIlYWn zV4UxgCnbfLU6w}-!&3(sC$3#@bZsjBFee{L+vqgOguOs z6G!9UEHlBRJr1(qExo{CZg*jZbVq zO@Cb?8Pa(E)GyGNPK8$|@ArQp)$%PW{tKLbr}OzMv`C+`ZVf^E|Aw%1gvwQDkK(uX zW@7#$%YwI+dO5G`e+%>bT@f!bxAiNeTi}LWe@o9wMdYYWs-)HT zPptl-L3fM2Hk?{B2S;aC^@<_&8a)+tUTqW@Wsd0@B|3>ef$MVikFbb zcawHw$1+gy>EC{V#7%Q1)XfrIz+(qT^7FhZ5ogaO|Cw4cK;hAOc<9QG2*Pj;LThDJ osL1-8!z{@Eze<|2UV}iO=6_1>v9alZ5I6oG4HoD5x5m@|0=>>$tN;K2 literal 0 HcmV?d00001 diff --git a/node_modules/flowbite-datepicker/docs/images/rangepicker.jpg b/node_modules/flowbite-datepicker/docs/images/rangepicker.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2470cc76df7be7613d7d9f5ca4b70e9d4d312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yJz#0kD>hMi*<)ZiBz<5aQ{(GO83v7l6Whu+ z`r@rfCe9`5@?A5H0}s3Mn!a@F;}Qo4iA_XNFolS~S@z0})}tD=ayD4mt6 zeZ-WqtS*p2&%N|L5iy@2nwVA^!B1pPbh%8!<_+C@*r|TX&HUjC^3iD)@U~Aq|!1J=0(lgRKcxFWb5e%mlqFw5!sgy-Svtn{KIFZGaeL)Ke ztpd>Y0Jy1qw;qo&R_@2KHEfD_iHuV4yIQQoNb=}CFXNdQ6kSPmT#Hk@U+?%S*CGO7 z(_ZU`t!yi;^YZ0jjl}qBSRV}5K$DLCsp&k_ciX`_`FljP(f7%*A_gWLSwbqTVQHF# zq))pt$9G!NvSzN`PYZ*^;lZ@mc9!GPWE_l3eWOtkXtBiBHaBWX{RD`pD(O{}HIU8# zIFgNX7^7)wR}f(j7!?n|1AudFU2mgXO9|ida=8VLE{NUa(mlY3V4ymu5zq2=5lQb% zlLw7f6Z3eW#LkVuO25!T6UY?b_e`Agr9sptRou$?7qBXR=_|~HtwVcV7WmD@KK-B) z*K4ZFuDMa}hdN5z&NBDn|Gg%~(A!D(1pQx|&)9$a2;w1@06@;4yW}8{Fn}!lZ+bj@ KKk-M8x&Hv;c%jt* literal 0 HcmV?d00001 diff --git a/node_modules/flowbite-datepicker/docs/images/view-months.jpg b/node_modules/flowbite-datepicker/docs/images/view-months.jpg new file mode 100644 index 0000000000000000000000000000000000000000..23e050830fb2208b58396b60e884c08c6db7e00d GIT binary patch literal 6443 zcmd5>2T)Vpwmu072}K~3&>=uXk=}cij!F}dCLNW~k)nV=qzlp^qI5w@DAJpV^sXXC zdJ{xxN>c%W7rgiW|DCz_-B)Jro43!*n%V2@ea4MN(!Td!-$QVf`W_^K}}1Gphh6*kZg=}^ehYr1QQn%3p+a} zCnp^vH=3IR&BnpW0U}O=k;16pa4HUZ1U<+9xSezW2sj7|f{=g^02l!xL4Z!W05$*w zfJshG{i8vkU=mUo2!1jN!2hB@ioy}^GBt!kJeqD)1^^nbL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z7-&5A;MPSNM+1xPOte%xUa6H-Jpt^YUpcsPs0?5Oco{dZ#9U_ty4X3In{4Z;@71=3 zt7@$Yqz0-MtO!96T71MInQzrUSLzkIn8Tf%1_V@z5~C?X}!v>a;LE#hjF>1!v2H>#2^BjDG-NE)9M z@s|TbGJfSzLS6{5t{8OAWNSX&+C)ltJWkkh6Bj^E*~g_hy|T!XR^QNpbOQ20u7m2u zVL(^EGV6zlmtGHYRo&mz4vDfRZ$R2t7AA;!y%)7~MBV?NLnJ3xo$zO&NSG%EF{g?M zo!=sR%AbTmNmDi$+DK8k$JRSS1dpLSZe^z>OnEkH@Dw)aIHvdp*02Sh;I)Mfx7y5V zw@0-lX38)zzV9|Vd>BBPJS6I-hrqZFXGRb zkEXg^Sk*=jSodXIF!xS^1w_*e{?Mr9U9+ZGdj^UsOUN*LrdL{i5Kc=124U3?#-7&| zjZL=^R1DCi(!Q|?ySSLbpU48$gTVBw(p2tnC$Cfv+ln1Yk4uDyY1U#_*oPj+kb?Ti zl2s9~nmi2tJL!d>R}gnNiYBNVbDe<9p>4`$;qwO)Dd=c}{LAh}Sj#oJ_CbW{DB~8g zm6Gai?wuEOS(jy6zAzLX|M091D~loMDjc|{q(xg1hq`~HTCTC?{FdCwa2nO*1)*9K zUE;+o{4mtaLwfbeNr)tq2#COlRhqb+589=*G?h8BMppZI(5UVkgyP*T&rg8S>wZ}2 zLY}B#7Fe+MbSR3M)zul|B3y85cL>czlQ)k3aZy}r-q5Rqt!Vz*lYvtF>kU9_FfS0L zSiR84z1*-xlImS$kU4+???sco}j+?wJL^r9jlXXp!m$&xX?nrEA7 z2y*5vBbDJySjEw4&00U*oc<=RJOYAIu?y18jh8no=mN{aXIK9noxGce#XGz&Pe17* f{_c;#DXju>|MKk_1X2dz%Ku^n@n^&D5flFbc4a3G literal 0 HcmV?d00001 diff --git a/node_modules/flowbite-datepicker/docs/images/view-years.jpg b/node_modules/flowbite-datepicker/docs/images/view-years.jpg new file mode 100644 index 0000000000000000000000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EeM%9eV?i$3+nPv+=a;Iv#|_FofT_ zQp$OO^U=2YrGMDEzscR>J5@(k7@%!vei3~6^B?09zdbybpjU;ybUN&h?tVju{_TGq dze&peee**CfusP)U7X}U8*zJm{5@j+KLA*Dk#GP2 literal 0 HcmV?d00001 diff --git a/node_modules/flowbite-datepicker/docs/index.html b/node_modules/flowbite-datepicker/docs/index.html new file mode 100644 index 0000000..d1dd910 --- /dev/null +++ b/node_modules/flowbite-datepicker/docs/index.html @@ -0,0 +1,26 @@ + + + + + vannilajs-datepicker - Vanilla JS datepicker for Bulma and other CSS frameworks + + + + + + +
+ + + + + + diff --git a/node_modules/flowbite-datepicker/docs/options.md b/node_modules/flowbite-datepicker/docs/options.md new file mode 100644 index 0000000..196fa9d --- /dev/null +++ b/node_modules/flowbite-datepicker/docs/options.md @@ -0,0 +1,354 @@ +# Options + +There are 2 kinds of config options: the Datepicker options and the DateRangePicker options. The former are for `DatePicker` object and the latter are for `DateRangePicker` object. + +Datepicker options can be used with date range picker. And when doing so, you can pass them mixing with DateRangePicker options into one "options" object. + +> Datepicker options passed to date range picker are applied to its start- and end-date pickers. + +Aside from a couple of exceptions, config options can be updated dynamically using the `setOptions()` method. + +### Datepicker Options + +#### autohide +- Type: `Boolean` +- Default: `false` + +Whether to hide the date picker immediately after a date is selected. + +> Not available on inline picker. + +#### beforeShowDay +- Type: `Function` +- Default: `null` + +Function to customize the day cells in the days view. The function is called when each day cell is rendered. + +- **function** + - Arguments: + - `date`: {`Date`} - Date associated with the cell + - Return: + - {`Object`} - Things to customize. Available properties are: + - `enabled`: {`Boolean`} - whether the cell is selectable + - `classes`: {`String`} - space-separated additional CSS classes for the cell element + - `content`: {`String`} - HTML for the cell element's child nodes + - {`String`} - additional classes — same as returning `{ classes: additionalClasses }` + - {`Boolean`} - whether the cell is selectable — same as returning `{ enabled: isSelectable }` + +```javascript +function (date) { + let isSelectable, additionalClasses, htmlFragment; + //...your customization logic + + return { + enabled: isSelectable, + classes: additionalClasses, + content: htmlFragment, + }; + // Or + return additionalClasses; + // Or + return isSelectable; +} +``` + +#### beforeShowDecade +- Type: `Function` +- Default: `null` + +Function to customize the decade cells in the decades view. The function is called when each decade cell is rendered. +> See [`beforeShowDay`](#beforeShowDay) for the function details. + +#### beforeShowMonth +- Type: `Function` +- Default: `null` + +Function to customize the month cells in the months view. The function is called when each month cell is rendered. +> See [`beforeShowDay`](#beforeShowDay) for the function details. + +#### beforeShowYear +- Type: `Function` +- Default: `null` + +Function to customize the year cells in the years view. The function is called when each year cell is rendered. +> See [`beforeShowDay`](#beforeShowDay) for the function details. + +#### buttonClass +- Type: `String` +- Default: `'button'` + +CSS class for ` + + +

+ +
+ + +`); + +export default pickerTemplate; diff --git a/node_modules/flowbite-datepicker/js/picker/views/DaysView.js b/node_modules/flowbite-datepicker/js/picker/views/DaysView.js new file mode 100644 index 0000000..267459d --- /dev/null +++ b/node_modules/flowbite-datepicker/js/picker/views/DaysView.js @@ -0,0 +1,250 @@ +import {hasProperty, pushUnique} from '../../lib/utils.js'; +import {today, dateValue, addDays, addWeeks, dayOfTheWeekOf, getWeek} from '../../lib/date.js'; +import {formatDate} from '../../lib/date-format.js'; +import {parseHTML, showElement, hideElement} from '../../lib/dom.js'; +import daysTemplate from '../templates/daysTemplate.js'; +import calendarWeeksTemplate from '../templates/calendarWeeksTemplate.js'; +import View from './View.js'; + +export default class DaysView extends View { + constructor(picker) { + super(picker, { + id: 0, + name: 'days', + cellClass: 'day', + }); + } + + init(options, onConstruction = true) { + if (onConstruction) { + const inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + super.init(options); + } + + setOptions(options) { + let updateDOW; + + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + const locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' + ? options.beforeShowDay + : undefined; + } + + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + const weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild, + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach((el, index) => { + const dow = (this.weekStart + index) % 7; + el.textContent = this.dayNames[dow]; + el.className = this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + const viewYear = viewDate.getFullYear(); + const viewMonth = viewDate.getMonth(); + const firstOfMonth = dateValue(viewYear, viewMonth, 1); + const start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + render() { + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = [...this.datesDisabled]; + + const switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + const startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach((el, index) => { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const current = addDays(this.start, index); + const date = new Date(current); + const day = date.getDay(); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + el.dataset.date = current; + el.textContent = date.getDate(); + + if (current < this.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > this.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (this.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < this.minDate || current > this.maxDate || this.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (this.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(this.disabled, current); + } + if (this.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (this.range) { + const [rangeStart, rangeEnd] = this.range; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg') + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const [rangeStart, rangeEnd] = this.range || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach((el) => { + const current = Number(el.dataset.date); + const classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg') + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg',); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg',); + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + const index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } +} diff --git a/node_modules/flowbite-datepicker/js/picker/views/MonthsView.js b/node_modules/flowbite-datepicker/js/picker/views/MonthsView.js new file mode 100644 index 0000000..1c78cdd --- /dev/null +++ b/node_modules/flowbite-datepicker/js/picker/views/MonthsView.js @@ -0,0 +1,198 @@ +import {hasProperty, pushUnique, createTagRepeat} from '../../lib/utils.js'; +import {dateValue} from '../../lib/date.js'; +import {parseHTML} from '../../lib/dom.js'; +import View from './View.js'; + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + + const [[startY, startM], [endY, endM]] = range; + if (startY > thisYear || endY < thisYear) { + return; + } + return [ + startY === thisYear ? startM : -1, + endY === thisYear ? endM : 12, + ]; +} + +export default class MonthsView extends View { + constructor(picker) { + super(picker, { + id: 1, + name: 'months', + cellClass: 'month', + }); + } + + init(options, onConstruction = true) { + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {'data-month': ix => ix}))); + } + super.init(options); + } + + setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + const minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + const maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' + ? options.beforeShowMonth + : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates.reduce((selected, timeValue) => { + const date = new Date(timeValue); + const year = date.getFullYear(); + const month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(timeValue => { + const date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + render() { + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + + const selected = this.selected[this.year] || []; + const yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + const isMinYear = this.year === this.minYear; + const isMaxYear = this.year === this.maxYear; + const range = computeMonthRange(this.range, this.year); + + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const date = dateValue(this.year, index, 1); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + if (this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = this.monthNames[index]; + + if ( + yrOutOfRange + || isMinYear && index < this.minMonth + || isMaxYear && index > this.maxMonth + ) { + classList.add('disabled'); + } + if (range) { + const [rangeStart, rangeEnd] = range; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const selected = this.selected[this.year] || []; + const [rangeStart, rangeEnd] = computeMonthRange(this.range, this.year) || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } +} \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/js/picker/views/View.js b/node_modules/flowbite-datepicker/js/picker/views/View.js new file mode 100644 index 0000000..b2ebb6c --- /dev/null +++ b/node_modules/flowbite-datepicker/js/picker/views/View.js @@ -0,0 +1,55 @@ +import {pushUnique} from '../../lib/utils.js'; +import {parseHTML, replaceChildNodes} from '../../lib/dom.js'; + +// Base class of the view classes +export default class View { + constructor(picker, config) { + Object.assign(this, config, { + picker, + element: parseHTML(`
`).firstChild, + selected: [], + }); + this.init(this.picker.datepicker.config); + } + + init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + performBeforeHook(el, current, timeValue) { + let result = this.beforeShow(new Date(timeValue)); + switch (typeof result) { + case 'boolean': + result = {enabled: result}; + break; + case 'string': + result = {classes: result}; + } + + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + const extraClasses = result.classes.split(/\s+/); + el.classList.add(...extraClasses); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } +} diff --git a/node_modules/flowbite-datepicker/js/picker/views/YearsView.js b/node_modules/flowbite-datepicker/js/picker/views/YearsView.js new file mode 100644 index 0000000..59a2974 --- /dev/null +++ b/node_modules/flowbite-datepicker/js/picker/views/YearsView.js @@ -0,0 +1,170 @@ +import {hasProperty, pushUnique, createTagRepeat} from '../../lib/utils.js'; +import {dateValue, startOfYearPeriod} from '../../lib/date.js'; +import {parseHTML} from '../../lib/dom.js'; +import View from './View.js'; + +function toTitleCase(word) { + return [...word].reduce((str, ch, ix) => str += ix ? ch : ch.toUpperCase(), ''); +} + +// Class representing the years and decades view elements +export default class YearsView extends View { + constructor(picker, config) { + super(picker, config); + } + + init(options, onConstruction = true) { + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = `beforeShow${toTitleCase(this.cellClass)}`; + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + super.init(options); + } + + setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + const beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + updateFocus() { + const viewDate = new Date(this.picker.viewDate); + const first = startOfYearPeriod(viewDate, this.navStep); + const last = first + 9 * this.step; + + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + updateSelection() { + const {dates, rangepicker} = this.picker.datepicker; + this.selected = dates.reduce((years, timeValue) => { + return pushUnique(years, startOfYearPeriod(timeValue, this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(timeValue => { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, this.step); + } + }); + } + } + + // Update the entire view UI + render() { + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + + this.picker.setViewSwitchLabel(`${this.first}-${this.last}`); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + + Array.from(this.grid.children).forEach((el, index) => { + const classList = el.classList; + const current = this.start + (index * this.step); + const date = dateValue(current, 0, 1); + + el.className = `datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`; + if (this.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < this.minYear || current > this.maxYear) { + classList.add('disabled'); + } + if (this.range) { + const [rangeStart, rangeEnd] = this.range; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + + if (this.beforeShow) { + this.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + refresh() { + const [rangeStart, rangeEnd] = this.range || []; + this.grid + .querySelectorAll('.range, .range-start, .range-end, .selected, .focused') + .forEach((el) => { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach((el) => { + const current = Number(el.textContent); + const classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (this.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === this.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + refreshFocus() { + const index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach((el) => { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } +} diff --git a/node_modules/flowbite-datepicker/package.json b/node_modules/flowbite-datepicker/package.json new file mode 100644 index 0000000..22ee968 --- /dev/null +++ b/node_modules/flowbite-datepicker/package.json @@ -0,0 +1,78 @@ +{ + "name": "flowbite-datepicker", + "version": "1.3.0", + "description": "A Tailwind CSS powered datepicker built with vanilla JavaScript and Flowbite", + "main": "dist/main.cjs.js", + "module": "dist/main.esm.js", + "exports": { + ".": { + "require": "./dist/main.cjs.js", + "import": "./dist/main.esm.js" + }, + "./Datepicker": { + "require": "./dist/Datepicker.cjs.js", + "import": "./dist/Datepicker.esm.js" + }, + "./DateRangePicker": { + "require": "./dist/DateRangePicker.cjs.js", + "import": "./dist/DateRangePicker.esm.js" + }, + "./locales": { + "require": "./dist/locales/index.cjs.js", + "import": "./dist/locales/index.esm.js" + } + }, + "repository": { + "type": "git", + "url": "https://github.com/themesberg/tailwind-datepicker" + }, + "homepage": "https://flowbite.com/docs/plugins/datepicker/", + "scripts": { + "build:js": "rollup -c", + "build:locales": "node scripts/build-locales.js", + "build": "npm run build:js && npm run build:locales && npx tailwindcss -o tailwind.css", + "minify:js": "node scripts/minify-js.js", + "minify": "npm run minify:js", + "make:js": "npm run build:js && npm run minify:js", + "make": "npm run build && npm run minify", + "test:lib": "mocha -r esm test/unit/lib", + "test:unit": "mocha -r esm test/unit", + "test": "npm run test:lib && npm run test:unit" + }, + "keywords": [ + "datepicker", + "tailwind", + "vanilla", + "javascript" + ], + "author": "Flowbite & Hidenao Miyamoto", + "license": "MIT", + "devDependencies": { + "@babel/core": "^7.24.7", + "@babel/preset-env": "^7.24.7", + "@rollup/plugin-babel": "^6.0.4", + "@rollup/plugin-commonjs": "^26.0.1", + "autoprefixer": "^10.4.0", + "bootstrap4": "npm:bootstrap@^4.5.3", + "bootstrap5": "npm:bootstrap@^5.0.1", + "bulma": "^0.9.1", + "bulma-tooltip": "^3.0.2", + "cssnano": "^4.1.10", + "docsify-cli": "^4.4.2", + "esm": "^3.2.25", + "foundation-sites": "^6.6.3", + "jsdom": "^16.4.0", + "mocha": "^8.2.1", + "postcss": "^8.4.1", + "rollup": "^2.35.1", + "simulant": "^0.2.2", + "sinon": "^9.2.2", + "tailwindcss": "^3.3.5", + "uglify-es": "^3.3.9", + "unexpected": "^12.0.0" + }, + "dependencies": { + "@rollup/plugin-node-resolve": "^15.2.3", + "flowbite": "^2.0.0" + } +} diff --git a/node_modules/flowbite-datepicker/postcss.config.js b/node_modules/flowbite-datepicker/postcss.config.js new file mode 100644 index 0000000..5c70d6e --- /dev/null +++ b/node_modules/flowbite-datepicker/postcss.config.js @@ -0,0 +1,7 @@ +// postcss.config.js +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + } +} \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/rollup.config.js b/node_modules/flowbite-datepicker/rollup.config.js new file mode 100644 index 0000000..8197017 --- /dev/null +++ b/node_modules/flowbite-datepicker/rollup.config.js @@ -0,0 +1,60 @@ +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; +import { babel } from '@rollup/plugin-babel'; + +export default [ + { + input: 'js/main.js', + output: [ + { + file: 'dist/main.cjs.js', + format: 'cjs', + }, + { + file: 'dist/main.esm.js', + format: 'es', + }, + ], + plugins: [ + resolve(), + commonjs(), + babel({ babelHelpers: 'bundled', presets: ['@babel/preset-env'] }), + ], + }, + { + input: 'js/Datepicker.js', + output: [ + { + file: 'dist/Datepicker.cjs.js', + format: 'cjs', + }, + { + file: 'dist/Datepicker.esm.js', + format: 'es', + }, + ], + plugins: [ + resolve(), + commonjs(), + babel({ babelHelpers: 'bundled', presets: ['@babel/preset-env'] }), + ], + }, + { + input: 'js/DateRangePicker.js', + output: [ + { + file: 'dist/DateRangePicker.cjs.js', + format: 'cjs', + }, + { + file: 'dist/DateRangePicker.esm.js', + format: 'es', + }, + ], + plugins: [ + resolve(), + commonjs(), + babel({ babelHelpers: 'bundled', presets: ['@babel/preset-env'] }), + ], + } +]; diff --git a/node_modules/flowbite-datepicker/sass/_mixins.scss b/node_modules/flowbite-datepicker/sass/_mixins.scss new file mode 100644 index 0000000..2c6b81f --- /dev/null +++ b/node_modules/flowbite-datepicker/sass/_mixins.scss @@ -0,0 +1,12 @@ + +@mixin dp-header-button-common { + border-color: transparent; + font-weight: bold; +} + +@mixin dp-footer-button-common { + margin: calc(0.375rem - 1px) 0.375rem; + border-radius: $dp-border-radius-small; + width: 100%; + font-size: $dp-font-size-small; +} diff --git a/node_modules/flowbite-datepicker/sass/datepicker-bs4.scss b/node_modules/flowbite-datepicker/sass/datepicker-bs4.scss new file mode 100644 index 0000000..29a21c5 --- /dev/null +++ b/node_modules/flowbite-datepicker/sass/datepicker-bs4.scss @@ -0,0 +1,91 @@ +$dp-background-color: $white !default; +$dp-border-color: $border-color !default; +$dp-border-radius: $border-radius !default; +$dp-border-radius-small: $border-radius-sm !default; +$dp-line-height-base: 1.5 !default; +$dp-font-size-normal: $font-size-base !default; +$dp-font-size-small: $font-size-sm !default; +$dp-font-weight-semibold: 600 !default; +$dp-font-weight-bold: $font-weight-bold !default; +$dp-dropdown-offset: 4px !default; +$dp-dropdown-shadow: $dropdown-box-shadow !default; +$dp-dropdown-z: $zindex-dropdown !default; + +$dp-title-background-color: $light !default; + +$dp-cell-size-base: 2.25rem !default; +$dp-cell-focus-background-color: darken($dropdown-link-hover-bg, 2.5) !default; +$dp-cell-prevnext-color: color('gray') !default; +$dp-cell-disabled-color: $dropdown-link-disabled-color !default; +$dp-cell-selected-background-color: $dropdown-link-active-bg !default; +$dp-cell-selected-color: $dropdown-link-active-color !default; +$dp-cell-selected-font-weight: 600 !default; +$dp-cell-today-background-color: $teal !default; +$dp-cell-today-color: $white !default; +$dp-cell-highlighted-background-color: $gray-100 !default; +$dp-range-start-end-background-color: $secondary !default; +$dp-range-start-end-color: $dp-cell-selected-color !default; +$dp-range-background-color: $gray-200 !default; +$dp-range-today-background-color: $dp-cell-today-background-color !default; +$dp-week-color: $gray-300 !default; + +$dp-footer-background-color: $light !default; + +$dp-input-in-edit-border-color: darken($input-focus-border-color, 5%) !default; +$dp-input-in-edit-focus-box-shadow-size: 0 0 0.25em 0.25em !default; + +@import 'mixins'; + +@mixin dp-button { + .btn { + // use custom version of .btn-light + $background: $light; + $border: $light; + $hover-background: darken($background, 7.5%); + $hover-border: darken($border, 10%); + $active-background: darken($background, 10%); + $active-border: darken($border, 12.5%); + + border-color: $border; + background-color: $dp-background-color; + + &:hover { + border-color: $hover-border; + background-color: $hover-background; + color: color-yiq($hover-background); + } + + &:focus { + border-color: $hover-border; + box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), 0.5); + background-color: $hover-background; + color: color-yiq($hover-background); + } + + &:disabled { + border-color: $border; + background-color: $background; + color: color-yiq($background); + } + + &:not(:disabled):active { + border-color: $active-border; + background-color: $active-background; + color: color-yiq($active-background); + + &:focus { + box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), 0.5); + } + } + + .datepicker-header & { + @include dp-header-button-common; + } + + .datepicker-footer & { + @include dp-footer-button-common; + } + } +} + +@import 'datepicker'; diff --git a/node_modules/flowbite-datepicker/sass/datepicker-bs5.scss b/node_modules/flowbite-datepicker/sass/datepicker-bs5.scss new file mode 100644 index 0000000..f6d8ae5 --- /dev/null +++ b/node_modules/flowbite-datepicker/sass/datepicker-bs5.scss @@ -0,0 +1,91 @@ +$dp-background-color: $white !default; +$dp-border-color: $border-color !default; +$dp-border-radius: $border-radius !default; +$dp-border-radius-small: $border-radius-sm !default; +$dp-line-height-base: 1.5 !default; +$dp-font-size-normal: $font-size-base !default; +$dp-font-size-small: $font-size-sm !default; +$dp-font-weight-semibold: 600 !default; +$dp-font-weight-bold: $font-weight-bold !default; +$dp-dropdown-offset: 4px !default; +$dp-dropdown-shadow: $dropdown-box-shadow !default; +$dp-dropdown-z: $zindex-dropdown !default; + +$dp-title-background-color: $light !default; + +$dp-cell-size-base: 2.25rem !default; +$dp-cell-focus-background-color: darken($dropdown-link-hover-bg, 2.5) !default; +$dp-cell-prevnext-color: color('gray') !default; +$dp-cell-disabled-color: $dropdown-link-disabled-color !default; +$dp-cell-selected-background-color: $dropdown-link-active-bg !default; +$dp-cell-selected-color: $dropdown-link-active-color !default; +$dp-cell-selected-font-weight: 600 !default; +$dp-cell-today-background-color: $teal !default; +$dp-cell-today-color: $white !default; +$dp-cell-highlighted-background-color: $gray-100 !default; +$dp-range-start-end-background-color: $secondary !default; +$dp-range-start-end-color: $dp-cell-selected-color !default; +$dp-range-background-color: $gray-200 !default; +$dp-range-today-background-color: $dp-cell-today-background-color !default; +$dp-week-color: $gray-300 !default; + +$dp-footer-background-color: $light !default; + +$dp-input-in-edit-border-color: darken($input-focus-border-color, 5%) !default; +$dp-input-in-edit-focus-box-shadow-size: 0 0 0.25em 0.25em !default; + +@import 'mixins'; + +@mixin dp-button { + .btn { + // use custom version of .btn-light + $background: $light; + $border: $light; + $hover-background: darken($background, 7.5%); + $hover-border: darken($border, 10%); + $active-background: darken($background, 10%); + $active-border: darken($border, 12.5%); + + border-color: $border; + background-color: $dp-background-color; + + &:hover { + border-color: $hover-border; + background-color: $hover-background; + color: color-contrast($hover-background); + } + + &:focus { + border-color: $hover-border; + box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-contrast($background), $border, 15%), 0.5); + background-color: $hover-background; + color: color-contrast($hover-background); + } + + &:disabled { + border-color: $border; + background-color: $background; + color: color-contrast($background); + } + + &:not(:disabled):active { + border-color: $active-border; + background-color: $active-background; + color: color-contrast($active-background); + + &:focus { + box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-contrast($background), $border, 15%), 0.5); + } + } + + .datepicker-header & { + @include dp-header-button-common; + } + + .datepicker-footer & { + @include dp-footer-button-common; + } + } +} + +@import 'datepicker'; diff --git a/node_modules/flowbite-datepicker/sass/datepicker-bulma.scss b/node_modules/flowbite-datepicker/sass/datepicker-bulma.scss new file mode 100644 index 0000000..50eaf90 --- /dev/null +++ b/node_modules/flowbite-datepicker/sass/datepicker-bulma.scss @@ -0,0 +1,69 @@ +$dp-background-color: $white !default; +$dp-border-color: $border !default; +$dp-border-radius: $radius !default; +$dp-border-radius-small: $radius-small !default; +$dp-line-height-base: 1.5 !default; +$dp-font-size-normal: $size-normal !default; +$dp-font-size-small: $size-small !default; +$dp-font-weight-semibold: $weight-semibold !default; +$dp-font-weight-bold: $weight-bold !default; +$dp-dropdown-offset: 4px !default; +$dp-dropdown-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default; +$dp-dropdown-z: 20 !default; + +$dp-title-background-color: $background !default; + +$dp-cell-size-base: 2.25rem !default; +$dp-cell-focus-background-color: darken($white-ter, 5%) !default; +$dp-cell-prevnext-color: $grey !default; +$dp-cell-disabled-color: $grey-lighter !default; +$dp-cell-selected-background-color: $link !default; +$dp-cell-selected-color: $link-invert !default; +$dp-cell-selected-font-weight: $weight-semibold !default; +$dp-cell-today-background-color: $primary !default; +$dp-cell-today-color: $primary-invert !default; +$dp-cell-highlighted-background-color: $white-ter !default; +$dp-range-start-end-background-color: $grey-light !default; +$dp-range-start-end-color: $dp-cell-selected-color !default; +$dp-range-background-color: $grey-lighter !default; +$dp-range-today-background-color: $dp-cell-today-background-color !default; +$dp-week-color: $grey-light !default; + +$dp-footer-background-color: $background !default; + +$dp-input-in-edit-border-color: darken($link, 5%) !default; +$dp-input-in-edit-focus-box-shadow-size: 0 0 0.25em 0.25em !default; + +@import 'mixins'; + +@mixin dp-button { + .button { + .datepicker-header & { + @include dp-header-button-common; + + &:hover { + background-color: darken($white, 2.5%); + } + + &:focus { + &:not(:active) { + box-shadow: 0 0 0 0.125em rgba($white, 0.25); + } + } + + &:active { + background-color: darken($white, 5%); + } + + &[disabled] { + box-shadow: none; + } + } + + .datepicker-footer & { + @include dp-footer-button-common; + } + } +} + +@import 'datepicker'; diff --git a/node_modules/flowbite-datepicker/sass/datepicker-foundation.scss b/node_modules/flowbite-datepicker/sass/datepicker-foundation.scss new file mode 100644 index 0000000..bb7bbde --- /dev/null +++ b/node_modules/flowbite-datepicker/sass/datepicker-foundation.scss @@ -0,0 +1,66 @@ +$dp-background-color: $body-background !default; +$dp-border-color: $light-gray !default; +$dp-border-radius: $global-radius !default; +$dp-border-radius-small: $global-radius !default; +$dp-line-height-base: $global-lineheight !default; +$dp-font-size-normal: 1rem !default; +$dp-font-size-small: 0.75rem !default; +$dp-font-weight-semibold: semibold !default; +$dp-font-weight-bold: bold !default; +$dp-dropdown-offset: 4px !default; +$dp-dropdown-shadow: 0 0 0 1px $medium-gray !default; +$dp-dropdown-z: 10 !default; + +$dp-title-background-color: $light-gray !default; + +$dp-cell-size-base: 2.25rem !default; +$dp-cell-focus-background-color: darken($white, 5%) !default; +$dp-cell-prevnext-color: $medium-gray !default; +$dp-cell-disabled-color: $light-gray !default; +$dp-cell-selected-background-color: get-color('primary') !default; +$dp-cell-selected-color: $white !default; +$dp-cell-selected-font-weight: $dp-font-weight-semibold !default; +$dp-cell-today-background-color: scale-color(get-color('primary'), $lightness: 85%) !default; +$dp-cell-today-color: $dark-gray !default; +$dp-cell-highlighted-background-color: scale-color($medium-gray, $lightness: 85%) !default; +$dp-range-start-end-background-color: get-color('secondary') !default; +$dp-range-start-end-color: $dp-cell-selected-color !default; +$dp-range-background-color: $light-gray !default; +$dp-range-today-background-color: darken($dp-cell-today-background-color, 8%) !default; +$dp-week-color: $dark-gray !default; + +$dp-footer-background-color: $light-gray !default; + +$dp-input-in-edit-border-color: darken($medium-gray, 15%) !default; +$dp-input-in-edit-focus-box-shadow-size: 0 0 0.25em 0.25em !default; + +@import 'mixins'; + +@mixin dp-button { + .button { + margin: 0; + background-color: $dp-background-color; + color: $body-font-color; + + &:hover, + &:focus { + background-color: scale-color($dp-background-color, $lightness: -15%); + + &[disabled] { + opacity: 0.25; // $button-opacity-disabled + background-color: $dp-background-color; + color: $body-font-color; + } + } + + .datepicker-header & { + @include dp-header-button-common; + } + + .datepicker-footer & { + @include dp-footer-button-common; + } + } +} + +@import 'datepicker'; diff --git a/node_modules/flowbite-datepicker/sass/datepicker.scss b/node_modules/flowbite-datepicker/sass/datepicker.scss new file mode 100644 index 0000000..eee8890 --- /dev/null +++ b/node_modules/flowbite-datepicker/sass/datepicker.scss @@ -0,0 +1,436 @@ +//== foundational variables ==// +$black: hsl(0, 0%, 4%) !default; +$white: hsl(0, 0%, 100%) !default; +$light: hsl(0, 0%, 96%) !default; // white-ter +$dark: hsl(0, 0%, 21%) !default; // grey-darker +$link: hsl(217, 71%, 53%) !default; // blue + +$grey-dark: lighten($black, 25%) !default; +$grey-light: darken($light, 25%) !default; +$grey-lighter: darken($light, 10%) !default; + +//== datepicker variables ==// +$dp-background-color: $white !default; +$dp-border-color: $grey-lighter !default; +$dp-border-radius: 4px !default; +$dp-border-radius-small: 2px !default; +$dp-line-height-base: 1.5 !default; +$dp-font-size-normal: 1rem !default; +$dp-font-size-small: 0.75rem !default; +$dp-font-weight-semibold: 600 !default; +$dp-font-weight-bold: 700 !default; +$dp-dropdown-offset: 4px !default; +$dp-dropdown-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default; +$dp-dropdown-z: 20 !default; + +$dp-title-background-color: $light !default; + +$dp-cell-size-base: 2.25rem !default; +$dp-cell-focus-background-color: darken($light, 5%) !default; +$dp-cell-prevnext-color: hsl(0, 0%, 48%) !default; // grey +$dp-cell-disabled-color: $grey-lighter !default; +$dp-cell-selected-background-color: $link !default; +$dp-cell-selected-color: #fff !default; // link(blue)-invert +$dp-cell-selected-font-weight: 600 !default; +$dp-cell-today-background-color: hsl(171, 100%, 41%) !default; // turquoise (primary) +$dp-cell-today-color: #fff !default; // turquoise-invert +$dp-cell-highlighted-background-color: $light !default; +$dp-range-start-end-background-color: $grey-light !default; +$dp-range-start-end-color: $dp-cell-selected-color !default; +$dp-range-background-color: $grey-lighter !default; +$dp-range-today-background-color: $dp-cell-today-background-color !default; +$dp-week-color: $grey-light !default; + +$dp-footer-background-color: $light !default; + +$dp-input-in-edit-border-color: darken($link, 5%) !default; +$dp-input-in-edit-focus-box-shadow-size: 0 0 0.25em 0.25em !default; + +//== non-configurable variables ==// +$dp-cell-shrink-threshold: $dp-cell-size-base * 10; // = 8 * 1.25 +$dp-cell-shrinked-width: $dp-cell-size-base * 7 / 8; + +//== mixins ==// +@import 'mixins'; + +//== styles ==// +.datepicker { + display: none; + + &.active { + display: block; + } +} + +.datepicker-dropdown { + position: absolute; + top: 0; + left: 0; + z-index: $dp-dropdown-z; + padding-top: $dp-dropdown-offset; + + &.datepicker-orient-top { + padding-top: 0; + padding-bottom: $dp-dropdown-offset; + } +} + +.datepicker-picker { + display: inline-block; + border-radius: $dp-border-radius; + background-color: $dp-background-color; + + .datepicker-dropdown & { + box-shadow: $dp-dropdown-shadow; + } + + span { + display: block; + flex: 1; + border: 0; + border-radius: $dp-border-radius; + cursor: default; + text-align: center; + -webkit-touch-callout: none; + user-select: none; + } +} + +.datepicker-main { + padding: 2px; +} + +.datepicker-footer { + box-shadow: inset 0 1px 1px rgba($black, 0.1); + background-color: $dp-footer-background-color; +} + +%flex-container { + display: flex; +} + +%flex-wrap { + flex-wrap: wrap; +} + +%flex-basis-day { + flex-basis: percentage(1 / 7); +} + +%flex-basis-month-year { + flex-basis: 25%; +} + +%datepicker-cell-height { + height: $dp-cell-size-base; + line-height: $dp-cell-size-base; +} + +.datepicker-title { + box-shadow: inset 0 -1px 1px rgba($black, 0.1); + background-color: $dp-title-background-color; + padding: 0.375rem 0.75rem; + text-align: center; + font-weight: $dp-font-weight-bold; +} + +.datepicker-controls { + @extend %flex-container; + + .datepicker-header & { + padding: 2px 2px 0; + } + + @if mixin-exists(dp-button) { + @include dp-button; + } @else { + .button { + $button-color: $dark; + $button-background-color: $white; + + $button-border-color: $grey-lighter; + $button-border-width: 1px; + + $button-padding-vertical: calc(0.375em - #{$button-border-width}); + $button-padding-horizontal: 0.75em; + + $button-hover-color: $dark; // link-hover + $button-hover-border-color: $grey-light; // link-hover-border + + $button-focus-color: $dark; // link-focus + $button-focus-border-color: $link; // link-focus-border + $button-focus-box-shadow-size: 0 0 0 0.125em; + $button-focus-box-shadow-color: rgba($link, 0.25); + + $button-active-color: $dark; // link-active + $button-active-border-color: $grey-dark; // link-active-border + + display: inline-flex; + position: relative; + align-items: center; + justify-content: center; + margin: 0; + border: $button-border-width solid $button-border-color; + border-radius: $dp-border-radius; // control-radius + box-shadow: none; + background-color: $button-background-color; + cursor: pointer; + padding: $button-padding-vertical $button-padding-horizontal; + height: 2.25em; // control-height + vertical-align: top; + text-align: center; + line-height: $dp-line-height-base; // control-line-height + white-space: nowrap; + color: $button-color; + font-size: $dp-font-size-normal; // size-normal + + &:focus, + &:active { + outline: none; + } + + &:hover { + border-color: $button-hover-border-color; + color: $button-hover-color; + } + + &:focus { + border-color: $button-focus-border-color; + color: $button-focus-color; + + &:not(:active) { + box-shadow: $button-focus-box-shadow-size $button-focus-box-shadow-color; + } + } + + &:active { + border-color: $button-active-border-color; + color: $button-active-color; + } + + &[disabled] { + cursor: not-allowed; + } + + .datepicker-header & { + @include dp-header-button-common; + + &:hover { + background-color: darken($white, 2.5%); + } + + &:focus { + &:not(:active) { + box-shadow: 0 0 0 0.125em rgba($white, 0.25); + } + } + + &:active { + background-color: darken($white, 5%); + } + + &[disabled] { + box-shadow: none; + } + } + + .datepicker-footer & { + @include dp-footer-button-common; + } + } + } + + .view-switch { + flex: auto; + } + + .prev-btn, + .next-btn { + padding-right: 0.375rem; + padding-left: 0.375rem; + width: $dp-cell-size-base; + + &.disabled { + visibility: hidden; + } + } +} + +.datepicker-view { + @extend %flex-container; + + .days-of-week { + @extend %flex-container; + } + + .dow { + @extend %flex-basis-day; + height: $dp-font-size-normal * $dp-line-height-base; + line-height: $dp-font-size-normal * $dp-line-height-base; + font-size: ($dp-font-size-small + $dp-font-size-normal) / 2; + font-weight: $dp-font-weight-bold; + } + + .week { + @extend %datepicker-cell-height; + width: $dp-cell-size-base; + color: $dp-week-color; + font-size: $dp-font-size-small; + + @media (max-width: $dp-cell-shrink-threshold) { + width: $dp-cell-shrinked-width; + } + } +} + +.datepicker-grid { + @extend %flex-container; + @extend %flex-wrap; + + width: $dp-cell-size-base * 7; + + @media (max-width: $dp-cell-shrink-threshold) { + .calendar-weeks + .days & { + width: $dp-cell-shrinked-width * 7; + } + } +} + +.datepicker-cell { + @extend %datepicker-cell-height; + + &:not(.disabled):hover { + background-color: darken($dp-background-color, 2.5%); + cursor: pointer; + } + + &.focused:not(.selected) { + background-color: $dp-cell-focus-background-color; + } + + &.selected { + &, + &:hover { + background-color: $dp-cell-selected-background-color; + color: $dp-cell-selected-color; + font-weight: $dp-cell-selected-font-weight; + } + } + + &.disabled { + color: $dp-cell-disabled-color; + } + + &.prev, + &.next { + &:not(.disabled) { + color: $dp-cell-prevnext-color; + } + + &.selected { + color: darken($dp-cell-selected-color, 10%); + } + } + + &.highlighted:not(.selected):not(.range):not(.today) { + border-radius: 0; + background-color: $dp-cell-highlighted-background-color; + + &:not(.disabled):hover { + background-color: darken($dp-cell-highlighted-background-color, 2.5%); + } + + &.focused { + background-color: $dp-cell-focus-background-color; + } + } + + &.today { + &:not(.selected) { + background-color: $dp-cell-today-background-color; + + &:not(.disabled) { + color: $dp-cell-today-color; + } + } + + &.focused:not(.selected) { + background-color: darken($dp-cell-today-background-color, 2.5%); + } + } + + &%range-start-end-common { + background-color: $dp-range-start-end-background-color; + color: $dp-range-start-end-color; + } + + &%range-start-end-focused-common { + background-color: darken($dp-range-start-end-background-color, 2.5%); + } + + &.range-start { + border-radius: $dp-border-radius 0 0 $dp-border-radius; + + &:not(.selected) { + @extend %range-start-end-common; + } + + &.focused:not(.selected) { + @extend %range-start-end-focused-common; + } + } + + &.range-end { + border-radius: 0 $dp-border-radius $dp-border-radius 0; + + &:not(.selected) { + @extend %range-start-end-common; + } + + &.focused:not(.selected) { + @extend %range-start-end-focused-common; + } + } + + &.range { + border-radius: 0; + background-color: $dp-range-background-color; + + &:not(.disabled):not(.focused):not(.today):hover { + background-color: darken($dp-range-background-color, 2.5%); + } + + &.disabled { + color: darken($dp-range-background-color, 10%); + } + + &.focused { + background-color: darken($dp-range-background-color, 5%); + } + + @if $dp-range-today-background-color != $dp-cell-today-background-color { + &.today { + background-color: $dp-range-today-background-color; + } + } + } + + .datepicker-view .days & { + @extend %flex-basis-day; + } + + .datepicker-view.datepicker-grid & { + @extend %flex-basis-month-year; + height: $dp-cell-size-base * 2; + line-height: $dp-cell-size-base * 2; + } +} + +.datepicker-input.in-edit { + border-color: $dp-input-in-edit-border-color; + + &:focus, + &:active { + box-shadow: $dp-input-in-edit-focus-box-shadow-size rgba($dp-input-in-edit-border-color, 0.2); + } +} diff --git a/node_modules/flowbite-datepicker/sass/index-bs4.scss b/node_modules/flowbite-datepicker/sass/index-bs4.scss new file mode 100644 index 0000000..d22a2a5 --- /dev/null +++ b/node_modules/flowbite-datepicker/sass/index-bs4.scss @@ -0,0 +1,5 @@ +@import '../node_modules/bootstrap4/scss/functions'; +@import '../node_modules/bootstrap4/scss/variables'; +@import '../node_modules/bootstrap4/scss/mixins'; + +@import 'datepicker-bs4'; diff --git a/node_modules/flowbite-datepicker/sass/index-bs5.scss b/node_modules/flowbite-datepicker/sass/index-bs5.scss new file mode 100644 index 0000000..89803fa --- /dev/null +++ b/node_modules/flowbite-datepicker/sass/index-bs5.scss @@ -0,0 +1,5 @@ +@import '../node_modules/bootstrap5/scss/functions'; +@import '../node_modules/bootstrap5/scss/variables'; +@import '../node_modules/bootstrap5/scss/mixins'; + +@import 'datepicker-bs5'; diff --git a/node_modules/flowbite-datepicker/sass/index-bulma.scss b/node_modules/flowbite-datepicker/sass/index-bulma.scss new file mode 100644 index 0000000..873cbea --- /dev/null +++ b/node_modules/flowbite-datepicker/sass/index-bulma.scss @@ -0,0 +1,6 @@ +@import '../node_modules/bulma/sass/utilities/initial-variables'; +@import '../node_modules/bulma/sass/utilities/functions'; +@import '../node_modules/bulma/sass/utilities/derived-variables'; +@import '../node_modules/bulma/sass/utilities/mixins'; + +@import 'datepicker-bulma'; diff --git a/node_modules/flowbite-datepicker/sass/index-foundation.scss b/node_modules/flowbite-datepicker/sass/index-foundation.scss new file mode 100644 index 0000000..9e7b959 --- /dev/null +++ b/node_modules/flowbite-datepicker/sass/index-foundation.scss @@ -0,0 +1,3 @@ +@import '../node_modules/foundation-sites/scss/global'; + +@import 'datepicker-foundation'; diff --git a/node_modules/flowbite-datepicker/scripts/build-css.js b/node_modules/flowbite-datepicker/scripts/build-css.js new file mode 100644 index 0000000..7af79e4 --- /dev/null +++ b/node_modules/flowbite-datepicker/scripts/build-css.js @@ -0,0 +1,39 @@ +const fs = require('fs'); +const path = require('path'); +const postcss = require('postcss'); +const nodeSass = require('postcss-node-sass')({ + outputStyle: 'expanded', +}); +const autoprefixer = require('autoprefixer'); +const syntax = require('postcss-scss'); + +const rootDir = path.dirname(__dirname); +const srcDir = `${rootDir}/sass`; +const distDir = `${rootDir}/dist/css`; +const files = [ + {in: 'datepicker.scss', out: 'datepicker.css'}, + {in: 'index-bulma.scss', out: 'datepicker-bulma.css'}, + {in: 'index-bs4.scss', out: 'datepicker-bs4.css'}, + {in: 'index-bs5.scss', out: 'datepicker-bs5.css'}, + {in: 'index-foundation.scss', out: 'datepicker-foundation.css'}, +]; + +if (!fs.existsSync(distDir)) { + fs.mkdirSync(distDir, {recursive: true}); +} + +Promise.all(files.map((entry) => { + return new Promise((resolve) => { + const from = `${srcDir}/${entry.in}`; + const file = fs.readFileSync(from, 'utf8'); + postcss([nodeSass, autoprefixer]) + .process(file, {syntax, from, map: false}) + .then((result) => { + fs.writeFileSync(`${distDir}/${entry.out}`, result.css); + resolve(); + }) + .catch((err) => { + console.error(err); + }); + }); +})); diff --git a/node_modules/flowbite-datepicker/scripts/build-locales.js b/node_modules/flowbite-datepicker/scripts/build-locales.js new file mode 100644 index 0000000..b216421 --- /dev/null +++ b/node_modules/flowbite-datepicker/scripts/build-locales.js @@ -0,0 +1,26 @@ +const fs = require('fs'); +const path = require('path'); + +const rootDir = path.dirname(__dirname); +const srcDir = `${rootDir}/js/i18n/locales`; +const distDir = `${rootDir}/dist/js/locales`; + +const reConvert = /export default (\{\s+)([\w'-]+):([\s\S]+\})\n\};/m; +const rePropNameFix = /\.('\w+-\w+')/; + +if (fs.existsSync(distDir)) { + // empty dist dir + fs.readdirSync(distDir).forEach((file) => { + fs.unlinkSync(`${distDir}/${file}`); + }); +} else { + fs.mkdirSync(distDir, {recursive: true}); +} +// copy locales to dist +fs.readdirSync(srcDir).forEach((file) => { + const src = fs.readFileSync(`${srcDir}/${file}`, 'utf8'); + const output = src + .replace(reConvert, '(function () $1Datepicker.locales.$2 =$3;\n}());') + .replace(rePropNameFix, '[$1]'); + fs.writeFileSync(`${distDir}/${file}`, output); +}); diff --git a/node_modules/flowbite-datepicker/scripts/convert-bsdp-locales.js b/node_modules/flowbite-datepicker/scripts/convert-bsdp-locales.js new file mode 100644 index 0000000..66acfe6 --- /dev/null +++ b/node_modules/flowbite-datepicker/scripts/convert-bsdp-locales.js @@ -0,0 +1,65 @@ +const fs = require('fs'); +const path = require('path'); + +const usage = `USAGE: + +node ${path.basename(process.argv[1])} [options] source_dir + + source_dir: path to the locale directory of bootstrap-datepicker's source + +Options: + -h|--help print this help +`; + +const src = process.argv[2]; +if (!src || src === '-h' || src === '--help') { + console.log(usage); + process.exit(); +} +if (!fs.existsSync(src) || !fs.statSync(src).isDirectory()) { + console.error(`${src} is not a directory.`); + process.exit(1); +} + +const reFilename = /^bootstrap-datepicker\.([a-z]+(-[A-Za-z]+)?)\.js$/; +const files = fs.readdirSync(src); + +if (files.length < 2 || !reFilename.test(files[1])) { + console.error(`${src} is not a bootstrap-datepicker's locale directory.`); + process.exit(1); +} + +const destDir = path.resolve(__dirname, '../js/i18n/locales'); +if (!fs.existsSync(destDir)) { + fs.mkdirSync(destDir, {recursive: true}); +} + +files.forEach(file => { + const matched = file.match(reFilename); + if (!matched) { + return; + } + const lang = matched[1].replace('latin', 'latn'); + if (lang === 'en-US') { + return; + } + const langKey = lang.indexOf('-') > -1 ? `'${lang}'` : lang; + + let contents = fs.readFileSync(path.resolve(src, file), 'utf8'); + if (contents.indexOf('DEPRECATED') > -1) { + return; + } + + contents = contents + .replace(/\t/g, ' ') + .replace(/; *\( *function *\( *\$ *\) *\{/, 'export default {') + .replace(/ *\$\.fn\.datepicker\.dates\[.+?\] =/, ` ${langKey}:`) + .replace(/ *};/, ' }') + .replace(/ *\} *\( *jQuery *\) *\);\s*/, '};\n') + .replace(/ {5,}/g, ' ') + .replace(/: *(\S)/g, ': $1') + .replace(/ +\n/g, '\n') + .replace(/(titleFormat:.+)yyyy/, '$1y'); + + fs.writeFileSync(path.resolve(destDir, `${lang}.js`), contents); +}); diff --git a/node_modules/flowbite-datepicker/scripts/minify-css.js b/node_modules/flowbite-datepicker/scripts/minify-css.js new file mode 100644 index 0000000..68503d2 --- /dev/null +++ b/node_modules/flowbite-datepicker/scripts/minify-css.js @@ -0,0 +1,31 @@ +const fs = require('fs'); +const path = require('path'); +const postcss = require('postcss'); +const cssnano = require('cssnano'); + +const distDir = `${path.dirname(__dirname)}/dist/css`; +const files = [ + 'datepicker', + 'datepicker-bulma', + 'datepicker-bs4', + 'datepicker-bs5', + 'datepicker-foundation', +]; + +Promise.all(files.map((basename) => { + return new Promise((resolve) => { + const fileNameBase = `${distDir}/${basename}`; + const from = `${fileNameBase}.css`; + const file = fs.readFileSync(from, 'utf8'); + + postcss([cssnano]) + .process(file, {from, map: false}) + .then((result) => { + fs.writeFileSync(`${fileNameBase}.min.css`, result.css); + resolve(); + }) + .catch((err) => { + console.error(err); + }); + }); +})); diff --git a/node_modules/flowbite-datepicker/scripts/minify-js.js b/node_modules/flowbite-datepicker/scripts/minify-js.js new file mode 100644 index 0000000..a6d4f78 --- /dev/null +++ b/node_modules/flowbite-datepicker/scripts/minify-js.js @@ -0,0 +1,17 @@ +const fs = require('fs'); +const path = require('path'); +const {minify} = require('uglify-es'); + +const distDir = `${path.dirname(__dirname)}/dist/js`; +const files = ['datepicker', 'datepicker-full']; + +files.forEach((basename) => { + const fileNameBase = `${distDir}/${basename}`; + const file = fs.readFileSync(`${fileNameBase}.js`, 'utf8'); + const {code, error} = minify(file); + + if (error) { + throw error; + } + fs.writeFileSync(`${fileNameBase}.min.js`, code); +}); diff --git a/node_modules/flowbite-datepicker/style.css b/node_modules/flowbite-datepicker/style.css new file mode 100644 index 0000000..be1f855 --- /dev/null +++ b/node_modules/flowbite-datepicker/style.css @@ -0,0 +1,4 @@ +/* ./your-css-folder/styles.css */ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/tailwind.config.js b/node_modules/flowbite-datepicker/tailwind.config.js new file mode 100644 index 0000000..405e017 --- /dev/null +++ b/node_modules/flowbite-datepicker/tailwind.config.js @@ -0,0 +1,13 @@ +module.exports = { + content: ["./demo/**/*.html", "./js/**/*.js", "./docs/**/*.*"], + darkMode: 'class', // or 'media' or 'class' + theme: { + extend: {}, + }, + variants: { + extend: {}, + }, + plugins: [ + require('flowbite/plugin') + ], +} diff --git a/node_modules/flowbite-datepicker/tailwind.css b/node_modules/flowbite-datepicker/tailwind.css new file mode 100644 index 0000000..b957d96 --- /dev/null +++ b/node_modules/flowbite-datepicker/tailwind.css @@ -0,0 +1,1389 @@ +/* +! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com +*/ + +/* +1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) +2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) +*/ + +*, +::before, +::after { + box-sizing: border-box; + /* 1 */ + border-width: 0; + /* 2 */ + border-style: solid; + /* 2 */ + border-color: #E5E7EB; + /* 2 */ +} + +::before, +::after { + --tw-content: ''; +} + +/* +1. Use a consistent sensible line-height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +3. Use a more readable tab size. +4. Use the user's configured `sans` font-family by default. +5. Use the user's configured `sans` font-feature-settings by default. +6. Use the user's configured `sans` font-variation-settings by default. +*/ + +html { + line-height: 1.5; + /* 1 */ + -webkit-text-size-adjust: 100%; + /* 2 */ + -moz-tab-size: 4; + /* 3 */ + -o-tab-size: 4; + tab-size: 4; + /* 3 */ + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + /* 4 */ + font-feature-settings: normal; + /* 5 */ + font-variation-settings: normal; + /* 6 */ +} + +/* +1. Remove the margin in all browsers. +2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. +*/ + +body { + margin: 0; + /* 1 */ + line-height: inherit; + /* 2 */ +} + +/* +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +3. Ensure horizontal rules are visible by default. +*/ + +hr { + height: 0; + /* 1 */ + color: inherit; + /* 2 */ + border-top-width: 1px; + /* 3 */ +} + +/* +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/* +Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* +Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + text-decoration: inherit; +} + +/* +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* +1. Use the user's configured `mono` font family by default. +2. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + /* 1 */ + font-size: 1em; + /* 2 */ +} + +/* +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* +Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; + /* 1 */ + border-color: inherit; + /* 2 */ + border-collapse: collapse; + /* 3 */ +} + +/* +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +3. Remove default padding in all browsers. +*/ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; + /* 1 */ + font-feature-settings: inherit; + /* 1 */ + font-variation-settings: inherit; + /* 1 */ + font-size: 100%; + /* 1 */ + font-weight: inherit; + /* 1 */ + line-height: inherit; + /* 1 */ + color: inherit; + /* 1 */ + margin: 0; + /* 2 */ + padding: 0; + /* 3 */ +} + +/* +Remove the inheritance of text transform in Edge and Firefox. +*/ + +button, +select { + text-transform: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Remove default button styles. +*/ + +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; + /* 1 */ + background-color: transparent; + /* 2 */ + background-image: none; + /* 2 */ +} + +/* +Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* +Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* +Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* +Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ + +[type='search'] { + -webkit-appearance: textfield; + /* 1 */ + outline-offset: -2px; + /* 2 */ +} + +/* +Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to `inherit` in Safari. +*/ + +::-webkit-file-upload-button { + -webkit-appearance: button; + /* 1 */ + font: inherit; + /* 2 */ +} + +/* +Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* +Removes the default spacing and border for appropriate elements. +*/ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +fieldset { + margin: 0; + padding: 0; +} + +legend { + padding: 0; +} + +ol, +ul, +menu { + list-style: none; + margin: 0; + padding: 0; +} + +/* +Reset default styling for dialogs. +*/ + +dialog { + padding: 0; +} + +/* +Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* +1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +2. Set the default placeholder color to the user's configured gray 400 color. +*/ + +input::-moz-placeholder, textarea::-moz-placeholder { + opacity: 1; + /* 1 */ + color: #9CA3AF; + /* 2 */ +} + +input::placeholder, +textarea::placeholder { + opacity: 1; + /* 1 */ + color: #9CA3AF; + /* 2 */ +} + +/* +Set the default cursor for buttons. +*/ + +button, +[role="button"] { + cursor: pointer; +} + +/* +Make sure disabled buttons don't get the pointer cursor. +*/ + +:disabled { + cursor: default; +} + +/* +1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) +2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; + /* 1 */ + vertical-align: middle; + /* 2 */ +} + +/* +Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* Make elements with the HTML hidden attribute stay hidden by default */ + +[hidden] { + display: none; +} + +[data-tooltip-style^='light'] + .tooltip > .tooltip-arrow:before { + border-style: solid; + border-color: #e5e7eb; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='top'] > .tooltip-arrow:before { + border-bottom-width: 1px; + border-right-width: 1px; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='right'] > .tooltip-arrow:before { + border-bottom-width: 1px; + border-left-width: 1px; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='bottom'] > .tooltip-arrow:before { + border-top-width: 1px; + border-left-width: 1px; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='left'] > .tooltip-arrow:before { + border-top-width: 1px; + border-right-width: 1px; +} + +.tooltip[data-popper-placement^='top'] > .tooltip-arrow { + bottom: -4px; +} + +.tooltip[data-popper-placement^='bottom'] > .tooltip-arrow { + top: -4px; +} + +.tooltip[data-popper-placement^='left'] > .tooltip-arrow { + right: -4px; +} + +.tooltip[data-popper-placement^='right'] > .tooltip-arrow { + left: -4px; +} + +.tooltip.invisible > .tooltip-arrow:before { + visibility: hidden; +} + +[data-popper-arrow],[data-popper-arrow]:before { + position: absolute; + width: 8px; + height: 8px; + background: inherit; +} + +[data-popper-arrow] { + visibility: hidden; +} + +[data-popper-arrow]:before { + content: ""; + visibility: visible; + transform: rotate(45deg); +} + +[data-popper-arrow]:after { + content: ""; + visibility: visible; + transform: rotate(45deg); + position: absolute; + width: 9px; + height: 9px; + background: inherit; +} + +[role="tooltip"] > [data-popper-arrow]:before { + border-style: solid; + border-color: #e5e7eb; +} + +.dark [role="tooltip"] > [data-popper-arrow]:before { + border-style: solid; + border-color: #4b5563; +} + +[role="tooltip"] > [data-popper-arrow]:after { + border-style: solid; + border-color: #e5e7eb; +} + +.dark [role="tooltip"] > [data-popper-arrow]:after { + border-style: solid; + border-color: #4b5563; +} + +[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:before { + border-bottom-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:after { + border-bottom-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:before { + border-bottom-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:after { + border-bottom-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:before { + border-top-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:after { + border-top-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:before { + border-top-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:after { + border-top-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow] { + bottom: -5px; +} + +[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow] { + top: -5px; +} + +[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow] { + right: -5px; +} + +[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow] { + left: -5px; +} + +[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + border-color: #6B7280; + border-width: 1px; + border-radius: 0px; + padding-top: 0.5rem; + padding-right: 0.75rem; + padding-bottom: 0.5rem; + padding-left: 0.75rem; + font-size: 1rem; + line-height: 1.5rem; + --tw-shadow: 0 0 #0000; +} + +[type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #1C64F2; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + border-color: #1C64F2; +} + +input::-moz-placeholder, textarea::-moz-placeholder { + color: #6B7280; + opacity: 1; +} + +input::placeholder,textarea::placeholder { + color: #6B7280; + opacity: 1; +} + +::-webkit-datetime-edit-fields-wrapper { + padding: 0; +} + +::-webkit-date-and-time-value { + min-height: 1.5em; +} + +select:not([size]) { + background-image: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e"); + background-position: right 0.75rem center; + background-repeat: no-repeat; + background-size: 0.75em 0.75em; + padding-right: 2.5rem; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} + +[multiple] { + background-image: initial; + background-position: initial; + background-repeat: unset; + background-size: initial; + padding-right: 0.75rem; + -webkit-print-color-adjust: unset; + print-color-adjust: unset; +} + +[type='checkbox'],[type='radio'] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding: 0; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + display: inline-block; + vertical-align: middle; + background-origin: border-box; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + flex-shrink: 0; + height: 1rem; + width: 1rem; + color: #1C64F2; + background-color: #fff; + border-color: #6B7280; + border-width: 1px; + --tw-shadow: 0 0 #0000; +} + +[type='checkbox'] { + border-radius: 0px; +} + +[type='radio'] { + border-radius: 100%; +} + +[type='checkbox']:focus,[type='radio']:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 2px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #1C64F2; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); +} + +[type='checkbox']:checked,[type='radio']:checked,.dark [type='checkbox']:checked,.dark [type='radio']:checked { + border-color: transparent; + background-color: currentColor; + background-size: 0.55em 0.55em; + background-position: center; + background-repeat: no-repeat; +} + +[type='checkbox']:checked { + background-image: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e"); + background-repeat: no-repeat; + background-size: 0.55em 0.55em; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} + +[type='radio']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); + background-size: 1em 1em; +} + +.dark [type='radio']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); + background-size: 1em 1em; +} + +[type='checkbox']:indeterminate { + background-image: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e"); + background-color: currentColor; + border-color: transparent; + background-position: center; + background-repeat: no-repeat; + background-size: 0.55em 0.55em; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} + +[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus { + border-color: transparent; + background-color: currentColor; +} + +[type='file'] { + background: unset; + border-color: inherit; + border-width: 0; + border-radius: 0; + padding: 0; + font-size: unset; + line-height: inherit; +} + +[type='file']:focus { + outline: 1px auto inherit; +} + +input[type=file]::file-selector-button { + color: white; + background: #1F2937; + border: 0; + font-weight: 500; + font-size: 0.875rem; + cursor: pointer; + padding-top: 0.625rem; + padding-bottom: 0.625rem; + padding-left: 2rem; + padding-right: 1rem; + margin-inline-start: -1rem; + margin-inline-end: 1rem; +} + +input[type=file]::file-selector-button:hover { + background: #374151; +} + +.dark input[type=file]::file-selector-button { + color: white; + background: #4B5563; +} + +.dark input[type=file]::file-selector-button:hover { + background: #6B7280; +} + +input[type="range"]::-webkit-slider-thumb { + height: 1.25rem; + width: 1.25rem; + background: #1C64F2; + border-radius: 9999px; + border: 0; + appearance: none; + -moz-appearance: none; + -webkit-appearance: none; + cursor: pointer; +} + +input[type="range"]:disabled::-webkit-slider-thumb { + background: #9CA3AF; +} + +.dark input[type="range"]:disabled::-webkit-slider-thumb { + background: #6B7280; +} + +input[type="range"]:focus::-webkit-slider-thumb { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); + --tw-ring-opacity: 1px; + --tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity)); +} + +input[type="range"]::-moz-range-thumb { + height: 1.25rem; + width: 1.25rem; + background: #1C64F2; + border-radius: 9999px; + border: 0; + appearance: none; + -moz-appearance: none; + -webkit-appearance: none; + cursor: pointer; +} + +input[type="range"]:disabled::-moz-range-thumb { + background: #9CA3AF; +} + +.dark input[type="range"]:disabled::-moz-range-thumb { + background: #6B7280; +} + +input[type="range"]::-moz-range-progress { + background: #3F83F8; +} + +input[type="range"]::-ms-fill-lower { + background: #3F83F8; +} + +*, ::before, ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(63 131 248 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +} + +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(63 131 248 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +} + +.container { + width: 100%; +} + +@media (min-width: 640px) { + .container { + max-width: 640px; + } +} + +@media (min-width: 768px) { + .container { + max-width: 768px; + } +} + +@media (min-width: 1024px) { + .container { + max-width: 1024px; + } +} + +@media (min-width: 1280px) { + .container { + max-width: 1280px; + } +} + +@media (min-width: 1536px) { + .container { + max-width: 1536px; + } +} + +.visible { + visibility: visible; +} + +.static { + position: static; +} + +.fixed { + position: fixed; +} + +.absolute { + position: absolute; +} + +.relative { + position: relative; +} + +.left-0 { + left: 0px; +} + +.top-0 { + top: 0px; +} + +.z-50 { + z-index: 50; +} + +.mb-1 { + margin-bottom: 0.25rem; +} + +.mb-2 { + margin-bottom: 0.5rem; +} + +.mt-2 { + margin-top: 0.5rem; +} + +.block { + display: block; +} + +.inline-block { + display: inline-block; +} + +.inline { + display: inline; +} + +.flex { + display: flex; +} + +.grid { + display: grid; +} + +.contents { + display: contents; +} + +.hidden { + display: none; +} + +.h-4 { + height: 1rem; +} + +.h-6 { + height: 1.5rem; +} + +.h-9 { + height: 2.25rem; +} + +.w-1\/2 { + width: 50%; +} + +.w-4 { + width: 1rem; +} + +.w-64 { + width: 16rem; +} + +.flex-1 { + flex: 1 1 0%; +} + +.transform { + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.cursor-default { + cursor: default; +} + +.cursor-not-allowed { + cursor: not-allowed; +} + +.cursor-pointer { + cursor: pointer; +} + +.resize { + resize: both; +} + +.grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); +} + +.grid-cols-7 { + grid-template-columns: repeat(7, minmax(0, 1fr)); +} + +.justify-between { + justify-content: space-between; +} + +.space-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.5rem * var(--tw-space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); +} + +.rounded-lg { + border-radius: 0.5rem; +} + +.rounded-l-lg { + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; +} + +.rounded-r-lg { + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; +} + +.border { + border-width: 1px; +} + +.border-0 { + border-width: 0px; +} + +.border-blue-700 { + --tw-border-opacity: 1; + border-color: rgb(26 86 219 / var(--tw-border-opacity)); +} + +.border-gray-300 { + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)); +} + +.bg-blue-700 { + --tw-bg-opacity: 1; + background-color: rgb(26 86 219 / var(--tw-bg-opacity)); +} + +.bg-gray-100 { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} + +.bg-gray-200 { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity)); +} + +.bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.p-1 { + padding: 0.25rem; +} + +.p-2 { + padding: 0.5rem; +} + +.p-2\.5 { + padding: 0.625rem; +} + +.p-4 { + padding: 1rem; +} + +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; +} + +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.py-2\.5 { + padding-top: 0.625rem; + padding-bottom: 0.625rem; +} + +.py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; +} + +.pt-2 { + padding-top: 0.5rem; +} + +.text-center { + text-align: center; +} + +.text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +} + +.text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} + +.font-medium { + font-weight: 500; +} + +.font-semibold { + font-weight: 600; +} + +.leading-6 { + line-height: 1.5rem; +} + +.leading-9 { + line-height: 2.25rem; +} + +.text-gray-400 { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); +} + +.text-gray-500 { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +.text-gray-800 { + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity)); +} + +.text-gray-900 { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.shadow-lg { + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.blur { + --tw-blur: blur(8px); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.filter { + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.transition { + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.hover\:bg-blue-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(30 66 159 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-100:hover { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} + +.hover\:text-gray-900:hover { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.focus\:outline-none:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.focus\:ring-2:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-4:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-blue-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)); +} + +:is([dir="rtl"] .rtl\:rotate-180) { + --tw-rotate: 180deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +:is([dir="rtl"] .rtl\:space-x-reverse) > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 1; +} + +:is(.dark .dark\:border-gray-600) { + --tw-border-opacity: 1; + border-color: rgb(75 85 99 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:bg-blue-600) { + --tw-bg-opacity: 1; + background-color: rgb(28 100 242 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-600) { + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-700) { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-900) { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:text-gray-400) { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-500) { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-white) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:bg-blue-700:hover) { + --tw-bg-opacity: 1; + background-color: rgb(26 86 219 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-gray-600:hover) { + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:text-white:hover) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/test/DateRangePicker/DateRangePicker.js b/node_modules/flowbite-datepicker/test/DateRangePicker/DateRangePicker.js new file mode 100644 index 0000000..3bab089 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/DateRangePicker/DateRangePicker.js @@ -0,0 +1,547 @@ +describe('DateRangePicker', function () { + let clock; + let elem; + let input0; + let input1; + + before(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + }); + + after(function () { + clock.restore(); + }); + + beforeEach(function () { + elem = domUtils.parseHTML('
').firstChild; + [input0, input1] = elem.children; + testContainer.appendChild(elem); + }); + + afterEach(function () { + testContainer.removeChild(elem); + }); + + it('input elements\' values are used for the initial dates', function () { + input0.value = '04/20/2020'; + input1.value = '04/22/2020'; + + const drp = new DateRangePicker(elem); + expect(drp.dates, 'to equal', [dateValue(2020, 3, 20), dateValue(2020, 3, 22)]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + it('the pickers are hidden at start', function () { + const {drp, picker0, picker1} = createDRP(elem); + + expect(isVisible(picker0), 'to be false'); + expect(isVisible(picker1), 'to be false'); + + drp.destroy(); + }); + + it('the pickers becomes visible when the input element get focus and invisivle when losing focus', function () { + const {drp, picker0, picker1} = createDRP(elem); + + input0.focus(); + expect(isVisible(picker0), 'to be true'); + + simulant.fire(input0, 'keydown', {key: 'Tab'}); + expect(isVisible(picker0), 'to be false'); + + input1.focus(); + expect(isVisible(picker1), 'to be true'); + + simulant.fire(input1, 'keydown', {key: 'Tab'}); + expect(isVisible(picker1), 'to be false'); + + drp.destroy(); + }); + + it('indicates the range with hilighting the start/end in the pickers', function () { + input0.value = '04/20/2020'; + input1.value = '04/22/2020'; + + const partsClasses = ['.view-switch', '.prev-btn', '.next-btn']; + let {drp, picker0, picker1} = createDRP(elem); + let [viewSwitch0, prevBtn0, nextBtn0] = getParts(picker0, partsClasses); + let [viewSwitch1, prevBtn1, nextBtn1] = getParts(picker1, partsClasses); + input0.focus(); + + let cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', 'April 2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', [22]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [22]); + expect(getCellIndices(cells, '.range-end'), 'to equal', [24]); + expect(getCellIndices(cells, '.range'), 'to equal', [23]); + expect(getCellIndices(cells, '.focused'), 'to equal', [22]); + + input1.focus(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', 'April 2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', [24]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [22]); + expect(getCellIndices(cells, '.range-end'), 'to equal', [24]); + expect(getCellIndices(cells, '.range'), 'to equal', [23]); + expect(getCellIndices(cells, '.focused'), 'to equal', [24]); + + drp.destroy(); + + // range over months (days → months views) + input0.value = '02/26/2020'; + input1.value = '04/12/2020'; + + ({drp, picker0, picker1} = createDRP(elem)); + ([viewSwitch0, prevBtn0, nextBtn0] = getParts(picker0, partsClasses)); + ([viewSwitch1, prevBtn1, nextBtn1] = getParts(picker1, partsClasses)); + + // range-start + input0.focus(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', [31]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [31]); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', [32, 33, 34, 35, 36, 37, 38, 39, 40, 41]); + expect(getCellIndices(cells, '.focused'), 'to equal', [31]); + + prevBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', 'January 2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', []); + expect(getCellIndices(cells, '.focused'), 'to equal', [28]); + + nextBtn0.click(); + nextBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', 'March 2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range').length, 'to be', 42); + expect(getCellIndices(cells, '.focused'), 'to equal', [25]); + + nextBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', 'April 2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', [14]); + expect(getCellIndices(cells, '.range'), 'to equal', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]); + expect(getCellIndices(cells, '.focused'), 'to equal', [28]); + + viewSwitch0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', [1]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [1]); + expect(getCellIndices(cells, '.range-end'), 'to equal', [3]); + expect(getCellIndices(cells, '.range'), 'to equal', [2]); + expect(getCellIndices(cells, '.focused'), 'to equal', [3]); + + // range-end + input1.focus(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', 'April 2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', [14]); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', [14]); + expect(getCellIndices(cells, '.range'), 'to equal', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]); + expect(getCellIndices(cells, '.focused'), 'to equal', [14]); + + nextBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', 'May 2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', []); + expect(getCellIndices(cells, '.focused'), 'to equal', [16]); + + prevBtn1.click(); + prevBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', 'March 2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range').length, 'to be', 42); + expect(getCellIndices(cells, '.focused'), 'to equal', [11]); + + prevBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', [31]); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', [32, 33, 34, 35, 36, 37, 38, 39, 40, 41]); + expect(getCellIndices(cells, '.focused'), 'to equal', [17]); + + viewSwitch1.click(); + cells = getCells(picker1); + + expect(viewSwitch0.textContent, 'to be', '2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', [3]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [1]); + expect(getCellIndices(cells, '.range-end'), 'to equal', [3]); + expect(getCellIndices(cells, '.range'), 'to equal', [2]); + expect(getCellIndices(cells, '.focused'), 'to equal', [1]); + + drp.destroy(); + + // range over years (months → years views) + input0.value = '10/01/2020'; + input1.value = '03/31/2023'; + + ({drp, picker0, picker1} = createDRP(elem)); + ([viewSwitch0, prevBtn0, nextBtn0] = getParts(picker0, partsClasses)); + ([viewSwitch1, prevBtn1, nextBtn1] = getParts(picker1, partsClasses)); + + // range-start + input0.focus(); + viewSwitch0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', [9]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [9]); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', [10, 11]); + expect(getCellIndices(cells, '.focused'), 'to equal', [9]); + + prevBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2019'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', []); + expect(getCellIndices(cells, '.focused'), 'to equal', [9]); + + nextBtn0.click(); + nextBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2021'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range').length, 'to be', 12); + expect(getCellIndices(cells, '.focused'), 'to equal', [9]); + + nextBtn0.click(); + nextBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2023'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', [2]); + expect(getCellIndices(cells, '.range'), 'to equal', [0, 1]); + expect(getCellIndices(cells, '.focused'), 'to equal', [9]); + + viewSwitch0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2020-2029'); + expect(getCellIndices(cells, '.selected'), 'to equal', [1]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [1]); + expect(getCellIndices(cells, '.range-end'), 'to equal', [4]); + expect(getCellIndices(cells, '.range'), 'to equal', [2, 3]); + expect(getCellIndices(cells, '.focused'), 'to equal', [4]); + + // range-end + input1.focus(); + viewSwitch1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2023'); + expect(getCellIndices(cells, '.selected'), 'to equal', [2]); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', [2]); + expect(getCellIndices(cells, '.range'), 'to equal', [0, 1]); + expect(getCellIndices(cells, '.focused'), 'to equal', [2]); + + nextBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2024'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', []); + expect(getCellIndices(cells, '.focused'), 'to equal', [2]); + + prevBtn1.click(); + prevBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2022'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range').length, 'to be', 12); + expect(getCellIndices(cells, '.focused'), 'to equal', [2]); + + prevBtn1.click(); + prevBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2020'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', [9]); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', [10, 11]); + expect(getCellIndices(cells, '.focused'), 'to equal', [2]); + + viewSwitch1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2020-2029'); + expect(getCellIndices(cells, '.selected'), 'to equal', [4]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [1]); + expect(getCellIndices(cells, '.range-end'), 'to equal', [4]); + expect(getCellIndices(cells, '.range'), 'to equal', [2, 3]); + expect(getCellIndices(cells, '.focused'), 'to equal', [1]); + + drp.destroy(); + + // range over decades (years → decades views) + input0.value = '01/01/2017'; + input1.value = '12/31/2041'; + + ({drp, picker0, picker1} = createDRP(elem)); + ([viewSwitch0, prevBtn0, nextBtn0] = getParts(picker0, partsClasses)); + ([viewSwitch1, prevBtn1, nextBtn1] = getParts(picker1, partsClasses)); + + // range-start + input0.focus(); + viewSwitch0.click(); + viewSwitch0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2010-2019'); + expect(getCellIndices(cells, '.selected'), 'to equal', [8]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [8]); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', [9, 10, 11]); + expect(getCellIndices(cells, '.focused'), 'to equal', [8]); + + prevBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2000-2009'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', []); + expect(getCellIndices(cells, '.focused'), 'to equal', [8]); + + nextBtn0.click(); + nextBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2020-2029'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range').length, 'to be', 12); + expect(getCellIndices(cells, '.focused'), 'to equal', [8]); + + nextBtn0.click(); + nextBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2040-2049'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', [2]); + expect(getCellIndices(cells, '.range'), 'to equal', [0, 1]); + expect(getCellIndices(cells, '.focused'), 'to equal', [8]); + + viewSwitch0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2000-2090'); + expect(getCellIndices(cells, '.selected'), 'to equal', [2]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [2]); + expect(getCellIndices(cells, '.range-end'), 'to equal', [5]); + expect(getCellIndices(cells, '.range'), 'to equal', [3, 4]); + expect(getCellIndices(cells, '.focused'), 'to equal', [5]); + + // range-end + input1.focus(); + viewSwitch1.click(); + viewSwitch1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2040-2049'); + expect(getCellIndices(cells, '.selected'), 'to equal', [2]); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', [2]); + expect(getCellIndices(cells, '.range'), 'to equal', [0, 1]); + expect(getCellIndices(cells, '.focused'), 'to equal', [2]); + + nextBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2050-2059'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', []); + expect(getCellIndices(cells, '.focused'), 'to equal', [2]); + + prevBtn1.click(); + prevBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2030-2039'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range').length, 'to be', 12); + expect(getCellIndices(cells, '.focused'), 'to equal', [2]); + + prevBtn1.click(); + prevBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2010-2019'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', [8]); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', [9, 10, 11]); + expect(getCellIndices(cells, '.focused'), 'to equal', [2]); + + viewSwitch1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2000-2090'); + expect(getCellIndices(cells, '.selected'), 'to equal', [5]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [2]); + expect(getCellIndices(cells, '.range-end'), 'to equal', [5]); + expect(getCellIndices(cells, '.range'), 'to equal', [3, 4]); + expect(getCellIndices(cells, '.focused'), 'to equal', [2]); + + drp.destroy(); + + // range over centures (decades views) + input0.value = '01/22/1984'; + input1.value = '12/31/2121'; + + ({drp, picker0, picker1} = createDRP(elem)); + ([viewSwitch0, prevBtn0, nextBtn0] = getParts(picker0, partsClasses)); + ([viewSwitch1, prevBtn1, nextBtn1] = getParts(picker1, partsClasses)); + + // range-start + input0.focus(); + viewSwitch0.click(); + viewSwitch0.click(); + viewSwitch0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '1900-1990'); + expect(getCellIndices(cells, '.selected'), 'to equal', [9]); + expect(getCellIndices(cells, '.range-start'), 'to equal', [9]); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', [10, 11]); + expect(getCellIndices(cells, '.focused'), 'to equal', [9]); + + prevBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '1800-1890'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', []); + expect(getCellIndices(cells, '.focused'), 'to equal', [9]); + + nextBtn0.click(); + nextBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2000-2090'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range').length, 'to be', 12); + expect(getCellIndices(cells, '.focused'), 'to equal', [9]); + + nextBtn0.click(); + cells = getCells(picker0); + + expect(viewSwitch0.textContent, 'to be', '2100-2190'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', [3]); + expect(getCellIndices(cells, '.range'), 'to equal', [0, 1, 2]); + expect(getCellIndices(cells, '.focused'), 'to equal', [9]); + + // range-end + input1.focus(); + viewSwitch1.click(); + viewSwitch1.click(); + viewSwitch1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2100-2190'); + expect(getCellIndices(cells, '.selected'), 'to equal', [3]); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', [3]); + expect(getCellIndices(cells, '.range'), 'to equal', [0, 1, 2]); + expect(getCellIndices(cells, '.focused'), 'to equal', [3]); + + nextBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2200-2290'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', []); + expect(getCellIndices(cells, '.focused'), 'to equal', [3]); + + prevBtn1.click(); + prevBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '2000-2090'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', []); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range').length, 'to be', 12); + expect(getCellIndices(cells, '.focused'), 'to equal', [3]); + + prevBtn1.click(); + cells = getCells(picker1); + + expect(viewSwitch1.textContent, 'to be', '1900-1990'); + expect(getCellIndices(cells, '.selected'), 'to equal', []); + expect(getCellIndices(cells, '.range-start'), 'to equal', [9]); + expect(getCellIndices(cells, '.range-end'), 'to equal', []); + expect(getCellIndices(cells, '.range'), 'to equal', [10, 11]); + expect(getCellIndices(cells, '.focused'), 'to equal', [3]); + + drp.destroy(); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/DateRangePicker/api-methods.js b/node_modules/flowbite-datepicker/test/DateRangePicker/api-methods.js new file mode 100644 index 0000000..321bb99 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/DateRangePicker/api-methods.js @@ -0,0 +1,415 @@ +describe('DateRangePicker - API methods', function () { + let clock; + let elem; + let input0; + let input1; + + before(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + }); + + after(function () { + clock.restore(); + }); + + beforeEach(function () { + elem = domUtils.parseHTML('
').firstChild; + [input0, input1] = elem.children; + testContainer.appendChild(elem); + }); + + afterEach(function () { + testContainer.removeChild(elem); + }); + + describe('getDates()', function () { + it('returns an array of the Date objects of selected dates', function () { + input0.value = '04/20/2020'; + input1.value = '04/22/2020'; + + const drp = new DateRangePicker(elem); + expect(drp.getDates(), 'to equal', [ + new Date(dateValue(2020, 3, 20)), + new Date(dateValue(2020, 3, 22)), + ]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + it('returns a formatted date stirngs of selected dates if the format is specified', function () { + input0.value = '04/20/2020'; + input1.value = '04/22/2020'; + + const drp = new DateRangePicker(elem); + expect(drp.getDates('yyyy-mm-dd'), 'to equal', ['2020-04-20', '2020-04-22']); + expect(drp.getDates('d M, yy'), 'to equal', ['20 Apr, 20', '22 Apr, 20']); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + it('uses undefined instead of Date object if date is not selected', function () { + const drp = new DateRangePicker(elem); + expect(drp.getDates(), 'to equal', [undefined, undefined]); + expect(drp.getDates('yyyy-mm-dd'), 'to equal', [undefined, undefined]); + + drp.destroy(); + }); + }); + + describe('setDates()', function () { + let drp; + let picker0; + let picker1; + let viewSwitch0; + let viewSwitch1; + let cells0; + let cells1; + + it('changes the selected dates to given dates', function () { + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.setDates('2/11/2020', '2/14/2020'); + + expect(drp.datepickers[0].dates, 'to equal', [dateValue(2020, 1, 11)]); + expect(input0.value, 'to be', '02/11/2020'); + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [16]); + expect(getCellIndices(cells0, '.range-start'), 'to equal', [16]); + expect(getCellIndices(cells0, '.range-end'), 'to equal', [19]); + expect(getCellIndices(cells0, '.range'), 'to equal', [17, 18]); + expect(getCellIndices(cells0, '.focused'), 'to equal', [16]); + + expect(drp.datepickers[1].dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input1.value, 'to be', '02/14/2020'); + expect(viewSwitch1.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [19]); + expect(getCellIndices(cells1, '.range-start'), 'to equal', [16]); + expect(getCellIndices(cells1, '.range-end'), 'to equal', [19]); + expect(getCellIndices(cells1, '.range'), 'to equal', [17, 18]); + expect(getCellIndices(cells1, '.focused'), 'to equal', [19]); + + drp.setDates(new Date(2020, 4, 31), new Date(2020, 6, 5).getTime()); + + expect(drp.datepickers[0].dates, 'to equal', [dateValue(2020, 4, 31)]); + expect(input0.value, 'to be', '05/31/2020'); + expect(viewSwitch0.textContent, 'to be', 'May 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [35]); + expect(getCellIndices(cells0, '.range-start'), 'to equal', [35]); + expect(getCellIndices(cells0, '.range-end'), 'to equal', []); + expect(getCellIndices(cells0, '.range'), 'to equal', [36, 37, 38, 39, 40, 41]); + expect(getCellIndices(cells0, '.focused'), 'to equal', [35]); + + expect(drp.datepickers[1].dates, 'to equal', [dateValue(2020, 6, 5)]); + expect(input1.value, 'to be', '07/05/2020'); + expect(viewSwitch1.textContent, 'to be', 'July 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [7]); + expect(getCellIndices(cells1, '.range-start'), 'to equal', []); + expect(getCellIndices(cells1, '.range-end'), 'to equal', [7]); + expect(getCellIndices(cells1, '.range'), 'to equal', [0, 1, 2, 3, 4, 5, 6]); + expect(getCellIndices(cells1, '.focused'), 'to equal', [7]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + it('swapps star↔︎end dates if given start date > end date', function () { + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.setDates(new Date(2020, 6, 5).getTime(), new Date(2020, 4, 31)); + + expect(drp.datepickers[0].dates, 'to equal', [dateValue(2020, 4, 31)]); + expect(input0.value, 'to be', '05/31/2020'); + expect(viewSwitch0.textContent, 'to be', 'May 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [35]); + + expect(drp.datepickers[1].dates, 'to equal', [dateValue(2020, 6, 5)]); + expect(input1.value, 'to be', '07/05/2020'); + expect(viewSwitch1.textContent, 'to be', 'July 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [7]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + it('ignores invalid dates and the same date as the current one and leaves that side untouched', function () { + input0.value = '02/11/2020'; + input1.value = '02/14/2020'; + + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.setDates('', '3/14/2020'); + + expect(drp.datepickers[0].dates, 'to equal', [dateValue(2020, 1, 11)]); + expect(input0.value, 'to be', '02/11/2020'); + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [16]); + + expect(drp.datepickers[1].dates, 'to equal', [dateValue(2020, 2, 14)]); + expect(input1.value, 'to be', '03/14/2020'); + expect(viewSwitch1.textContent, 'to be', 'March 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [13]); + + let date0Str; + let date0YM; + let date0Indices; + if (new Date(0).getDate() === 1) { + date0Str = '01/01/1970'; + date0YM = 'January 1970'; + date0Indices = [4]; + } else { + date0Str = '12/31/1969'; + date0YM = 'December 1969'; + date0Indices = [31]; + } + + drp.setDates(0, new Date(-1, 11, 31)); + + expect(drp.datepickers[0].dates, 'to equal', [dateValue(0)]); + expect(input0.value, 'to be', date0Str); + expect(viewSwitch0.textContent, 'to be', date0YM); + expect(getCellIndices(cells0, '.selected'), 'to equal', date0Indices); + + expect(drp.datepickers[1].dates, 'to equal', [dateValue(2020, 2, 14)]); + expect(input1.value, 'to be', '03/14/2020'); + expect(viewSwitch1.textContent, 'to be', 'March 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [13]); + + input1.value = 'foo'; + drp.setDates('2/11/2020', '3/14/2020'); + + expect(drp.datepickers[0].dates, 'to equal', [dateValue(2020, 1, 11)]); + expect(input0.value, 'to be', '02/11/2020'); + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [16]); + + expect(drp.datepickers[1].dates, 'to equal', [dateValue(2020, 2, 14)]); + expect(input1.value, 'to be', '03/14/2020'); + expect(viewSwitch1.textContent, 'to be', 'March 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [13]); + + input0.value = 'foo'; + drp.setDates('2/11/2020', '2/14/2020'); + + expect(drp.datepickers[0].dates, 'to equal', [dateValue(2020, 1, 11)]); + expect(input0.value, 'to be', '02/11/2020'); + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [16]); + + expect(drp.datepickers[1].dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input1.value, 'to be', '02/14/2020'); + expect(viewSwitch1.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [19]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + it('sets the same date to both sides if called with one side only when range is not selected', function () { + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.setDates('2/11/2020'); + + expect(drp.datepickers[0].dates, 'to equal', [dateValue(2020, 1, 11)]); + expect(input0.value, 'to be', '02/11/2020'); + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [16]); + + expect(drp.datepickers[1].dates, 'to equal', [dateValue(2020, 1, 11)]); + expect(input1.value, 'to be', '02/11/2020'); + expect(viewSwitch1.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [16]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.setDates(undefined, '3/14/2020'); + + expect(drp.datepickers[0].dates, 'to equal', [dateValue(2020, 2, 14)]); + expect(input0.value, 'to be', '03/14/2020'); + expect(viewSwitch0.textContent, 'to be', 'March 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [13]); + + expect(drp.datepickers[1].dates, 'to equal', [dateValue(2020, 2, 14)]); + expect(input1.value, 'to be', '03/14/2020'); + expect(viewSwitch1.textContent, 'to be', 'March 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [13]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + it('clears both sides if {clear: true} is passed as the last effective argument instrad of a date', function () { + input0.value = '02/11/2020'; + input1.value = '02/14/2020'; + + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + // start: clear + end: ineffective (unspecified) + drp.setDates({clear: true}); + + expect(drp.datepickers[0].dates, 'to equal', []); + expect(input0.value, 'to be', ''); + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', []); + + expect(drp.datepickers[1].dates, 'to equal', []); + expect(input1.value, 'to be', ''); + expect(viewSwitch1.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', []); + + drp.destroy(); + input0.value = '02/11/2020'; + input1.value = '02/14/2020'; + + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + // start: clear + end: ineffective (same date) + drp.setDates({clear: true}, '2/14/2020'); + + expect(drp.datepickers[0].dates, 'to equal', []); + expect(input0.value, 'to be', ''); + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', []); + + expect(drp.datepickers[1].dates, 'to equal', []); + expect(input1.value, 'to be', ''); + expect(viewSwitch1.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', []); + + drp.destroy(); + input0.value = '02/11/2020'; + input1.value = '02/14/2020'; + + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + // start: valid date + end: clear + drp.setDates('4/20/2020', {clear: true}); + + expect(drp.datepickers[0].dates, 'to equal', []); + expect(input0.value, 'to be', ''); + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', []); + + expect(drp.datepickers[1].dates, 'to equal', []); + expect(input1.value, 'to be', ''); + expect(viewSwitch1.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', []); + + drp.destroy(); + input0.value = '02/11/2020'; + input1.value = '02/14/2020'; + + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + // start: ineffective (same date) + end: clear + drp.setDates('2/11/2020', {clear: true}); + + expect(drp.datepickers[0].dates, 'to equal', []); + expect(input0.value, 'to be', ''); + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', []); + + expect(drp.datepickers[1].dates, 'to equal', []); + expect(input1.value, 'to be', ''); + expect(viewSwitch1.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', []); + + drp.destroy(); + }); + + it('sets the end date to both sides if {clear: true} is passed to start and an eefective date to end', function () { + input0.value = '02/11/2020'; + input1.value = '02/11/2020'; + + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.setDates({clear: true}, '2/14/2020'); + + expect(drp.datepickers[0].dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input0.value, 'to be', '02/14/2020'); + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [19]); + + expect(drp.datepickers[1].dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input1.value, 'to be', '02/14/2020'); + expect(viewSwitch1.textContent, 'to be', 'February 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [19]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.setDates({clear: true}, '3/14/2020'); + + expect(drp.datepickers[0].dates, 'to equal', [dateValue(2020, 2, 14)]); + expect(input0.value, 'to be', '03/14/2020'); + expect(viewSwitch0.textContent, 'to be', 'March 2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [13]); + + expect(drp.datepickers[1].dates, 'to equal', [dateValue(2020, 2, 14)]); + expect(input1.value, 'to be', '03/14/2020'); + expect(viewSwitch1.textContent, 'to be', 'March 2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [13]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/DateRangePicker/date-selection.js b/node_modules/flowbite-datepicker/test/DateRangePicker/date-selection.js new file mode 100644 index 0000000..6b593cd --- /dev/null +++ b/node_modules/flowbite-datepicker/test/DateRangePicker/date-selection.js @@ -0,0 +1,472 @@ +describe('DateRangePicker - date selection', function () { + let clock; + let elem; + let input0; + let input1; + // + let drp; + let picker0; + let picker1; + let viewSwitch0; + let viewSwitch1; + let nextBtn0; + let nextBtn1; + let cells0; + let cells1; + + before(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + }); + + after(function () { + clock.restore(); + }); + + beforeEach(function () { + elem = domUtils.parseHTML('
').firstChild; + [input0, input1] = elem.children; + testContainer.appendChild(elem); + }); + + afterEach(function () { + testContainer.removeChild(elem); + }); + + it('same date is set to both sides if a date is selected on one side when selections are none', function () { + let selectDate = dateValue(2020, 1, 11); + + ({drp, picker0, picker1} = createDRP(elem)); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.datepickers[0].show(); + cells0[16].click(); + + expect(drp.dates, 'to equal', [selectDate, selectDate]); + expect(input0.value, 'to be', '02/11/2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-end'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range'), 'to equal', []); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[16]]); + + expect(input1.value, 'to be', '02/11/2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[16]]); + expect(filterCells(cells1, '.range-start'), 'to equal', [cells1[16]]); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[16]]); + expect(filterCells(cells1, '.range'), 'to equal', []); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[16]]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + + ({drp, picker0, picker1} = createDRP(elem)); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.datepickers[1].show(); + cells1[16].click(); + + expect(drp.dates, 'to equal', [selectDate, selectDate]); + expect(input0.value, 'to be', '02/11/2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-end'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range'), 'to equal', []); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[16]]); + + expect(input1.value, 'to be', '02/11/2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[16]]); + expect(filterCells(cells1, '.range-start'), 'to equal', [cells1[16]]); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[16]]); + expect(filterCells(cells1, '.range'), 'to equal', []); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[16]]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + + // other month than default view date's + // (issue #17, #19) + let partsClasses = ['.view-switch', '.next-btn']; + selectDate = dateValue(2020, 2, 10); + + ({drp, picker0, picker1} = createDRP(elem)); + [viewSwitch0, nextBtn0] = getParts(picker0, partsClasses); + [viewSwitch1, nextBtn1] = getParts(picker1, partsClasses); + + drp.datepickers[0].show(); + nextBtn0.click(); + getCells(picker0)[9].click(); + + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + expect(drp.dates, 'to equal', [selectDate, selectDate]); + expect(input0.value, 'to be', '03/10/2020'); + expect(viewSwitch0.textContent, 'to equal', 'March 2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[9]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[9]]); + expect(filterCells(cells0, '.range-end'), 'to equal', [cells0[9]]); + expect(filterCells(cells0, '.range'), 'to equal', []); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[9]]); + + expect(input1.value, 'to be', '03/10/2020'); + expect(viewSwitch1.textContent, 'to equal', 'March 2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[9]]); + expect(filterCells(cells1, '.range-start'), 'to equal', [cells1[9]]); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[9]]); + expect(filterCells(cells1, '.range'), 'to equal', []); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[9]]); + + drp.datepickers[1].show(); + nextBtn1.click(); + expect(viewSwitch1.textContent, 'to equal', 'April 2020'); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + + ({drp, picker0, picker1} = createDRP(elem)); + [viewSwitch0, nextBtn0] = getParts(picker0, partsClasses); + [viewSwitch1, nextBtn1] = getParts(picker1, partsClasses); + + drp.datepickers[1].show(); + nextBtn1.click(); + getCells(picker1)[9].click(); + + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + expect(drp.dates, 'to equal', [selectDate, selectDate]); + expect(input0.value, 'to be', '03/10/2020'); + expect(viewSwitch0.textContent, 'to equal', 'March 2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[9]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[9]]); + expect(filterCells(cells0, '.range-end'), 'to equal', [cells0[9]]); + expect(filterCells(cells0, '.range'), 'to equal', []); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[9]]); + + expect(input1.value, 'to be', '03/10/2020'); + expect(viewSwitch1.textContent, 'to equal', 'March 2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[9]]); + expect(filterCells(cells1, '.range-start'), 'to equal', [cells1[9]]); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[9]]); + expect(filterCells(cells1, '.range'), 'to equal', []); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[9]]); + + drp.datepickers[0].show(); + nextBtn0.click(); + expect(viewSwitch0.textContent, 'to equal', 'April 2020'); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + it('selections are cleared from both sides if selected date on one side is cleared', function () { + input0.value = '02/11/2020'; + input1.value = '02/11/2020'; + + ({drp, picker0, picker1} = createDRP(elem)); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + input0.value = ''; + simulant.fire(input0, 'keydown', {key: 'Enter'}); + + expect(drp.dates, 'to equal', [undefined, undefined]); + expect(input0.value, 'to be', ''); + expect(filterCells(cells0, '.selected'), 'to equal', []); + expect(filterCells(cells0, '.range-start'), 'to equal', []); + expect(filterCells(cells0, '.range-end'), 'to equal', []); + expect(filterCells(cells0, '.range'), 'to equal', []); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[19]]); + + expect(input1.value, 'to be', ''); + expect(filterCells(cells1, '.selected'), 'to equal', []); + expect(filterCells(cells1, '.range-start'), 'to equal', []); + expect(filterCells(cells1, '.range-end'), 'to equal', []); + expect(filterCells(cells1, '.range'), 'to equal', []); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[19]]); + + drp.destroy(); + + input0.value = '02/11/2020'; + input1.value = '02/11/2020'; + ({drp, picker0, picker1} = createDRP(elem)); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + input1.value = ''; + simulant.fire(input1, 'keydown', {key: 'Enter'}); + + expect(drp.dates, 'to equal', [undefined, undefined]); + expect(input0.value, 'to be', ''); + expect(filterCells(cells0, '.selected'), 'to equal', []); + expect(filterCells(cells0, '.range-start'), 'to equal', []); + expect(filterCells(cells0, '.range-end'), 'to equal', []); + expect(filterCells(cells0, '.range'), 'to equal', []); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[19]]); + + expect(input1.value, 'to be', ''); + expect(filterCells(cells1, '.selected'), 'to equal', []); + expect(filterCells(cells1, '.range-start'), 'to equal', []); + expect(filterCells(cells1, '.range-end'), 'to equal', []); + expect(filterCells(cells1, '.range'), 'to equal', []); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[19]]); + + drp.destroy(); + }); + + it('dates are swapped if a date later than the 2nd picker\'s selection is seleted on the 1st picker', function () { + input0.value = '02/11/2020'; + input1.value = '02/11/2020'; + + ({drp, picker0, picker1} = createDRP(elem)); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.datepickers[0].show(); + cells0[20].click(); + + expect(drp.dates, 'to equal', [dateValue(2020, 1, 11), dateValue(2020, 1, 15)]); + expect(input0.value, 'to be', '02/11/2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-end'), 'to equal', [cells0[20]]); + expect(filterCells(cells0, '.range'), 'to equal', [cells0[17], cells0[18], cells0[19]]); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[16]]); + + expect(input1.value, 'to be', '02/15/2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[20]]); + expect(filterCells(cells1, '.range-start'), 'to equal', [cells1[16]]); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[20]]); + expect(filterCells(cells1, '.range'), 'to equal', [cells1[17], cells1[18], cells1[19]]); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[20]]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + it('dates are swapped if a date earlier than the 1st picker\'s selection is seleted on the 2nd picker', function () { + input0.value = '02/11/2020'; + input1.value = '02/11/2020'; + + ({drp, picker0, picker1} = createDRP(elem)); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.datepickers[1].show(); + cells1[12].click(); + + expect(drp.dates, 'to equal', [dateValue(2020, 1, 7), dateValue(2020, 1, 11)]); + expect(input0.value, 'to be', '02/07/2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[12]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[12]]); + expect(filterCells(cells0, '.range-end'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range'), 'to equal', [cells0[13], cells0[14], cells0[15]]); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[12]]); + + expect(input1.value, 'to be', '02/11/2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[16]]); + expect(filterCells(cells1, '.range-start'), 'to equal', [cells1[12]]); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[16]]); + expect(filterCells(cells1, '.range'), 'to equal', [cells1[13], cells1[14], cells1[15]]); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[16]]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + describe('range between different months', function () { + it('each picker displays the month of corresponding end of the range', function () { + input0.value = '02/25/2020'; + input1.value = '03/05/2020'; + + ({drp, picker0, picker1} = createDRP(elem)); + viewSwitch0 = picker0.querySelector('.view-switch'); + viewSwitch1 = picker1.querySelector('.view-switch'); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[30]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[30]]); + expect(filterCells(cells0, '.range-end'), 'to equal', [cells0[39]]); + expect(filterCells(cells0, '.range'), 'to equal', cells0.slice(31, 39)); + + expect(viewSwitch1.textContent, 'to be', 'March 2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[4]]); + expect(filterCells(cells1, '.range-start'), 'to equal', []); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[4]]); + expect(filterCells(cells1, '.range'), 'to equal', cells1.slice(0, 4)); + + drp.datepickers[1].show(); + picker1.querySelector('.next-btn').click(); + cells1 = getCells(picker1); + cells1[24].click(); + + expect(drp.dates, 'to equal', [dateValue(2020, 1, 25), dateValue(2020, 3, 22)]); + expect(input0.value, 'to be', '02/25/2020'); + expect(input1.value, 'to be', '04/22/2020'); + + expect(viewSwitch0.textContent, 'to be', 'February 2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[30]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[30]]); + expect(filterCells(cells0, '.range-end'), 'to equal', []); + expect(filterCells(cells0, '.range'), 'to equal', cells0.slice(31)); + + expect(viewSwitch1.textContent, 'to be', 'April 2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[24]]); + expect(filterCells(cells1, '.range-start'), 'to equal', []); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[24]]); + expect(filterCells(cells1, '.range'), 'to equal', cells1.slice(0, 24)); + + input0.value = '02/14/1998'; + simulant.fire(input0, 'keydown', {key: 'Enter'}); + cells0 = getCells(picker0); + + expect(drp.dates, 'to equal', [dateValue(1998, 1, 14), dateValue(2020, 3, 22)]); + expect(input0.value, 'to be', '02/14/1998'); + expect(input1.value, 'to be', '04/22/2020'); + + expect(viewSwitch0.textContent, 'to be', 'February 1998'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[13]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[13]]); + expect(filterCells(cells0, '.range-end'), 'to equal', []); + expect(filterCells(cells0, '.range'), 'to equal', cells0.slice(14)); + + expect(viewSwitch1.textContent, 'to be', 'April 2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[24]]); + expect(filterCells(cells1, '.range-start'), 'to equal', []); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[24]]); + expect(filterCells(cells1, '.range'), 'to equal', cells1.slice(0, 24)); + + drp.datepickers[0].show(); + + // months view + viewSwitch0.click(); + cells0 = getCells(picker0); + expect(viewSwitch0.textContent, 'to be', '1998'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[1]]); + + viewSwitch1.click(); + cells1 = getCells(picker1); + expect(viewSwitch1.textContent, 'to be', '2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[3]]); + + // years view + viewSwitch0.click(); + cells0 = getCells(picker0); + expect(viewSwitch0.textContent, 'to be', '1990-1999'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[9]]); + + viewSwitch1.click(); + cells1 = getCells(picker1); + expect(viewSwitch1.textContent, 'to be', '2020-2029'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[1]]); + + // decades view + viewSwitch0.click(); + cells0 = getCells(picker0); + expect(viewSwitch0.textContent, 'to be', '1900-1990'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[10]]); + + viewSwitch1.click(); + cells1 = getCells(picker1); + expect(viewSwitch1.textContent, 'to be', '2000-2090'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[3]]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + it('dates are swapped if a date later than the 2nd picker\'s selection is seleted on the 1st picker', function () { + ({drp, picker0, picker1} = createDRP(elem)); + [viewSwitch0, nextBtn0] = getParts(picker0, ['.view-switch', '.next-btn']); + viewSwitch1 = picker1.querySelector('.view-switch'); + + drp.datepickers[1].show(); + getCells(picker1)[16].click(); + drp.datepickers[1].hide(); + drp.datepickers[0].show(); + expect(viewSwitch0.textContent, 'to equal', 'February 2020'); + + nextBtn0.click(); + expect(viewSwitch0.textContent, 'to equal', 'March 2020'); + + getCells(picker0)[9].click(); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + expect(drp.dates, 'to equal', [dateValue(2020, 1, 11), dateValue(2020, 2, 10)]); + expect(input0.value, 'to be', '02/11/2020'); + expect(viewSwitch0.textContent, 'to equal', 'February 2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-end'), 'to equal', []); + expect(filterCells(cells0, '.range'), 'to equal', cells0.slice(17)); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[16]]); + + expect(input1.value, 'to be', '03/10/2020'); + expect(viewSwitch1.textContent, 'to equal', 'March 2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[9]]); + expect(filterCells(cells1, '.range-start'), 'to equal', []); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[9]]); + expect(filterCells(cells1, '.range'), 'to equal', cells1.slice(0, 9)); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[9]]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + + it('dates are swapped if a date earlier than the 1st picker\'s selection is seleted on the 2nd picker', function () { + let prevBtn1; + + ({drp, picker0, picker1} = createDRP(elem)); + [viewSwitch0, nextBtn0] = getParts(picker0, ['.view-switch', '.next-btn']); + [viewSwitch1, prevBtn1] = getParts(picker1, ['.view-switch', '.prev-btn']); + + drp.datepickers[0].show(); + nextBtn0.click(); + getCells(picker0)[9].click(); + drp.datepickers[0].hide(); + drp.datepickers[1].show(); + expect(viewSwitch1.textContent, 'to equal', 'March 2020'); + + prevBtn1.click(); + expect(viewSwitch1.textContent, 'to equal', 'February 2020'); + + getCells(picker1)[16].click(); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + expect(drp.dates, 'to equal', [dateValue(2020, 1, 11), dateValue(2020, 2, 10)]); + expect(input0.value, 'to be', '02/11/2020'); + expect(viewSwitch0.textContent, 'to equal', 'February 2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-end'), 'to equal', []); + expect(filterCells(cells0, '.range'), 'to equal', cells0.slice(17)); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[16]]); + + expect(input1.value, 'to be', '03/10/2020'); + expect(viewSwitch1.textContent, 'to equal', 'March 2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[9]]); + expect(filterCells(cells1, '.range-start'), 'to equal', []); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[9]]); + expect(filterCells(cells1, '.range'), 'to equal', cells1.slice(0, 9)); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[9]]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/DateRangePicker/options.js b/node_modules/flowbite-datepicker/test/DateRangePicker/options.js new file mode 100644 index 0000000..9820598 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/DateRangePicker/options.js @@ -0,0 +1,308 @@ +describe('DateRangePicker - options', function () { + let clock; + let elem; + let input0; + let input1; + + before(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + }); + + after(function () { + clock.restore(); + }); + + beforeEach(function () { + elem = domUtils.parseHTML('
').firstChild; + [input0, input1] = elem.children; + testContainer.appendChild(elem); + }); + + afterEach(function () { + testContainer.removeChild(elem); + }); + + describe('allowOneSidedRange', function () { + it('disables the requirement for both sides of range to be set/unset', function () { + let {drp, picker0, picker1} = createDRP(elem, {allowOneSidedRange: true}); + let cells0 = getCells(picker0); + let cells1 = getCells(picker1); + + drp.datepickers[0].show(); + cells0[16].click(); + + expect(drp.dates, 'to equal', [dateValue(2020, 1, 11), undefined]); + expect(drp.getDates(), 'to equal', [new Date(drp.dates[0]), undefined]); + expect(input0.value, 'to be', '02/11/2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-end'), 'to equal', []); + expect(filterCells(cells0, '.range'), 'to equal', []); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[16]]); + + expect(input1.value, 'to be', ''); + expect(filterCells(cells1, '.selected'), 'to equal', []); + expect(filterCells(cells1, '.range-start'), 'to equal', [cells1[16]]); + expect(filterCells(cells1, '.range-end'), 'to equal', []); + expect(filterCells(cells1, '.range'), 'to equal', []); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[19]]); + + drp.datepickers[1].show(); + cells1[25].click(); + + expect(drp.dates, 'to equal', [dateValue(2020, 1, 11), dateValue(2020, 1, 20)]); + expect(drp.getDates(), 'to equal', drp.dates.map(date => new Date(date))); + expect(input0.value, 'to be', '02/11/2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-start'), 'to equal', [cells0[16]]); + expect(filterCells(cells0, '.range-end'), 'to equal', [cells0[25]]); + expect(filterCells(cells0, '.range'), 'to equal', cells0.slice(17, 25)); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[16]]); + + expect(input1.value, 'to be', '02/20/2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[25]]); + expect(filterCells(cells1, '.range-start'), 'to equal', [cells1[16]]); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[25]]); + expect(filterCells(cells1, '.range'), 'to equal', cells1.slice(17, 25)); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[25]]); + + simulant.fire(input0, 'keydown', {key: 'Escape'}); + input0.value = ''; + simulant.fire(input0, 'keydown', {key: 'Enter'}); + + expect(drp.dates, 'to equal', [undefined, dateValue(2020, 1, 20)]); + expect(drp.getDates(), 'to equal', [undefined, new Date(drp.dates[1])]); + expect(input0.value, 'to be', ''); + expect(filterCells(cells0, '.selected'), 'to equal', []); + expect(filterCells(cells0, '.range-start'), 'to equal', []); + expect(filterCells(cells0, '.range-end'), 'to equal', [cells0[25]]); + expect(filterCells(cells0, '.range'), 'to equal', []); + expect(filterCells(cells0, '.focused'), 'to equal', [cells0[19]]); + + expect(input1.value, 'to be', '02/20/2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[25]]); + expect(filterCells(cells1, '.range-start'), 'to equal', []); + expect(filterCells(cells1, '.range-end'), 'to equal', [cells1[25]]); + expect(filterCells(cells1, '.range'), 'to equal', []); + expect(filterCells(cells1, '.focused'), 'to equal', [cells1[25]]); + + drp.destroy(); + input0.value = ''; + input1.value = ''; + + // by setDates() + ({drp, picker0, picker1} = createDRP(elem, {allowOneSidedRange: true})); + cells0 = getCells(picker0); + cells1 = getCells(picker1); + + drp.setDates('02/11/2020'); + + expect(drp.dates, 'to equal', [dateValue(2020, 1, 11), undefined]); + expect(input0.value, 'to be', '02/11/2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[16]]); + expect(input1.value, 'to be', ''); + expect(filterCells(cells1, '.selected'), 'to equal', []); + + drp.setDates(undefined, '02/20/2020'); + + expect(drp.dates, 'to equal', [dateValue(2020, 1, 11), dateValue(2020, 1, 20)]); + expect(input0.value, 'to be', '02/11/2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[16]]); + expect(input1.value, 'to be', '02/20/2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[25]]); + + drp.setDates({clear: true}); + + expect(drp.dates, 'to equal', [undefined, dateValue(2020, 1, 20)]); + expect(input0.value, 'to be', ''); + expect(filterCells(cells0, '.selected'), 'to equal', []); + expect(input1.value, 'to be', '02/20/2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[25]]); + + drp.setDates('02/11/2020', {clear: true}); + + expect(drp.dates, 'to equal', [dateValue(2020, 1, 11), undefined]); + expect(input0.value, 'to be', '02/11/2020'); + expect(filterCells(cells0, '.selected'), 'to equal', [cells0[16]]); + expect(input1.value, 'to be', ''); + expect(filterCells(cells1, '.selected'), 'to equal', []); + + drp.setDates({clear: true}, '02/20/2020'); + + expect(drp.dates, 'to equal', [undefined, dateValue(2020, 1, 20)]); + expect(input0.value, 'to be', ''); + expect(filterCells(cells0, '.selected'), 'to equal', []); + expect(input1.value, 'to be', '02/20/2020'); + expect(filterCells(cells1, '.selected'), 'to equal', [cells1[25]]); + + drp.setDates(undefined, {clear: true}); + + expect(drp.dates, 'to equal', [undefined, undefined]); + expect(input0.value, 'to be', ''); + expect(filterCells(cells0, '.selected'), 'to equal', []); + expect(input1.value, 'to be', ''); + expect(filterCells(cells1, '.selected'), 'to equal', []); + + drp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const drp = new DateRangePicker(elem); + drp.setOptions({allowOneSidedRange: true}); + + input0.value = '02/11/2020'; + simulant.fire(input0, 'keydown', {key: 'Enter'}); + expect(drp.dates, 'to equal', [dateValue(2020, 1, 11), undefined]); + + drp.setDates({clear: true}, '02/11/2020'); + expect(drp.dates, 'to equal', [undefined, dateValue(2020, 1, 11)]); + + drp.setOptions({allowOneSidedRange: false}); + + input1.value = '02/20/2020'; + simulant.fire(input1, 'keydown', {key: 'Enter'}); + expect(drp.dates, 'to equal', [dateValue(2020, 1, 20), dateValue(2020, 1, 20)]); + + drp.setDates({clear: true}); + expect(drp.dates, 'to equal', [undefined, undefined]); + + drp.destroy(); + }); + }); + + describe('pickLevel', function () { + it('changes the span of range selection to 1st of a month → last day of a month when 1', function () { + input0.value = '2/14/2020'; + input1.value = '2/14/2020'; + + const {drp, picker0, picker1} = createDRP(elem, {pickLevel: 1}); + const viewSwitch0 = picker0.querySelector('.view-switch'); + const viewSwitch1 = picker1.querySelector('.view-switch'); + let cells0 = getCells(picker0); + let cells1 = getCells(picker1); + + input0.focus(); + expect(drp.dates, 'to equal', [dateValue(2020, 1, 1), dateValue(2020, 1, 29)]); + expect(input0.value, 'to be', '02/01/2020'); + expect(viewSwitch0.textContent, 'to be', '2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [1]); + expect(getCellIndices(cells0, '.range-start'), 'to equal', [1]); + expect(getCellIndices(cells0, '.range-end'), 'to equal', [1]); + expect(getCellIndices(cells0, '.range'), 'to equal', []); + expect(getCellIndices(cells0, '.focused'), 'to equal', [1]); + + input1.focus(); + expect(input1.value, 'to be', '02/29/2020'); + expect(viewSwitch1.textContent, 'to be', '2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [1]); + expect(getCellIndices(cells1, '.range-start'), 'to equal', [1]); + expect(getCellIndices(cells1, '.range-end'), 'to equal', [1]); + expect(getCellIndices(cells1, '.range'), 'to equal', []); + expect(getCellIndices(cells1, '.focused'), 'to equal', [1]); + + // mouse operation + cells0[0].click(); + cells1[6].click(); + + expect(drp.dates, 'to equal', [dateValue(2020, 0, 1), dateValue(2020, 6, 31)]); + expect(input0.value, 'to be', '01/01/2020'); + expect(viewSwitch0.textContent, 'to be', '2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [0]); + expect(getCellIndices(cells0, '.range-start'), 'to equal', [0]); + expect(getCellIndices(cells0, '.range-end'), 'to equal', [6]); + + input1.focus(); + expect(input1.value, 'to be', '07/31/2020'); + expect(viewSwitch1.textContent, 'to be', '2020'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [6]); + expect(getCellIndices(cells1, '.range-start'), 'to equal', [0]); + expect(getCellIndices(cells1, '.range-end'), 'to equal', [6]); + + // api call + drp.setDates('2/14/2021', '3/14/2020'); + + expect(drp.dates, 'to equal', [dateValue(2020, 2, 1), dateValue(2021, 1, 28)]); + expect(input0.value, 'to be', '03/01/2020'); + expect(viewSwitch0.textContent, 'to be', '2020'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [2]); + expect(getCellIndices(cells0, '.range-start'), 'to equal', [2]); + expect(getCellIndices(cells0, '.range-end'), 'to equal', []); + + input1.focus(); + expect(input1.value, 'to be', '02/28/2021'); + expect(viewSwitch1.textContent, 'to be', '2021'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [1]); + expect(getCellIndices(cells1, '.range-start'), 'to equal', []); + expect(getCellIndices(cells1, '.range-end'), 'to equal', [1]); + + drp.destroy(); + }); + + it('changes the span of range selection to Jan 1st of a month → Dec 31st of a month when 2', function () { + input0.value = '2/14/2020'; + input1.value = '2/14/2020'; + + const {drp, picker0, picker1} = createDRP(elem, {pickLevel: 2}); + const viewSwitch0 = picker0.querySelector('.view-switch'); + const viewSwitch1 = picker1.querySelector('.view-switch'); + let cells0 = getCells(picker0); + let cells1 = getCells(picker1); + + input0.focus(); + expect(drp.dates, 'to equal', [dateValue(2020, 0, 1), dateValue(2020, 11, 31)]); + expect(input0.value, 'to be', '01/01/2020'); + expect(viewSwitch0.textContent, 'to be', '2020-2029'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [1]); + expect(getCellIndices(cells0, '.range-start'), 'to equal', [1]); + expect(getCellIndices(cells0, '.range-end'), 'to equal', [1]); + expect(getCellIndices(cells0, '.range'), 'to equal', []); + expect(getCellIndices(cells0, '.focused'), 'to equal', [1]); + + input1.focus(); + expect(input1.value, 'to be', '12/31/2020'); + expect(viewSwitch1.textContent, 'to be', '2020-2029'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [1]); + expect(getCellIndices(cells1, '.range-start'), 'to equal', [1]); + expect(getCellIndices(cells1, '.range-end'), 'to equal', [1]); + expect(getCellIndices(cells1, '.range'), 'to equal', []); + expect(getCellIndices(cells1, '.focused'), 'to equal', [1]); + + // mouse operation + cells0[0].click(); + cells1[3].click(); + + expect(drp.dates, 'to equal', [dateValue(2019, 0, 1), dateValue(2022, 11, 31)]); + expect(input0.value, 'to be', '01/01/2019'); + expect(viewSwitch0.textContent, 'to be', '2010-2019'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [10]); + expect(getCellIndices(cells0, '.range-start'), 'to equal', [10]); + expect(getCellIndices(cells0, '.range-end'), 'to equal', []); + + input1.focus(); + expect(input1.value, 'to be', '12/31/2022'); + expect(viewSwitch1.textContent, 'to be', '2020-2029'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [3]); + expect(getCellIndices(cells1, '.range-start'), 'to equal', [0]); + expect(getCellIndices(cells1, '.range-end'), 'to equal', [3]); + + // api call + drp.setDates('2/14/2025', '3/14/2021'); + + expect(drp.dates, 'to equal', [dateValue(2021, 0, 1), dateValue(2025, 11, 31)]); + expect(input0.value, 'to be', '01/01/2021'); + expect(viewSwitch0.textContent, 'to be', '2020-2029'); + expect(getCellIndices(cells0, '.selected'), 'to equal', [2]); + expect(getCellIndices(cells0, '.range-start'), 'to equal', [2]); + expect(getCellIndices(cells0, '.range-end'), 'to equal', [6]); + + input1.focus(); + expect(input1.value, 'to be', '12/31/2025'); + expect(viewSwitch1.textContent, 'to be', '2020-2029'); + expect(getCellIndices(cells1, '.selected'), 'to equal', [6]); + expect(getCellIndices(cells1, '.range-start'), 'to equal', [2]); + expect(getCellIndices(cells1, '.range-end'), 'to equal', [6]); + + drp.destroy(); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/Datepicker/Datepicker-object.js b/node_modules/flowbite-datepicker/test/Datepicker/Datepicker-object.js new file mode 100644 index 0000000..cebbe59 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/Datepicker/Datepicker-object.js @@ -0,0 +1,236 @@ +describe('Datepicker', function () { + let input; + + before(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + after(function () { + testContainer.removeChild(input); + }); + + it('input element\'s value is used for the initial date', function () { + input.value = '04/22/2020'; + + const dp = new Datepicker(input); + expect(dp.dates, 'to equal', [dateValue(2020, 3, 22)]); + + dp.destroy(); + input.value = ''; + }); + + it('the picker is hidden at start', function () { + const dp = new Datepicker(input); + expect(isVisible(document.querySelector('.datepicker')), 'to be false'); + expect(dp.active, 'to be false'); + dp.destroy(); + }); + + it('the picker becomes visible when the input element get focused', function () { + const dp = new Datepicker(input); + input.focus(); + + expect(isVisible(document.querySelector('.datepicker')), 'to be true'); + expect(dp.active, 'to be true'); + dp.destroy(); + }); + + describe('hide()', function () { + it('makes the picker invisible', function () { + const dp = new Datepicker(input); + input.focus(); + dp.hide(); + + expect(isVisible(document.querySelector('.datepicker')), 'to be false'); + expect(dp.active, 'to be false'); + + dp.destroy(); + }); + }); + + describe('show()', function () { + it('makes the picker visible', function () { + const dp = new Datepicker(input); + dp.show(); + + expect(isVisible(document.querySelector('.datepicker')), 'to be true'); + expect(dp.active, 'to be true'); + + dp.destroy(); + }); + + it('moves the focus onto the input field', function () { + // related to issue #52 + const dp = new Datepicker(input); + const spyShow = sinon.spy(dp, 'show'); + input.blur(); + dp.show(); + + expect(document.activeElement, 'to be', input); + // the focus listener's calling show() is prevented + expect(spyShow.calledOnce, 'to be true'); + + spyShow.restore(); + dp.destroy(); + }); + + it('adds or removes dir attribute to/from the picker if picker\'s text direction != input\'s', function (done) { + testContainer.dir = 'rtl'; + + const {dp, picker} = createDP(input); + dp.show(); + expect(picker.dir, 'to be', 'rtl'); + + dp.hide(); + testContainer.removeAttribute('dir'); + + dp.show(); + expect(picker.hasAttribute('dir'), 'to be false'); + + dp.hide(); + + const htmlElem = document.querySelector('html'); + htmlElem.dir = 'rtl'; + input.style.direction = 'ltr'; + + dp.show(); + expect(picker.dir, 'to be', 'ltr'); + + dp.hide(); + input.removeAttribute('style'); + + dp.show(); + expect(picker.hasAttribute('dir'), 'to be false'); + + dp.destroy(); + htmlElem.removeAttribute('dir'); + htmlElem.style.direction = 'ltr'; + + const checkDirChange = () => { + if (window.getComputedStyle(htmlElem).direction === 'ltr') { + htmlElem.removeAttribute('style'); + done(); + } else { + setTimeout(checkDirChange, 10); + } + }; + checkDirChange(); + }); + }); + + describe('picker', function () { + it('displays current month with current date as focued date if no initial date is provided', function () { + let clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + + const {dp, picker} = createDP(input); + const days = Array.from(picker.querySelector('.datepicker-grid').children); + dp.show(); + + expect(getViewSwitch(picker).textContent, 'to be', 'February 2020'); + + expect(days, 'to have length', 42); + expect(filterCells(days, '.datepicker-cell'), 'to have length', 42); + expect(days[0].textContent, 'to be', '26'); + expect(days[0].classList.contains('prev'), 'to be true'); + expect(days[0].classList.contains('next'), 'to be false'); + expect(days[5].textContent, 'to be', '31'); + expect(days[5].classList.contains('prev'), 'to be true'); + expect(days[5].classList.contains('next'), 'to be false'); + expect(days[6].textContent, 'to be', '1'); + expect(days[6].classList.contains('prev'), 'to be false'); + expect(days[6].classList.contains('next'), 'to be false'); + expect(days[34].textContent, 'to be', '29'); + expect(days[34].classList.contains('prev'), 'to be false'); + expect(days[34].classList.contains('next'), 'to be false'); + expect(days[35].textContent, 'to be', '1'); + expect(days[35].classList.contains('prev'), 'to be false'); + expect(days[35].classList.contains('next'), 'to be true'); + expect(days[41].textContent, 'to be', '7'); + expect(days[41].classList.contains('prev'), 'to be false'); + expect(days[41].classList.contains('next'), 'to be true'); + + expect(filterCells(days, '.focused'), 'to equal', [days[19]]); + expect(filterCells(days, '.selected'), 'to be empty'); + expect(days[19].textContent, 'to be', '14'); + + dp.destroy(); + clock.restore(); + }); + + it('displays iniial date\'s month with the date as selected and focued date', function () { + input.value = '04/22/2020'; + + const {dp, picker} = createDP(input); + const days = Array.from(picker.querySelector('.datepicker-grid').children); + dp.show(); + + expect(getViewSwitch(picker).textContent, 'to be', 'April 2020'); + + expect(days, 'to have length', 42); + expect(filterCells(days, '.datepicker-cell'), 'to have length', 42); + expect(days[0].textContent, 'to be', '29'); + expect(days[0].classList.contains('prev'), 'to be true'); + expect(days[0].classList.contains('next'), 'to be false'); + expect(days[2].textContent, 'to be', '31'); + expect(days[2].classList.contains('prev'), 'to be true'); + expect(days[2].classList.contains('next'), 'to be false'); + expect(days[3].textContent, 'to be', '1'); + expect(days[3].classList.contains('prev'), 'to be false'); + expect(days[3].classList.contains('next'), 'to be false'); + expect(days[32].textContent, 'to be', '30'); + expect(days[32].classList.contains('prev'), 'to be false'); + expect(days[32].classList.contains('next'), 'to be false'); + expect(days[33].textContent, 'to be', '1'); + expect(days[33].classList.contains('prev'), 'to be false'); + expect(days[33].classList.contains('next'), 'to be true'); + expect(days[41].textContent, 'to be', '9'); + expect(days[41].classList.contains('prev'), 'to be false'); + expect(days[41].classList.contains('next'), 'to be true'); + + expect(filterCells(days, '.focused'), 'to equal', [days[24]]); + expect(filterCells(days, '.selected'), 'to equal', [days[24]]); + expect(days[24].textContent, 'to be', '22'); + + dp.destroy(); + input.value = ''; + }); + + it('displays day names of week by default', function () { + const {dp, picker} = createDP(input); + const daysOfWeek = picker.querySelector('.days-of-week'); + const days = Array.from(daysOfWeek.children).map(el => el.textContent); + + expect(days, 'to equal', ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']); + + dp.destroy(); + }); + + it('does not display calendar weeks by default', function () { + const {dp, picker} = createDP(input); + + expect(picker.querySelectorAll('.calendar-weeks').length, 'to be', 0); + + dp.destroy(); + }); + + it('uses "button" for the main class of button element', function () { + const {dp, picker} = createDP(input); + const [viewSwitch, prevBtn, nextBtn, todayBtn, clearBtn] = getParts(picker, [ + '.view-switch', + '.prev-btn', + '.next-btn', + '.today-btn', + '.clear-btn', + ]); + + expect(viewSwitch.className, 'to be', 'button view-switch'); + expect(prevBtn.className, 'to be', 'button prev-btn'); + expect(nextBtn.className, 'to be', 'button next-btn'); + expect(todayBtn.className, 'to be', 'button today-btn'); + expect(clearBtn.className, 'to be', 'button clear-btn'); + + dp.destroy(); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/Datepicker/api-methods.js b/node_modules/flowbite-datepicker/test/Datepicker/api-methods.js new file mode 100644 index 0000000..56e4aad --- /dev/null +++ b/node_modules/flowbite-datepicker/test/Datepicker/api-methods.js @@ -0,0 +1,328 @@ +describe('Datepicker - API methods', function () { + let clock; + let input; + let dp; + let picker; + + beforeEach(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 2, 14)}); + input = parseHTML('').firstChild; + testContainer.appendChild(input); + dp = new Datepicker(input); + picker = document.querySelector('.datepicker'); + input.focus(); // Activate for visibility checks + }); + + afterEach(function () { + if (input.datepicker) { + dp.destroy(); + } + testContainer.removeChild(input); + clock.restore(); + }); + + describe('getDate()', function () { + it('returns a Date object of selected date', function () { + const date = dp.getDate(); + expect(date, 'to be a date'); + expect(date.getTime(), 'to be', dateValue(2020, 3, 22)); + }); + + it('returns a formatted date stirng of selected date if the format is specified', function () { + expect(dp.getDate('yyyy-mm-dd'), 'to be', '2020-04-22'); + }); + + it('returns undefined if no date is selected', function () { + dp.destroy(); + input.value = ''; + dp = new Datepicker(input); + + expect(dp.getDate(), 'to be undefined'); + expect(dp.getDate('yyyy-mm-dd'), 'to be undefined'); + }); + }); + + describe('setDate()', function () { + it('changes the selected date to given date', function () { + const spyChnageEvent = sinon.spy(); + input.addEventListener('change', spyChnageEvent); + + const viewSwitdh = getViewSwitch(picker); + const date = new Date(2019, 11, 23); + dp.setDate(date); + + expect(dp.dates, 'to equal', [date.getTime()]); + expect(input.value, 'to be', '12/23/2019'); + expect(viewSwitdh.textContent, 'to be', 'December 2019'); + + let cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[22]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[22]]); + expect(cells[22].textContent, 'to be', '23'); + + dp.setDate('04/22/2020'); + + expect(dp.dates, 'to equal', [dateValue(2020, 3, 22)]); + expect(input.value, 'to be', '04/22/2020'); + expect(viewSwitdh.textContent, 'to be', 'April 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[24]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[24]]); + expect(cells[24].textContent, 'to be', '22'); + + // change by api call should not be a trigger of change event + // (issue #24) + expect(spyChnageEvent.called, 'to be false'); + input.removeEventListener('change', spyChnageEvent); + + // change the view to the selected daye's days view + // (issue #33) + dp.picker.changeFocus(dateValue(2021, 3, 20)).changeView(2).render(); + dp.setDate('02/14/2020'); + + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input.value, 'to be', '02/14/2020'); + expect(viewSwitdh.textContent, 'to be', 'February 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + expect(cells[19].textContent, 'to be', '14'); + }); + + it('does nothing if no date or invalid date is given', function () { + const viewSwitdh = getViewSwitch(picker); + const origDates = [dateValue(2020, 3, 22)]; + + dp.setDate(); + expect(dp.dates, 'to equal', origDates); + expect(input.value, 'to be', '04/22/2020'); + expect(viewSwitdh.textContent, 'to be', 'April 2020'); + + const cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[24]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[24]]); + expect(cells[24].textContent, 'to be', '22'); + + dp.setDate(''); + expect(dp.dates, 'to equal', origDates); + expect(input.value, 'to be', '04/22/2020'); + }); + + it('clears the selection if no dates + clear: true option are given', function () { + const spyChnageEvent = sinon.spy(); + input.addEventListener('change', spyChnageEvent); + + const viewSwitdh = getViewSwitch(picker); + const today = dateUtils.today(); + + dp.setDate({clear: true}); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(viewSwitdh.textContent, 'to be', Datepicker.formatDate(today, 'MM yyyy')); + + // view date is changed to the default view date (current date) + const cells = getCells(picker); + const todayCell = filterCells(cells, el => el.dataset.date == today)[0]; + expect(todayCell.textContent, 'to be', Datepicker.formatDate(today, 'd')); + expect(filterCells(cells, '.selected'), 'to equal', []); + expect(filterCells(cells, '.focused'), 'to equal', [todayCell]); + + // change by api call should not be a trigger of change event + // (issue #24) + expect(spyChnageEvent.called, 'to be false'); + input.removeEventListener('change', spyChnageEvent); + }); + + it('omits updating the picker UI if render option = false', function () { + const date = new Date(2019, 11, 23); + dp.setDate(date, {render: false}); + + expect(dp.dates, 'to equal', [date.getTime()]); + expect(input.value, 'to be', '12/23/2019'); + + const cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[24]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[24]]); + expect(cells[24].textContent, 'to be', '22'); + }); + + it('hides the picker if both render and autohide options are true', function () { + let date = new Date(2019, 11, 23); + dp.setDate(date, {render: false, autohide: true}); + + expect(dp.dates, 'to equal', [date.getTime()]); + expect(input.value, 'to be', '12/23/2019'); + expect(getViewSwitch(picker).textContent, 'to be', 'April 2020'); + expect(filterCells(getCells(picker), '.selected')[0].textContent, 'to be', '22'); + expect(isVisible(picker), 'to be true'); + + date = new Date(2018, 6, 14); + dp.setDate(date, {autohide: true}); + + expect(dp.dates, 'to equal', [date.getTime()]); + expect(input.value, 'to be', '07/14/2018'); + expect(getViewSwitch(picker).textContent, 'to be', 'July 2018'); + expect(filterCells(getCells(picker), '.selected')[0].textContent, 'to be', '14'); + expect(isVisible(picker), 'to be false'); + }); + }); + + describe('update()', function () { + it('updates the selected date with the input element\'s value', function () { + const viewSwitdh = getViewSwitch(picker); + const date = new Date(2019, 11, 23); + input.value = '12/23/2019'; + dp.update(); + + expect(dp.dates, 'to equal', [date.getTime()]); + expect(input.value, 'to be', '12/23/2019'); + expect(viewSwitdh.textContent, 'to be', 'December 2019'); + + let cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[22]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[22]]); + expect(cells[22].textContent, 'to be', '23'); + + // change the view to the selected daye's days view + // (issue #33) + dp.picker.changeFocus(dateValue(2021, 3, 20)).changeView(2).render(); + input.value = '02/14/2020'; + dp.update(); + + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input.value, 'to be', '02/14/2020'); + expect(viewSwitdh.textContent, 'to be', 'February 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + expect(cells[19].textContent, 'to be', '14'); + }); + + it('notmalizes iput text\'s format', function () { + const date = new Date(2020, 6, 4); + input.value = '7 4 2020'; + + dp.update(); + expect(dp.dates, 'to equal', [date.getTime()]); + expect(input.value, 'to be', '07/04/2020'); + expect(getViewSwitch(picker).textContent, 'to be', 'July 2020'); + expect(filterCells(getCells(picker), '.selected')[0].textContent, 'to be', '4'); + }); + }); + + describe('refresh()', function () { + it('refreshes the input element and picker UI to refrect the internal data', function () { + const spyChnageEvent = sinon.spy(); + input.addEventListener('change', spyChnageEvent); + + dp.dates = [dateValue(2020, 1, 14)]; + dp.refresh(); + + expect(input.value, 'to be', '02/14/2020'); + expect(getViewSwitch(picker).textContent, 'to be', 'February 2020'); + + const cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + expect(cells[19].textContent, 'to be', '14'); + + // change by api call should not be a trigger of change event + // (issue #24) + expect(spyChnageEvent.called, 'to be false'); + input.removeEventListener('change', spyChnageEvent); + }); + + it('also changes the view back to the selected date\'s days view', function () { + dp.dates = [dateValue(2020, 1, 14)]; + dp.picker.changeFocus(dateValue(2021, 3, 20)).changeView(2).render(); + dp.refresh(); + + expect(input.value, 'to be', '02/14/2020'); + expect(getViewSwitch(picker).textContent, 'to be', 'February 2020'); + + let cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + expect(cells[19].textContent, 'to be', '14'); + + // go back to the current date's days view if no date is selected + dp.dates = []; + dp.picker.changeFocus(dateValue(2019, 10, 22)).update().changeView(1).render(); + dp.refresh(); + + expect(input.value, 'to be', ''); + expect(getViewSwitch(picker).textContent, 'to be', 'March 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', []); + expect(filterCells(cells, '.focused'), 'to equal', [cells[13]]); + expect(cells[13].textContent, 'to be', '14'); + + clock.restore(); + }); + + it('refresh only picker UI if target: "picker" is passed', function () { + dp.dates = [dateValue(2020, 1, 14)]; + dp.refresh('picker'); + + expect(input.value, 'to be', '04/22/2020'); + expect(getViewSwitch(picker).textContent, 'to be', 'February 2020'); + + const cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + expect(cells[19].textContent, 'to be', '14'); + }); + + it('refresh only input element if target: "input" is passed', function () { + dp.dates = [dateValue(2020, 1, 14)]; + dp.refresh('input'); + + expect(input.value, 'to be', '02/14/2020'); + expect(getViewSwitch(picker).textContent, 'to be', 'April 2020'); + + const cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[24]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[24]]); + expect(cells[24].textContent, 'to be', '22'); + }); + + it('re-renders the picker regardless of its state if forceRender true is passed', function () { + let cells = getCells(picker); + cells[16].classList.add('foo'); + cells[12].textContent = '♥︎'; + dp.dates = [dateValue(2020, 3, 10)]; + dp.refresh('picker'); + + cells = getCells(picker); + expect(input.value, 'to be', '04/22/2020'); + expect(getViewSwitch(picker).textContent, 'to be', 'April 2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[12]]); + expect(filterCells(cells, '.foo'), 'to equal', [cells[16]]); + expect(cells[12].textContent, 'to be', '♥︎'); + + dp.refresh('picker', true); + + cells = getCells(picker); + expect(input.value, 'to be', '04/22/2020'); + expect(getViewSwitch(picker).textContent, 'to be', 'April 2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[12]]); + expect(filterCells(cells, '.foo'), 'to equal', []); + expect(cells[12].textContent, 'to be', '10'); + + cells[16].classList.add('foo'); + cells[12].textContent = '♥︎'; + dp.refresh(true); + + cells = getCells(picker); + expect(input.value, 'to be', '04/10/2020'); + expect(getViewSwitch(picker).textContent, 'to be', 'April 2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[12]]); + expect(filterCells(cells, '.foo'), 'to equal', []); + expect(cells[12].textContent, 'to be', '10'); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/_utils/date.js b/node_modules/flowbite-datepicker/test/_utils/date.js new file mode 100644 index 0000000..0e14ddf --- /dev/null +++ b/node_modules/flowbite-datepicker/test/_utils/date.js @@ -0,0 +1,102 @@ +var dateUtils = (function (exports) { + 'use strict'; + + function stripTime(timeValue) { + return new Date(timeValue).setHours(0, 0, 0, 0); + } + + function today() { + return new Date().setHours(0, 0, 0, 0); + } + + // Get the time value of the start of given date or year, month and day + function dateValue(...args) { + switch (args.length) { + case 0: + return today(); + case 1: + return stripTime(args[0]); + } + + // use setFullYear() to keep 2-digit year from being mapped to 1900-1999 + const newDate = new Date(0); + newDate.setFullYear(...args); + return newDate.setHours(0, 0, 0, 0); + } + + function addDays(date, amount) { + const newDate = new Date(date); + return newDate.setDate(newDate.getDate() + amount); + } + + function addWeeks(date, amount) { + return addDays(date, amount * 7); + } + + function addMonths(date, amount) { + // If the day of the date is not in the new month, the last day of the new + // month will be returned. e.g. Jan 31 + 1 month → Feb 28 (not Mar 03) + const newDate = new Date(date); + const monthsToSet = newDate.getMonth() + amount; + let expectedMonth = monthsToSet % 12; + if (expectedMonth < 0) { + expectedMonth += 12; + } + + const time = newDate.setMonth(monthsToSet); + return newDate.getMonth() !== expectedMonth ? newDate.setDate(0) : time; + } + + function addYears(date, amount) { + // If the date is Feb 29 and the new year is not a leap year, Feb 28 of the + // new year will be returned. + const newDate = new Date(date); + const expectedMonth = newDate.getMonth(); + const time = newDate.setFullYear(newDate.getFullYear() + amount); + return expectedMonth === 1 && newDate.getMonth() === 2 ? newDate.setDate(0) : time; + } + + // Calculate the distance bettwen 2 days of the week + function dayDiff(day, from) { + return (day - from + 7) % 7; + } + + // Get the date of the specified day of the week of given base date + function dayOfTheWeekOf(baseDate, dayOfWeek, weekStart = 0) { + const baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); + } + + // Get the ISO week of a date + function getWeek(date) { + // start of ISO week is Monday + const thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + const firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; + } + + // Get the start year of the period of years that includes given date + // years: length of the year period + function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + const year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; + } + + exports.addDays = addDays; + exports.addMonths = addMonths; + exports.addWeeks = addWeeks; + exports.addYears = addYears; + exports.dateValue = dateValue; + exports.dayOfTheWeekOf = dayOfTheWeekOf; + exports.getWeek = getWeek; + exports.startOfYearPeriod = startOfYearPeriod; + exports.stripTime = stripTime; + exports.today = today; + + Object.defineProperty(exports, '__esModule', { value: true }); + + return exports; + +})({}); diff --git a/node_modules/flowbite-datepicker/test/_utils/dom.js b/node_modules/flowbite-datepicker/test/_utils/dom.js new file mode 100644 index 0000000..83a4850 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/_utils/dom.js @@ -0,0 +1,70 @@ +var domUtils = (function (exports) { + 'use strict'; + + const range = document.createRange(); + + function parseHTML(html) { + return range.createContextualFragment(html); + } + + // equivalent to jQuery's :visble + function isVisible(el) { + return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length); + } + + function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; + } + + function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } + } + + function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } + } + + function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach((node) => { + el.appendChild(node); + }); + } + } + + exports.emptyChildNodes = emptyChildNodes; + exports.hideElement = hideElement; + exports.isVisible = isVisible; + exports.parseHTML = parseHTML; + exports.replaceChildNodes = replaceChildNodes; + exports.showElement = showElement; + + Object.defineProperty(exports, '__esModule', { value: true }); + + return exports; + +})({}); diff --git a/node_modules/flowbite-datepicker/test/events.js b/node_modules/flowbite-datepicker/test/events.js new file mode 100644 index 0000000..ccfb692 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/events.js @@ -0,0 +1,785 @@ +describe('events', function () { + let clock; + let input; + let dp; + let picker; + let viewSwitch; + + before(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + input = document.createElement('input'); + testContainer.appendChild(input); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + }); + + after(function () { + dp.destroy(); + testContainer.removeChild(input); + clock.restore(); + }); + + describe('changeDate', function () { + it('is triggered when the selection is changed', function () { + const spyChangeDate = sinon.spy(); + input.addEventListener('changeDate', spyChangeDate); + + // by setDate() + dp.setDate('2/14/2020'); + expect(spyChangeDate.calledOnce, 'to be true'); + + spyChangeDate.resetHistory(); + + // by update() + input.value = '4/22/2020'; + dp.update(); + expect(spyChangeDate.calledOnce, 'to be true'); + + spyChangeDate.resetHistory(); + + // by clicking on a day cell + getCells(picker)[12].click(); + expect(spyChangeDate.calledOnce, 'to be true'); + + spyChangeDate.resetHistory(); + + // by hitting enter in edit mode + dp.enterEditMode(); + input.value = '2/4/2020'; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeDate.calledOnce, 'to be true'); + + spyChangeDate.resetHistory(); + + // by hittin enter when the picker is hidden + dp.hide(); + input.value = '3/20/2020'; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeDate.calledOnce, 'to be true'); + + input.removeEventListener('changeDate', spyChangeDate); + dp.setDate({clear: true}); + }); + + it('is triggered when the selection is cleared', function () { + const spyChangeDate = sinon.spy(); + dp.setDate('2/14/2020'); + input.addEventListener('changeDate', spyChangeDate); + + // by setDate() + dp.setDate({clear: true}); + expect(spyChangeDate.calledOnce, 'to be true'); + + dp.setDate('2/14/2020'); + spyChangeDate.resetHistory(); + + // by update() + input.value = ''; + dp.update(); + expect(spyChangeDate.calledOnce, 'to be true'); + + dp.setDate('2/14/2020'); + spyChangeDate.resetHistory(); + + // by hitting enter in edit mode + dp.enterEditMode(); + input.value = ''; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeDate.calledOnce, 'to be true'); + + dp.setDate('2/14/2020'); + spyChangeDate.resetHistory(); + + // by hittin enter when the picker is hidden + dp.hide(); + input.value = ''; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeDate.calledOnce, 'to be true'); + + input.removeEventListener('changeDate', spyChangeDate); + }); + + it('is not triggered when trying to update with the current value', function () { + const spyChangeDate = sinon.spy(); + dp.setDate('2/14/2020'); + input.addEventListener('changeDate', spyChangeDate); + + // by setDate() + dp.setDate('2/14/2020'); + expect(spyChangeDate.called, 'to be false'); + + // by update() + dp.update(); + expect(spyChangeDate.called, 'to be false'); + + // by clicking on a day cell + getCells(picker)[19].click(); + expect(spyChangeDate.called, 'to be false'); + + // by hitting enter in edit mode + dp.enterEditMode(); + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeDate.called, 'to be false'); + + // by hittin enter when the picker is hidden + dp.hide(); + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeDate.called, 'to be false'); + + input.removeEventListener('changeDate', spyChangeDate); + dp.setDate({clear: true}); + }); + }); + + describe('changeMonth', function () { + let spyChangeMonth; + + beforeEach(function () { + dp.show(); + spyChangeMonth = sinon.spy(); + input.addEventListener('changeMonth', spyChangeMonth); + }); + + afterEach(function () { + input.removeEventListener('changeMonth', spyChangeMonth); + dp.hide(); + }); + + it('is triggered when prevBtn or nextBtn is clicked on days view', function () { + const [prevBtn, nextBtn] = getParts(picker, ['.prev-btn', '.next-btn']); + + prevBtn.click(); + expect(spyChangeMonth.calledOnce, 'to be true'); + nextBtn.click(); + expect(spyChangeMonth.calledTwice, 'to be true'); + + spyChangeMonth.resetHistory(); + + // months view + viewSwitch.click(); + prevBtn.click(); + expect(spyChangeMonth.called, 'to be false'); + nextBtn.click(); + expect(spyChangeMonth.called, 'to be false'); + + // years view + viewSwitch.click(); + prevBtn.click(); + expect(spyChangeMonth.called, 'to be false'); + nextBtn.click(); + expect(spyChangeMonth.called, 'to be false'); + + // decades view + viewSwitch.click(); + prevBtn.click(); + expect(spyChangeMonth.called, 'to be false'); + nextBtn.click(); + expect(spyChangeMonth.called, 'to be false'); + }); + + it('is triggered when ctrl + arrow lett/right is pressed on days view', function () { + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(spyChangeMonth.called, 'to be false'); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(spyChangeMonth.called, 'to be false'); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + expect(spyChangeMonth.calledOnce, 'to be true'); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + expect(spyChangeMonth.calledTwice, 'to be true'); + + spyChangeMonth.resetHistory(); + + // months view + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + expect(spyChangeMonth.called, 'to be false'); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + expect(spyChangeMonth.called, 'to be false'); + + // years view + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + expect(spyChangeMonth.called, 'to be false'); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + expect(spyChangeMonth.called, 'to be false'); + + // decades view + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + expect(spyChangeMonth.called, 'to be false'); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + expect(spyChangeMonth.called, 'to be false'); + }); + + it('is triggered when a previous or next month\'s day is clicked', function () { + getCells(picker)[19].click(); + expect(spyChangeMonth.called, 'to be false'); + + getCells(picker)[2].click(); + expect(spyChangeMonth.calledOnce, 'to be true'); + + getCells(picker)[40].click(); + expect(spyChangeMonth.calledTwice, 'to be true'); + + dp.setDate({clear: true}); + }); + + it('is triggered when view date is moved to a previous or next month\'s day by arrow keys', function () { + // move to 2/1/2020 + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + + // go to 1/31 + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(spyChangeMonth.calledOnce, 'to be true'); + + // go back to 2/1 + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(spyChangeMonth.calledTwice, 'to be true'); + + spyChangeMonth.resetHistory(); + + // move to 2/3/2020 + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + + // go to 1/27 + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(spyChangeMonth.calledOnce, 'to be true'); + + // go back to 2/3 + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(spyChangeMonth.calledTwice, 'to be true'); + }); + + it('is triggered when a different month is seleced on months view', function () { + viewSwitch.click(); + + getCells(picker)[1].click(); + expect(spyChangeMonth.called, 'to be false'); + + viewSwitch.click(); + getCells(picker)[2].click(); + expect(spyChangeMonth.calledOnce, 'to be true'); + }); + + it('is triggered when moving month by arrow keys on months view', function () { + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(spyChangeMonth.callCount, 'to be', 1); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(spyChangeMonth.callCount, 'to be', 2); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(spyChangeMonth.callCount, 'to be', 3); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(spyChangeMonth.callCount, 'to be', 4); + }); + + it('is triggered when the selection is updated to a different month by API calls', function () { + dp.setDate('2/22/2020'); + expect(spyChangeMonth.called, 'to be false'); + + dp.setDate('4/22/2020'); + expect(spyChangeMonth.calledOnce, 'to be true'); + + input.value = '3/14/2020'; + dp.update(); + expect(spyChangeMonth.calledTwice, 'to be true'); + }); + + it('is triggered when the selection is cleard from a date of a different month from default view date', function () { + dp.setDate('2/22/2020'); + spyChangeMonth.resetHistory(); + dp.setDate({clear: true}); + expect(spyChangeMonth.called, 'to be false'); + + dp.setDate('4/22/2020'); + spyChangeMonth.resetHistory(); + input.value = ''; + dp.update(); + expect(spyChangeMonth.calledOnce, 'to be true'); + + dp.setDate('4/22/2020'); + spyChangeMonth.resetHistory(); + dp.enterEditMode(); + input.value = ''; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeMonth.calledOnce, 'to be true'); + }); + + it('is triggered before changeDate when triggered on change of the selection', function () { + const spyChangeDate = sinon.spy(); + input.addEventListener('changeDate', spyChangeDate); + + dp.setDate('4/22/2020'); + expect(spyChangeDate.called, 'to be true'); + expect(spyChangeMonth.called, 'to be true'); + expect(spyChangeMonth.calledBefore(spyChangeDate), 'to be true'); + + input.removeEventListener('changeDate', spyChangeDate); + dp.setDate({clear: true}); + }); + + it('is triggered when view is reset from different month from default view date on hide', function () { + picker.querySelector('.next-btn').click(); + spyChangeMonth.resetHistory(); + + dp.hide(); + expect(spyChangeMonth.calledOnce, 'to be true'); + }); + + it('is not triggered when view date is changed to the same month of different year', function () { + viewSwitch.click(); + viewSwitch.click(); + // years view + getCells(picker)[3].click(); + expect(spyChangeMonth.called, 'to be false'); + // months view + getCells(picker)[1].click(); + expect(spyChangeMonth.called, 'to be false'); + + viewSwitch.click(); + viewSwitch.click(); + // years view + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeMonth.called, 'to be false'); + // months view + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeMonth.called, 'to be false'); + }); + }); + + describe('changeYear', function () { + let spyChangeYear; + + beforeEach(function () { + dp.show(); + spyChangeYear = sinon.spy(); + input.addEventListener('changeYear', spyChangeYear); + }); + + afterEach(function () { + input.removeEventListener('changeYear', spyChangeYear); + dp.hide(); + }); + + it('is triggered when prevBtn on January on days view or nextBtn on December is clicked', function () { + const [prevBtn, nextBtn] = getParts(picker, ['.prev-btn', '.next-btn']); + + // move to 1/15 + prevBtn.click(); + spyChangeYear.resetHistory(); + + prevBtn.click(); + expect(spyChangeYear.calledOnce, 'to be true'); + nextBtn.click(); + expect(spyChangeYear.calledTwice, 'to be true'); + }); + + it('is triggered when ctrl + arrow lett is pressed on January on days view or right on December', function () { + // move to 1/15 + picker.querySelector('.prev-btn').click(); + spyChangeYear.resetHistory(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(spyChangeYear.called, 'to be false'); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(spyChangeYear.called, 'to be false'); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + expect(spyChangeYear.calledOnce, 'to be true'); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + expect(spyChangeYear.calledTwice, 'to be true'); + }); + + it('is triggered when a previous month\'s day on January or a next month\'s on December is clicked', function () { + // move to 1/15 + picker.querySelector('.prev-btn').click(); + spyChangeYear.resetHistory(); + + getCells(picker)[19].click(); + expect(spyChangeYear.called, 'to be false'); + + getCells(picker)[2].click(); + expect(spyChangeYear.calledOnce, 'to be true'); + + getCells(picker)[40].click(); + expect(spyChangeYear.calledTwice, 'to be true'); + + dp.setDate({clear: true}); + }); + + it('is triggered when prevBtn or nextBtn is clicked on months view', function () { + const [prevBtn, nextBtn] = getParts(picker, ['.prev-btn', '.next-btn']); + viewSwitch.click(); + + prevBtn.click(); + expect(spyChangeYear.calledOnce, 'to be true'); + nextBtn.click(); + expect(spyChangeYear.calledTwice, 'to be true'); + }); + + it('is triggered when view month is moved to a previous or next year\'s by arrow keys', function () { + viewSwitch.click(); + // move to january + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + + // go to last year's December + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(spyChangeYear.calledOnce, 'to be true'); + + // go back to January + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(spyChangeYear.calledTwice, 'to be true'); + + spyChangeYear.resetHistory(); + + // go to last year's September + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(spyChangeYear.calledOnce, 'to be true'); + + // go back to January + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(spyChangeYear.calledTwice, 'to be true'); + }); + + it('is triggered when a different year/decade is seleced on years/decades view', function () { + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + // decades view + getCells(picker)[0].click(); + expect(spyChangeYear.calledOnce, 'to be true'); + + // years view + getCells(picker)[2].click(); + expect(spyChangeYear.calledTwice, 'to be true'); + + viewSwitch.click(); + viewSwitch.click(); + spyChangeYear.resetHistory(); + + // decades view + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeYear.calledOnce, 'to be true'); + + // years view + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeYear.calledTwice, 'to be true'); + }); + + it('is triggered when moving year/decade by arrow keys on years/decades view', function () { + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(spyChangeYear.callCount, 'to be', 1); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(spyChangeYear.callCount, 'to be', 2); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(spyChangeYear.callCount, 'to be', 3); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(spyChangeYear.callCount, 'to be', 4); + + viewSwitch.click(); + spyChangeYear.resetHistory(); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(spyChangeYear.callCount, 'to be', 1); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(spyChangeYear.callCount, 'to be', 2); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(spyChangeYear.callCount, 'to be', 3); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(spyChangeYear.callCount, 'to be', 4); + }); + + it('is triggered when the selection is updated to a different year by API calls', function () { + dp.setDate('2/22/2020'); + expect(spyChangeYear.called, 'to be false'); + + dp.setDate('4/22/2022'); + expect(spyChangeYear.calledOnce, 'to be true'); + + input.value = '3/14/2018'; + dp.update(); + expect(spyChangeYear.calledTwice, 'to be true'); + }); + + it('is triggered when the selection is cleard from a date of a different year from default view date', function () { + dp.setDate('2/22/2020'); + spyChangeYear.resetHistory(); + dp.setDate({clear: true}); + expect(spyChangeYear.called, 'to be false'); + + dp.setDate('4/22/2022'); + spyChangeYear.resetHistory(); + input.value = ''; + dp.update(); + expect(spyChangeYear.calledOnce, 'to be true'); + + dp.setDate('4/22/2022'); + spyChangeYear.resetHistory(); + dp.enterEditMode(); + input.value = ''; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeYear.calledOnce, 'to be true'); + }); + + it('is triggered before changeDate when triggered on change of the selection', function () { + const spyChangeDate = sinon.spy(); + input.addEventListener('changeDate', spyChangeDate); + + dp.setDate('4/22/2022'); + expect(spyChangeDate.called, 'to be true'); + expect(spyChangeYear.called, 'to be true'); + expect(spyChangeYear.calledBefore(spyChangeDate), 'to be true'); + + input.removeEventListener('changeDate', spyChangeDate); + dp.setDate({clear: true}); + }); + + it('is triggered when view is reset from different year from default view date on hide', function () { + picker.querySelector('.prev-btn').click(); + picker.querySelector('.prev-btn').click(); + spyChangeYear.resetHistory(); + + dp.hide(); + expect(spyChangeYear.calledOnce, 'to be true'); + }); + }); + + describe('changeView', function () { + let spyChangeView; + + beforeEach(function () { + dp.show(); + spyChangeView = sinon.spy(); + input.addEventListener('changeView', spyChangeView); + }); + + afterEach(function () { + input.removeEventListener('changeView', spyChangeView); + dp.hide(); + }); + + it('is triggered when view is changed by clicking view switch', function () { + viewSwitch.click(); + expect(spyChangeView.calledOnce, 'to be true'); + + // on months view + viewSwitch.click(); + expect(spyChangeView.calledTwice, 'to be true'); + + // on years view + viewSwitch.click(); + expect(spyChangeView.calledThrice, 'to be true'); + + // on decades view + viewSwitch.click(); + expect(spyChangeView.calledThrice, 'to be true'); + }); + + it('is triggered when view is changed by pressing ctrl + arrow up', function () { + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(spyChangeView.called, 'to be false'); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', ctrlKey: true}); + expect(spyChangeView.calledOnce, 'to be true'); + + // on months view + simulant.fire(input, 'keydown', {key: 'ArrowUp', ctrlKey: true}); + expect(spyChangeView.calledTwice, 'to be true'); + + // on years view + simulant.fire(input, 'keydown', {key: 'ArrowUp', ctrlKey: true}); + expect(spyChangeView.calledThrice, 'to be true'); + + // on decades view + simulant.fire(input, 'keydown', {key: 'ArrowUp', ctrlKey: true}); + expect(spyChangeView.calledThrice, 'to be true'); + }); + + it('is triggered when view is changed by seleting a decade/year/month on decades/years/months view', function () { + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + spyChangeView.resetHistory(); + + // on decades view + getCells(picker)[2].click(); + expect(spyChangeView.calledOnce, 'to be true'); + + // on years view + getCells(picker)[2].click(); + expect(spyChangeView.calledTwice, 'to be true'); + + // on months view + getCells(picker)[2].click(); + expect(spyChangeView.calledThrice, 'to be true'); + + // on days view + getCells(picker)[12].click(); + expect(spyChangeView.calledThrice, 'to be true'); + + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + spyChangeView.resetHistory(); + + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeView.calledOnce, 'to be true'); + + // on decades view + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeView.calledTwice, 'to be true'); + + // on years view + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeView.calledThrice, 'to be true'); + + // on months view + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeView.calledThrice, 'to be true'); + + // on days view + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(spyChangeView.calledThrice, 'to be true'); + }); + + it('is triggered when view is reset on hide', function () { + viewSwitch.click(); + spyChangeView.resetHistory(); + + dp.hide(); + expect(spyChangeView.calledOnce, 'to be true'); + }); + }); + + describe('show', function () { + let spyShow; + + beforeEach(function () { + dp.show(); + spyShow = sinon.spy(); + input.addEventListener('show', spyShow); + }); + + afterEach(function () { + input.removeEventListener('show', spyShow); + dp.hide(); + }); + + it('is triggered when the picker becomes visible', function () { + // not triggered if already shown + dp.show(); + expect(spyShow.called, 'to be false'); + + dp.hide(); + // by API call + dp.show(); + expect(spyShow.calledOnce, 'to be true'); + + dp.hide(); + input.blur(); + // by getting focus + input.focus(); + expect(spyShow.calledTwice, 'to be true'); + + // by toggling visibility by Esc key + simulant.fire(input, 'keydown', {key: 'Escape'}); + expect(spyShow.calledTwice, 'to be true'); + simulant.fire(input, 'keydown', {key: 'Escape'}); + expect(spyShow.calledThrice, 'to be true'); + }); + }); + + describe('hide', function () { + let spyHide; + + beforeEach(function () { + dp.show(); + spyHide = sinon.spy(); + input.addEventListener('hide', spyHide); + }); + + afterEach(function () { + input.removeEventListener('hide', spyHide); + dp.hide(); + }); + + it('is triggered when the picker becomes hidden', function () { + // by API call + dp.hide(); + expect(spyHide.callCount, 'to be', 1); + + dp.show(); + // by clicking outside + simulant.fire(testContainer, 'mousedown'); + expect(spyHide.callCount, 'to be', 2); + + dp.show(); + // by pressing tab key + simulant.fire(input, 'keydown', {key: 'Tab'}); + expect(spyHide.callCount, 'to be', 3); + + dp.show(); + // by toggling visibility by Esc key + simulant.fire(input, 'keydown', {key: 'Escape'}); + expect(spyHide.callCount, 'to be', 4); + }); + }); + + describe('event object', function () { + const stubChangeDate = (ev) => { + eventObj = ev; + }; + let eventObj; + + before(function () { + input.addEventListener('changeDate', stubChangeDate); + dp.setDate('2/14/2020'); + }); + + after(function () { + input.removeEventListener('changeDate', stubChangeDate); + }); + + it('is a custom event object', function () { + expect(eventObj, 'to be a', CustomEvent); + }); + + it('has the result of getDate() in detail.date', function () { + expect(eventObj.detail.date, 'to equal', dp.getDate()); + }); + + it('has a date object of view date in detail.viewDate', function () { + expect(eventObj.detail.viewDate, 'to be a date'); + expect(eventObj.detail.viewDate.getTime(), 'to be', dateValue(2020, 1, 14)); + }); + + it('has view mode of current view in detail.viewId', function () { + expect(eventObj.detail.viewId, 'to be', 0); + }); + + it('has the Datepicker instance in detail.datepicker', function () { + expect(eventObj.detail.datepicker, 'to be', dp); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/inline-mode.js b/node_modules/flowbite-datepicker/test/inline-mode.js new file mode 100644 index 0000000..7de9e7d --- /dev/null +++ b/node_modules/flowbite-datepicker/test/inline-mode.js @@ -0,0 +1,45 @@ +describe('inline mode', function () { + let element; + let dp; + let picker; + + beforeEach(function () { + element = parseHTML('
').firstChild; + testContainer.appendChild(element); + dp = new Datepicker(element, {container: 'body'}); + picker = document.querySelector('.datepicker'); + }); + + afterEach(function () { + dp.destroy(); + testContainer.removeChild(element); + }); + + it('uses the bound element for the container regardless of the container option', function () { + expect(picker.parentElement, 'to be', element); + }); + + it('does not add datepicker-input class to the bound element', function () { + expect(element.classList.contains('datepicker-input'), 'to be false'); + }); + + it('shows the picker on construction', function () { + expect(isVisible(picker), 'to be true'); + }); + + it('uses the data-date attribute for the initial date(s)', function () { + expect(dp.dates[0], 'to be', dateValue(2020, 3, 22)); + expect(getViewSwitch(picker).textContent, 'to be', 'April 2020'); + expect(picker.querySelector('.datepicker-cell.selected').textContent, 'to be', '22'); + }); + + it('hide() takes no effect', function () { + dp.hide(); + expect(isVisible(picker), 'to be true'); + }); + + it('enterEditMode() takes no effect', function () { + dp.enterEditMode(); + expect(dp.editMode, 'to be undefined'); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-down.js b/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-down.js new file mode 100644 index 0000000..0866e0e --- /dev/null +++ b/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-down.js @@ -0,0 +1,293 @@ +describe('keyboard operation - arrow-down', function () { + const replaceInput = () => { + const newInput = document.createElement('input'); + testContainer.replaceChild(newInput, input); + return newInput; + }; + let input; + + beforeEach(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + }); + + it('shows the picker if it is hidden', function () { + const {dp, picker} = createDP(input); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(isVisible(picker), 'to be true'); + + dp.destroy(); + }); + + it('moves the view date/month/year/decade to 1 step down side', function () { + const clock = sinon.useFakeTimers({now: new Date(2044, 5, 15)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', 'June 2044'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[24]]); + expect(cells[24].textContent, 'to be', '22'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2044'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[9]]); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2040-2049'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[9]]); + expect(cells[9].textContent, 'to be', '2048'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[9]]); + expect(cells[9].textContent, 'to be', '2080'); + + dp.destroy(); + clock.restore(); + }); + + it('also changes month of the days view if the current view date >= last 7 days of month', function () { + let clock = sinon.useFakeTimers({now: new Date(2020, 1, 23)}); + let {dp, picker} = createDP(input); + let viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', 'March 2020'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[0]]); + expect(cells[0].textContent, 'to be', '1'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2020, 1, 26)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', 'March 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + expect(cells[3].textContent, 'to be', '4'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2020, 1, 29)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', 'March 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + expect(cells[6].textContent, 'to be', '7'); + + dp.destroy(); + clock.restore(); + }); + + it('also changes year of the months view if the current view month is Sep/Oct/Npv/Dec', function () { + let clock = sinon.useFakeTimers({now: new Date(2020, 8, 1)}); + let {dp, picker} = createDP(input); + let viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2021'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[0]]); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2020, 9, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2021'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2020, 10, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2021'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2020, 11, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2021'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + dp.destroy(); + clock.restore(); + }); + + it('also changes decade of the years view if the current view year is the first 4 of the decade', function () { + let clock = sinon.useFakeTimers({now: new Date(2016, 1, 1)}); + let {dp, picker} = createDP(input); + let viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2020'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2018, 1, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + expect(cells[3].textContent, 'to be', '2022'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2019, 1, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[4]]); + expect(cells[4].textContent, 'to be', '2023'); + + dp.destroy(); + clock.restore(); + }); + + it('also changes century of the decades view if the current view decade is the first 4 of the century', function () { + let clock = sinon.useFakeTimers({now: new Date(1960, 1, 1)}); + let {dp, picker} = createDP(input); + let viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2000'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(1980, 1, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + expect(cells[3].textContent, 'to be', '2020'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(1990, 1, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[4]]); + expect(cells[4].textContent, 'to be', '2030'); + + dp.destroy(); + clock.restore(); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-left.js b/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-left.js new file mode 100644 index 0000000..0b9fc3d --- /dev/null +++ b/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-left.js @@ -0,0 +1,255 @@ +describe('keyboard operation - arrow-left', function () { + let input; + + beforeEach(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + }); + + it('moves the view date/month/year/decade to 1 step left side', function () { + const clock = sinon.useFakeTimers({now: new Date(2024, 5, 12)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', 'June 2024'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[16]]); + expect(cells[16].textContent, 'to be', '11'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', '2024'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[4]]); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[4]]); + expect(cells[4].textContent, 'to be', '2023'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + expect(cells[2].textContent, 'to be', '2010'); + + clock.restore(); + dp.destroy(); + }); + + it('also changes month of the days view if the current view date is the 1st', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 2, 1)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[34]]); + expect(cells[34].textContent, 'to be', '29'); + + dp.destroy(); + clock.restore(); + }); + + it('also changes year of the months view if the current view month is January', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 0, 1)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', '2019'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[11]]); + + dp.destroy(); + clock.restore(); + }); + + it('also changes decade of the years view if the current view year is the start of the decade', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 1, 1)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', '2010-2019'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + expect(cells[10].textContent, 'to be', '2019'); + + dp.destroy(); + clock.restore(); + }); + + it('also changes century of the decades view if the current view decade is the start of the century', function () { + const clock = sinon.useFakeTimers({now: new Date(2000, 1, 1)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', '1900-1990'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + expect(cells[10].textContent, 'to be', '1990'); + + dp.destroy(); + clock.restore(); + }); + + it('does nothing if the view date is 0000-01-01', function () { + input.value = '01/01/0000'; + + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', 'January 0'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + expect(cells[6].textContent, 'to be', '1'); + + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', '0'); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[0]]); + + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', '0-9'); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '0'); + + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', '0-90'); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '0'); + + dp.destroy(); + }); + + describe('with control', function () { + it('functions as the shortcut key of the prev button', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 3, 22)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', 'March 2020'); + + // view date is changed to the same day of the previous month + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[21]]); + expect(cells[21].textContent, 'to be', '22'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', '2019'); + + // view date is changed to the same month of the previous year + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + expect(filterCells(cells, '.selected'), 'to equal', []); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', '2000-2009'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + expect(cells[10].textContent, 'to be', '2009'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', '1900-1990'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '1900'); + + dp.destroy(); + clock.reset(); + }); + }); + + describe('with meta', function () { + it('functions as a substitute for the "+ctrl" key combination', function () { + let clock = sinon.useFakeTimers({now: new Date(2020, 3, 22)}); + let {dp, picker} = createDP(input); + let viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft', metaKey: true}); + expect(viewSwitch.textContent, 'to be', 'March 2020'); + + // view date is changed to the same day of the previous month + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[21]]); + expect(cells[21].textContent, 'to be', '22'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', metaKey: true}); + expect(viewSwitch.textContent, 'to be', '2019'); + + // view date is changed to the same month of the previous year + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + expect(filterCells(cells, '.selected'), 'to equal', []); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', metaKey: true}); + expect(viewSwitch.textContent, 'to be', '2000-2009'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + expect(cells[10].textContent, 'to be', '2009'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', metaKey: true}); + expect(viewSwitch.textContent, 'to be', '1900-1990'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '1900'); + + dp.destroy(); + clock.restore(); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-right.js b/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-right.js new file mode 100644 index 0000000..794b877 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-right.js @@ -0,0 +1,215 @@ +describe('keyboard operation - arrow-right', function () { + let input; + + beforeEach(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + }); + + it('moves the view date/month/year/decade to 1 step right side', function () { + const clock = sinon.useFakeTimers({now: new Date(2024, 5, 12)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(viewSwitch.textContent, 'to be', 'June 2024'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + expect(cells[18].textContent, 'to be', '13'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(viewSwitch.textContent, 'to be', '2024'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + expect(cells[6].textContent, 'to be', '2025'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[4]]); + expect(cells[4].textContent, 'to be', '2030'); + + dp.destroy(); + clock.restore(); + }); + + it('also changes month of the days view if the current view date is the last day', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 1, 29)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(viewSwitch.textContent, 'to be', 'March 2020'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[0]]); + expect(cells[0].textContent, 'to be', '1'); + + dp.destroy(); + clock.restore(); + }); + + it('also changes year of the months view if the current view month is December', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 11, 1)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(viewSwitch.textContent, 'to be', '2021'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[0]]); + + dp.destroy(); + clock.restore(); + }); + + it('also changes decade of the years view if the current view year is the end of the decade', function () { + const clock = sinon.useFakeTimers({now: new Date(2019, 1, 1)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2020'); + + dp.destroy(); + clock.restore(); + }); + + it('also changes century of the decades view if the current view decade is the end of the century', function () { + const clock = sinon.useFakeTimers({now: new Date(1990, 1, 1)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2000'); + + dp.destroy(); + clock.restore(); + }); + + describe('with control', function () { + it('functions as the shortcut key of the next button', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 3, 22)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', 'May 2020'); + + // view date is changed to the same day of the next month + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[26]]); + expect(cells[26].textContent, 'to be', '22'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', '2021'); + + // view date is changed to the same month of the previous year + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[4]]); + expect(filterCells(cells, '.selected'), 'to equal', []); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', '2030-2039'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + expect(cells[2].textContent, 'to be', '2031'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', '2100-2190'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + expect(cells[4].textContent, 'to be', '2130'); + + dp.destroy(); + clock.reset(); + }); + }); + + describe('with meta', function () { + it('functions as a substitute for the "+ctrl" key combination', function () { + let clock = sinon.useFakeTimers({now: new Date(2020, 3, 22)}); + let {dp, picker} = createDP(input); + let viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowRight', metaKey: true}); + expect(viewSwitch.textContent, 'to be', 'May 2020'); + + // view date is changed to the same day of the next month + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[26]]); + expect(cells[26].textContent, 'to be', '22'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowRight', metaKey: true}); + expect(viewSwitch.textContent, 'to be', '2021'); + + // view date is changed to the same month of the previous year + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[4]]); + expect(filterCells(cells, '.selected'), 'to equal', []); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowRight', metaKey: true}); + expect(viewSwitch.textContent, 'to be', '2030-2039'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + expect(cells[2].textContent, 'to be', '2031'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowRight', metaKey: true}); + expect(viewSwitch.textContent, 'to be', '2100-2190'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + expect(cells[4].textContent, 'to be', '2130'); + + dp.destroy(); + clock.restore(); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-up.js b/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-up.js new file mode 100644 index 0000000..f0c17c7 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/keyboard-operation/arrow-up.js @@ -0,0 +1,461 @@ +describe('keyboard operation - arrow-up', function () { + const replaceInput = () => { + const newInput = document.createElement('input'); + testContainer.replaceChild(newInput, input); + return newInput; + }; + let input; + + beforeEach(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + }); + + it('moves the view date/month/year/decade to 1 step up side', function () { + const clock = sinon.useFakeTimers({now: new Date(2044, 5, 15)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', 'June 2044'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + expect(cells[10].textContent, 'to be', '8'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '2044'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '2040-2049'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2040'); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2000'); + + dp.destroy(); + clock.restore(); + }); + + it('also changes month of the days view if the current view date <= 7th', function () { + let clock = sinon.useFakeTimers({now: new Date(2020, 2, 1)}); + let {dp, picker} = createDP(input); + let viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[28]]); + expect(cells[28].textContent, 'to be', '23'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2020, 2, 4)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[31]]); + expect(cells[31].textContent, 'to be', '26'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2020, 2, 7)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[34]]); + expect(cells[34].textContent, 'to be', '29'); + + dp.destroy(); + clock.restore(); + }); + + it('also changes year of the months view if the current view month is Jan/Feb/Mar/Apr', function () { + let clock = sinon.useFakeTimers({now: new Date(2020, 0, 1)}); + let {dp, picker} = createDP(input); + let viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '2019'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[8]]); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2020, 1, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '2019'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[9]]); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2020, 2, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '2019'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2020, 3, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '2019'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[11]]); + + dp.destroy(); + clock.restore(); + }); + + it('also changes decade of the years view if the current view year is the first 4 of the decade', function () { + let clock = sinon.useFakeTimers({now: new Date(2020, 1, 1)}); + let {dp, picker} = createDP(input); + let viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '2010-2019'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[7]]); + expect(cells[7].textContent, 'to be', '2016'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2022, 1, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '2010-2019'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[9]]); + expect(cells[9].textContent, 'to be', '2018'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2023, 1, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '2010-2019'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + expect(cells[10].textContent, 'to be', '2019'); + + dp.destroy(); + clock.restore(); + }); + + it('also changes century of the decades view if the current view decade is the first 4 of the century', function () { + let clock = sinon.useFakeTimers({now: new Date(2000, 1, 1)}); + let {dp, picker} = createDP(input); + let viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '1900-1990'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[7]]); + expect(cells[7].textContent, 'to be', '1960'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2020, 1, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '1900-1990'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[9]]); + expect(cells[9].textContent, 'to be', '1980'); + + dp.destroy(); + clock.restore(); + input = replaceInput(); + + clock = sinon.useFakeTimers({now: new Date(2030, 1, 1)}); + ({dp, picker} = createDP(input)); + viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '1900-1990'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + expect(cells[10].textContent, 'to be', '1990'); + + dp.destroy(); + clock.restore(); + }); + + it('does nothing if the current view date <= 0000-01-07 in the days view', function () { + input.value = '01/01/0000'; + + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', 'January 0'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + expect(cells[6].textContent, 'to be', '1'); + + dp.setDate('01/07/0000'); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', 'January 0'); + expect(filterCells(cells, '.focused'), 'to equal', [cells[12]]); + expect(cells[12].textContent, 'to be', '7'); + + dp.destroy(); + }); + + it('does nothing if the current view month <= April 0000 in the months view', function () { + input.value = '01/01/0000'; + + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '0'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[0]]); + + dp.setDate('04/07/0000'); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '0'); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + dp.destroy(); + }); + + it('does nothing if the current view year <= 0004 in the years view', function () { + input.value = '01/01/0000'; + + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '0-9'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '0'); + + dp.setDate('04/07/0004'); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '0-9'); + expect(filterCells(cells, '.focused'), 'to equal', [cells[5]]); + expect(cells[5].textContent, 'to be', '4'); + + dp.destroy(); + }); + + it('does nothing if the current view decade <= 0040 in the decades view', function () { + input.value = '01/01/0000'; + + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', '0-90'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '0'); + + dp.setDate('04/07/0047'); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', '0-90'); + expect(filterCells(cells, '.focused'), 'to equal', [cells[5]]); + expect(cells[5].textContent, 'to be', '40'); + + dp.destroy(); + }); + + describe('with control', function () { + it('functions as the shortcut key of the view switch', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 3, 22)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', '2020'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2020'); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + expect(cells[3].textContent, 'to be', '2020'); + + // does nothig if the view has reached to the max view + simulant.fire(input, 'keydown', {key: 'ArrowUp', ctrlKey: true}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + dp.destroy(); + clock.reset(); + }); + }); + + describe('with meta', function () { + it('functions as a substitute for the "+ctrl" key combination', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 3, 22)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', metaKey: true}); + expect(viewSwitch.textContent, 'to be', '2020'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', metaKey: true}); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2020'); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', metaKey: true}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + expect(cells[3].textContent, 'to be', '2020'); + + // does nothig if the view has reached to the max view + simulant.fire(input, 'keydown', {key: 'ArrowUp', metaKey: true}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + dp.destroy(); + clock.reset(); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/keyboard-operation/edit-mode.js b/node_modules/flowbite-datepicker/test/keyboard-operation/edit-mode.js new file mode 100644 index 0000000..8770b2e --- /dev/null +++ b/node_modules/flowbite-datepicker/test/keyboard-operation/edit-mode.js @@ -0,0 +1,458 @@ +describe('keyboard operation - edit mode', function () { + let input; + + beforeEach(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + }); + + it('turns on when Datepicker.enterEditMode() is called', function () { + const dp = new Datepicker(input); + input.focus(); + dp.enterEditMode(); + + expect(dp.editMode, 'to be true'); + expect(input.classList.contains('in-edit'), 'to be true'); + + dp.destroy(); + input.classList.remove('in-edit'); + }); + + it('turns on when a printable letter, backspace or delete key is pressed without ctrl/meta', function () { + const dp = new Datepicker(input); + input.focus(); + + simulant.fire(input, 'keydown', {key: '1'}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: 'J'}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: '/'}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: ' '}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: 'Backspace'}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: 'Delete'}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + // with modifier key + simulant.fire(input, 'keydown', {key: '1', shiftKey: true}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: '1', altKey: true}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: '1', ctrlKey: true}); + expect(dp.editMode, 'to be undefined'); + expect(input.classList.contains('in-edit'), 'to be false'); + + simulant.fire(input, 'keydown', {key: '1', metaKey: true}); + expect(dp.editMode, 'to be undefined'); + expect(input.classList.contains('in-edit'), 'to be false'); + + // non-pritable-letter key + simulant.fire(input, 'keydown', {key: 'PageDown'}); + expect(dp.editMode, 'to be undefined'); + expect(input.classList.contains('in-edit'), 'to be false'); + + simulant.fire(input, 'keydown', {key: 'Escape', ctrlKey: true}); + expect(dp.editMode, 'to be undefined'); + + dp.destroy(); + }); + + it('turns on when shift + either of arrow keys is pressed without ctrl/meta', function () { + const dp = new Datepicker(input); + input.focus(); + + // shift + arrow + simulant.fire(input, 'keydown', {key: 'ArrowLeft', shiftKey: true}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: 'ArrowRight', shiftKey: true}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', shiftKey: true}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: 'ArrowDown', shiftKey: true}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + // arrow + other modifire key + // arrow-left + simulant.fire(input, 'keydown', {key: 'ArrowLeft', altKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft', metaKey: true}); + expect(dp.editMode, 'to be undefined'); + + // arrow-right + simulant.fire(input, 'keydown', {key: 'ArrowRight', altKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowRight', metaKey: true}); + expect(dp.editMode, 'to be undefined'); + + // arrow-up + simulant.fire(input, 'keydown', {key: 'ArrowUp', altKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', ctrlKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', metaKey: true}); + expect(dp.editMode, 'to be undefined'); + + // arrow-down + simulant.fire(input, 'keydown', {key: 'ArrowDown', altKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowDown', ctrlKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowDown', metaKey: true}); + expect(dp.editMode, 'to be undefined'); + + // shift + arrow with other modifier key + // arrow-left + simulant.fire(input, 'keydown', {key: 'ArrowLeft', shiftKey: true, altKey: true}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft', shiftKey: true, ctrlKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft', shiftKey: true, metaKey: true}); + expect(dp.editMode, 'to be undefined'); + + // arrow-right + simulant.fire(input, 'keydown', {key: 'ArrowRight', shiftKey: true, altKey: true}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: 'ArrowRight', shiftKey: true, ctrlKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowRight', shiftKey: true, metaKey: true}); + expect(dp.editMode, 'to be undefined'); + + // arrow-up + simulant.fire(input, 'keydown', {key: 'ArrowUp', shiftKey: true, altKey: true}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', shiftKey: true, ctrlKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowUp', shiftKey: true, metaKey: true}); + expect(dp.editMode, 'to be undefined'); + + // arrow-down + simulant.fire(input, 'keydown', {key: 'ArrowDown', shiftKey: true, altKey: true}); + expect(dp.editMode, 'to be true'); + + delete dp.editMode; + input.classList.remove('in-edit'); + + simulant.fire(input, 'keydown', {key: 'ArrowDown', shiftKey: true, ctrlKey: true}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'ArrowDown', shiftKey: true, metaKey: true}); + expect(dp.editMode, 'to be undefined'); + + dp.destroy(); + }); + + it('turns on when input is clicked', function () { + const dp = new Datepicker(input); + input.focus(); + + simulant.fire(input, 'mousedown'); + input.click(); + expect(dp.editMode, 'to be true'); + expect(input.classList.contains('in-edit'), 'to be true'); + + dp.destroy(); + input.classList.remove('in-edit'); + }); + + it('does not turn on when the picker is hidden', function () { + const dp = new Datepicker(input); + + dp.enterEditMode(); + expect(dp.editMode, 'to be undefined'); + expect(input.classList.contains('in-edit'), 'to be false'); + + simulant.fire(input, 'keydown', {key: '1'}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'keydown', {key: 'J'}); + expect(dp.editMode, 'to be undefined'); + + simulant.fire(input, 'mousedown'); + input.click(); + expect(dp.editMode, 'to be undefined'); + + dp.destroy(); + }); + + it('disables the arrow-key operation of the picker', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + dp.enterEditMode(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + expect(cells[19].textContent, 'to be', '14'); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + simulant.fire(input, 'keydown', {key: 'ArrowDownt'}); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(viewSwitch.textContent, 'to be', '2020'); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + viewSwitch.click(); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + dp.destroy(); + clock.restore(); + }); + + it('turns off when Datepicker.exitEditMode() is called', function () { + const dp = new Datepicker(input); + input.focus(); + dp.enterEditMode(); + + dp.exitEditMode(); + expect(dp.editMode, 'to be undefined'); + expect(input.classList.contains('in-edit'), 'to be false'); + + dp.destroy(); + }); + + it('turns off when the picker hides', function () { + const {dp, picker} = createDP(input); + input.focus(); + dp.enterEditMode(); + + dp.hide(); + expect(dp.editMode, 'to be undefined'); + expect(input.classList.contains('in-edit'), 'to be false'); + + dp.destroy(); + }); + + it('turns off when escape key is pressed', function () { + const dp = new Datepicker(input); + input.focus(); + dp.enterEditMode(); + + simulant.fire(input, 'keydown', {key: 'Escape'}); + expect(dp.editMode, 'to be undefined'); + expect(input.classList.contains('in-edit'), 'to be false'); + + dp.destroy(); + }); + + it('leaves the edit on the input as-is by default when turning off', function () { + const dp = new Datepicker(input); + const date = dateValue(2020, 1, 14); + dp.setDate(date); + input.focus(); + dp.enterEditMode(); + input.value = '4/22/2020'; + + dp.exitEditMode(); + expect(input.value, 'to be', '4/22/2020'); + expect(dp.dates, 'to equal', [date]); + + dp.show(); + dp.enterEditMode(); + input.value = '3/8/2020'; + + dp.hide(); + expect(input.value, 'to be', '3/8/2020'); + expect(dp.dates, 'to equal', [date]); + + dp.show(); + dp.enterEditMode(); + input.value = '02/14/2020'; + + simulant.fire(input, 'keydown', {key: 'Escape'}); + expect(input.value, 'to be', '02/14/2020'); + expect(dp.dates, 'to equal', [date]); + + dp.destroy(); + }); + + it('hides the picker when turning off by escape key press', function () { + const {dp, picker} = createDP(input); + input.focus(); + dp.enterEditMode(); + + simulant.fire(input, 'keydown', {key: 'Escape'}); + expect(isVisible(picker), 'to be false'); + + dp.show(); + dp.enterEditMode(); + + dp.exitEditMode(); + expect(isVisible(picker), 'to be true'); + + dp.destroy(); + }); + + it('updates the selection with the input when turning off by exitEditMode() call with update: true option', function () { + const dp = new Datepicker(input); + const date = dateValue(2020, 3, 22); + dp.setDate('02/14/2020'); + input.focus(); + dp.enterEditMode(); + input.value = '4/22/2020'; + + dp.exitEditMode({update: true}); + expect(dp.editMode, 'to be undefined'); + expect(input.classList.contains('in-edit'), 'to be false'); + expect(input.value, 'to be', '04/22/2020'); + expect(dp.dates, 'to equal', [date]); + + dp.destroy(); + }); + + it('updates the selection with the input when turning off by enter key press', function () { + const dp = new Datepicker(input); + const date = dateValue(2020, 3, 22); + dp.setDate('02/14/2020'); + input.focus(); + dp.enterEditMode(); + input.value = '4/22/2020'; + + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(dp.editMode, 'to be undefined'); + expect(input.classList.contains('in-edit'), 'to be false'); + expect(input.value, 'to be', '04/22/2020'); + expect(dp.dates, 'to equal', [date]); + + dp.destroy(); + }); + + it('updates the selection with the input when turning off being induced by unfocusing input element', function () { + const outsider = document.createElement('p'); + testContainer.appendChild(outsider); + + const dp = new Datepicker(input); + const date = dateValue(2020, 3, 22); + // by tab key-press + dp.setDate('02/14/2020'); + input.focus(); + dp.enterEditMode(); + input.value = '4/22/2020'; + + simulant.fire(input, 'keydown', {key: 'Tab'}); + expect(dp.editMode, 'to be undefined'); + expect(input.classList.contains('in-edit'), 'to be false'); + expect(input.value, 'to be', '04/22/2020'); + expect(dp.dates, 'to equal', [date]); + + //by clicking outside + dp.setDate('02/14/2020'); + dp.show(); + dp.enterEditMode(); + input.value = '4/22/2020'; + + simulant.fire(outsider, 'mousedown'); + expect(dp.editMode, 'to be undefined'); + expect(input.classList.contains('in-edit'), 'to be false'); + expect(input.value, 'to be', '04/22/2020'); + expect(dp.dates, 'to equal', [date]); + + dp.destroy(); + testContainer.removeChild(outsider); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/keyboard-operation/keyboard-operation.js b/node_modules/flowbite-datepicker/test/keyboard-operation/keyboard-operation.js new file mode 100644 index 0000000..c75850d --- /dev/null +++ b/node_modules/flowbite-datepicker/test/keyboard-operation/keyboard-operation.js @@ -0,0 +1,146 @@ +describe('keyboard operation', function () { + let input; + + beforeEach(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + }); + + describe('tab', function () { + it('hides the picker', function () { + const {dp, picker} = createDP(input); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'Tab'}); + expect(isVisible(picker), 'to be false'); + + dp.destroy(); + }); + + it('updates the selected date with the input\'s value', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + + const dp = new Datepicker(input); + // when picker is shown + input.focus(); + input.value = 'foo'; + + simulant.fire(input, 'keydown', {key: 'Tab'}); + expect(input.value, 'to be', '02/14/2020'); + expect(dp.getDate().getTime(), 'to be', dateValue(2020, 1, 14)); + + // when picker is hidden + input.focus(); + input.value = '04/22/2020'; + + simulant.fire(input, 'keydown', {key: 'Tab'}); + expect(input.value, 'to be', '04/22/2020'); + expect(dp.getDate().getTime(), 'to be', dateValue(2020, 3, 22)); + + input.focus(); + input.value = ''; + + simulant.fire(input, 'keydown', {key: 'Tab'}); + expect(input.value, 'to be', ''); + expect(dp.getDate(), 'to be undefined'); + + dp.destroy(); + clock.restore(); + }); + }); + + describe('escape', function () { + it('shows or hides the picker', function () { + const {dp, picker} = createDP(input); + + simulant.fire(input, 'keydown', {key: 'Escape'}); + expect(isVisible(picker), 'to be true'); + + simulant.fire(input, 'keydown', {key: 'Escape'}); + expect(isVisible(picker), 'to be false'); + + dp.destroy(); + }); + }); + + describe('enter', function () { + it('sets the view date to the selection if the current view is days', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + const {dp, picker} = createDP(input); + input.focus(); + + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input.value, 'to be', '02/14/2020'); + + let cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + expect(cells[19].textContent, 'to be', '14'); + + dp.destroy(); + clock.reset(); + }); + + it('changes the view to the next minor one if the current view is not days', function () { + const clock = sinon.useFakeTimers({now: new Date(2020, 3, 22)}); + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + input.focus(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2020'); + + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(viewSwitch.textContent, 'to be', '2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(viewSwitch.textContent, 'to be', 'April 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[24]]); + expect(cells[24].textContent, 'to be', '22'); + + // does nothig if the view has reached to the min view + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(viewSwitch.textContent, 'to be', 'April 2020'); + + dp.destroy(); + clock.reset(); + }); + + it('updates the selection with the input text if the picker is hidden', function () { + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + + input.value = '7/4/2020'; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(dp.dates, 'to equal', [dateValue(2020, 6, 4)]); + expect(input.value, 'to be', '07/04/2020'); + + dp.show(); + expect(viewSwitch.textContent, 'to be', 'July 2020'); + + let cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[6]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + expect(cells[6].textContent, 'to be', '4'); + + dp.destroy(); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/mouse-operation.js b/node_modules/flowbite-datepicker/test/mouse-operation.js new file mode 100644 index 0000000..bafc2a4 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/mouse-operation.js @@ -0,0 +1,580 @@ +describe('mouse operation', function () { + let clock; + let input; + + before(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + after(function () { + clock.restore(); + testContainer.removeChild(input); + }); + + it('picker hides if mouse is pressed outside the picker or the input', function () { + const outsider = document.createElement('p'); + testContainer.appendChild(outsider); + + const {dp, picker} = createDP(input); + input.focus(); + + simulant.fire(picker.querySelector('.dow'), 'mousedown'); + expect(isVisible(picker), 'to be true'); + + simulant.fire(input, 'mousedown'); + expect(isVisible(picker), 'to be true'); + + simulant.fire(outsider, 'mousedown'); + expect(isVisible(picker), 'to be false'); + + // hide() should not called when picker is hidden + // (issue #45) + const spyHide = sinon.spy(dp, 'hide'); + input.blur(); + + simulant.fire(outsider, 'mousedown'); + expect(spyHide.called, 'to be false'); + + spyHide.restore(); + + // picker shown programmatically should be closed by clicking outside + // (issue #52) + dp.show(); + + simulant.fire(outsider, 'mousedown'); + expect(isVisible(picker), 'to be false'); + + dp.destroy(); + testContainer.removeChild(outsider); + }); + + it('selection is updated with input\'s value if mouse is pressed outside the input', function () { + const outsider = document.createElement('p'); + testContainer.appendChild(outsider); + + const {dp, picker} = createDP(input); + // when picker is shown + input.focus(); + input.value = 'foo'; + + simulant.fire(picker.querySelector('.dow'), 'mousedown'); + expect(input.value, 'to be', 'foo'); + + simulant.fire(input, 'mousedown'); + expect(input.value, 'to be', 'foo'); + + simulant.fire(outsider, 'mousedown'); + expect(input.value, 'to be', '02/14/2020'); + expect(dp.getDate().getTime(), 'to be', dateValue(2020, 1, 14)); + + // when picker is hidden + input.focus(); + input.value = '04/22/2020'; + + simulant.fire(outsider, 'mousedown'); + expect(input.value, 'to be', '04/22/2020'); + expect(dp.getDate().getTime(), 'to be', dateValue(2020, 3, 22)); + + input.focus(); + input.value = ''; + + simulant.fire(outsider, 'mousedown'); + expect(input.value, 'to be', ''); + expect(dp.getDate(), 'to be undefined'); + + dp.destroy(); + testContainer.removeChild(outsider); + }); + + it('picker shows up if input field is clicked wheh picker is hidden', function () { + const {dp, picker} = createDP(input); + // when input field is not focued + simulant.fire(input, 'mousedown'); + input.click(); + expect(isVisible(picker), 'to be true'); + + dp.hide(); + + // when input has focus + simulant.fire(input, 'mousedown'); + input.click(); + expect(isVisible(picker), 'to be true'); + + dp.destroy(); + }); + + describe('view-switch', function () { + it('changes the view to the next greater one', function () { + input.value = '04/22/2020'; + + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + dp.show(); + + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', '2020'); + expect(input.value, 'to be', '04/22/2020'); + + let cells = getCells(picker); + expect(cells.map(el => el.textContent), 'to equal', Datepicker.locales.en.monthsShort); + expect(cells[3].classList.contains('selected'), 'to be true'); + expect(cells[3].classList.contains('focused'), 'to be true'); + + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + expect(input.value, 'to be', '04/22/2020'); + + cells = getCells(picker); + expect(cells, 'to have length', 12); + expect(cells[0].textContent, 'to be', '2019'); + expect(cells[0].classList.contains('prev'), 'to be true'); + expect(cells[0].classList.contains('next'), 'to be false'); + expect(cells[1].textContent, 'to be', '2020'); + expect(cells[1].classList.contains('prev'), 'to be false'); + expect(cells[1].classList.contains('next'), 'to be false'); + expect(cells[10].textContent, 'to be', '2029'); + expect(cells[10].classList.contains('prev'), 'to be false'); + expect(cells[10].classList.contains('next'), 'to be false'); + expect(cells[11].textContent, 'to be', '2030'); + expect(cells[11].classList.contains('prev'), 'to be false'); + expect(cells[11].classList.contains('next'), 'to be true'); + + expect(filterCells(cells, '.selected'), 'to equal', [cells[1]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + expect(input.value, 'to be', '04/22/2020'); + + cells = getCells(picker); + expect(cells, 'to have length', 12); + expect(cells[0].textContent, 'to be', '1990'); + expect(cells[0].classList.contains('prev'), 'to be true'); + expect(cells[0].classList.contains('next'), 'to be false'); + expect(cells[1].textContent, 'to be', '2000'); + expect(cells[1].classList.contains('prev'), 'to be false'); + expect(cells[1].classList.contains('next'), 'to be false'); + expect(cells[10].textContent, 'to be', '2090'); + expect(cells[10].classList.contains('prev'), 'to be false'); + expect(cells[10].classList.contains('next'), 'to be false'); + expect(cells[11].textContent, 'to be', '2100'); + expect(cells[11].classList.contains('prev'), 'to be false'); + expect(cells[11].classList.contains('next'), 'to be true'); + + expect(filterCells(cells, '.selected'), 'to equal', [cells[3]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + expect(cells[3].textContent, 'to be', '2020'); + + // does nothig if the view has reached to the max view + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + dp.destroy(); + input.value = ''; + }); + }); + + describe('prev-btn', function () { + it('changes the month/year/decade/century of the view to the previouse one', function () { + input.value = '04/22/2020'; + + const {dp, picker} = createDP(input); + const [viewSwitch, prevBtn] = getParts(picker, ['.view-switch', '.prev-btn']); + dp.show(); + + prevBtn.click(); + expect(viewSwitch.textContent, 'to be', 'March 2020'); + expect(input.value, 'to be', '04/22/2020'); + + // view date is changed to the same day of the previous month + let cells = getCells(picker); + expect(cells, 'to have length', 42); + expect(cells[0].textContent, 'to be', '1'); + expect(cells[0].classList.contains('prev'), 'to be false'); + expect(cells[0].classList.contains('next'), 'to be false'); + expect(cells[30].textContent, 'to be', '31'); + expect(cells[30].classList.contains('prev'), 'to be false'); + expect(cells[30].classList.contains('next'), 'to be false'); + expect(cells[31].textContent, 'to be', '1'); + expect(cells[31].classList.contains('prev'), 'to be false'); + expect(cells[31].classList.contains('next'), 'to be true'); + expect(cells[41].textContent, 'to be', '11'); + expect(cells[41].classList.contains('prev'), 'to be false'); + expect(cells[41].classList.contains('next'), 'to be true'); + + expect(filterCells(cells, '.selected'), 'to equal', []); + expect(filterCells(cells, '.focused'), 'to equal', [cells[21]]); + expect(cells[21].textContent, 'to be', '22'); + + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', '2020'); + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[3]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + + prevBtn.click(); + expect(viewSwitch.textContent, 'to be', '2019'); + expect(input.value, 'to be', '04/22/2020'); + + // view date is changed to the same month of the previous year + cells = getCells(picker); + expect(cells.map(el => el.textContent), 'to equal', Datepicker.locales.en.monthsShort); + expect(filterCells(cells, '.selected'), 'to equal', []); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', '2010-2019'); + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[11]]); + expect(cells[11].textContent, 'to be', '2020'); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + expect(cells[10].textContent, 'to be', '2019'); + + prevBtn.click(); + expect(viewSwitch.textContent, 'to be', '2000-2009'); + expect(input.value, 'to be', '04/22/2020'); + + cells = getCells(picker); + expect(cells, 'to have length', 12); + expect(cells[0].textContent, 'to be', '1999'); + expect(cells[1].textContent, 'to be', '2000'); + expect(cells[10].textContent, 'to be', '2009'); + expect(cells[11].textContent, 'to be', '2010'); + + expect(filterCells(cells, '.selected'), 'to equal', []); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[3]]); + expect(cells[3].textContent, 'to be', '2020'); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2000'); + + prevBtn.click(); + expect(viewSwitch.textContent, 'to be', '1900-1990'); + expect(input.value, 'to be', '04/22/2020'); + + cells = getCells(picker); + expect(cells, 'to have length', 12); + expect(cells[0].textContent, 'to be', '1890'); + expect(cells[1].textContent, 'to be', '1900'); + expect(cells[10].textContent, 'to be', '1990'); + expect(cells[11].textContent, 'to be', '2000'); + + expect(filterCells(cells, '.selected'), 'to equal', []); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + dp.destroy(); + input.value = ''; + }); + + it('controls the view date in days view to be in the prev month when moving from a longer month to shorter', function () { + input.value = '03/31/2019'; + + const {dp, picker} = createDP(input); + const [viewSwitch, prevBtn] = getParts(picker, ['.view-switch', '.prev-btn']); + dp.show(); + + prevBtn.click(); + expect(viewSwitch.textContent, 'to be', 'February 2019'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[32]]); + expect(cells[32].textContent, 'to be', '28'); + + input.value = '03/31/2020'; + dp.update(); + prevBtn.click(); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[34]]); + expect(cells[34].textContent, 'to be', '29'); + + input.value = '10/31/2020'; + dp.update(); + prevBtn.click(); + expect(viewSwitch.textContent, 'to be', 'September 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[31]]); + expect(cells[31].textContent, 'to be', '30'); + + dp.destroy(); + input.value = ''; + }); + + it('becomes disabled if the view includes the decade/year/month/day of 0000-01-01', function () { + input.value = '01/04/0000'; + + const {dp, picker} = createDP(input); + const [viewSwitch, prevBtn] = getParts(picker, ['.view-switch', '.prev-btn']); + dp.show(); + + expect(prevBtn.disabled, 'to be true'); + prevBtn.click(); + expect(viewSwitch.textContent, 'to be', 'January 0'); + + viewSwitch.click(); + + expect(prevBtn.disabled, 'to be true'); + prevBtn.click(); + expect(viewSwitch.textContent, 'to be', '0'); + + viewSwitch.click(); + + expect(prevBtn.disabled, 'to be true'); + prevBtn.click(); + expect(viewSwitch.textContent, 'to be', '0-9'); + + viewSwitch.click(); + + expect(prevBtn.disabled, 'to be true'); + prevBtn.click(); + expect(viewSwitch.textContent, 'to be', '0-90'); + + dp.destroy(); + input.value = ''; + }); + }); + + describe('next-btn', function () { + it('changes the month/year/decade/century of the view to the next one', function () { + input.value = '04/22/2020'; + + const {dp, picker} = createDP(input); + const [viewSwitch, nextBtn] = getParts(picker, ['.view-switch', '.next-btn']); + dp.show(); + + nextBtn.click(); + expect(viewSwitch.textContent, 'to be', 'May 2020'); + expect(input.value, 'to be', '04/22/2020'); + + // view date is changed to the same day of the next month + let cells = getCells(picker); + expect(cells, 'to have length', 42); + expect(cells[0].textContent, 'to be', '26'); + expect(cells[0].classList.contains('prev'), 'to be true'); + expect(cells[0].classList.contains('next'), 'to be false'); + expect(cells[4].textContent, 'to be', '30'); + expect(cells[4].classList.contains('prev'), 'to be true'); + expect(cells[4].classList.contains('next'), 'to be false'); + expect(cells[5].textContent, 'to be', '1'); + expect(cells[5].classList.contains('prev'), 'to be false'); + expect(cells[5].classList.contains('next'), 'to be false'); + expect(cells[35].textContent, 'to be', '31'); + expect(cells[35].classList.contains('prev'), 'to be false'); + expect(cells[35].classList.contains('next'), 'to be false'); + expect(cells[36].textContent, 'to be', '1'); + expect(cells[36].classList.contains('prev'), 'to be false'); + expect(cells[36].classList.contains('next'), 'to be true'); + expect(cells[41].textContent, 'to be', '6'); + expect(cells[41].classList.contains('prev'), 'to be false'); + expect(cells[41].classList.contains('next'), 'to be true'); + + expect(filterCells(cells, '.selected'), 'to equal', []); + expect(filterCells(cells, '.focused'), 'to equal', [cells[26]]); + expect(cells[26].textContent, 'to be', '22'); + + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', '2020'); + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[3]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[4]]); + + nextBtn.click(); + expect(viewSwitch.textContent, 'to be', '2021'); + expect(input.value, 'to be', '04/22/2020'); + + // view date is changed to the same month of the previous year + cells = getCells(picker); + expect(cells.map(el => el.textContent), 'to equal', Datepicker.locales.en.monthsShort); + expect(filterCells(cells, '.selected'), 'to equal', []); + expect(filterCells(cells, '.focused'), 'to equal', [cells[4]]); + + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[1]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + expect(cells[1].textContent, 'to be', '2020'); + expect(cells[2].textContent, 'to be', '2021'); + + nextBtn.click(); + expect(viewSwitch.textContent, 'to be', '2030-2039'); + expect(input.value, 'to be', '04/22/2020'); + + cells = getCells(picker); + expect(cells, 'to have length', 12); + expect(cells[0].textContent, 'to be', '2029'); + expect(cells[1].textContent, 'to be', '2030'); + expect(cells[10].textContent, 'to be', '2039'); + expect(cells[11].textContent, 'to be', '2040'); + + expect(filterCells(cells, '.selected'), 'to equal', []); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + expect(cells[2].textContent, 'to be', '2031'); + + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', '2000-2090'); + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[3]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[4]]); + expect(cells[3].textContent, 'to be', '2020'); + expect(cells[4].textContent, 'to be', '2030'); + + nextBtn.click(); + expect(viewSwitch.textContent, 'to be', '2100-2190'); + expect(input.value, 'to be', '04/22/2020'); + + cells = getCells(picker); + expect(cells, 'to have length', 12); + expect(cells[0].textContent, 'to be', '2090'); + expect(cells[1].textContent, 'to be', '2100'); + expect(cells[10].textContent, 'to be', '2190'); + expect(cells[11].textContent, 'to be', '2200'); + + expect(filterCells(cells, '.selected'), 'to equal', []); + expect(filterCells(cells, '.focused'), 'to equal', [cells[4]]); + expect(cells[4].textContent, 'to be', '2130'); + + dp.destroy(); + input.value = ''; + }); + + it('controls the view date in days view to be in the next month when moving from a longer month to shorter', function () { + input.value = '01/31/2019'; + + const {dp, picker} = createDP(input); + const [viewSwitch, nextBtn] = getParts(picker, ['.view-switch', '.next-btn']); + dp.show(); + + nextBtn.click(); + expect(viewSwitch.textContent, 'to be', 'February 2019'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[32]]); + expect(cells[32].textContent, 'to be', '28'); + + input.value = '01/31/2020'; + dp.update(); + nextBtn.click(); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[34]]); + expect(cells[34].textContent, 'to be', '29'); + + input.value = '08/31/2020'; + dp.update(); + nextBtn.click(); + expect(viewSwitch.textContent, 'to be', 'September 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[31]]); + expect(cells[31].textContent, 'to be', '30'); + + dp.destroy(); + input.value = ''; + }); + }); + + describe('datepicker-cell', function () { + let dp; + let picker; + + beforeEach(function () { + ({dp, picker} = createDP(input)); + dp.show(); + }); + + afterEach(function () { + dp.destroy(); + }); + + it('changes the selection to the clicked date if the current view = days', function () { + const targetCell = getCells(picker)[19]; + targetCell.click(); + + expect(dp.dates, 'to equal', [new Date(2020, 1, 14).getTime()]); + expect(input.value, 'to be', '02/14/2020'); + expect(getViewSwitch(picker).textContent, 'to be', 'February 2020'); + expect(targetCell.classList.contains('selected'), 'to be true'); + expect(targetCell.classList.contains('focused'), 'to be true'); + + dp.setDate({clear: true}); + }); + + it('also changes the month of the view if a date of previous or next month is clicked', function () { + const viewSwitch = getViewSwitch(picker); + getCells(picker)[1].click(); + + expect(dp.dates, 'to equal', [new Date(2020, 0, 27).getTime()]); + expect(input.value, 'to be', '01/27/2020'); + expect(viewSwitch.textContent, 'to be', 'January 2020'); + + let cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[29]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[29]]); + expect(cells[29].textContent, 'to be', '27'); + + expect(cells[40].textContent, 'to be', '7'); + cells[40].click(); + + expect(dp.dates, 'to equal', [dateValue(2020, 1, 7)]); + expect(input.value, 'to be', '02/07/2020'); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[12]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[12]]); + expect(cells[12].textContent, 'to be', '7'); + + dp.setDate({clear: true}); + }); + + it('changes the view year or month to the clicked one and moves to the next minor view if the current view != days', function () { + const viewSwitch = getViewSwitch(picker); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + // on decades view: 2000-2090 + let cells = getCells(picker); + // click "2010" + cells[2].click(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(getViewSwitch(picker).textContent, 'to be', '2010-2019'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2010'); + + // click "2017" + cells[8].click(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(getViewSwitch(picker).textContent, 'to be', '2017'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', 'Feb'); + + // click "Oct" + cells[9].click(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(getViewSwitch(picker).textContent, 'to be', 'October 2017'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[10].textContent, 'to be', '11'); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/options/before-show.js b/node_modules/flowbite-datepicker/test/options/before-show.js new file mode 100644 index 0000000..c126a9f --- /dev/null +++ b/node_modules/flowbite-datepicker/test/options/before-show.js @@ -0,0 +1,635 @@ +describe('options - beforeShow hooks', function () { + let clock; + let input; + + beforeEach(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + clock.restore(); + }); + + describe('beforeShowDay', function () { + it('disables the date when it returns false', function () { + const beforeShowDay = date => !!(date.getDate() % 10); + const {dp, picker} = createDP(input, {beforeShowDay}); + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[4], cells[15], cells[25]]); + expect(disabledCells.map(el => el.textContent), 'to equal', ['30', '10', '20']); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[9], cells[19], cells[29], cells[40]]); + expect(disabledCells.map(el => el.textContent), 'to equal', ['10', '20', '30', '10']); + + dp.destroy(); + }); + + it('adds classes to the date when it returns spece separated classes', function () { + const beforeShowDay = date => date.getDate() % 10 ? undefined : 'foo bar'; + const {dp, picker} = createDP(input, {beforeShowDay}); + let cells = getCells(picker); + let fooCells = filterCells(cells, '.foo'); + let barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[4], cells[15], cells[25]]); + expect(barCells, 'to equal', fooCells); + expect(fooCells.map(el => el.textContent), 'to equal', ['30', '10', '20']); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + fooCells = filterCells(cells, '.foo'); + barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[9], cells[19], cells[29], cells[40]]); + expect(barCells, 'to equal', fooCells); + expect(fooCells.map(el => el.textContent), 'to equal', ['10', '20', '30', '10']); + + dp.destroy(); + }); + + it('disables the date when the return contains enabled: false', function () { + const beforeShowDay = date => ({enabled: !!(date.getDate() % 10)}); + const {dp, picker} = createDP(input, {beforeShowDay}); + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[4], cells[15], cells[25]]); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[9], cells[19], cells[29], cells[40]]); + + dp.destroy(); + }); + + it('adds classes to the date when the return contains space separated classes in the classes property', function () { + const beforeShowDay = date => date.getDate() % 10 ? undefined : {classes: 'foo bar'}; + const {dp, picker} = createDP(input, {beforeShowDay}); + let cells = getCells(picker); + let fooCells = filterCells(cells, '.foo'); + let barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[4], cells[15], cells[25]]); + expect(barCells, 'to equal', fooCells); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + fooCells = filterCells(cells, '.foo'); + barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[9], cells[19], cells[29], cells[40]]); + expect(barCells, 'to equal', fooCells); + + dp.destroy(); + }); + + it('uses custom content to the date cell when the return contains text/html in the content property', function () { + const beforeShowDay = (date) => date.getDate() % 10 === 4 ? {content: '❤️'} : undefined; + const {dp, picker} = createDP(input, {beforeShowDay}); + let cells = getCells(picker); + let ccCells = cells.filter(el => el.children.length > 0); + + expect(ccCells, 'to equal', [cells[9], cells[19], cells[29], cells[38]]); + ccCells.forEach((cell) => { + expect(cell.innerHTML, 'to be', '❤️'); + }); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + ccCells = cells.filter(el => el.children.length > 0); + + expect(ccCells, 'to equal', [cells[3], cells[13], cells[23], cells[34]]); + ccCells.forEach((cell) => { + expect(cell.innerHTML, 'to be', '❤️'); + }); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({beforeShowDay: date => !!(date.getDate() % 10)}); + dp.show(); + + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[4], cells[15], cells[25]]); + + dp.hide(); + dp.setOptions({beforeShowDay: null}); + dp.show(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + expect(disabledCells, 'to equal', []); + + dp.destroy(); + }); + }); + + describe('beforeShowMonth', function () { + it('disables the month on months view when it returns false', function () { + const beforeShowMonth = date => !!(date.getMonth() % 5); + const {dp, picker} = createDP(input, {beforeShowMonth}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[0], cells[5], cells[10]]); + expect(disabledCells.map(el => el.textContent), 'to equal', ['Jan', 'Jun', 'Nov']); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[0], cells[5], cells[10]]); + expect(disabledCells.map(el => el.textContent), 'to equal', ['Jan', 'Jun', 'Nov']); + + dp.destroy(); + }); + + it('adds classes to the month on months view when it returns spece separated classes', function () { + const beforeShowMonth = date => date.getMonth() % 5 ? undefined : 'foo bar'; + const {dp, picker} = createDP(input, {beforeShowMonth}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + + let cells = getCells(picker); + let fooCells = filterCells(cells, '.foo'); + let barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[0], cells[5], cells[10]]); + expect(barCells, 'to equal', fooCells); + expect(fooCells.map(el => el.textContent), 'to equal', ['Jan', 'Jun', 'Nov']); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + fooCells = filterCells(cells, '.foo'); + barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[0], cells[5], cells[10]]); + expect(barCells, 'to equal', fooCells); + expect(fooCells.map(el => el.textContent), 'to equal', ['Jan', 'Jun', 'Nov']); + + dp.destroy(); + }); + + it('disables the month on months view when the return contains enabled: false', function () { + const beforeShowMonth = date => ({enabled: !!(date.getMonth() % 5)}); + const {dp, picker} = createDP(input, {beforeShowMonth}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[0], cells[5], cells[10]]); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[0], cells[5], cells[10]]); + + dp.destroy(); + }); + + it('adds classes to the month on months view when the return contains space separated classes in the classes property', function () { + const beforeShowMonth = date => date.getMonth() % 5 ? undefined : {classes: 'foo bar'}; + const {dp, picker} = createDP(input, {beforeShowMonth}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + + let cells = getCells(picker); + let fooCells = filterCells(cells, '.foo'); + let barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[0], cells[5], cells[10]]); + expect(barCells, 'to equal', fooCells); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + fooCells = filterCells(cells, '.foo'); + barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[0], cells[5], cells[10]]); + expect(barCells, 'to equal', fooCells); + + dp.destroy(); + }); + + it('uses custom content to the month cell when the return contains text/html in the content property', function () { + const beforeShowMonth = (date) => (date.getMonth() + date.getFullYear() % 10) % 10 ? undefined : {content: '🍀'}; + const {dp, picker} = createDP(input, {beforeShowMonth}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + + let cells = getCells(picker); + let ccCells = cells.filter(el => el.textContent.length < 3); + + expect(ccCells, 'to equal', [cells[0], cells[10]]); + ccCells.forEach((cell) => { + expect(cell.textContent, 'to be', '🍀'); + }); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + ccCells = cells.filter(el => el.textContent.length < 3); + + expect(ccCells, 'to equal', [cells[9]]); + ccCells.forEach((cell) => { + expect(cell.textContent, 'to be', '🍀'); + }); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + dp.setOptions({beforeShowMonth: date => !!(date.getMonth() % 5)}); + dp.show(); + viewSwitch.click(); + + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[0], cells[5], cells[10]]); + + dp.hide(); + dp.setOptions({beforeShowMonth: null}); + dp.show(); + viewSwitch.click(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + expect(disabledCells, 'to equal', []); + + dp.destroy(); + }); + }); + + describe('beforeShowYear', function () { + it('disables the year on years view when it returns false', function () { + const beforeShowYear = date => !!(date.getFullYear() % 4); + const {dp, picker} = createDP(input, {beforeShowYear}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[1], cells[5], cells[9]]); + expect(disabledCells.map(el => el.textContent), 'to equal', ['2020', '2024', '2028',]); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[3], cells[7], cells[11]]); + expect(disabledCells.map(el => el.textContent), 'to equal', ['2032', '2036', '2040']); + + dp.destroy(); + }); + + it('adds classes to the year on years view when it returns spece separated classes', function () { + const beforeShowYear = date => date.getFullYear() % 4 ? undefined : 'foo bar'; + const {dp, picker} = createDP(input, {beforeShowYear}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let fooCells = filterCells(cells, '.foo'); + let barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[1], cells[5], cells[9]]); + expect(barCells, 'to equal', fooCells); + expect(fooCells.map(el => el.textContent), 'to equal', ['2020', '2024', '2028']); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + fooCells = filterCells(cells, '.foo'); + barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[3], cells[7], cells[11]]); + expect(barCells, 'to equal', fooCells); + expect(fooCells.map(el => el.textContent), 'to equal', ['2032', '2036', '2040']); + + dp.destroy(); + }); + + it('disables the year on years view when the return contains enabled: false', function () { + const beforeShowYear = date => ({enabled: !!(date.getFullYear() % 4)}); + const {dp, picker} = createDP(input, {beforeShowYear}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[1], cells[5], cells[9]]); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[3], cells[7], cells[11]]); + + dp.destroy(); + }); + + it('adds classes to the year on years view when the return contains space separated classes in the classes property', function () { + const beforeShowYear = date => date.getFullYear() % 4 ? undefined : {classes: 'foo bar'}; + const {dp, picker} = createDP(input, {beforeShowYear}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let fooCells = filterCells(cells, '.foo'); + let barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[1], cells[5], cells[9]]); + expect(barCells, 'to equal', fooCells); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + fooCells = filterCells(cells, '.foo'); + barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[3], cells[7], cells[11]]); + expect(barCells, 'to equal', fooCells); + + dp.destroy(); + }); + + it('uses custom content to the year cell when the return contains text/html in the content property', function () { + const beforeShowYear = (date) => { + const year = date.getFullYear(); + return (year + Math.floor(year / 10) % 10) % 4 ? undefined : {content: ''}; + }; + const {dp, picker} = createDP(input, {beforeShowYear}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let ccCells = cells.filter(el => el.children.length > 0); + + expect(ccCells, 'to equal', [cells[1], cells[5], cells[9]]); + ccCells.forEach((cell) => { + expect(cell.innerHTML, 'to be', ''); + }); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + ccCells = cells.filter(el => el.children.length > 0); + + expect(ccCells, 'to equal', [cells[2], cells[6], cells[10]]); + ccCells.forEach((cell) => { + expect(cell.innerHTML, 'to be', ''); + }); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + dp.setOptions({beforeShowYear: date => !!(date.getFullYear() % 4)}); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[1], cells[5], cells[9]]); + + dp.hide(); + dp.setOptions({beforeShowYear: null}); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + expect(disabledCells, 'to equal', []); + + dp.destroy(); + }); + }); + + describe('beforeShowDecade', function () { + it('disables the decade on decades view when it returns false', function () { + const beforeShowDecade = date => !!((date.getFullYear() / 10) % 4); + const {dp, picker} = createDP(input, {beforeShowDecade}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[1], cells[5], cells[9]]); + expect(disabledCells.map(el => el.textContent), 'to equal', ['2000', '2040', '2080',]); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[3], cells[7], cells[11]]); + expect(disabledCells.map(el => el.textContent), 'to equal', ['2120', '2160', '2200']); + + dp.destroy(); + }); + + it('adds classes to the decade on decades view when it returns spece separated classes', function () { + const beforeShowDecade = date => (date.getFullYear() / 10) % 4 ? undefined : 'foo bar'; + const {dp, picker} = createDP(input, {beforeShowDecade}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let fooCells = filterCells(cells, '.foo'); + let barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[1], cells[5], cells[9]]); + expect(barCells, 'to equal', fooCells); + expect(fooCells.map(el => el.textContent), 'to equal', ['2000', '2040', '2080']); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + fooCells = filterCells(cells, '.foo'); + barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[3], cells[7], cells[11]]); + expect(barCells, 'to equal', fooCells); + expect(fooCells.map(el => el.textContent), 'to equal', ['2120', '2160', '2200']); + + dp.destroy(); + }); + + it('disables the decade on decades view when the return contains enabled: false', function () { + const beforeShowDecade = date => ({enabled: !!((date.getFullYear() / 10) % 4)}); + const {dp, picker} = createDP(input, {beforeShowDecade}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[1], cells[5], cells[9]]); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[3], cells[7], cells[11]]); + + dp.destroy(); + }); + + it('adds classes to the decade on decades view when the return contains space separated classes in the classes property', function () { + const beforeShowDecade = date => (date.getFullYear() / 10) % 4 ? undefined : {classes: 'foo bar'}; + const {dp, picker} = createDP(input, {beforeShowDecade}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let fooCells = filterCells(cells, '.foo'); + let barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[1], cells[5], cells[9]]); + expect(barCells, 'to equal', fooCells); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + fooCells = filterCells(cells, '.foo'); + barCells = filterCells(cells, '.bar'); + + expect(fooCells, 'to equal', [cells[3], cells[7], cells[11]]); + expect(barCells, 'to equal', fooCells); + + dp.destroy(); + }); + + it('uses custom content to the decade cell when the return contains text/html in the content property', function () { + const beforeShowDecade = (date) => { + const dec = date.getFullYear() / 10; + return (dec + Math.floor(dec / 10) % 10) % 5 ? undefined : {content: 'X'}; + }; + const {dp, picker} = createDP(input, {beforeShowDecade}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let ccCells = cells.filter(el => el.children.length > 0); + + expect(ccCells, 'to equal', [cells[1], cells[6]]); + ccCells.forEach((cell) => { + expect(cell.innerHTML, 'to be', 'X'); + }); + + picker.querySelector('.next-btn').click(); + + cells = getCells(picker); + ccCells = cells.filter(el => el.children.length > 0); + + expect(ccCells, 'to equal', [cells[5], cells[10]]); + ccCells.forEach((cell) => { + expect(cell.innerHTML, 'to be', 'X'); + }); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + dp.setOptions({beforeShowDecade: date => !!((date.getFullYear() / 10) % 4)}); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + let cells = getCells(picker); + let disabledCells = filterCells(cells, '.disabled'); + + expect(disabledCells, 'to equal', [cells[1], cells[5], cells[9]]); + + dp.hide(); + dp.setOptions({beforeShowDecade: null}); + dp.show(); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + cells = getCells(picker); + disabledCells = filterCells(cells, '.disabled'); + expect(disabledCells, 'to equal', []); + + dp.destroy(); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/options/bulma-datepicker.sublime-workspace b/node_modules/flowbite-datepicker/test/options/bulma-datepicker.sublime-workspace new file mode 100644 index 0000000..c88d853 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/options/bulma-datepicker.sublime-workspace @@ -0,0 +1,1280 @@ +{ + "auto_complete": + { + "selected_items": + [ + [ + "i", + "input" + ], + [ + "Datep", + "Datepicker〔variable〕" + ], + [ + "con", + "container" + ], + [ + "w", + "weekStart" + ], + [ + "u", + "updated" + ], + [ + "getD", + "getDatesInColumn" + ], + [ + "dat", + "dates" + ], + [ + "qu", + "querySelectorAll" + ], + [ + "A", + "Array" + ], + [ + "disp", + "display" + ], + [ + "for", + "format" + ], + [ + "set", + "setOptions" + ], + [ + "hi", + "highlight" + ], + [ + "l", + "link" + ], + [ + "to", + "todayBtn" + ], + [ + "que", + "querySelectorAll" + ], + [ + "se", + "setOptions" + ], + [ + "text", + "textContent" + ], + [ + "ti", + "title" + ], + [ + "be", + "before" + ], + [ + "tex", + "textContent" + ], + [ + "fo", + "focused" + ], + [ + "class", + "classList" + ], + [ + "view", + "viewSwitch" + ], + [ + "des", + "describe〔variable〕" + ], + [ + "de", + "destroy" + ], + [ + "nextB", + "nextBtn〔variable〕" + ], + [ + "h", + "html" + ], + [ + "da", + "daysOfWeekHighlighted" + ], + [ + "selec", + "selector〔variable〕" + ], + [ + "in", + "index" + ], + [ + "ne", + "newStartView" + ], + [ + "focu", + "focused" + ], + [ + "cl", + "classList" + ], + [ + "ke", + "key" + ], + [ + "clear", + "clearBtn" + ], + [ + "cle", + "clearBtn" + ], + [ + "exp", + "expect〔function〕" + ], + [ + "sta", + "startOfWeek" + ], + [ + "create", + "createWeeks" + ], + [ + "str", + "startOfWeek" + ], + [ + "sec", + "secondWeek" + ], + [ + "ca", + "calendarWeeks" + ], + [ + "quer", + "querySelector" + ], + [ + "c", + "click" + ], + [ + "Date", + "Datepicker" + ], + [ + "ev", + "eventObj" + ], + [ + "si", + "sinon" + ], + [ + "chang", + "changeDate" + ], + [ + "spy", + "spyChangeDate" + ], + [ + "chage", + "changeDate" + ], + [ + "tr", + "turning" + ], + [ + "key", + "keydown" + ], + [ + "vie", + "viewSwitch" + ], + [ + "te", + "textContent" + ], + [ + "p", + "picker" + ], + [ + "re", + "replaceInput" + ], + [ + "replaceI", + "replaceInput" + ], + [ + "newI", + "newInput" + ], + [ + "do", + "document" + ], + [ + "a", + "active" + ], + [ + "date", + "datepicker" + ], + [ + "sw", + "switch" + ], + [ + "E", + "Escape" + ], + [ + "Arrow", + "ArrowUp" + ], + [ + "perfor", + "performArrowLeftOrRightKey" + ], + [ + "per", + "perform〔variable〕" + ], + [ + "ex", + "exitEditMode" + ], + [ + "edi", + "editMode" + ], + [ + "en", + "enterEditMode" + ], + [ + "ac", + "active" + ], + [ + "on", + "onMousedownInput" + ], + [ + "m", + "maxMonth" + ], + [ + "max", + "maxYear" + ], + [ + "lo", + "localDate" + ], + [ + "minDate", + "minDateObj〔variable〕" + ], + [ + "ma", + "maxYear" + ], + [ + "di", + "direction" + ], + [ + "inp", + "inputField" + ], + [ + "fun", + "fun\tFunction" + ], + [ + "sh", + "shiftKey" + ], + [ + "co", + "control" + ], + [ + "fu", + "functions" + ], + [ + "dec", + "decades" + ], + [ + "vi", + "viewSwitch" + ], + [ + "ta", + "targetCell" + ], + [ + "F", + "February" + ], + [ + "e", + "expect" + ], + [ + "pre", + "previous" + ], + [ + "chag", + "changes" + ], + [ + "thi", + "thisYear" + ], + [ + "v", + "view" + ], + [ + "chn", + "changes" + ], + [ + "ce", + "cells" + ], + [ + "out", + "outsider" + ], + [ + "ou", + "outsider" + ], + [ + "foc", + "focused" + ], + [ + "op", + "option" + ], + [ + "q", + "querySelector" + ], + [ + "descr", + "describe〔variable〕" + ], + [ + "day", + "daysOfWeek" + ], + [ + "pa", + "parseHTML" + ], + [ + "Da", + "Datepicker" + ], + [ + "cla", + "classList" + ], + [ + "rem", + "removeChild" + ], + [ + "desc", + "describe〔variable〕" + ], + [ + "startOfY", + "startOfYearPeriod〔variable〕" + ], + [ + "yea", + "years〔variable〕" + ], + [ + "inc", + "increase" + ], + [ + "add", + "addMonths" + ], + [ + "pu", + "pushUnique" + ], + [ + "days", + "daysOfWeekDisabled" + ], + [ + "dates", + "datesDisabled" + ], + [ + "min", + "minDate" + ], + [ + "ng", + "ngDays" + ], + [ + "fi", + "findAvailableDate" + ], + [ + "cu", + "currentDate" + ], + [ + "is", + "isNaN" + ], + [ + "base", + "baseDate" + ], + [ + "unde", + "undefined〔keyword〕" + ], + [ + "get", + "getTime" + ], + [ + "mu", + "multidate" + ], + [ + "endO", + "endOfCurrent〔variable〕" + ], + [ + "minVi", + "minViewMode" + ], + [ + "computeV", + "computeViewMode" + ], + [ + "ori", + "origVal" + ], + [ + "loca", + "locale" + ], + [ + "startD", + "startDate〔variable〕" + ] + ] + }, + "buffers": + [ + ], + "build_system": "", + "build_system_choices": + [ + ], + "build_varint": "", + "command_palette": + { + "height": 375.0, + "last_filter": "", + "selected_items": + [ + [ + "dis", + "Package Control: Discover Packages" + ], + [ + "ma", + "Markdown Preview: Preview in Browser" + ], + [ + "lis", + "Package Control: List Packages" + ], + [ + "pa", + "Package Control: Upgrade Package" + ], + [ + "hex", + "HexViewer: Toggle Hex View" + ], + [ + "in", + "Package Control: Install Package" + ], + [ + "rem", + "Package Control: Remove Package" + ], + [ + "op", + "Open URL" + ], + [ + "list", + "Package Control: List Packages" + ], + [ + "togg", + "SublimeLinter: Toggle Highlights" + ], + [ + "to", + "SublimeLinter: Toggle Linter" + ], + [ + "ins", + "Package Control: Install Package" + ], + [ + "mar", + "Markdown Preview: Preview in Browser" + ], + [ + "LiveReload: Enable/disable plugins", + "LiveReload: Enable/disable plug-ins" + ], + [ + "jso", + "Pretty JSON: Format (Pretty Print) JSON" + ], + [ + "m", + "Markdown Preview: Preview in Browser" + ], + [ + "mark", + "Markdown Preview: Preview in Browser" + ], + [ + "json", + "Pretty JSON: Minify (compress) JSON" + ], + [ + "toggle", + "SublimeLinter: Toggle Highlights" + ], + [ + "linter", + "SublimeLinter: Toggle Highlights" + ], + [ + "lin", + "SublimeLinter: Toggle Highlights" + ], + [ + "linte", + "SublimeLinter: Toggle Highlights" + ], + [ + "lint", + "SublimeLinter: Lint This View" + ], + [ + "js", + "Pretty JSON: Validate" + ], + [ + "tog", + "Toggle Block Comment" + ], + [ + "com", + "Toggle Block Comment" + ], + [ + "dash", + "DashDoc: invoke Dash with selected word (flip syntax sensitivity)" + ], + [ + "li", + "SublimeLinter: Disable Linter" + ], + [ + "re", + "Package Control: Remove Package" + ], + [ + "PHP Code Sniffer: ", + "PHP Code Sniffer: Turn Execute On Save On" + ], + [ + "l", + "Package Control: List Packages" + ], + [ + "pac", + "Package Control: Remove Package" + ], + [ + "ena", + "Package Control: Enable Package" + ], + [ + "pack", + "Package Control: Remove Package" + ], + [ + "inst", + "Package Control: Install Package" + ], + [ + "java", + "Set Syntax: JavaScript" + ], + [ + "ba", + "Babel Transform" + ], + [ + "syn", + "Set Syntax: PHP" + ], + [ + "ja", + "Set Syntax: JavaScript" + ], + [ + "php", + "PHP Code Sniffer: Sniff this file" + ], + [ + "d", + "Package Control: Discover Packages" + ], + [ + "brow", + "Markdown Preview: Preview in Browser" + ], + [ + "insta", + "Package Control: Install Package" + ], + [ + "disc", + "Package Control: Discover Packages" + ], + [ + "intall", + "Package Control: Install Package" + ], + [ + "disco", + "Package Control: Discover Packages" + ], + [ + "ruby", + "Set Syntax: Ruby" + ], + [ + "ru", + "Set Syntax: Ruby" + ], + [ + "generi", + "Set Syntax: Generic Config" + ], + [ + "conf", + "Set Syntax: Generic Config" + ], + [ + "r", + "Set Syntax: Ruby" + ], + [ + "loca", + "Local History: Browse" + ], + [ + "paci", + "Package Control: Install Package" + ], + [ + "p", + "Package Control: Install Package" + ], + [ + "wr", + "HTML: Wrap Selection With Tag" + ], + [ + "pach", + "Package Control: Add Channel" + ], + [ + "packe", + "Preferences: Browse Packages" + ], + [ + "enc", + "HTML: Encode Special Characters" + ], + [ + "wrap", + "HTML: Wrap Selection With Tag" + ], + [ + "wra", + "HTML: Wrap Selection With Tag" + ], + [ + "install", + "Package Control: Install Package" + ], + [ + "en", + "HTML: Encode Special Characters" + ], + [ + "co", + "Toggle Comment" + ] + ], + "width": 650.0 + }, + "console": + { + "height": 142.0, + "history": + [ + "/usr/local/bin/subl /Users/Shared/Library/SublimeText/sublime-phpmd-ruleset.xml", + "subl /Users/Shared/Library/SublimeText/sublime-phpmd-ruleset.xml" + ] + }, + "distraction_free": + { + "menu_visible": true, + "show_minimap": false, + "show_open_files": false, + "show_tabs": false, + "side_bar_visible": false, + "status_bar_visible": false + }, + "file_history": + [ + "/Volumes/dev/bulma-datepicker/demo/index.html", + "/Volumes/dev/bulma-datepicker/test/test.html", + "/Volumes/dev/bulma-datepicker/test/options/date-restrictions.js", + "/Volumes/dev/bulma-datepicker.sublime-project", + "/Volumes/dev/bulma-datepicker/test/options/options.js", + "/Volumes/dev/bulma-datepicker/test/options/container.js", + "/Volumes/dev/bulma-datepicker/test/embed-mode.js", + "/Volumes/dev/bulma-datepicker/js/picker/Picker.js", + "/Volumes/dev/bulma-datepicker/js/views/View.js", + "/Volumes/dev/bulma-datepicker/js/views/DaysView.js", + "/Volumes/dev/bulma-datepicker/js/views/MonthsView.js", + "/Volumes/dev/bulma-datepicker/js/views/YearsView.js", + "/Volumes/dev/bulma-datepicker/test/options-container.js", + "/Volumes/dev/bulma-datepicker/js/defaults/options.js", + "/Volumes/dev/bulma-datepicker/test/options-orientation.js", + "/Volumes/dev/bulma-datepicker/test/options-date-restrictions.js", + "/Volumes/dev/bulma-datepicker/test/options-multidate.js", + "/Volumes/dev/bulma-datepicker/test/options-language.js", + "/Volumes/dev/bulma-datepicker/test/options-before-show-hooks.js", + "/Volumes/dev/bulma-datepicker/refs/bulma-calendar/node_modules/acorn/dist/acorn.es.js", + "/Volumes/dev/bulma-datepicker/demo/live-demo.js", + "/Volumes/dev/bulma-datepicker/js/Datepicker.js", + "/Volumes/dev/bulma-datepicker/js/events/inputFieldListeners.js", + "/Volumes/dev/bulma-datepicker/js/events/pickerListeners.js", + "/Volumes/dev/bulma-datepicker/js/processOptions.js", + "/Volumes/dev/bulma-datepicker/refs/bootstrap-datepicker/tests/suites/options.js", + "/Volumes/dev/bulma-datepicker/test/events.js", + "/Volumes/dev/bulma-datepicker/js/lib/date.js", + "/Volumes/dev/bulma-datepicker/refs/bootstrap-datepicker/js/bootstrap-datepicker.js", + "/Volumes/dev/bulma-datepicker/test/addon-mode.js", + "/Users/cpr/Library/Application Support/Sublime Text 3/.sublime/Local History/Volumes/dev/bulma-datepicker/test/keyboard-operation-arrow-down-20190613152723.js", + "/Volumes/dev/bulma-datepicker/test/keyboard-operation-edit-mode.js", + "/Volumes/dev/bulma-datepicker/test/keyboard-operation.js", + "/Volumes/dev/bulma-datepicker/test/keyboard-operation-arrow-down.js", + "/Volumes/dev/bulma-datepicker/test/keyboard-operation-arrow-left.js", + "/Volumes/dev/bulma-datepicker/test/keyboard-operation-arrow-right.js", + "/Volumes/dev/bulma-datepicker/test/keyboard-operation-arrow-up.js", + "/Volumes/dev/bulma-datepicker/js/events/otherListeners.js", + "/Volumes/dev/bulma-datepicker/js/events/functions.js", + "/Volumes/dev/bulma-datepicker/test/Datepicker.js", + "/Volumes/dev/bulma-datepicker/test/with-addon-mode.js", + "/Volumes/dev/bulma-datepicker/test/Datepicker-methods.js", + "/Volumes/dev/bulma-datepicker/test/unit/Datepicker.js", + "/Volumes/dev/bulma-datepicker/test/mouse-operation.js", + "/Volumes/dev/bulma-datepicker/sass/datepicker.scss", + "/Volumes/dev/bulma-datepicker/test/Datepicker-picker.js", + "/Volumes/dev/bulma-datepicker/test/unit/_setup.js", + "/Volumes/dev/bulma-datepicker/test.bak/test.html", + "/Volumes/dev/bulma-datepicker/js/DateRangePicker.js", + "/Volumes/dev/bulma-datepicker/test/datepicker-class.js", + "/Volumes/dev/bulma-datepicker/test/unit/date.js", + "/Volumes/dev/bulma-datepicker/js/views/DaysView.bak.js", + "/Volumes/dev/bulma-datepicker/js/defaults/config.js", + "/Volumes/dev/bulma-datepicker/js/lib/date-format.js", + "/Volumes/dev/bulma-datepicker/.gitignore", + "/Volumes/dev/bulma-datepicker/.eslintignore", + "/Volumes/dev/bulma-datepicker/rollup-test-utils.config.js", + "/Volumes/dev/bulma-datepicker/test/unit/date-format.js", + "/Volumes/dev/bulma-datepicker/dist/datepicker.css", + "/Volumes/dev/bulma-datepicker/src.bak/sass/datepicker.new.scss", + "/Volumes/dev/bulma-datepicker/js/processOptions.new.js", + "/Volumes/dev/bulma-datepicker/js/lib/dom.js", + "/Volumes/dev/bulma-datepicker/dist/datepicker.js", + "/Volumes/dev/bulma-datepicker/demo/test.html", + "/Volumes/dev/bulma-datepicker/js/config.js", + "/Volumes/dev/bulma-datepicker/package.json", + "/Volumes/dev/bulma-datepicker/js/datepicker-fn.js", + "/Volumes/dev/bulma-datepicker/js/picker/pickerTemplate.js", + "/Volumes/dev/bulma-datepicker/src.bak/sass/datepicker.scss", + "/Volumes/dev/bulma-datepicker/sass/index.scss", + "/Volumes/dev/bulma-datepicker/rollup.config.js", + "/Volumes/dev/bulma-datepicker/demo.bak/index.html", + "/Volumes/dev/bulma-datepicker/js/lib/utils.js", + "/Volumes/dev/bulma-datepicker/test/unit/utils.js", + "/Volumes/dev/bulma-datepicker/test/unit/array.js", + "/Volumes/dev/bulma-datepicker/js/lib/array.js", + "/Volumes/dev/bulma-datepicker/js/events/general.js", + "/Volumes/dev/bulma-datepicker/notes/date-picker-ideas.mindnode", + "/Volumes/dev/bulma-datepicker/js/lib/event.js", + "/Volumes/dev/bulma-datepicker/js/views/YearView.js", + "/Volumes/dev/bulma-datepicker/src.bak/js/Datepicker.js", + "/Volumes/dev/bulma-datepicker/src.bak/js/views/pickerTemplate.js", + "/Volumes/dev/bulma-datepicker/test/unit/processOptions.js", + "/Volumes/dev/bulma-datepicker/.eslintrc.js", + "/Volumes/dev/bulma-datepicker/js.new/Datepicker.js", + "/Volumes/dev/bulma-datepicker/js.new/processOptions.js", + "/Volumes/dev/bulma-datepicker/test.new/unit/date-format.js", + "/Volumes/dev/bulma-datepicker/js.new/lib/date-format.js", + "/Volumes/dev/bulma-datepicker/src/js/lib/date-format.js", + "/Volumes/dev/bulma-datepicker/test/unit.bak/date-format.js", + "/Volumes/dev/bulma-datepicker/test/unit/event.js", + "/Volumes/dev/bulma-datepicker/test/unit/dom.js", + "/Volumes/dev/bulma-datepicker/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js", + "/Users/cpr/Desktop/google.com!colangelopr.com!1558483200!1558569599.xml", + "/Volumes/dev/bulma-datepicker/test/unit/_utils.js", + "/Volumes/dev/bulma-datepicker/src/js/processOptions.js", + "/Volumes/dev/bulma-datepicker/src/js/lib/date.js", + "/Volumes/dev/bulma-datepicker/src/js/Datepicker.js", + "/Volumes/dev/bulma-datepicker/src/js/lib/dom.js", + "/Volumes/dev/bulma-datepicker/js/locales/bulma-datepicker.ar.js", + "/Volumes/dev/bulma-datepicker/src/js/events.js", + "/Volumes/dev/bulma-datepicker/src/js/views/years.js", + "/Volumes/dev/bulma-datepicker/src/js/views/months.js", + "/Volumes/dev/bulma-datepicker/src/js/views/days.js", + "/Volumes/dev/bulma-datepicker/src/js/views/Picker.js", + "/Volumes/dev/bulma-datepicker/src/js/DateRangePicker.js", + "/Volumes/dev/bulma-datepicker/notes/changes-from-bootstrap-datepicker.md", + "/Volumes/dev/bulma-datepicker/src/js/views/years.bak.js", + "/Volumes/dev/bulma-datepicker/src/js/views/utils.js", + "/Volumes/dev/bulma-datepicker/src/js/views/performBeforeHook.js", + "/Volumes/dev/bulma-datepicker/src/js/views/months.bak.js", + "/Volumes/dev/bulma-datepicker/src/js/views/controls.js", + "/Volumes/dev/bulma-datepicker/demo/examine.html", + "/Volumes/dev/bulma-datepicker/src/js/defaults/options.js", + "/Volumes/dev/bulma-datepicker/src/js/locales/bulma-datepicker.ar.js", + "/Volumes/dev/bulma-datepicker/dist/locales/bulma-datepicker.ar.js", + "/Volumes/dev/bulma-datepicker/demo/live.js", + "/Users/cpr/Library/Application Support/Sublime Text 3/Packages/User/Package Control.sublime-settings", + "/Volumes/dev/bulma-datepicker/demo/live.html", + "/Volumes/dev/bulma-datepicker/src/js/views/pickerTemplate.js", + "/Volumes/dev/bulma-datepicker/test/options.js", + "/Volumes/dev/bulma-datepicker/src/js/lib/utils.js", + "/Volumes/dev/bulma-datepicker/test/formats.js", + "/Volumes/dev/bulma-datepicker/src/js/datepicker-fn.js", + "/Volumes/dev/bulma-datepicker/test/mouse_navigation/2012.js", + "/Volumes/dev/bulma-datepicker/test/methods.js", + "/Volumes/dev/bulma-datepicker/test/calendar-weeks.js", + "/Volumes/dev/bulma-datepicker/test/inline.js" + ], + "find": + { + "height": 37.0 + }, + "find_in_files": + { + "height": 95.0, + "where_history": + [ + "-node_modules/**,-dist/**,-refs/**" + ] + }, + "find_state": + { + "case_sensitive": true, + "find_history": + [ + "cells", + "autoclose is", + "clear", + "clearBtn", + "showWeekDays", + "input\\.focus", + "find_highlighted", + "startView", + "minViewMode", + "classes", + "(\\S) {2,}", + "\\Wpicker\\.update", + "picker\\.update", + "disableTouchKeyboard", + "dayOfTheWeekOf", + "getWeak", + "changeDate", + "spyChangeDate", + "ArrowDown", + "shiftKey", + "ctrlKey", + "shiftKey", + "startView", + "doKey", + "perform(\\w+)Key", + "performArrowLeftOrRightKey", + "performArrowDown", + "hideOnClickOutside", + "minMonth", + "\\.(min|max)(\\W)", + "\\.(min|max)\\W", + "viewDate", + "view", + "(Arrow)Up", + "let", + "const", + "let", + "(Arrow)Left", + "34", + "ArrowLeft", + "const", + "enableOnReadonly", + "prevBtn", + "fucused", + "0", + "(\\S+)\\.click\\(\\)", + "hideOnClickOutside", + "'to be', \\[\\]", + "'to be', []", + "'to be', (true|false|null|undefined)", + "'to be', false", + "weekEnd", + "stubHide", + "Inline", + "inline", + "toTitleCase", + "isSameDate", + "isValidDate", + "startOfYearPeriod", + "calcBaseYear", + "isValidDate", + "isSameDate", + "adder", + "daysHighlighted", + "datesDisabled", + "daysDisabled", + "isValidDate", + "toFullYear", + "isValidDate", + "exitEditMode", + "_(editMode)", + "_editMode", + "reFormatTokens", + "pad2", + "changeMonth", + "changeDate", + "dateChanged", + "changeDate", + "startDate", + "endDate", + "multidateSeparator", + "multidate", + "multidateSeparator", + "endDate", + "startDate", + "endDate", + "increase", + "endDate", + "startDate", + "maxDatesLength", + "multidateSeparator", + "assumeNearbyYear", + "use2digitYr", + "setConditionalClass", + "parseInt", + "orig_language", + "orig_dates", + "todayHighlight", + "showDaysOfWeek", + "\\Wdate\\W", + "date\\W", + "(options)\\.(\\w+) !== undefined" + ], + "highlight": true, + "in_selection": false, + "preserve_case": false, + "regex": true, + "replace_history": + [ + "autoclose =", + "showDaysOfWeek", + "dp.show", + "$1 ", + "getWeek", + "key", + "doKeydown$1", + ".$1Year$2", + ".$1Date$2", + ".$1Date", + "$1Down", + "$1Up", + "simulant.fire($1, 'mousedown')", + "'to equal', []", + "'to be $1'", + "embed", + "startOfYearPeriod", + "daysOfWeekHighlighted", + "$1", + "minDate", + "maxDate", + "dateDelimiter", + "maxNumOfDates", + "dateDelimiter", + "maxDate", + "minDate", + "maxDate", + "minDate", + "maxNumOfDates", + "dateDelimiter", + "hasProperty($1, '$2')" + ], + "reverse": false, + "show_context": true, + "use_buffer2": true, + "whole_word": false, + "wrap": true + }, + "groups": + [ + { + "sheets": + [ + ] + } + ], + "incremental_find": + { + "height": 24.0 + }, + "input": + { + "height": 34.0 + }, + "layout": + { + "cells": + [ + [ + 0, + 0, + 1, + 1 + ] + ], + "cols": + [ + 0.0, + 1.0 + ], + "rows": + [ + 0.0, + 1.0 + ] + }, + "menu_visible": true, + "output.SublimeLinter": + { + "height": 0.0 + }, + "output.SublimeLinter Messages": + { + "height": 102.0 + }, + "output.exec": + { + "height": 102.0 + }, + "output.find_results": + { + "height": 102.0 + }, + "output.hex_viewer_inspector": + { + "height": 108.0 + }, + "output.markdown": + { + "height": 108.0 + }, + "output.mdpopups": + { + "height": 0.0 + }, + "output.tooltips": + { + "height": 102.0 + }, + "output.xdebug": + { + "height": 102.0 + }, + "pinned_build_system": "", + "project": "bulma-datepicker.sublime-project", + "replace": + { + "height": 66.0 + }, + "save_all_on_build": false, + "select_file": + { + "height": 0.0, + "last_filter": "", + "selected_items": + [ + [ + "vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php", + "app/vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php" + ], + [ + "scripts/initial-setup.php", + "app/scripts/initial-setup.php" + ], + [ + "scripts/db-preparation.php", + "app/scripts/db-preparation.php" + ], + [ + "run-update.sh", + "app/run-update.sh" + ], + [ + "config/db-sample.php", + "app/config/db-sample.php" + ], + [ + "tests/unit/components/appModule/AppModuleManagerTest.php", + "app/tests/unit/components/appModule/AppModuleManagerTest.php" + ], + [ + "tests/_support/FunctionalTester.php", + "app/tests/_support/FunctionalTester.php" + ], + [ + "tests/_support/AcceptanceTester.php", + "app/tests/_support/AcceptanceTester.php" + ], + [ + "scripts/post-update.php", + "app/scripts/post-update.php" + ], + [ + "scripts/post-install.php", + "app/scripts/post-install.php" + ], + [ + "scripts/inc.php", + "app/scripts/inc.php" + ], + [ + "components/appModule/AppModuleManager.php", + "app/components/appModule/AppModuleManager.php" + ], + [ + "commands/ModuleController.php", + "app-new/commands/ModuleController.php" + ], + [ + "webdr", + "app/vendor/facebook/webdriver/lib/WebDriver.php" + ] + ], + "width": 0.0 + }, + "select_project": + { + "height": 500.0, + "last_filter": "", + "selected_items": + [ + ], + "width": 380.0 + }, + "select_symbol": + { + "height": 375.0, + "last_filter": "", + "selected_items": + [ + ], + "width": 778.0 + }, + "selected_group": 0, + "settings": + { + }, + "show_minimap": true, + "show_open_files": true, + "show_tabs": true, + "side_bar_visible": true, + "side_bar_width": 237.0, + "status_bar_visible": true, + "template_settings": + { + } +} diff --git a/node_modules/flowbite-datepicker/test/options/buttons.js b/node_modules/flowbite-datepicker/test/options/buttons.js new file mode 100644 index 0000000..42b938b --- /dev/null +++ b/node_modules/flowbite-datepicker/test/options/buttons.js @@ -0,0 +1,383 @@ +describe('options - buttons', function () { + let clock; + let input; + + beforeEach(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + clock.restore(); + }); + + describe('clearBtn', function () { + it('displays a button to clear the selection when true', function () { + const {dp, picker} = createDP(input, {clearBtn: true}); + const [viewSwitch, clearBtn] = getParts(picker, ['.view-switch', '.clear-btn']); + dp.show(); + + expect(isVisible(clearBtn), 'to be true'); + expect(clearBtn.textContent, 'to be', 'Clear'); + + // months view + viewSwitch.click(); + expect(isVisible(clearBtn), 'to be true'); + + // years view + viewSwitch.click(); + expect(isVisible(clearBtn), 'to be true'); + + // decades view + viewSwitch.click(); + expect(isVisible(clearBtn), 'to be true'); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({clearBtn: true}); + dp.show(); + + const clearBtn = picker.querySelector('.clear-btn'); + expect(isVisible(clearBtn), 'to be true'); + + dp.setOptions({clearBtn: false}); + expect(isVisible(clearBtn), 'to be false'); + + dp.destroy(); + }); + + describe('clear button', function () { + let dp; + let picker; + let clearBtn; + + beforeEach(function () { + ({dp, picker} = createDP(input, {clearBtn: true})); + clearBtn = picker.querySelector('.clear-btn'); + dp.show(); + }); + + afterEach(function () { + dp.destroy(); + }); + + it('clears the selection', function () { + dp.setDate('2/14/2020'); + clearBtn.click(); + + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + + const viewSwitch = getViewSwitch(picker); + // months view + dp.setDate('2/14/2020'); + viewSwitch.click(); + clearBtn.click(); + expect(dp.dates, 'to equal', []); + + // years view + dp.setDate('2/14/2020'); + viewSwitch.click(); + clearBtn.click(); + expect(dp.dates, 'to equal', []); + + // decades view + dp.setDate('2/14/2020'); + viewSwitch.click(); + clearBtn.click(); + expect(dp.dates, 'to equal', []); + }); + + it('hides the picker as well when autohide = true', function () { + dp.setDate('2/14/2020'); + dp.setOptions({autohide: true}); + clearBtn.click(); + + expect(isVisible(picker), 'to be false'); + }); + }); + }); + + describe('todayBtn', function () { + it('displays a button to change the view date to current date when true', function () { + const {dp, picker} = createDP(input, {todayBtn: true}); + const [viewSwitch, todayBtn] = getParts(picker, ['.view-switch', '.today-btn']); + dp.show(); + + expect(isVisible(todayBtn), 'to be true'); + expect(todayBtn.textContent, 'to be', 'Today'); + + // months view + viewSwitch.click(); + expect(isVisible(todayBtn), 'to be true'); + + // years view + viewSwitch.click(); + expect(isVisible(todayBtn), 'to be true'); + + // decades view + viewSwitch.click(); + expect(isVisible(todayBtn), 'to be true'); + + dp.destroy(); + }); + + it('today will be disabled if the current date is out of the range of minDate/maxDate', function () { + const {dp, picker} = createDP(input, {todayBtn: true}); + const todayBtn = picker.querySelector('.today-btn'); + dp.show(); + + expect(todayBtn.disabled, 'to be false'); + + dp.setOptions({minDate: '2/20/2020'}); + expect(todayBtn.disabled, 'to be true'); + + dp.setOptions({minDate: null, maxDate: '2/10/2020'}); + expect(todayBtn.disabled, 'to be true'); + + dp.setOptions({minDate: '2/1/2020', maxDate: '2/29/2020'}); + expect(todayBtn.disabled, 'to be false'); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({todayBtn: true}); + dp.show(); + + const todayBtn = picker.querySelector('.today-btn'); + expect(isVisible(todayBtn), 'to be true'); + + dp.setOptions({todayBtn: false}); + expect(isVisible(todayBtn), 'to be false'); + + dp.setOptions({todayBtn: 'true'}); + expect(isVisible(todayBtn), 'to be true'); + + dp.destroy(); + }); + }); + + describe('todayBtnMode', function () { + let dp; + let picker; + let viewSwitch; + let todayBtn; + let cells; + + beforeEach(function () { + ({dp, picker} = createDP(input, {todayBtn: true})); + [viewSwitch, todayBtn] = getParts(picker, ['.view-switch', '.today-btn']); + dp.show(); + }); + + afterEach(function () { + dp.destroy(); + }); + + it('specifies the behavior of the today buton', function () { + const date = dateValue(2020, 1, 11); + + // defualt to 0: focus-on (change view date) + dp.setDate(date); + todayBtn.click(); + + cells = getCells(picker); + expect(cells[19].textContent, 'to be', '14'); + expect(cells[19].classList.contains('focused'), 'to be true'); + expect(cells[16].classList.contains('selected'), 'to be true'); + expect(dp.dates, 'to equal', [date]); + + dp.destroy(); + + // 1: select (change the selection) + ({dp, picker} = createDP(input, {todayBtn: true, todayBtnMode: 1})); + todayBtn = picker.querySelector('.today-btn'); + dp.setDate(date); + dp.show(); + todayBtn.click(); + + cells = getCells(picker); + expect(cells[19].textContent, 'to be', '14'); + expect(cells[19].classList.contains('focused'), 'to be true'); + expect(cells[19].classList.contains('selected'), 'to be true'); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + }); + + it('can be updated with setOptions()', function () { + const date = dateValue(2020, 1, 11); + + dp.setDate(date); + dp.setOptions({todayBtnMode: 1}); + todayBtn.click(); + + cells = getCells(picker); + expect(cells[19].textContent, 'to be', '14'); + expect(cells[19].classList.contains('focused'), 'to be true'); + expect(cells[19].classList.contains('selected'), 'to be true'); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + + dp.setDate(date); + dp.setOptions({todayBtnMode: 0}); + todayBtn.click(); + + expect(cells[19].textContent, 'to be', '14'); + expect(cells[19].classList.contains('focused'), 'to be true'); + expect(cells[16].classList.contains('selected'), 'to be true'); + expect(dp.dates, 'to equal', [date]); + }); + + describe('today button', function () { + it('changes the view date to the current date when todayBtnMode = 0', function () { + dp.setDate('4/22/2020'); + todayBtn.click(); + + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + cells = getCells(picker); + expect(cells[19].textContent, 'to be', '14'); + expect(cells[19].classList.contains('focused'), 'to be true'); + expect(cells.find(el => el.classList.contains('selected')), 'to be undefined'); + + expect(dp.dates, 'to equal', [dateValue(2020, 3, 22)]); + expect(input.value, 'to be', '04/22/2020'); + + dp.setDate({clear: true}); + }); + + it('also changes the view to days view when todayBtnMode = 0', function () { + // months view + dp.setDate('4/22/2020'); + viewSwitch.click(); + todayBtn.click(); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + // years view + dp.setDate({clear: true}); + dp.setDate('4/22/2020'); + viewSwitch.click(); + viewSwitch.click(); + todayBtn.click(); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + // decades view + dp.setDate({clear: true}); + dp.setDate('4/22/2020'); + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + todayBtn.click(); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + dp.setDate({clear: true}); + }); + + it('changes the selection to the current date when todayBtnMode = 1', function () { + dp.setOptions({todayBtnMode: 1}); + dp.setDate('4/22/2020'); + todayBtn.click(); + + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + cells = getCells(picker); + expect(cells[19].textContent, 'to be', '14'); + expect(cells[19].classList.contains('focused'), 'to be true'); + expect(cells[19].classList.contains('selected'), 'to be true'); + + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + + expect(input.value, 'to be', '02/14/2020'); + dp.setDate({clear: true}); + dp.setDate('4/22/2020'); + viewSwitch.click(); + viewSwitch.click(); + todayBtn.click(); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + + dp.setDate({clear: true}); + }); + + it('also hides the picker when todayBtnMode = 1 and autohide = true', function () { + dp.setOptions({todayBtnMode: 1, autohide: true}); + dp.setDate('4/22/2020'); + todayBtn.click(); + + expect(isVisible(picker), 'to be false'); + + dp.setDate({clear: true}); + }); + + it('always changes the view to current date\'s days view when todayBtnMode = 1', function () { + const nextBtn = picker.querySelector('.next-btn'); + dp.setOptions({todayBtnMode: 1}); + + // after moving other month or view while the current date is selected already + // (issue #11) + todayBtn.click(); + nextBtn.click(); + todayBtn.click(); + cells = getCells(picker); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + expect(cells[19].classList.contains('focused'), 'to be true'); + expect(cells[19].classList.contains('selected'), 'to be true'); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + + viewSwitch.click(); + nextBtn.click(); + todayBtn.click(); + cells = getCells(picker); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + expect(cells[19].classList.contains('focused'), 'to be true'); + expect(cells[19].classList.contains('selected'), 'to be true'); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + + viewSwitch.click(); + viewSwitch.click(); + nextBtn.click(); + nextBtn.click(); + todayBtn.click(); + cells = getCells(picker); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + expect(cells[19].classList.contains('focused'), 'to be true'); + expect(cells[19].classList.contains('selected'), 'to be true'); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + + // when current date is deslected by toggling in multi-date mode + dp.setOptions({maxNumberOfDates: 3}); + nextBtn.click(); + getCells(picker)[20].click(); + todayBtn.click(); + cells = getCells(picker); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + expect(cells[19].classList.contains('focused'), 'to be true'); + expect(cells[19].classList.contains('selected'), 'to be false'); + expect(dp.dates, 'to equal', [dateValue(2020, 2, 21)]); + + nextBtn.click(); + todayBtn.click(); + cells = getCells(picker); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + expect(cells[19].classList.contains('selected'), 'to be true'); + expect(dp.dates, 'to equal', [dateValue(2020, 2, 21), dateValue(2020, 1, 14)]); + + viewSwitch.click(); + nextBtn.click(); + todayBtn.click(); + cells = getCells(picker); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + expect(cells[19].classList.contains('focused'), 'to be true'); + expect(cells[19].classList.contains('selected'), 'to be false'); + expect(dp.dates, 'to equal', [dateValue(2020, 2, 21)]); + + dp.setDate({clear: true}); + }); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/options/date-restrictions.js b/node_modules/flowbite-datepicker/test/options/date-restrictions.js new file mode 100644 index 0000000..24ce3d0 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/options/date-restrictions.js @@ -0,0 +1,802 @@ +describe('options - date restrictions', function () { + const getDisabled = cells => filterCells(cells, '.disabled').map(el => [el, el.textContent]); + let input; + + beforeEach(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + }); + + describe('datesDisabled', function () { + let clock; + + beforeEach(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + }); + + afterEach(function () { + clock.restore(); + }); + + it('specifies unselectable dates', function () { + const dp = new Datepicker(input, { + datesDisabled: [new Date(2020, 1, 12), '2/13/2020', new Date(2020, 1, 13), '2/20/2020'], + }); + const picker = document.querySelector('.datepicker'); + dp.show(); + + expect(picker.querySelector('.prev-btn').disabled, 'to be false'); + expect(picker.querySelector('.next-btn').disabled, 'to be false'); + + let cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[17], '12'], + [cells[18], '13'], + [cells[25], '20'], + ]); + + cells[17].click(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(filterCells(cells, '.selected'), 'to equal', []); + + dp.setDate(new Date(2020, 1, 12)); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(filterCells(cells, '.selected'), 'to equal', []); + + input.value = '2/12/2020'; + dp.update(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', '2/12/2020'); + expect(filterCells(cells, '.selected'), 'to equal', []); + + cells[16].click(); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 11)]); + expect(input.value, 'to be', '02/11/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[16]]); + + dp.enterEditMode(); + input.value = '2/12/2020'; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 11)]); + expect(input.value, 'to be', '2/12/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[16]]); + + dp.destroy(); + }); + + it('makes the picker prevent those dates becoming view date', function () { + const dp = new Datepicker(input, { + datesDisabled: ['2/11/2020', '2/12/2020', '2/13/2020', '2/20/2020'], + }); + const picker = document.querySelector('.datepicker'); + const cells = getCells(picker); + dp.show(); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[15]]); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + // on 5th + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + // on 27th + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[24]]); + + // on 19th + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[15]]); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + // on 4th + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({datesDisabled: [new Date(2020, 1, 11), new Date(2020, 1, 26)]}); + dp.show(); + + let cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[16], '11'], + [cells[31], '26'], + ]); + + dp.setOptions({datesDisabled: []}); + + cells = getCells(picker); + expect(getDisabled(cells), 'to equal', []); + + dp.destroy(); + }); + }); + + describe('daysOfWeekDisabled', function () { + let clock; + + beforeEach(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + }); + + afterEach(function () { + clock.restore(); + }); + + it('specifies unselectable days of week', function () { + const {dp, picker} = createDP(input, {daysOfWeekDisabled: [0, 6]}); + dp.show(); + + expect(picker.querySelector('.prev-btn').disabled, 'to be false'); + expect(picker.querySelector('.next-btn').disabled, 'to be false'); + + let cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[0], '26'], + [cells[6], '1'], + [cells[7], '2'], + [cells[13], '8'], + [cells[14], '9'], + [cells[20], '15'], + [cells[21], '16'], + [cells[27], '22'], + [cells[28], '23'], + [cells[34], '29'], + [cells[35], '1'], + [cells[41], '7'], + ]); + + cells[14].click(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(filterCells(cells, '.selected'), 'to equal', []); + + dp.setDate(new Date(2020, 1, 9)); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(filterCells(cells, '.selected'), 'to equal', []); + + input.value = '2/9/2020'; + dp.update(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', '2/9/2020'); + expect(filterCells(cells, '.selected'), 'to equal', []); + + cells[15].click(); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 10)]); + expect(input.value, 'to be', '02/10/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[15]]); + + dp.enterEditMode(); + input.value = '2/9/2020'; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 10)]); + expect(input.value, 'to be', '2/9/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[15]]); + + dp.destroy(); + }); + + it('makes the picker prevent those dates becoming view date', function () { + const {dp, picker} = createDP(input, {daysOfWeekDisabled: [0, 6]}); + const cells = getCells(picker); + dp.show(); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[22]]); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + // on 7th + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[15]]); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[12]]); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({daysOfWeekDisabled: [4]}); + dp.show(); + + let cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[4], '30'], + [cells[11], '6'], + [cells[18], '13'], + [cells[25], '20'], + [cells[32], '27'], + [cells[39], '5'], + ]); + + dp.setOptions({daysOfWeekDisabled: []}); + + cells = getCells(picker); + expect(getDisabled(cells), 'to equal', []); + + dp.destroy(); + }); + }); + + describe('maxDate', function () { + let clock; + + beforeEach(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + }); + + afterEach(function () { + clock.restore(); + }); + + it('specifies the maximum selectable date', function () { + const {dp, picker} = createDP(input, {maxDate: new Date(2020, 1, 25)}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + + let cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[31], '26'], + [cells[32], '27'], + [cells[33], '28'], + [cells[34], '29'], + [cells[35], '1'], + [cells[36], '2'], + [cells[37], '3'], + [cells[38], '4'], + [cells[39], '5'], + [cells[40], '6'], + [cells[41], '7'], + ]); + + viewSwitch.click(); + cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[2], 'Mar'], + [cells[3], 'Apr'], + [cells[4], 'May'], + [cells[5], 'Jun'], + [cells[6], 'Jul'], + [cells[7], 'Aug'], + [cells[8], 'Sep'], + [cells[9], 'Oct'], + [cells[10], 'Nov'], + [cells[11], 'Dec'], + ]); + + viewSwitch.click(); + cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[2], '2021'], + [cells[3], '2022'], + [cells[4], '2023'], + [cells[5], '2024'], + [cells[6], '2025'], + [cells[7], '2026'], + [cells[8], '2027'], + [cells[9], '2028'], + [cells[10], '2029'], + [cells[11], '2030'], + ]); + + viewSwitch.click(); + cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[4], '2030'], + [cells[5], '2040'], + [cells[6], '2050'], + [cells[7], '2060'], + [cells[8], '2070'], + [cells[9], '2080'], + [cells[10], '2090'], + [cells[11], '2100'], + ]); + + dp.hide(); + dp.show(); + cells = getCells(picker); + + cells[31].click(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(filterCells(cells, '.selected'), 'to equal', []); + + dp.setDate(new Date(2020, 1, 26)); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(filterCells(cells, '.selected'), 'to equal', []); + + input.value = '2/26/2020'; + dp.update(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', '2/26/2020'); + expect(filterCells(cells, '.selected'), 'to equal', []); + + cells[30].click(); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 25)]); + expect(input.value, 'to be', '02/25/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[30]]); + + dp.enterEditMode(); + input.value = '2/26/2020'; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 25)]); + expect(input.value, 'to be', '2/26/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[30]]); + + dp.destroy(); + }); + + it('makes the picker disallow to navigate to after the max date', function () { + const {dp, picker} = createDP(input, {maxDate: '2/14/2020'}); + const [viewSwitch, prevBtn, nextBtn] = getParts(picker, ['.view-switch', '.prev-btn', '.next-btn']); + dp.show(); + + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be true'); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[13]]); + + prevBtn.click(); + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be false'); + + // move to Jan 22nd + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + nextBtn.click(); + + // view date is limited to the max date + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + // the same goes for ctrl + ArrowRight key + prevBtn.click(); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + // months view + viewSwitch.click(); + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be true'); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + // on prev year's Nov + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + + prevBtn.click(); + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be false'); + + // move to Mar + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + nextBtn.click(); + + // view date is limited to the Feb + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + // the same goes for ctrl + ArrowRight key + prevBtn.click(); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + // years view + viewSwitch.click(); + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be true'); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + // on 2017 + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[8]]); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + + prevBtn.click(); + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be false'); + + // move to 2011 + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + nextBtn.click(); + + // view year is limited to 2020 + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + // the same goes for ctrl + ArrowRight key + prevBtn.click(); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + // decades view + viewSwitch.click(); + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be true'); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + // on 1990 + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[10]]); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + + prevBtn.click(); + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be false'); + + // move to 1930 + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + nextBtn.click(); + + // view decade is limited to 2020 + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + // the same goes for ctrl + ArrowRight key + prevBtn.click(); + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + simulant.fire(input, 'keydown', {key: 'ArrowRight', ctrlKey: true}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({maxDate: new Date(2020, 1, 28)}); + dp.show(); + + let cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[34], '29'], + [cells[35], '1'], + [cells[36], '2'], + [cells[37], '3'], + [cells[38], '4'], + [cells[39], '5'], + [cells[40], '6'], + [cells[41], '7'], + ]); + + dp.setOptions({maxDate: null}); + + cells = getCells(picker); + expect(getDisabled(cells), 'to equal', []); + + dp.destroy(); + }); + }); + + describe('minDate', function () { + let clock; + + beforeEach(function () { + clock = sinon.useFakeTimers({now: new Date(2022, 6, 14)}); + }); + + afterEach(function () { + clock.restore(); + }); + + it('specifies the minimum selectable date', function () { + const {dp, picker} = createDP(input, {minDate: new Date(2022, 6, 4)}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + + let cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[0], '26'], + [cells[1], '27'], + [cells[2], '28'], + [cells[3], '29'], + [cells[4], '30'], + [cells[5], '1'], + [cells[6], '2'], + [cells[7], '3'], + ]); + + viewSwitch.click(); + cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[0], 'Jan'], + [cells[1], 'Feb'], + [cells[2], 'Mar'], + [cells[3], 'Apr'], + [cells[4], 'May'], + [cells[5], 'Jun'], + ]); + + viewSwitch.click(); + cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[0], '2019'], + [cells[1], '2020'], + [cells[2], '2021'], + ]); + + viewSwitch.click(); + cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[0], '1990'], + [cells[1], '2000'], + [cells[2], '2010'], + ]); + + dp.hide(); + dp.show(); + cells = getCells(picker); + + cells[7].click(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(filterCells(cells, '.selected'), 'to equal', []); + + dp.setDate(new Date(2022, 6, 3)); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(filterCells(cells, '.selected'), 'to equal', []); + + input.value = '7/3/2022'; + dp.update(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', '7/3/2022'); + expect(filterCells(cells, '.selected'), 'to equal', []); + + cells[8].click(); + expect(dp.dates, 'to equal', [dateValue(2022, 6, 4)]); + expect(input.value, 'to be', '07/04/2022'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[8]]); + + dp.enterEditMode(); + input.value = '7/3/2022'; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(dp.dates, 'to equal', [dateValue(2022, 6, 4)]); + expect(input.value, 'to be', '7/3/2022'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[8]]); + + dp.destroy(); + }); + + it('makes the picker disallow to navigate to before the min date', function () { + const {dp, picker} = createDP(input, {minDate: '7/14/2022'}); + const [viewSwitch, prevBtn, nextBtn] = getParts(picker, ['.view-switch', '.prev-btn', '.next-btn']); + dp.show(); + + expect(prevBtn.disabled, 'to be true'); + expect(nextBtn.disabled, 'to be false'); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[18]]); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[18]]); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + expect(filterCells(cells, '.focused'), 'to equal', [cells[24]]); + + nextBtn.click(); + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be false'); + + // move to Aug 13th + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + prevBtn.click(); + + // view date is limited to min date + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[18]]); + + // the same goes for ctrl + ArrowLeft key + prevBtn.click(); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[18]]); + + // months view + viewSwitch.click(); + expect(prevBtn.disabled, 'to be true'); + expect(nextBtn.disabled, 'to be false'); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + // on Oct + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[9]]); + + nextBtn.click(); + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be false'); + + // move to Jun + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + prevBtn.click(); + + // view date is limited to Jul + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + + // the same goes for ctrl + ArrowLeft key + prevBtn.click(); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + + // years view + viewSwitch.click(); + expect(prevBtn.disabled, 'to be true'); + expect(nextBtn.disabled, 'to be false'); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + // on 2025 + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + + nextBtn.click(); + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be false'); + + // move to 2031 + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + prevBtn.click(); + + // view year is limited to 2022 + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + // the same goes for ctrl + ArrowLeft key + prevBtn.click(); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + // decades view + viewSwitch.click(); + expect(prevBtn.disabled, 'to be true'); + expect(nextBtn.disabled, 'to be false'); + + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + simulant.fire(input, 'keydown', {key: 'ArrowDown'}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + // on 2050 + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + + simulant.fire(input, 'keydown', {key: 'ArrowRight'}); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + + nextBtn.click(); + expect(prevBtn.disabled, 'to be false'); + expect(nextBtn.disabled, 'to be false'); + + // move to 2110 + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + prevBtn.click(); + + // view decade is limited to 2020 + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + // the same goes for ctrl + ArrowLeft key + prevBtn.click(); + simulant.fire(input, 'keydown', {key: 'ArrowUp'}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({minDate: new Date(2022, 6, 2)}); + dp.show(); + + let cells = getCells(picker); + expect(getDisabled(cells), 'to equal', [ + [cells[0], '26'], + [cells[1], '27'], + [cells[2], '28'], + [cells[3], '29'], + [cells[4], '30'], + [cells[5], '1'], + ]); + + dp.setOptions({minDate: null}); + + cells = getCells(picker); + expect(getDisabled(cells), 'to equal', []); + + dp.destroy(); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/options/format.js b/node_modules/flowbite-datepicker/test/options/format.js new file mode 100644 index 0000000..c710572 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/options/format.js @@ -0,0 +1,281 @@ +describe('options - format & language', function () { + let clock; + let input; + + beforeEach(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + clock.restore(); + }); + + describe('format', function () { + it('specifies the date format used to parse/format the date string in input', function () { + const dp = new Datepicker(input, {format: 'yyyy-mm-dd'}); + + dp.setDate(new Date(2020, 1, 14)); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input.value, 'to be', '2020-02-14'); + + input.value = '2020/4/22'; + dp.update(); + expect(dp.dates, 'to equal', [dateValue(2020, 3, 22)]); + expect(input.value, 'to be', '2020-04-22'); + + // when a date in a wrong format is given... + dp.setDate('2/14/2020'); + expect(dp.dates, 'to equal', [dateValue(2, 13, 2020)]); + expect(input.value, 'to be', '0008-08-12'); + + input.value = '22/4/2020'; + dp.update(); + expect(dp.dates, 'to equal', [dateValue(22, 3, 2020)]); + expect(input.value, 'to be', '0027-10-11'); + + dp.destroy(); + input.value = ''; + }); + + it('custom parser/fomatter can be used by providing them as toValue/toDisplay of an object', function () { + const dp = new Datepicker(input, { + format: { + toDisplay(date) { + return new Date(date.getTime() - date.getTimezoneOffset() * 60000).toISOString() + .slice(0, 10) + .replace(/-/g, ''); + }, + toValue(date) { + const parts = [ + parseInt(date.slice(0, 4), 10), + parseInt(date.slice(4, 6), 10) - 1, + parseInt(date.slice(6, 8), 10), + ]; + return dateValue(...parts); + }, + }, + }); + + dp.setDate(new Date(2020, 1, 14)); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input.value, 'to be', '20200214'); + + input.value = '20200422'; + dp.update(); + expect(dp.dates, 'to equal', [dateValue(2020, 3, 22)]); + expect(input.value, 'to be', '20200422'); + + dp.destroy(); + input.value = ''; + }); + + it('can be updated with setOptions()', function () { + const dp = new Datepicker(input); + dp.setOptions({format: 'd M, \'yy'}); + + dp.setDate('14/2/2020'); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input.value, 'to be', '14 Feb, \'20'); + + dp.setOptions({format: 'mm/dd/yyyy'}); + expect(input.value, 'to be', '02/14/2020'); + input.value = '4/22/2020'; + dp.update(); + expect(dp.dates, 'to equal', [dateValue(2020, 3, 22)]); + expect(input.value, 'to be', '04/22/2020'); + + dp.destroy(); + input.value = ''; + }); + }); + + describe('language', function () { + const getDayNames = picker => Array.from(picker.querySelectorAll('.dow')).map(el => el.textContent); + + it('specifies the language used for the month/day names, today/clear buttons and the default format/weekStart', function () { + const locale = Datepicker.locales['zh-CN']; + const {dp, picker} = createDP(input, {language: 'zh-CN', todayBtn: true, clearBtn: true}); + const viewSwitch = getViewSwitch(picker); + dp.setDate(new Date(2020, 1, 14)); + dp.show(); + + expect(viewSwitch.textContent, 'to be', '2020年02月'); + expect(input.value, 'to be', '2020-02-14'); + expect(picker.querySelector('.today-btn').textContent, 'to be', locale.today); + expect(picker.querySelector('.clear-btn').textContent, 'to be', locale.clear); + + const dayNames = locale.daysMin.slice(1); + dayNames.push(locale.daysMin[0]); + expect(getDayNames(picker), 'to equal', dayNames); + + let cells = getCells(picker); + expect(cells[0].textContent, 'to be', '27'); + expect(cells[5].textContent, 'to be', '1'); + expect(cells[33].textContent, 'to be', '29'); + expect(cells[41].textContent, 'to be', '8'); + + expect(filterCells(cells, '.selected'), 'to equal', [cells[18]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[18]]); + expect(cells[18].textContent, 'to be', '14'); + + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', '2020'); + + cells = getCells(picker); + expect(Array.from(cells).map(el => el.textContent), 'to equal', locale.monthsShort); + cells[1].click(); + + input.value = '2020-4-22'; + dp.update(); + expect(viewSwitch.textContent, 'to be', '2020年04月'); + expect(input.value, 'to be', '2020-04-22'); + + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[23]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[23]]); + expect(cells[23].textContent, 'to be', '22'); + + dp.destroy(); + input.value = ''; + }); + + it('default format/weekStart in the locale are overriden by user-specified ones', function () { + const locale = Datepicker.locales['zh-CN']; + const {dp, picker} = createDP(input, {language: 'zh-CN', format: 'yyyy年mm月dd日', weekStart: 0}); + const viewSwitch = getViewSwitch(picker); + dp.setDate(new Date(2020, 1, 14)); + dp.show(); + + expect(viewSwitch.textContent, 'to be', '2020年02月'); + expect(input.value, 'to be', '2020年02月14日'); + expect(getDayNames(picker), 'to equal', locale.daysMin); + + let cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + expect(cells[19].textContent, 'to be', '14'); + + dp.destroy(); + input.value = ''; + }); + + it('language code + tag not installed falls back to the language code without tag', function () { + const locale = Datepicker.locales.fr; + const {dp, picker} = createDP(input, {language: 'fr-CA', todayBtn: true, clearBtn: true}); + const viewSwitch = getViewSwitch(picker); + dp.setDate(new Date(2020, 1, 14)); + dp.show(); + + expect(viewSwitch.textContent, 'to be', 'février 2020'); + expect(input.value, 'to be', '14/02/2020'); + expect(picker.querySelector('.today-btn').textContent, 'to be', locale.today); + expect(picker.querySelector('.clear-btn').textContent, 'to be', locale.clear); + + const dayNames = locale.daysMin.slice(1); + dayNames.push(locale.daysMin[0]); + expect(getDayNames(picker), 'to equal', dayNames); + + dp.destroy(); + input.value = ''; + }); + + it('language code not installed falls back to "en"', function () { + const locale = Datepicker.locales.en; + const {dp, picker} = createDP(input, {language: 'it', todayBtn: true, clearBtn: true}); + const viewSwitch = getViewSwitch(picker); + dp.setDate(new Date(2020, 1, 14)); + dp.show(); + + expect(viewSwitch.textContent, 'to be', 'February 2020'); + expect(input.value, 'to be', '02/14/2020'); + expect(picker.querySelector('.today-btn').textContent, 'to be', locale.today); + expect(picker.querySelector('.clear-btn').textContent, 'to be', locale.clear); + + expect(getDayNames(picker), 'to equal', locale.daysMin); + + dp.destroy(); + input.value = ''; + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input, {todayBtn: true, clearBtn: true}); + const viewSwitch = getViewSwitch(picker); + let locale = Datepicker.locales['zh-CN']; + dp.setDate(new Date(2020, 1, 14)); + dp.setOptions({language: 'zh-CN'}); + dp.show(); + + expect(viewSwitch.textContent, 'to be', '2020年02月'); + expect(input.value, 'to be', '2020-02-14'); + expect(picker.querySelector('.today-btn').textContent, 'to be', locale.today); + expect(picker.querySelector('.clear-btn').textContent, 'to be', locale.clear); + + let dayNames = locale.daysMin.slice(1); + dayNames.push(locale.daysMin[0]); + expect(getDayNames(picker), 'to equal', dayNames); + + let cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[18]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[18]]); + expect(cells[18].textContent, 'to be', '14'); + + locale = Datepicker.locales.fr; + dp.setOptions({language: 'fr'}); + + expect(viewSwitch.textContent, 'to be', 'février 2020'); + expect(input.value, 'to be', '14/02/2020'); + expect(picker.querySelector('.today-btn').textContent, 'to be', locale.today); + expect(picker.querySelector('.clear-btn').textContent, 'to be', locale.clear); + + dayNames = locale.daysMin.slice(1); + dayNames.push(locale.daysMin[0]); + expect(getDayNames(picker), 'to equal', dayNames); + + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[18]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[18]]); + expect(cells[18].textContent, 'to be', '14'); + + locale = Datepicker.locales.en; + dp.setOptions({language: 'en'}); + + expect(viewSwitch.textContent, 'to be', 'February 2020'); + expect(input.value, 'to be', '02/14/2020'); + expect(picker.querySelector('.today-btn').textContent, 'to be', locale.today); + expect(picker.querySelector('.clear-btn').textContent, 'to be', locale.clear); + + expect(getDayNames(picker), 'to equal', locale.daysMin); + + cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + expect(cells[19].textContent, 'to be', '14'); + + dp.destroy(); + input.value = ''; + }); + + it('user-specified format/weekStart other than old language\'s default are kept on being updated dynamically', function () { + const {dp, picker} = createDP(input, {language: 'zh-CN', format: 'yyyy/mm/dd', weekStart: 0}); + dp.setDate(new Date(2020, 1, 14)); + dp.show(); + + let locale = Datepicker.locales.fr; + dp.setOptions({language: 'fr'}); + + expect(input.value, 'to be', '2020/02/14'); + expect(getDayNames(picker), 'to equal', locale.daysMin); + + let cells = getCells(picker); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + expect(cells[19].textContent, 'to be', '14'); + + dp.destroy(); + input.value = ''; + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/options/multidate.js b/node_modules/flowbite-datepicker/test/options/multidate.js new file mode 100644 index 0000000..42774ef --- /dev/null +++ b/node_modules/flowbite-datepicker/test/options/multidate.js @@ -0,0 +1,380 @@ +describe('options - multi date', function () { + let clock; + let input; + + beforeEach(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + clock.restore(); + }); + + describe('maxNumberOfDates', function () { + it('specifies the muximum number of dates the datepicker accepts for the selection', function () { + let {dp, picker} = createDP(input, {maxNumberOfDates: 2}); + + dp.setDate('2/14/2020', '4/22/2020'); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14), dateValue(2020, 3, 22)]); + expect(input.value, 'to be', '02/14/2020,04/22/2020'); + + // the dates come later win + dp.setDate('1/4/2020', '2/22/2020', '3/21/2020'); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 22), dateValue(2020, 2, 21)]); + expect(input.value, 'to be', '02/22/2020,03/21/2020'); + + // repeated dates are eliminated + dp.setDate('4/22/2020', '7/14/2020', '5/5/2020', '7/14/2020'); + expect(dp.dates, 'to equal', [dateValue(2020, 6, 14), dateValue(2020, 4, 5)]); + expect(input.value, 'to be', '07/14/2020,05/05/2020'); + + dp.destroy(); + input.value = ''; + ({dp, picker} = createDP(input, {maxNumberOfDates: 3})); + dp.show(); + + let cells = getCells(picker); + cells[19].click(); + cells[9].click(); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14), dateValue(2020, 1, 4)]); + expect(input.value, 'to be', '02/14/2020,02/04/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19], cells[9]]); + // view date is changed co the last selected item + expect(filterCells(cells, '.focused'), 'to equal', [cells[9]]); + + input.value = '2/3/2020,2/22/2020'; + dp.update(); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 3), dateValue(2020, 1, 22)]); + expect(input.value, 'to be', '02/03/2020,02/22/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[8], cells[27]]); + // view date is changed co the last item of the selection + expect(filterCells(cells, '.focused'), 'to equal', [cells[27]]); + + dp.destroy(); + input.value = ''; + ({dp, picker} = createDP(input, {maxNumberOfDates: 3})); + + dp.setDate('2/14/2020', '4/22/2020', '3/21/2020'); + expect(dp.dates, 'to equal', [ + dateValue(2020, 1, 14), + dateValue(2020, 3, 22), + dateValue(2020, 2, 21), + ]); + expect(input.value, 'to be', '02/14/2020,04/22/2020,03/21/2020'); + + dp.destroy(); + input.value = ''; + ({dp, picker} = createDP(input, {maxNumberOfDates: 3})); + dp.show(); + + getCells(picker)[1].click(); + getCells(picker)[40].click(); + cells = getCells(picker); + cells[19].click(); + expect(dp.dates, 'to equal', [ + dateValue(2020, 0, 27), + dateValue(2020, 1, 7), + dateValue(2020, 1, 14), + ]); + expect(input.value, 'to be', '01/27/2020,02/07/2020,02/14/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[1], cells[12], cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + input.value = '2/3/2020,2/22/2020'; + dp.update(); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 3), dateValue(2020, 1, 22)]); + expect(input.value, 'to be', '02/03/2020,02/22/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[8], cells[27]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[27]]); + + // setting initial dates does not cuase error + // (issue #51) + dp.destroy(); + input.value = '02/14/2020,04/22/2020,03/21/2020'; + ({dp, picker} = createDP(input, {maxNumberOfDates: 2})); + + expect(dp.dates, 'to equal', [ + dateValue(2020, 3, 22), + dateValue(2020, 2, 21), + ]); + expect(input.value, 'to be', '04/22/2020,03/21/2020'); + + dp.destroy(); + input.value = ''; + }); + + it('makes the picker deselect the date when a selected date is clicked if value != 1', function () { + const {dp, picker} = createDP(input, {maxNumberOfDates: 3}); + dp.show(); + + let cells = getCells(picker); + cells[19].click(); + cells[12].click(); + + cells[19].click(); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 7)]); + expect(input.value, 'to be', '02/07/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[12]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[12]]); + + cells[12].click(); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + expect(filterCells(cells, '.selected'), 'to equal', []); + // view date is changed to the default view date + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + dp.destroy(); + input.value = ''; + }); + + it('makes the picker deselect the date when a selected date is clicked if value != 1', function () { + const {dp, picker} = createDP(input, {maxNumberOfDates: 3}); + const cells = getCells(picker); + dp.setDate('2/14/2020', '2/7/2020'); + dp.show(); + + dp.setDate('2/14/2020'); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 7)]); + expect(input.value, 'to be', '02/07/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[12]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[12]]); + + dp.setDate('2/11/2020', '2/7/2020', '2/14/2020'); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 11), dateValue(2020, 1, 14)]); + expect(input.value, 'to be', '02/11/2020,02/14/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[16], cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + dp.destroy(); + input.value = ''; + }); + + it('setDate() replaces the selection instead of deselect/merg-ing if clear: true option is passed', function () { + const {dp, picker} = createDP(input, {maxNumberOfDates: 3}); + const cells = getCells(picker); + dp.setDate('2/14/2020', '2/7/2020'); + dp.show(); + + dp.setDate('2/14/2020', {clear: true}); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input.value, 'to be', '02/14/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + dp.setDate('2/11/2020', '2/7/2020', '2/14/2020', {clear: true}); + expect(dp.dates, 'to equal', [ + dateValue(2020, 1, 11), + dateValue(2020, 1, 7), + dateValue(2020, 1, 14), + ]); + expect(input.value, 'to be', '02/11/2020,02/07/2020,02/14/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[16], cells[12], cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + dp.destroy(); + input.value = ''; + }); + + it('setDate() does nothing if no dates or all-invalid dates are passed', function () { + const dp = new Datepicker(input, {maxNumberOfDates: 3}); + dp.setDate('2/14/2020', '2/7/2020'); + dp.show(); + + const origDates = [...dp.dates]; + dp.setDate([]); + expect(dp.dates, 'to equal', origDates); + expect(input.value, 'to be', '02/14/2020,02/07/2020'); + + dp.setDate(); + expect(dp.dates, 'to equal', origDates); + expect(input.value, 'to be', '02/14/2020,02/07/2020'); + + dp.setDate([false, NaN], {clear: true}); + expect(dp.dates, 'to equal', origDates); + expect(input.value, 'to be', '02/14/2020,02/07/2020'); + + dp.setDate('', null); + expect(dp.dates, 'to equal', origDates); + expect(input.value, 'to be', '02/14/2020,02/07/2020'); + + dp.destroy(); + }); + + it('setDate() clears all selected dates if no dates + clear: true option are passed', function () { + const dp = new Datepicker(input, {maxNumberOfDates: 3}); + dp.setDate('2/14/2020', '2/7/2020'); + dp.show(); + + dp.setDate([], {clear: true}); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + + dp.setDate('2/14/2020', '2/7/2020'); + + dp.setDate({clear: true}); + expect(dp.dates, 'to equal', []); + expect(input.value, 'to be', ''); + + dp.destroy(); + }); + + it('setDate() does nothing if all-invalid dates + clear: true option are passed', function () { + const dp = new Datepicker(input, {maxNumberOfDates: 3}); + dp.setDate('2/14/2020', '2/7/2020'); + dp.show(); + + const origDates = [...dp.dates]; + dp.setDate([false, NaN], {clear: true}); + expect(dp.dates, 'to equal', origDates); + expect(input.value, 'to be', '02/14/2020,02/07/2020'); + + dp.setDate('', null, {clear: true}); + expect(dp.dates, 'to equal', origDates); + expect(input.value, 'to be', '02/14/2020,02/07/2020'); + + dp.destroy(); + }); + + it('does not apply deselecting behavior to update()', function () { + const {dp, picker} = createDP(input, {maxNumberOfDates: 3}); + const cells = getCells(picker); + dp.setDate('2/14/2020', '2/7/2020'); + dp.show(); + + input.value = '2/14/2020'; + dp.update(); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 14)]); + expect(input.value, 'to be', '02/14/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + input.value = '2/11/2020,2/7/2020,2/14/2020'; + dp.update(); + expect(dp.dates, 'to equal', [ + dateValue(2020, 1, 11), + dateValue(2020, 1, 7), + dateValue(2020, 1, 14), + ]); + expect(input.value, 'to be', '02/11/2020,02/07/2020,02/14/2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[16], cells[12], cells[19]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + + dp.destroy(); + input.value = ''; + }); + + it('makes getDate() return array of dates if value != 1', function () { + const dp = new Datepicker(input, {maxNumberOfDates: 3}); + + expect(dp.getDate(), 'to equal', []); + expect(dp.getDate('yyyy-mm-dd'), 'to equal', []); + + dp.setDate('2/11/2020', '2/7/2020', '2/14/2020'); + expect(dp.getDate(), 'to equal', [new Date(2020, 1, 11), new Date(2020, 1, 7), new Date(2020, 1, 14)]); + expect(dp.getDate('yyyy-mm-dd'), 'to equal', ['2020-02-11', '2020-02-07', '2020-02-14']); + + dp.setDate('2/7/2020', {clear: true}); + expect(dp.getDate(), 'to equal', [new Date(2020, 1, 7)]); + expect(dp.getDate('d M, yyyy'), 'to equal', ['7 Feb, 2020']); + + const changeDateListener = (e) => { + evt = e; + }; + let evt; + input.addEventListener('changeDate', changeDateListener); + + dp.setDate('7/4/2020', '7/14/2020'); + expect(evt.detail.date, 'to equal', dp.getDate()); + + input.removeEventListener('changeDate', changeDateListener); + dp.destroy(); + input.value = ''; + }); + + it('value 0 is considered unlimited', function () { + if (window.navigator.userAgent.indexOf('Edge') > -1) { + this.timeout(5000); + } + + const max = new Date(2100, 0, 1).getTime(); + const generateDates = (dates, length, index = 0) => { + const date = dateUtils.stripTime(Math.floor(Math.random() * max)); + if (dates.includes(date)) { + return generateDates(dates, length, index); + } else { + dates.push(date); + return index <= length + ? generateDates(dates, length, index + 1) + : dates; + } + }; + const dates = generateDates([], 3000); + + const dp = new Datepicker(input, {maxNumberOfDates: 0}); + dp.setDate(dates); + expect(dp.dates, 'to equal', dates); + + dp.destroy(); + input.value = ''; + }); + + it('can be updated with setOptions()', function () { + const dp = new Datepicker(input); + dp.setOptions({maxNumberOfDates: 3}); + + dp.setDate('2/11/2020', '2/7/2020', '2/14/2020'); + expect(dp.dates, 'to equal', [ + dateValue(2020, 1, 11), + dateValue(2020, 1, 7), + dateValue(2020, 1, 14), + ]); + + dp.setOptions({maxNumberOfDates: 1}); + dp.setDate('7/4/2020', '4/22/2020'); + expect(dp.dates, 'to equal', [dateValue(2020, 3, 22)]); + expect(dp.getDate(), 'to be a date'); + + dp.destroy(); + input.value = ''; + }); + }); + + describe('dateDelimiter', function () { + it('specifies the date delemiter for the input string', function () { + const dp = new Datepicker(input, {maxNumberOfDates: 3, dateDelimiter: '|'}); + + dp.setDate('2/14/2020', '4/22/2020'); + expect(input.value, 'to be', '02/14/2020|04/22/2020'); + + input.value = '2/11/2020|2/7/2020|2/14/2020'; + dp.update(); + expect(dp.dates, 'to equal', [ + dateValue(2020, 1, 11), + dateValue(2020, 1, 7), + dateValue(2020, 1, 14), + ]); + + dp.destroy(); + input.value = ''; + }); + + it('can be updated with setOptions()', function () { + const dp = new Datepicker(input, {maxNumberOfDates: 3}); + dp.setOptions({dateDelimiter: '_'}); + dp.setDate('2/11/2020', '2/7/2020', '2/14/2020'); + + dp.setOptions({dateDelimiter: ' - '}); + expect(input.value, 'to be', '02/11/2020 - 02/07/2020 - 02/14/2020'); + + dp.setOptions({dateDelimiter: ','}); + expect(input.value, 'to be', '02/11/2020,02/07/2020,02/14/2020'); + + dp.destroy(); + input.value = ''; + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/options/options.js b/node_modules/flowbite-datepicker/test/options/options.js new file mode 100644 index 0000000..622a157 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/options/options.js @@ -0,0 +1,727 @@ +describe('options', function () { + let clock; + let input; + + beforeEach(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + clock.restore(); + }); + + describe('autohide', function () { + it('makes the picker hide automatically on selection when true', function () { + const {dp, picker} = createDP(input, {autohide: true}); + dp.show(); + + // by satDate() + dp.setDate('2/4/2020'); + expect(isVisible(picker), 'to be false'); + + dp.show(); + + // by click on day cell + getCells(picker)[25].click(); + expect(isVisible(picker), 'to be false'); + + dp.show(); + + // by typing enter key in edit mode + dp.enterEditMode(); + input.value = '2/14/2020'; + simulant.fire(input, 'keydown', {key: 'Enter'}); + expect(isVisible(picker), 'to be false'); + + // focus is kept on input field after auto-hidng by clicking day cell + // (issue #21) + const spyFocus = sinon.spy(input, 'focus'); + dp.show(); + + getCells(picker)[25].click(); + expect(spyFocus.called, 'to be true'); + + spyFocus.restore(); + + dp.destroy(); + input.value = ''; + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({autohide: true}); + dp.show(); + + dp.setDate('2/4/2020'); + expect(isVisible(picker), 'to be false'); + + dp.setOptions({autohide: false}); + dp.show(); + + dp.setDate('2/14/2020'); + expect(isVisible(picker), 'to be true'); + + dp.destroy(); + input.value = ''; + }); + }); + + describe('buttonClass', function () { + it('specifies the main class used for the button elements', function () { + const {dp, picker} = createDP(input, {buttonClass: 'btn'}); + const [viewSwitch, prevBtn, nextBtn, todayBtn, clearBtn] = getParts(picker, [ + '.view-switch', + '.prev-btn', + '.next-btn', + '.today-btn', + '.clear-btn', + ]); + + expect(viewSwitch.className, 'to be', 'btn view-switch'); + expect(prevBtn.className, 'to be', 'btn prev-btn'); + expect(nextBtn.className, 'to be', 'btn next-btn'); + expect(todayBtn.className, 'to be', 'btn today-btn'); + expect(clearBtn.className, 'to be', 'btn clear-btn'); + + dp.destroy(); + }); + + it('cannot be update with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({buttonClass: 'btn'}); + + const [viewSwitch, prevBtn, nextBtn, todayBtn, clearBtn] = getParts(picker, [ + '.view-switch', + '.prev-btn', + '.next-btn', + '.today-btn', + '.clear-btn', + ]); + expect(viewSwitch.className, 'to be', 'button view-switch'); + expect(prevBtn.className, 'to be', 'button prev-btn'); + expect(nextBtn.className, 'to be', 'button next-btn'); + expect(todayBtn.className, 'to be', 'button today-btn'); + expect(clearBtn.className, 'to be', 'button clear-btn'); + + dp.destroy(); + }); + }); + + describe('calendarWeeks', function () { + const getDisplayedWeeks = (picker) => { + const calendarWeeks = picker.querySelector('.calendar-weeks'); + return Array.from(calendarWeeks.querySelectorAll('.week')).map(el => el.textContent); + }; + + it('enables display ISO weeks in days view when true', function () { + const {dp, picker} = createDP(input, {calendarWeeks: true}); + const [viewSwitch, prevBtn] = getParts(picker, ['.view-switch', '.prev-btn']); + dp.show(); + + let calendarWeeks = picker.querySelector('.calendar-weeks'); + expect(isVisible(calendarWeeks), 'to be true'); + expect(getDisplayedWeeks(picker), 'to equal', ['5', '6', '7', '8', '9', '10']); + + prevBtn.click(); + expect(getDisplayedWeeks(picker), 'to equal', ['1', '2', '3', '4', '5', '6']); + + prevBtn.click(); + expect(getDisplayedWeeks(picker), 'to equal', ['48', '49', '50', '51', '52', '1']); + + prevBtn.click(); + expect(getDisplayedWeeks(picker), 'to equal', ['44', '45', '46', '47', '48', '49']); + + dp.setDate('01/01/2021'); + expect(getDisplayedWeeks(picker), 'to equal', ['53', '1', '2', '3', '4', '5']); + + prevBtn.click(); + expect(getDisplayedWeeks(picker), 'to equal', ['49', '50', '51', '52', '53', '1']); + + // months view + viewSwitch.click(); + expect(picker.querySelector('.calendar-weeks'), 'to be null'); + + // years view + viewSwitch.click(); + expect(picker.querySelector('.calendar-weeks'), 'to be null'); + + // decades view + viewSwitch.click(); + expect(picker.querySelector('.calendar-weeks'), 'to be null'); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({calendarWeeks: true}); + dp.show(); + + expect(isVisible(picker.querySelector('.calendar-weeks')), 'to be true'); + + dp.setOptions({calendarWeeks: false}); + expect(picker.querySelector('.calendar-weeks'), 'to be null'); + + dp.destroy(); + }); + }); + + describe('container', function () { + let foo; + + beforeEach(function () { + foo = parseHTML('
').firstChild; + testContainer.appendChild(foo); + }); + + afterEach(function () { + testContainer.removeChild(foo); + }); + + it('specifies the element to attach the picker', function () { + const dp = new Datepicker(input, {container: '#foo'}); + expect(document.querySelector('.datepicker').parentElement, 'to be', foo); + + dp.destroy(); + }); + + it('cannot be update with setOptions()', function () { + const dp = new Datepicker(input); + dp.setOptions({container: '#foo'}); + + expect(document.querySelector('.datepicker').parentElement, 'to be', document.body); + + dp.destroy(); + }); + }); + + describe('daysOfWeekHighlighted', function () { + const highlightedCellIndices = (picker) => { + const cells = getCells(picker); + return filterCells(cells, '.highlighted').map(el => cells.indexOf(el)); + }; + const highlighted1stWeekIndices = picker => highlightedCellIndices(picker).filter(val => val < 7); + + it('specifies the days of week to highlight by dey numbers', function () { + const {dp, picker} = createDP(input, {daysOfWeekHighlighted: [1, 5]}); + dp.show(); + + expect(highlightedCellIndices(picker), 'to equal', [1, 5, 8, 12, 15, 19, 22, 26, 29, 33, 36, 40]); + + const viewSwitch = getViewSwitch(picker); + // months view + viewSwitch.click(); + expect(highlightedCellIndices(picker), 'to equal', []); + + // years view + viewSwitch.click(); + expect(highlightedCellIndices(picker), 'to equal', []); + + // decades view + viewSwitch.click(); + expect(highlightedCellIndices(picker), 'to equal', []); + + dp.destroy(); + }); + + it('can contain values of 0 - 6 and max 6 items', function () { + const {dp, picker} = createDP(input, {daysOfWeekHighlighted: [0, -1, 1, 2, 3, 2, 4, 5, 6, 7]}); + dp.show(); + + expect(highlighted1stWeekIndices(picker), 'to equal', [0, 1, 2, 3, 4, 5]); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({daysOfWeekHighlighted: [6, 0, 3]}); + dp.show(); + + expect(highlighted1stWeekIndices(picker), 'to equal', [0, 3, 6]); + + dp.setOptions({daysOfWeekHighlighted: []}); + expect(highlightedCellIndices(picker), 'to equal', []); + + dp.destroy(); + }); + }); + + describe('defaultViewDate', function () { + it('specifies the start view date in the case no selection is made', function () { + const date = new Date(1984, 0, 24); + const {dp, picker} = createDP(input, {defaultViewDate: date}); + dp.show(); + + expect(getViewSwitch(picker).textContent, 'to be', 'January 1984'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[23]]); + expect(cells[23].textContent, 'to be', '24'); + + dp.setDate('7/4/2020'); + dp.setDate({clear: true}); + + expect(getViewSwitch(picker).textContent, 'to be', 'January 1984'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[23]]); + expect(cells[23].textContent, 'to be', '24'); + + picker.querySelector('.prev-btn').click(); + dp.hide(); + dp.show(); + + expect(getViewSwitch(picker).textContent, 'to be', 'January 1984'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[23]]); + expect(cells[23].textContent, 'to be', '24'); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.show(); + + dp.setOptions({defaultViewDate: new Date(1984, 0, 24)}); + dp.hide(); + dp.show(); + + expect(getViewSwitch(picker).textContent, 'to be', 'January 1984'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[23]]); + expect(cells[23].textContent, 'to be', '24'); + + dp.setOptions({defaultViewDate: new Date(2007, 5, 29)}); + dp.setDate('7/4/2020'); + dp.setDate({clear: true}); + + expect(getViewSwitch(picker).textContent, 'to be', 'June 2007'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[33]]); + expect(cells[33].textContent, 'to be', '29'); + + dp.destroy(); + }); + }); + + describe('disableTouchKeyboard', function () { + const ontouchstartSupported = 'ontouchstart' in document; + + before(function () { + if (!ontouchstartSupported) { + document.ontouchstart = null; + } + }); + + after(function () { + if (!ontouchstartSupported) { + delete document.ontouchstart; + } + }); + + it('unfocuses the input after showing the picker', function () { + const dp = new Datepicker(input, {disableTouchKeyboard: true}); + input.focus(); + + expect(document.activeElement, 'not to be', input); + + dp.destroy(); + }); + + it('prevents the input from getting focus after an eleent in the picker is clicked', function () { + const {dp, picker} = createDP(input, {disableTouchKeyboard: true}); + const [viewSwitch, prevBtn] = getParts(picker, ['.view-switch', '.prev-btn']); + dp.show(); + + prevBtn.focus(); + simulant.fire(prevBtn, 'click'); + expect(document.activeElement, 'not to be', input); + + simulant.fire(getCells(picker)[15], 'click'); + expect(document.activeElement, 'not to be', input); + + viewSwitch.focus(); + simulant.fire(viewSwitch, 'click'); + expect(document.activeElement, 'not to be', input); + + simulant.fire(getCells(picker)[6], 'click'); + expect(document.activeElement, 'not to be', input); + + dp.destroy(); + }); + + it('is ignored if the browser does not support document.ontouchstart', function () { + if (ontouchstartSupported) { + return; + } + delete document.ontouchstart; + + const {dp, picker} = createDP(input, {disableTouchKeyboard: true}); + const [viewSwitch, prevBtn] = getParts(picker, ['.view-switch', '.prev-btn']); + input.focus(); + + expect(document.activeElement, 'to be', input); + + prevBtn.focus(); + simulant.fire(prevBtn, 'click'); + expect(document.activeElement, 'to be', input); + + prevBtn.focus(); + simulant.fire(getCells(picker)[15], 'click'); + expect(document.activeElement, 'to be', input); + + viewSwitch.focus(); + simulant.fire(viewSwitch, 'click'); + expect(document.activeElement, 'to be', input); + + viewSwitch.focus(); + simulant.fire(getCells(picker)[6], 'click'); + expect(document.activeElement, 'to be', input); + + dp.destroy(); + document.ontouchstart = null; + }); + + it('can be updated with setOptions()', function () { + const dp = new Datepicker(input); + dp.setOptions({disableTouchKeyboard: true}); + input.focus(); + + expect(document.activeElement, 'not to be', input); + + dp.hide(); + dp.setOptions({disableTouchKeyboard: false}); + input.focus(); + + expect(document.activeElement, 'to be', input); + + dp.destroy(); + }); + }); + + describe('nextArrow', function () { + it('specifies the label of the next button in HTML (or plain text)', function () { + const html = ''; + const {dp, picker} = createDP(input, {nextArrow: html}); + const nextBtn = picker.querySelector('.next-btn'); + dp.show(); + + expect(nextBtn.innerHTML, 'to be', html); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + const nextBtn = picker.querySelector('.next-btn'); + dp.setOptions({nextArrow: 'N'}); + dp.show(); + + expect(nextBtn.textContent, 'to be', 'N'); + + dp.setOptions({nextArrow: '>'}); + expect(nextBtn.textContent, 'to be', '>'); + + dp.destroy(); + }); + }); + + describe('prevArrow', function () { + it('specifies the label of the next button in HTML (or plain text)', function () { + const html = ''; + const {dp, picker} = createDP(input, {prevArrow: html}); + const prevBtn = picker.querySelector('.prev-btn'); + dp.show(); + + expect(prevBtn.innerHTML, 'to be', html); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + const prevBtn = picker.querySelector('.prev-btn'); + dp.setOptions({prevArrow: 'P'}); + dp.show(); + + expect(prevBtn.textContent, 'to be', 'P'); + + dp.setOptions({prevArrow: '<'}); + expect(prevBtn.textContent, 'to be', '<'); + + dp.destroy(); + }); + }); + + describe('showDaysOfWeek', function () { + it('hides day names of week when false', function () { + const {dp, picker} = createDP(input, {showDaysOfWeek: false}); + dp.show(); + + expect(isVisible(picker.querySelector('.days-of-week')), 'to be false'); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({showDaysOfWeek: false}); + dp.show(); + + expect(isVisible(picker.querySelector('.days-of-week')), 'to be false'); + + dp.setOptions({showDaysOfWeek: true}); + expect(isVisible(picker.querySelector('.days-of-week')), 'to be true'); + + dp.destroy(); + }); + }); + + describe('showOnClick', function () { + it('disables the picker to auto-open on clicking input when false', function () { + const {dp, picker} = createDP(input, {showOnClick: false}); + input.focus(); + dp.hide(); + + simulant.fire(input, 'mousedown'); + input.click(); + expect(isVisible(picker), 'to be false'); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({showOnClick: false}); + input.focus(); + dp.hide(); + simulant.fire(input, 'mousedown'); + input.click(); + + expect(isVisible(picker), 'to be false'); + + dp.setOptions({showOnClick: true}); + simulant.fire(input, 'mousedown'); + input.click(); + + expect(isVisible(picker), 'to be true'); + + dp.destroy(); + }); + }); + + describe('showOnFocus', function () { + it('disables the picker to auto-open on focus when false', function () { + const {dp, picker} = createDP(input, {showOnFocus: false}); + input.focus(); + + expect(isVisible(picker), 'to be false'); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({showOnFocus: false}); + input.focus(); + + expect(isVisible(picker), 'to be false'); + + input.blur(); + dp.setOptions({showOnFocus: true}); + input.focus(); + + expect(isVisible(picker), 'to be true'); + + dp.destroy(); + }); + }); + + describe('title', function () { + it('specifies the title of the picker and shows it when not empty', function () { + const {dp, picker} = createDP(input, {title: 'Foo Bar'}); + const title = picker.querySelector('.datepicker-title'); + dp.show(); + + expect(title.textContent, 'to be', 'Foo Bar'); + expect(isVisible(title), 'to be true'); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + const title = picker.querySelector('.datepicker-title'); + dp.setOptions({title: 'My Datepicker'}); + dp.show(); + + expect(title.textContent, 'to be', 'My Datepicker'); + expect(isVisible(title), 'to be true'); + + dp.setOptions({title: ''}); + expect(title.textContent, 'to be', ''); + expect(isVisible(title), 'to be false'); + + dp.destroy(); + }); + }); + + describe('todayHighlight', function () { + it('highlights the current date in days view when true', function () { + const {dp, picker} = createDP(input, {todayHighlight: true}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + + let cells = getCells(picker); + expect(filterCells(cells, '.today'), 'to equal', [cells[19]]); + + picker.querySelector('.prev-btn').click(); + expect(filterCells(getCells(picker), '.today'), 'to equal', []); + + picker.querySelector('.next-btn').click(); + viewSwitch.click(); + expect(filterCells(getCells(picker), '.today'), 'to equal', []); + + viewSwitch.click(); + expect(filterCells(getCells(picker), '.today'), 'to equal', []); + + viewSwitch.click(); + expect(filterCells(getCells(picker), '.today'), 'to equal', []); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({todayHighlight: true}); + dp.show(); + + let cells = getCells(picker); + expect(filterCells(cells, '.today'), 'to equal', [cells[19]]); + + dp.setOptions({todayHighlight: false}); + + cells = getCells(picker); + expect(filterCells(cells, '.today'), 'to equal', []); + + dp.destroy(); + }); + }); + + describe('updateOnBlur', function () { + it('discards unparsed input on losing focus when false', function () { + const outsider = document.createElement('p'); + testContainer.appendChild(outsider); + + const {dp, picker} = createDP(input, {updateOnBlur: false}); + input.focus(); + input.value = 'foo'; + + // on tab key press + simulant.fire(input, 'keydown', {key: 'Tab'}); + expect(input.value, 'to be', ''); + + dp.setDate('04/22/2020'); + dp.show(); + dp.enterEditMode(); + input.value = 'foo'; + + simulant.fire(input, 'keydown', {key: 'Tab'}); + expect(input.value, 'to be', '04/22/2020'); + + // on click outside + dp.show(); + input.value = 'foo'; + + simulant.fire(picker.querySelector('.dow'), 'mousedown'); + expect(input.value, 'to be', 'foo'); + + simulant.fire(input, 'mousedown'); + expect(input.value, 'to be', 'foo'); + + simulant.fire(outsider, 'mousedown'); + expect(input.value, 'to be', '04/22/2020'); + + dp.setDate({clear: true}); + input.value = 'foo'; + + simulant.fire(outsider, 'mousedown'); + expect(input.value, 'to be', ''); + + dp.destroy(); + testContainer.removeChild(outsider); + }); + + it('can be updated with setOptions()', function () { + const dp = new Datepicker(input); + dp.setOptions({updateOnBlur: false}); + input.focus(); + input.value = '04/22/2020'; + + simulant.fire(input, 'keydown', {key: 'Tab'}); + expect(input.value, 'to be', ''); + + dp.setOptions({updateOnBlur: true}); + input.focus(); + input.value = '04/22/2020'; + + simulant.fire(input, 'keydown', {key: 'Tab'}); + expect(input.value, 'to be', '04/22/2020'); + + dp.destroy(); + }); + }); + + describe('weekStart', function () { + const getDayNames = (picker) => { + const daysOfWeek = picker.querySelector('.days-of-week'); + return Array.from(daysOfWeek.children).map(el => el.textContent); + }; + const getDatesInColumn = (picker, colIndex) => { + const cells = getCells(picker); + return cells.reduce((dates, el, ix) => { + if (ix % 7 === colIndex) { + dates.push(el.textContent); + } + return dates; + }, []); + }; + + it('specifies the day of week to display in the first column', function () { + const {dp, picker} = createDP(input, {weekStart: 1}); + dp.show(); + + expect(getDayNames(picker), 'to equal', ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su']); + expect(getDatesInColumn(picker, 0), 'to equal', ['27', '3', '10', '17', '24', '2']); + expect(getDatesInColumn(picker, 6), 'to equal', ['2', '9', '16', '23', '1', '8']); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({weekStart: 4}); + dp.show(); + + expect(getDayNames(picker), 'to equal', ['Th', 'Fr', 'Sa', 'Su', 'Mo', 'Tu', 'We']); + expect(getDatesInColumn(picker, 0), 'to equal', ['30', '6', '13', '20', '27', '5']); + expect(getDatesInColumn(picker, 6), 'to equal', ['5', '12', '19', '26', '4', '11']); + + dp.setOptions({weekStart: 0}); + + expect(getDayNames(picker), 'to equal', ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']); + expect(getDatesInColumn(picker, 0), 'to equal', ['26', '2', '9', '16', '23', '1']); + expect(getDatesInColumn(picker, 6), 'to equal', ['1', '8', '15', '22', '29', '7']); + + dp.destroy(); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/options/orientation.js b/node_modules/flowbite-datepicker/test/options/orientation.js new file mode 100644 index 0000000..0d2703a --- /dev/null +++ b/node_modules/flowbite-datepicker/test/options/orientation.js @@ -0,0 +1,410 @@ +describe('options - orientation', function () { + const getIntSize = px => Math.round(parseFloat(px)); + const getTopPos = (el, wrap) => el.offsetTop + (wrap ? wrap.offsetTop : 0) + window.scrollY; + const getLeftPos = (el, wrap) => el.offsetLeft + (wrap ? wrap.offsetLeft : 0) + window.scrollX; + const getBottomPos = (el, wrap) => getTopPos(el, wrap) + el.offsetHeight; + const getRightPos = (el, wrap) => getLeftPos(el, wrap) + el.offsetWidth; + let wrapper; + let input; + + beforeEach(function () { + wrapper = document.createElement('div'); + Object.assign(wrapper.style, { + boxSizing: 'border-box', + position: 'fixed', + top: '50px', + left: '50px', + width: '300px', + paddingTop: '300px', + }); + input = document.createElement('input'); + wrapper.appendChild(input); + testContainer.appendChild(wrapper); + }); + + afterEach(function () { + domUtils.emptyChildNodes(testContainer); + }); + + it('"auto" makes the picker show on top left of the input by default', function () { + const {dp, picker} = createDP(input); + dp.show(); + + expect(getIntSize(picker.style.top), 'to be close to', getTopPos(input, wrapper) - picker.offsetHeight, 1); + expect(getIntSize(picker.style.left), 'to be close to', getLeftPos(input, wrapper), 1); + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.destroy(); + }); + + it('"auto" makes the picker show on top right of the input if computed style of the input has direction: rrl', function () { + const {dp, picker} = createDP(input); + wrapper.setAttribute('dir', 'rtl'); + dp.show(); + + expect(getIntSize(picker.style.top), 'to be close to', getTopPos(input, wrapper) - picker.offsetHeight, 1); + expect(getIntSize(picker.style.left), 'to be close to', getRightPos(input, wrapper) - picker.offsetWidth, 1); + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.destroy(); + }); + + it('"auto" makes the picker show on bottom of the input if visible space above the input < picker height', function () { + const {dp, picker} = createDP(input); + wrapper.style.paddingTop = '0'; + dp.show(); + + expect(getIntSize(picker.style.top), 'to be close to', getBottomPos(input, wrapper), 1); + expect(getIntSize(picker.style.left), 'to be close to', getLeftPos(input, wrapper), 1); + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + wrapper.setAttribute('dir', 'rtl'); + dp.show(); + + expect(getIntSize(picker.style.top), 'to be close to', getBottomPos(input, wrapper), 1); + expect(getIntSize(picker.style.left), 'to be close to', getRightPos(input, wrapper) - picker.offsetWidth, 1); + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.destroy(); + }); + + it('"auto" makes the picker move to 10px from document\'s left if picker\'s left < document\'s', function () { + const {dp, picker} = createDP(input); + wrapper.style.left = '-40px'; + dp.show(); + + expect(getIntSize(picker.style.left), 'to be', 10); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.destroy(); + }); + + it('"auto" makes the picker show on right if picker\'s right edge > document\'s', function () { + const {dp, picker} = createDP(input); + Object.assign(wrapper.style, {left: 'auto', right: 0, width: '150px'}); + dp.show(); + + expect(getIntSize(picker.style.left), 'to be close to', getRightPos(input, wrapper) - picker.offsetWidth, 1); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.destroy(); + }); + + it('"top" makes the picker show on top of the input regardless of the size of the space above', function () { + const {dp, picker} = createDP(input, {orientation: 'top'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + wrapper.style.paddingTop = '0'; + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + wrapper.setAttribute('dir', 'rtl'); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.destroy(); + }); + + it('"bottom" makes the picker show on bottom of the input regardless of the size of the space below', function () { + wrapper.style.paddingTop = '0'; + + const {dp, picker} = createDP(input, {orientation: 'bottom'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + Object.assign(wrapper.style, {top: 'auto', bottom: '0'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + wrapper.setAttribute('dir', 'rtl'); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.destroy(); + }); + + it('"left" makes the picker show on left of the input regardless of the direction of the input', function () { + const {dp, picker} = createDP(input, {orientation: 'left'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + wrapper.setAttribute('dir', 'rtl'); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.destroy(); + }); + + it('"right" makes the picker show on right of the input regardless of the direction of the input', function () { + const {dp, picker} = createDP(input, {orientation: 'right'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.hide(); + wrapper.setAttribute('dir', 'rtl'); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.destroy(); + }); + + it('"top left" makes the picker always show on top left of the input', function () { + wrapper.style.paddingTop = '0'; + + const {dp, picker} = createDP(input, {orientation: 'top left'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + Object.assign(wrapper.style, {top: 'auto', bottom: '0'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + wrapper.setAttribute('dir', 'rtl'); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + Object.assign(wrapper.style, {top: '0', bottom: ''}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.destroy(); + }); + + it('"top right" makes the picker always show on top right of the input', function () { + wrapper.style.paddingTop = '0'; + + const {dp, picker} = createDP(input, {orientation: 'top right'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.hide(); + Object.assign(wrapper.style, {top: 'auto', bottom: '0'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.hide(); + wrapper.setAttribute('dir', 'rtl'); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.hide(); + Object.assign(wrapper.style, {top: '0', bottom: ''}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.destroy(); + }); + + it('"bottom left" makes the picker always show on bottom left of the input', function () { + wrapper.style.paddingTop = '0'; + + const {dp, picker} = createDP(input, {orientation: 'bottom left'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + Object.assign(wrapper.style, {top: 'auto', bottom: '0'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + wrapper.setAttribute('dir', 'rtl'); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + Object.assign(wrapper.style, {top: '0', bottom: ''}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.destroy(); + }); + + it('"bottom right" makes the picker always show on bottom right of the input', function () { + wrapper.style.paddingTop = '0'; + + const {dp, picker} = createDP(input, {orientation: 'bottom right'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.hide(); + Object.assign(wrapper.style, {top: 'auto', bottom: '0'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.hide(); + wrapper.setAttribute('dir', 'rtl'); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.hide(); + Object.assign(wrapper.style, {top: '0', bottom: ''}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + dp.setOptions({orientation: 'right bottom'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.hide(); + dp.setOptions({orientation: 'bottom auto'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + dp.setOptions({orientation: 'auto right'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.hide(); + dp.setOptions({orientation: 'auto'}); + dp.show(); + + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.destroy(); + }); + + describe('with custom container', function () { + let foo; + + beforeEach(function () { + foo = parseHTML('
').firstChild; + Object.assign(foo.style, { + boxSizing: 'border-box', + position: 'fixed', + top: '20px', + left: '20px', + height: '360px', + overflow: 'auto', + }); + Object.assign(wrapper.style, {position: '', top: '', left: ''}); + testContainer.replaceChild(foo, wrapper); + foo.appendChild(wrapper); + }); + + it('makes the picker\'s position relative to the container', function () { + const {dp, picker} = createDP(input, {container: '#foo'}); + dp.show(); + + expect(getIntSize(picker.style.top), 'to be', input.offsetTop - picker.offsetHeight); + expect(getIntSize(picker.style.left), 'to be', input.offsetLeft); + expect(picker.classList.contains('datepicker-orient-top'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.hide(); + wrapper.style.paddingBottom = '200px'; + foo.scrollTop = 100; + dp.show(); + + expect(getIntSize(picker.style.top), 'to be', input.offsetTop + input.offsetHeight); + expect(getIntSize(picker.style.left), 'to be', input.offsetLeft); + expect(picker.classList.contains('datepicker-orient-bottom'), 'to be true'); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + foo.scrollTop = 0; + wrapper.style.paddingBottom = ''; + dp.destroy(); + }); + + it('"auto" makes the picker move to 10px from container\'s left if picker\'s left < container\'s', function () { + const {dp, picker} = createDP(input, {container: '#foo'}); + wrapper.style.marginLeft = '-40px'; + dp.show(); + + expect(getIntSize(picker.style.left), 'to be', 10); + expect(picker.classList.contains('datepicker-orient-left'), 'to be true'); + + dp.destroy(); + }); + + it('"auto" makes the picker show on right if picker\'s right edge < container\'s', function () { + const {dp, picker} = createDP(input, {container: '#foo'}); + wrapper.style.width = '150px'; + dp.show(); + + expect(getIntSize(picker.style.left), 'to be', input.offsetLeft + input.offsetWidth - picker.offsetWidth); + expect(picker.classList.contains('datepicker-orient-right'), 'to be true'); + + dp.destroy(); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/options/pick-levle+view.js b/node_modules/flowbite-datepicker/test/options/pick-levle+view.js new file mode 100644 index 0000000..cf035a8 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/options/pick-levle+view.js @@ -0,0 +1,357 @@ +describe('options - pick level & view', function () { + let clock; + let input; + + beforeEach(function () { + clock = sinon.useFakeTimers({now: new Date(2020, 1, 14)}); + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + afterEach(function () { + testContainer.removeChild(input); + clock.restore(); + }); + + describe('pickLevel', function () { + it('limits the minimum of available views', function () { + const {dp, picker} = createDP(input, {pickLevel: 2}); + const viewSwitch = getViewSwitch(picker); + const cells1 = getCells(picker)[1]; + dp.show(); + + expect(viewSwitch.textContent, 'to be', '2020-2029'); + expect(cells1.textContent, 'to be', '2020'); + + cells1.click(); + + expect(viewSwitch.textContent, 'to be', '2020-2029'); + expect(getCells(picker)[1].textContent, 'to be', '2020'); + + dp.destroy(); + }); + + it('changes the selection level to month when 1', function () { + input.value = '2/14/2020'; + + const {dp, picker} = createDP(input, {pickLevel: 1}); + const [viewSwitch, nextBtn] = getParts(picker, ['.view-switch', '.next-btn']); + let cells = getCells(picker); + dp.show(); + + expect(dp.dates, 'to equal', [dateValue(2020, 1, 1)]); + expect(input.value, 'to be', '02/01/2020'); + expect(viewSwitch.textContent, 'to be', '2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[1]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + // mouse operation + cells[0].click(); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2020, 0, 1)]); + expect(input.value, 'to be', '01/01/2020'); + expect(viewSwitch.textContent, 'to be', '2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[0]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[0]]); + + nextBtn.click(); + getCells(picker)[7].click(); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2021, 7, 1)]); + expect(input.value, 'to be', '08/01/2021'); + expect(viewSwitch.textContent, 'to be', '2021'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[7]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[7]]); + + // keyboard operation + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + simulant.fire(input, 'keydown', {key: 'Enter'}); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2020, 6, 1)]); + expect(input.value, 'to be', '07/01/2020'); + expect(viewSwitch.textContent, 'to be', '2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[6]]); + + dp.enterEditMode(); + input.value = '4/20/2021'; + simulant.fire(input, 'keydown', {key: 'Enter'}); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2021, 3, 1)]); + expect(input.value, 'to be', '04/01/2021'); + expect(viewSwitch.textContent, 'to be', '2021'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[3]]); + + // api call + viewSwitch.click(); + + dp.setDate('2/14/2022'); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2022, 1, 1)]); + expect(input.value, 'to be', '02/01/2022'); + expect(viewSwitch.textContent, 'to be', '2022'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[1]]); + + viewSwitch.click(); + dp.hide(); + + input.value = '3/14/2020'; + dp.update(); + dp.show(); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2020, 2, 1)]); + expect(input.value, 'to be', '03/01/2020'); + expect(viewSwitch.textContent, 'to be', '2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[2]]); + + dp.destroy(); + }); + + it('changes the selection level to year when 2', function () { + input.value = '2/14/2020'; + + const {dp, picker} = createDP(input, {pickLevel: 2}); + const [viewSwitch, nextBtn] = getParts(picker, ['.view-switch', '.next-btn']); + let cells = getCells(picker); + dp.show(); + + expect(dp.dates, 'to equal', [dateValue(2020, 0, 1)]); + expect(input.value, 'to be', '01/01/2020'); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[1]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + + // mouse operation + cells[2].click(); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2021, 0, 1)]); + expect(input.value, 'to be', '01/01/2021'); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[2]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[2]]); + + nextBtn.click(); + getCells(picker)[7].click(); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2036, 0, 1)]); + expect(input.value, 'to be', '01/01/2036'); + expect(viewSwitch.textContent, 'to be', '2030-2039'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[7]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[7]]); + + // keyboard operation + simulant.fire(input, 'keydown', {key: 'ArrowLeft', ctrlKey: true}); + simulant.fire(input, 'keydown', {key: 'ArrowLeft'}); + simulant.fire(input, 'keydown', {key: 'Enter'}); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2025, 0, 1)]); + expect(input.value, 'to be', '01/01/2025'); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[6]]); + + dp.enterEditMode(); + input.value = '4/20/2021'; + simulant.fire(input, 'keydown', {key: 'Enter'}); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2021, 0, 1)]); + expect(input.value, 'to be', '01/01/2021'); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[2]]); + + // api call + viewSwitch.click(); + + dp.setDate('2/14/2032'); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2032, 0, 1)]); + expect(input.value, 'to be', '01/01/2032'); + expect(viewSwitch.textContent, 'to be', '2030-2039'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[3]]); + + viewSwitch.click(); + dp.hide(); + + input.value = '3/14/2020'; + dp.update(); + dp.show(); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2020, 0, 1)]); + expect(input.value, 'to be', '01/01/2020'); + expect(viewSwitch.textContent, 'to be', '2020-2029'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[1]]); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + dp.setOptions({pickLevel: 1}); + dp.show(); + + let cells = getCells(picker); + expect(viewSwitch.textContent, 'to be', '2020'); + expect(cells[1].textContent, 'to be', 'Feb'); + + cells[1].click(); + + cells = getCells(picker); + expect(dp.dates, 'to equal', [dateValue(2020, 1, 1)]); + expect(input.value, 'to be', '02/01/2020'); + expect(viewSwitch.textContent, 'to be', '2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[0]]); + + dp.setOptions({pickLevel: 0}); + + cells = getCells(picker); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + expect(filterCells(cells, '.selected'), 'to equal', [cells[6]]); + expect(filterCells(cells, '.focused'), 'to equal', [cells[6]]); + + viewSwitch.click(); + getCells(picker)[3].click(); + + cells = getCells(picker); + expect(viewSwitch.textContent, 'to be', 'April 2020'); + expect(filterCells(cells, '.selected'), 'to equal', []); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + + dp.destroy(); + }); + }); + + describe('maxView', function () { + it('limits the maximum of available views', function () { + const {dp, picker} = createDP(input, {maxView: 1}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + + viewSwitch.click(); + viewSwitch.click(); + + expect(viewSwitch.textContent, 'to be', '2020'); + expect(getCells(picker)[0].textContent, 'to be', 'Jan'); + + dp.destroy(); + }); + + it('cannot be smaller than pickLevel', function () { + const {dp, picker} = createDP(input, {maxView: 1, pickLevel: 2}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + + expect(viewSwitch.textContent, 'to be', '2020-2029'); + expect(getCells(picker)[1].textContent, 'to be', '2020'); + + viewSwitch.click(); + + expect(viewSwitch.textContent, 'to be', '2020-2029'); + expect(getCells(picker)[1].textContent, 'to be', '2020'); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + dp.setOptions({maxView: 2}); + dp.show(); + + viewSwitch.click(); + viewSwitch.click(); + viewSwitch.click(); + + expect(viewSwitch.textContent, 'to be', '2020-2029'); + expect(getCells(picker)[1].textContent, 'to be', '2020'); + + dp.setOptions({maxView: 0}); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + viewSwitch.click(); + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + dp.destroy(); + }); + }); + + describe('startView', function () { + it('specifies the view desplayed on open', function () { + const {dp, picker} = createDP(input, {startView: 3}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + + expect(viewSwitch.textContent, 'to be', '2000-2090'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[3]]); + expect(cells[3].textContent, 'to be', '2020'); + + dp.destroy(); + }); + + it('cannot be smaller than pickLevel', function () { + const {dp, picker} = createDP(input, {startView: 1, pickLevel: 2}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2020'); + + dp.destroy(); + }); + + it('cannot be larger than maxView', function () { + const {dp, picker} = createDP(input, {startView: 3, maxView: 2}); + const viewSwitch = getViewSwitch(picker); + dp.show(); + + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2020'); + + dp.destroy(); + }); + + it('can be updated with setOptions()', function () { + const {dp, picker} = createDP(input); + const viewSwitch = getViewSwitch(picker); + dp.setOptions({startView: 2}); + dp.show(); + + expect(viewSwitch.textContent, 'to be', '2020-2029'); + + let cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[1]]); + expect(cells[1].textContent, 'to be', '2020'); + + dp.hide(); + dp.setOptions({startView: 0}); + dp.show(); + + expect(viewSwitch.textContent, 'to be', 'February 2020'); + + cells = getCells(picker); + expect(filterCells(cells, '.focused'), 'to equal', [cells[19]]); + expect(cells[19].textContent, 'to be', '14'); + + dp.destroy(); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/test.html b/node_modules/flowbite-datepicker/test/test.html new file mode 100644 index 0000000..e7aa99a --- /dev/null +++ b/node_modules/flowbite-datepicker/test/test.html @@ -0,0 +1,94 @@ + + + + + Mocha Tests + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/node_modules/flowbite-datepicker/test/unit/DateRangePicker.js b/node_modules/flowbite-datepicker/test/unit/DateRangePicker.js new file mode 100644 index 0000000..cd798f3 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/unit/DateRangePicker.js @@ -0,0 +1,192 @@ +import './_setup.js'; +import DateRangePicker from '../../js/DateRangePicker.js'; +import {parseHTML} from '../../js/lib/dom.js'; +// to spy constructor with sinon, import entire module +// @see: https://github.com/sinonjs/sinon/issues/1358#issuecomment-391643741 +import * as DP from '../../js/Datepicker.js'; +const Datepicker = DP.default; + +describe('DateRangePicker', function () { + let elem; + let input0; + let input1; + + beforeEach(function () { + elem = parseHTML('
').firstChild; + [input0, input1] = elem.children; + testContainer.appendChild(elem); + }); + + afterEach(function () { + document.querySelectorAll('.datepicker').forEach((el) => { + el.parentElement.removeChild(el); + }); + delete input0.datepicker; + delete input1.datepicker; + delete elem.rangepicker; + testContainer.removeChild(elem); + }); + + describe('constructor', function () { + it('attachs the created instance to the bound element', function () { + const drp = new DateRangePicker(elem); + expect(elem.rangepicker, 'to be', drp); + }); + + it('configures the instance with the default values', function () { + let drp = new DateRangePicker(elem); + expect(drp.allowOneSidedRange, 'to be false'); + }); + + it('creates datepicker for the inputs passing rangepicker and given options expect', function () { + const spyDPConstructor = sinon.spy(DP, 'default'); + + let drp = new DateRangePicker(elem); + expect(spyDPConstructor.args, 'to equal', [ + [input0, {}, drp], + [input1, {}, drp], + ]); + expect(input0.datepicker, 'to be a', Datepicker); + expect(input1.datepicker, 'to be a', Datepicker); + expect([input0.datepicker, input1.datepicker], 'to equal', drp.datepickers); + + spyDPConstructor.resetHistory(); + delete input0.datepicker; + delete input1.datepicker; + delete elem.rangepicker; + + const fakeOptions = {foo: 123, bar: 456}; + drp = new DateRangePicker(elem, fakeOptions); + expect(spyDPConstructor.args, 'to equal', [ + [input0, fakeOptions, drp], + [input1, fakeOptions, drp], + ]); + + spyDPConstructor.restore(); + }); + + it('makes datepickers property read-only/immutable', function () { + const drp = new DateRangePicker(elem); + + expect(() => { drp.datepickers = []; }, 'to throw a', TypeError); + expect(() => { drp.datepickers[0] = null; }, 'to throw a', TypeError); + expect(() => { drp.datepickers[2] = {}; }, 'to throw a', TypeError); + }); + + it('excludes inputs, allowOneSidedRange and maxNumberOfDates from options to pass Datepicker container', function () { + const spyDPConstructor = sinon.spy(DP, 'default'); + new DateRangePicker(elem, { + inputs: [input0, input1], + allowOneSidedRange: false, + maxNumberOfDates: 2, + foo: 123, + }); + + expect(spyDPConstructor.args[0][1], 'to equal', {foo: 123}); + + spyDPConstructor.restore(); + }); + + it('works with arbitrary input elements if they are provided in the inputs option', function () { + const outsideEl = document.createElement('div'); + const drp = new DateRangePicker(outsideEl, {inputs: [input0, input1]}); + + expect(outsideEl.rangepicker, 'to be', drp); + expect(input0.datepicker.rangepicker, 'to be', drp); + expect(input1.datepicker.rangepicker, 'to be', drp); + expect([input0.datepicker, input1.datepicker], 'to equal', drp.datepickers); + }); + + it('append datepicker elements to the container)', function () { + new DateRangePicker(elem); + + const dpElems = Array.from(document.body.children).filter(el => el.matches('.datepicker')); + expect(dpElems, 'to have length', 2); + }); + + it('does not add the active class to the picker elements', function () { + new DateRangePicker(elem); + + const dpElems = Array.from(document.querySelectorAll('.datepicker')); + expect(dpElems.filter(el => el.classList.contains('active')), 'to be empty'); + }); + + it('does nothing but creating an instance if number of inputs < 2', function () { + elem.removeChild(input1); + + let drp = new DateRangePicker(elem); + expect(elem, 'not to have property', 'rangepicker'); + expect(drp, 'not to have properties', ['inputs', 'datepickers']); + expect(input0, 'not to have property', 'datepicker'); + expect(document.querySelectorAll('.datepicker').length, 'to be', 0); + + const outsideEl = document.createElement('div'); + drp = new DateRangePicker(outsideEl, {inputs: [input0]}); + expect(outsideEl, 'not to have property', 'rangepicker'); + expect(input0, 'not to have property', 'datepicker'); + expect(document.querySelectorAll('.datepicker').length, 'to be', 0); + }); + }); + + describe('destroy()', function () { + let drp; + let spyDestroy0; + let spyDestroy1; + + beforeEach(function () { + drp = new DateRangePicker(elem); + spyDestroy0 = sinon.spy(input0.datepicker, 'destroy'); + spyDestroy1 = sinon.spy(input1.datepicker, 'destroy'); + }); + + afterEach(function () { + spyDestroy0.restore(); + spyDestroy1.restore(); + }); + + it('calls destroy() of each datepickers', function () { + drp.destroy(); + expect(spyDestroy0.called, 'to be true'); + expect(spyDestroy1.called, 'to be true'); + }); + + it('removes the instance from the bound element', function () { + drp.destroy(); + expect(Object.prototype.hasOwnProperty.call(elem, 'rangepicker'), 'to be false'); + }); + }); + + describe('dates property', function () { + it('contains the array of the inputs\' selected dates', function () { + const drp = new DateRangePicker(elem); + expect(drp.dates, 'to equal', [undefined, undefined]); + + const date0 = new Date(2020, 3, 20).setHours(0, 0, 0, 0); + const date1 = new Date(2020, 3, 22).setHours(0, 0, 0, 0); + drp.datepickers[0].dates = [date0]; + drp.datepickers[1].dates = [date1]; + expect(drp.dates, 'to equal', [date0, date1]); + }); + }); + + describe('setOptions()', function () { + it('updates allowOneSidedRange but ignores inputs if they are in the given options', function () { + const input2 = document.createElement('input'); + const drp = new DateRangePicker(elem); + + drp.setOptions({allowOneSidedRange: true, inputs: [input2, input0]}); + expect(drp.allowOneSidedRange, 'to be true'); + expect(drp.inputs, 'to equal', [input0, input1]); + }); + + it('calls each datepicker\'s setOptions() with given options except inputs, allowOneSidedRange and maxNumberOfDates', function () { + const drp = new DateRangePicker(elem); + const stubDP0SetOptions = sinon.stub(drp.datepickers[0], 'setOptions').callsFake(() => {}); + const stubDP1SetOptions = sinon.stub(drp.datepickers[1], 'setOptions').callsFake(() => {}); + + drp.setOptions({inputs: [], allowOneSidedRange: true, maxNumberOfDates: 2, foo: 123, bar: 456}); + expect(stubDP0SetOptions.args, 'to equal', [[{foo: 123, bar: 456}]]); + expect(stubDP1SetOptions.args, 'to equal', [[{foo: 123, bar: 456}]]); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/unit/Datepicker.js b/node_modules/flowbite-datepicker/test/unit/Datepicker.js new file mode 100644 index 0000000..023f7e4 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/unit/Datepicker.js @@ -0,0 +1,307 @@ +import './_setup.js'; +import Datepicker from '../../js/Datepicker.js'; +import defaultOptions from '../../js/options/defaultOptions.js'; +import {locales} from '../../js/i18n/base-locales.js'; +import {dateValue, today} from '../../js/lib/date.js'; + +const esLocale = { + months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], + monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], +}; + +describe('Datepicker', function () { + it('has locales attribute with "en" locale', function () { + expect(Datepicker.locales, 'to be an object'); + expect(Datepicker.locales.en, 'to equal', locales.en); + }); + + describe('constructor', function () { + let input; + + beforeEach(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + }); + + after(function () { + document.querySelectorAll('.datepicker').forEach((el) => { + el.parentElement.removeChild(el); + }); + delete input.datepicker; + testContainer.removeChild(input); + }); + + it('attachs the created instance to the bound element', function () { + const dp = new Datepicker(input); + expect(input.datepicker, 'to be', dp); + }); + + it('adds datepicker-input class to the bound element', function () { + new Datepicker(input); + expect(input.classList.contains('datepicker-input'), 'to be true'); + }); + + it('configures the instance with the default options', function () { + const dp = new Datepicker(input); + // config items should be options + container, locale, multidate and weekEnd + const numOfOptions = Object.keys(defaultOptions).length; + expect(Object.keys(dp.config), 'to have length', numOfOptions + 5); + + expect(dp.config.autohide, 'to be false'); + expect(dp.config.beforeShowDay, 'to be null'); + expect(dp.config.beforeShowDecade, 'to be null'); + expect(dp.config.beforeShowMonth, 'to be null'); + expect(dp.config.beforeShowYear, 'to be null'); + expect(dp.config.buttonClass, 'to be', 'button'); + expect(dp.config.calendarWeeks, 'to be false'); + expect(dp.config.clearBtn, 'to be false'); + expect(dp.config.container, 'to be', document.body); + expect(dp.config.dateDelimiter, 'to be', ','); + expect(dp.config.datesDisabled, 'to equal', []); + expect(dp.config.daysOfWeekDisabled, 'to equal', []); + expect(dp.config.daysOfWeekHighlighted, 'to equal', []); + expect(dp.config.defaultViewDate, 'to be', today()); + expect(dp.config.disableTouchKeyboard, 'to be false'); + expect(dp.config.format, 'to be', 'mm/dd/yyyy'); + expect(dp.config.language, 'to be', 'en'); + expect(dp.config.locale, 'to equal', Object.assign({ + format: defaultOptions.format, + weekStart: defaultOptions.weekStart, + }, locales.en)); + expect(dp.config.maxDate, 'to be undefined'); + expect(dp.config.maxNumberOfDates, 'to be', 1); + expect(dp.config.maxView, 'to be', 3); + expect(dp.config.minDate, 'to be', dateValue(0, 0, 1)); + expect(dp.config.multidate, 'to be false'); + // + expect(dp.config.nextArrow, 'to be a', NodeList); + expect(dp.config.nextArrow.length, 'to be', 1); + expect(dp.config.nextArrow[0].wholeText, 'to be', '»'); + // + expect(dp.config.orientation, 'to equal', {x: 'auto', y: 'auto'}); + expect(dp.config.pickLevel, 'to be', 0); + // + expect(dp.config.prevArrow, 'to be a', NodeList); + expect(dp.config.prevArrow.length, 'to be', 1); + expect(dp.config.prevArrow[0].wholeText, 'to be', '«'); + // + expect(dp.config.showDaysOfWeek, 'to be true'); + expect(dp.config.showOnFocus, 'to be true'); + expect(dp.config.startView, 'to be', 0); + expect(dp.config.title, 'to be', ''); + expect(dp.config.todayBtn, 'to be false'); + expect(dp.config.todayHighlight, 'to be false'); + expect(dp.config.updateOnBlur, 'to be true'); + expect(dp.config.weekStart, 'to be', 0); + expect(dp.config.weekEnd, 'to be', 6); + }); + + it('append datepicker element to the container)', function () { + new Datepicker(input); + + const dpElem = Array.from(document.body.children).find(el => el.matches('.datepicker')); + expect(dpElem, 'not to be undefined'); + }); + + it('does not add the active class to the picker element', function () { + new Datepicker(input); + + const dpElem = document.querySelector('.datepicker'); + expect(dpElem.classList.contains('active'), 'to be false'); + }); + + it('sets rangepicker properties if DateRangePicker to link is passed', function () { + const fakeRangepicker = { + inputs: [input], + datepickers: [], + }; + const dp = new Datepicker(input, {}, fakeRangepicker); + + expect(dp.rangepicker, 'to be', fakeRangepicker); + }); + + it('adds itself to rangepicker.datepickers if DateRangePicker to link is passed', function () { + let fakeRangepicker = { + inputs: [input], + datepickers: [], + }; + let dp = new Datepicker(input, {}, fakeRangepicker); + + expect(fakeRangepicker.datepickers[0], 'to be', dp); + + fakeRangepicker = { + inputs: [undefined, input], + datepickers: [], + }; + dp = new Datepicker(input, {}, fakeRangepicker); + + expect(fakeRangepicker.datepickers[1], 'to be', dp); + }); + + it('throws an error if invalid rangepicker is passed', function () { + const testFn = rangepicker => new Datepicker(input, {}, rangepicker); + const errMsg = 'Invalid rangepicker object.'; + + let fakeRangepicker = { + inputs: [], + datepickers: [], + }; + expect(() => testFn(fakeRangepicker), 'to throw', errMsg); + + fakeRangepicker = { + inputs: ['foo', 'bar', input], + datepickers: [], + }; + expect(() => testFn(fakeRangepicker), 'to throw', errMsg); + + fakeRangepicker = { + inputs: [input], + }; + expect(() => testFn(fakeRangepicker), 'to throw', errMsg); + }); + }); + + describe('destroy()', function () { + let input; + let dp; + let spyHide; + let returnVal; + + before(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + dp = new Datepicker(input); + spyHide = sinon.spy(dp, 'hide'); + + returnVal = dp.destroy(); + }); + + after(function () { + spyHide.restore(); + document.querySelectorAll('.datepicker').forEach((el) => { + el.parentElement.removeChild(el); + }); + delete input.datepicker; + testContainer.removeChild(input); + }); + + it('calls hide()', function () { + expect(spyHide.called, 'to be true'); + }); + + it('removes datepicker element from its container', function () { + expect(document.body.querySelectorAll('.datepicker').length, 'to be', 0); + }); + + it('removes the instance from the bound element', function () { + expect(Object.prototype.hasOwnProperty.call(input, 'datepicker'), 'to be false'); + }); + + it('removes datepicker-input class from the bound element', function () { + expect(input.classList.contains('datepicker-input'), 'to be false'); + }); + + it('returns the instance', function () { + expect(returnVal, 'to be', dp); + }); + }); + + describe('show()', function () { + let input; + let dp; + let dpElem; + + before(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + dp = new Datepicker(input); + dpElem = document.querySelector('.datepicker'); + dp.show(); + }); + + after(function () { + dp.destroy(); + testContainer.removeChild(input); + }); + + it('adds the "active" class to the datepicker element', function () { + expect(dpElem.classList.contains('active'), 'to be true'); + }); + + it('sets true to the picker.active property', function () { + expect(dp.picker.active, 'to be true'); + }); + }); + + describe('hide()', function () { + let input; + let dp; + let dpElem; + + before(function () { + input = document.createElement('input'); + testContainer.appendChild(input); + dp = new Datepicker(input); + dpElem = document.querySelector('.datepicker'); + dp.picker.active = true; + dpElem.classList.add('active', 'block'); + + dp.hide(); + }); + + after(function () { + dp.destroy(); + testContainer.removeChild(input); + }); + + it('removes the "active" class from the datepicker element', function () { + expect(dpElem.classList.contains('active'), 'to be false'); + }); + + it('deletes the "picker.active" property', function () { + expect(dp.picker, 'to have property', 'active'); + }); + }); + + describe('static formatDate()', function () { + it('formats a date or time value', function () { + Datepicker.locales.es = esLocale; + + let date = new Date(2020, 0, 4); + expect(Datepicker.formatDate(date, 'y-m-d'), 'to be', '2020-1-4'); + expect(Datepicker.formatDate(date.getTime(), 'dd M yy'), 'to be', '04 Jan 20'); + expect(Datepicker.formatDate(date, 'dd M yy', 'es'), 'to be', '04 Ene 20'); + expect(Datepicker.formatDate(date.getTime(), 'MM d, y', 'es'), 'to be', 'Enero 4, 2020'); + + delete Datepicker.locales.es; + + // fallback to en + expect(Datepicker.formatDate(date, 'dd M yy', 'es'), 'to be', '04 Jan 20'); + expect(Datepicker.formatDate(date.getTime(), 'MM d, y', 'es'), 'to be', 'January 4, 2020'); + }); + }); + + describe('static parseDate()', function () { + it('parses a date string and returnes the time value of the date', function () { + Datepicker.locales.es = esLocale; + + let timeValue = new Date(2020, 0, 4).getTime(); + expect(Datepicker.parseDate('2020-1-4', 'y-m-d'), 'to be', timeValue); + expect(Datepicker.parseDate('04 Jan 2020', 'dd M yy'), 'to be', timeValue); + expect(Datepicker.parseDate('04 Ene 2020', 'dd M yy', 'es'), 'to be', timeValue); + expect(Datepicker.parseDate('Enero 4, 2020', 'MM d, y', 'es'), 'to be', timeValue); + + expect(Datepicker.parseDate('04/20/2022', 'mm/dd/yyyy'), 'to equal', new Date(2022, 3, 20).getTime()); + expect(Datepicker.parseDate('5/3/1994', 'd/m/y'), 'to equal', new Date(1994, 2, 5).getTime()); + + delete Datepicker.locales.es; + + // fallback to en + const fallbackDate = new Date(timeValue).setMonth(new Date().getMonth()); + expect(Datepicker.parseDate('04 Ene 2020', 'dd M yy', 'es'), 'to be', fallbackDate); + expect(Datepicker.parseDate('Enero 4, 2020', 'MM d, y', 'es'), 'to be', fallbackDate); + expect(Datepicker.parseDate('04 Jan 2020', 'dd M yy', 'es'), 'to be', timeValue); + expect(Datepicker.parseDate('2020-1-4', 'y-m-d', 'es'), 'to be', timeValue); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/unit/_setup.js b/node_modules/flowbite-datepicker/test/unit/_setup.js new file mode 100644 index 0000000..9d95af2 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/unit/_setup.js @@ -0,0 +1,28 @@ +global.expect = require('unexpected'); +global.sinon = require('sinon'); + +const jsdom = require('jsdom'); +const {JSDOM} = jsdom; +const {window} = new JSDOM('
', { + pretendToBeVisual: true +}); +const document = window.document; + +global.JSDOM = JSDOM; +global.window = window; +global.testContainer = document.getElementById('test-container'); + +const exposeToGlobal = [ + 'document', + 'CustomEvent', + 'DocumentFragment', + 'Event', + 'EventTarget', + 'NodeList', + 'Range', +]; +exposeToGlobal.forEach((prop) => { + global[prop] = window[prop]; +}); + +global.simulant = require('simulant'); diff --git a/node_modules/flowbite-datepicker/test/unit/lib/date-format.js b/node_modules/flowbite-datepicker/test/unit/lib/date-format.js new file mode 100644 index 0000000..ea0f079 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/unit/lib/date-format.js @@ -0,0 +1,310 @@ +import '../_setup.js'; +import {parseDate, formatDate} from '../../../js/lib/date-format.js'; + +describe('lib/date', function () { + const locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM yyyy" + }, + de: { + days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], + daysShort: ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam"], + months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], + monthsShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], + }, + es: { + days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"], + daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], + months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], + monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], + }, + fr: { + days: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], + daysShort: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."], + daysMin: ["d", "l", "ma", "me", "j", "v", "s"], + months: ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], + monthsShort: ["janv.", "févr.", "mars", "avril", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."], + } + }; + + describe('parseDate()', function () { + const today = new Date().setHours(0, 0, 0, 0); + const thisYear = new Date().getFullYear(); + + it('return undefined if the given date is falsy value other than 0 or invalid date', function () { + expect(parseDate(), 'to be undefined'); + expect(parseDate(''), 'to be undefined'); + expect(parseDate(new Date('')), 'to be undefined'); + expect(parseDate(0), 'not to be undefined'); + }); + + it('returns time value of the same day\'s 00:00:00 local time if the given date is a Date object or time value', function () { + const origDate = new Date().setHours(0, 0, 0, 0); + + expect(parseDate(new Date()), 'to be', origDate); + expect(parseDate(Date.now()), 'to be', origDate); + }); + + it('invokes custom parse fucntion and returns the result if it\'s given to format.toValue', function () { + const date = new Date(); + const format = {toValue: sinon.stub()}; + format.toValue.returns(date); + + expect(parseDate('2020-01-01', format, locales.en), 'to be', date.setHours(0, 0, 0, 0)); + expect(format.toValue.calledWith('2020-01-01', format, locales.en), 'to be true'); + }); + + it('returns the date that the word means if given date is "today"', function () { + expect(parseDate('today'), 'to be', today); + }); + + it('uses format: "d" or "dd" as day of month to parse date string', function () { + expect(parseDate('2012-03-5', 'yyyy-mm-d'), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('2012-03-15', 'yyyy-mm-d'), 'to be', new Date(2012, 2, 15).getTime()); + expect(parseDate('2012-03-05', 'yyyy-mm-d'), 'to be', new Date(2012, 2, 5).getTime()); + + expect(parseDate('2012-03-5', 'yyyy-mm-dd'), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('2012-03-15', 'yyyy-mm-dd'), 'to be', new Date(2012, 2, 15).getTime()); + expect(parseDate('2012-03-05', 'yyyy-mm-dd'), 'to be', new Date(2012, 2, 5).getTime()); + + expect(parseDate('5/03/2012', 'dd/mm/yyyy'), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('15/03/2012', 'd/mm/yyyy'), 'to be', new Date(2012, 2, 15).getTime()); + }); + + it('accepts 0 and number larger than the end of the month for "d", "dd"', function () { + expect(parseDate('2012-03-0', 'yyyy-mm-d'), 'to be', new Date(2012, 1, 29).getTime()); + expect(parseDate('2012-03-33', 'yyyy-mm-d'), 'to be', new Date(2012, 3, 2).getTime()); + expect(parseDate('2013-02-60', 'yyyy-mm-d'), 'to be', new Date(2013, 3, 1).getTime()); + }); + + it('uses format: "m", "mm", "M" or "MM" as month to parse date string', function () { + const fakeToday = new Date(thisYear, 2, 31); + const clock = sinon.useFakeTimers({now: fakeToday}); + + // month number + expect(parseDate('2012-3-5', 'yyyy-m-d'), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('2012-12-15', 'yyyy-m-d'), 'to be', new Date(2012, 11, 15).getTime()); + expect(parseDate('2012-03-05', 'yyyy-m-d'), 'to be', new Date(2012, 2, 5).getTime()); + + expect(parseDate('2012-3-5', 'yyyy-mm-dd'), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('2012-12-15', 'yyyy-mm-dd'), 'to be', new Date(2012, 11, 15).getTime()); + expect(parseDate('2012-03-05', 'yyyy-mm-dd'), 'to be', new Date(2012, 2, 5).getTime()); + + expect(parseDate('5/3/2012', 'dd/mm/yyyy'), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('15/12/2012', 'd/m/yyyy'), 'to be', new Date(2012, 11, 15).getTime()); + + // ensure setting a month w/ < 31days on the 31 of a month works correctly + expect(parseDate('2012-02-28', 'yyyy-mm-dd'), 'to be', new Date(2012, 1, 28).getTime()); + expect(parseDate('2012-09-15', 'yyyy-mm-dd'), 'to be', new Date(2012, 8, 15).getTime()); + + // month name + expect(parseDate('Mar 5, 2012', 'M d, yyyy', locales.en), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('Dec 15, 2012', 'M d, yyyy', locales.en), 'to be', new Date(2012, 11, 15).getTime()); + + expect(parseDate('Mär 5, 2012', 'M d, yyyy', locales.de), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('Dez 15, 2012', 'M d, yyyy', locales.de), 'to be', new Date(2012, 11, 15).getTime()); + + expect(parseDate('mars 5, 2012', 'M d, yyyy', locales.fr), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('déc. 15, 2012', 'M d, yyyy', locales.fr), 'to be', new Date(2012, 11, 15).getTime()); + + expect(parseDate('March 5, 2012', 'MM d, yyyy', locales.en), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('December 15, 2012', 'MM d, yyyy', locales.en), 'to be', new Date(2012, 11, 15).getTime()); + + expect(parseDate('März 5, 2012', 'MM d, yyyy', locales.de), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('Dezember 15, 2012', 'MM d, yyyy', locales.de), 'to be', new Date(2012, 11, 15).getTime()); + + expect(parseDate('mars 5, 2012', 'MM d, yyyy', locales.fr), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('décembre 15, 2012', 'MM d, yyyy', locales.fr), 'to be', new Date(2012, 11, 15).getTime()); + + // month number for "M" and "MM" + expect(parseDate('3/5/2012', 'M/dd/yyyy', locales.en), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('12/15/2012', 'MM/dd/yyyy', locales.en), 'to be', new Date(2012, 11, 15).getTime()); + + // month name for "m" and "mm" + expect(parseDate('Mar/5/2012', 'm/d/yyyy', locales.en), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('December/15/2012', 'mm/dd/yyyy', locales.en), 'to be', new Date(2012, 11, 15).getTime()); + + clock.restore(); + }); + + it('accepts 0 and number larger than 12 for "m", "mm"', function () { + const fakeToday = new Date(thisYear, 2, 31); + const clock = sinon.useFakeTimers({now: fakeToday}); + + expect(parseDate('2012-0-05', 'yyyy-m-dd'), 'to be', new Date(2011, 11, 5).getTime()); + expect(parseDate('2012-16-30', 'yyyy-m-d'), 'to be', new Date(2013, 3, 30).getTime()); + expect(parseDate('2012-32-30', 'yyyy-m-d'), 'to be', new Date(2014, 7, 30).getTime()); + + clock.restore(); + }); + + it('evaluates month name with case-insensible begin-with match', function () { + const fakeToday = new Date(thisYear, 2, 31); + const clock = sinon.useFakeTimers({now: fakeToday}); + + expect(parseDate('march 5, 2012', 'M d, yyyy', locales.en), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('DEC 15, 2012', 'MM d, yyyy', locales.en), 'to be', new Date(2012, 11, 15).getTime()); + + expect(parseDate('MA 5, 2012', 'MM d, yyyy', locales.en), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('j 5, 2012', 'MM d, yyyy', locales.en), 'to be', new Date(2012, 0, 5).getTime()); + expect(parseDate('ju 5, 2012', 'MM d, yyyy', locales.en), 'to be', new Date(2012, 5, 5).getTime()); + + expect(parseDate('march/5/2012', 'm/d/yyyy', locales.en), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('DEC/15/2012', 'mm/dd/yyyy', locales.en), 'to be', new Date(2012, 11, 15).getTime()); + + expect(parseDate('MA/05/2012', 'mm/dd/yyyy', locales.en), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('j/05/2012', 'mm/dd/yyyy', locales.en), 'to be', new Date(2012, 0, 5).getTime()); + expect(parseDate('ju/05/2012', 'mm/dd/yyyy', locales.en), 'to be', new Date(2012, 5, 5).getTime()); + + clock.restore(); + }); + + it('uses format: "y", "yy" or "yyyy" as year to parse date string', function () { + expect(parseDate('2012-3-5', 'y-m-d'), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('1984-3-15', 'y-m-d'), 'to be', new Date(1984, 2, 15).getTime()); + expect(parseDate('12-03-05', 'y-m-d'), 'to be', new Date(0, 2, 5).setFullYear(12)); + + expect(parseDate('2012-3-5', 'yy-m-d'), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('1984-3-15', 'yy-m-d'), 'to be', new Date(1984, 2, 15).getTime()); + expect(parseDate('12-03-05', 'yy-m-d'), 'to be', new Date(0, 2, 5).setFullYear(12)); + + expect(parseDate('2012-03-5', 'yyyy-mm-dd'), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('1984-03-15', 'yyyy-mm-dd'), 'to be', new Date(1984, 2, 15).getTime()); + expect(parseDate('12-03-05', 'yyyy-mm-dd'), 'to be', new Date(0, 2, 5).setFullYear(12)); + + expect(parseDate('5/03/2012', 'dd/mm/yyyy'), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('15/03/1984', 'd/m/yy'), 'to be', new Date(1984, 2, 15).getTime()); + }); + + it('ignores "D" and "DD" (day of week)', function () { + let date = parseDate('2012-03-05', 'yyyy-mm-dd-D'); + expect(date, 'to be', new Date(2012, 2, 5).getTime()); + + date = parseDate('Sat, Dec 15, 2012', 'DD, M dd, yyyy', locales.en); + expect(date, 'to be', new Date(2012, 11, 15).getTime()); + }); + + it('uses current date\'s year/month/day to complement undefined, missing or unparsable parts', function () { + const fakeToday = new Date(thisYear, 2, 31); + const clock = sinon.useFakeTimers({now: fakeToday}); + + expect(parseDate('03-05', 'mm-dd'), 'to be', new Date(thisYear, 2, 5).getTime()); + expect(parseDate('2012-06', 'yyyy-mm'), 'to be', new Date(2012, 5, 30).getTime()); + expect(parseDate('5, 2012', 'd, yyyy'), 'to be', new Date(2012, 2, 5).getTime()); + expect(parseDate('Mai/10', 'M/d', locales.en), 'to be', new Date(thisYear, 2, 10).getTime()); + expect(parseDate('Maya/10', 'M/d', locales.en), 'to be', new Date(thisYear, 2, 10).getTime()); + + expect(parseDate('03-05', 'yyyy-mm-dd'), 'to be', new Date(0, 4, 31).setFullYear(3)); + expect(parseDate('Sun, 23', 'DD, mm-dd'), 'to be', new Date(thisYear + 1, 10, 30).getTime()); + + expect(parseDate('Mar/05/12', 'yyyy/mm/dd', locales.en), 'to be', new Date(thisYear, 4, 12).getTime()); + expect(parseDate('05/Mar/12', 'yyyy/mm/dd', locales.en), 'to be', new Date(0, 2, 12).setFullYear(5)); + expect(parseDate('2012年十二月十五日', 'yyyy年mm月dd日', locales.en), 'to be', new Date(2012, 2, 31).getTime()); + + clock.restore(); + }); + + it('throws an Error if format is neither a valid format string nor an object w/ toValue property', function () { + expect(() => parseDate('01-01-01', {}), 'to throw error'); + expect(() => parseDate('01-01-01', 1), 'to throw error'); + expect(() => parseDate('01-01-01', 'aa-bb-cc'), 'to throw error'); + }); + }); + + describe('formatDate()', function () { + it('return empty string if the given date is falsy value other than 0 or invalid date', function () { + expect(formatDate(), 'to be', ''); + expect(formatDate(''), 'to be', ''); + expect(formatDate(new Date('')), 'to be', ''); + expect(formatDate(0, 'yyyy', locales.en), 'not to be', ''); + }); + + it('invokes custom format fucntion and returns the result if it\'s given to format.toDisplay', function () { + const date = new Date(2012, 2, 5); + const format = {toDisplay: sinon.stub()}; + format.toDisplay.returns('foo-bar'); + + expect(formatDate(date, format, locales.en), 'to be', 'foo-bar'); + expect(format.toDisplay.calledWith(date, format, locales.en), 'to be true'); + }); + + it('uses format: "d" as day of month, no leading zero to format date', function () { + expect(formatDate(new Date(2012, 2, 5), 'yyyy-mm-d', locales.en), 'to be', '2012-03-5'); + expect(formatDate(0, 'd', locales.en), 'to be', String(new Date(0).getDate())); + }); + + it('uses format: "dd" as day of month, leading zero to format date', function () { + const date = new Date(2012, 2, 5); + expect(formatDate(date, 'yyyy-mm-dd', locales.en), 'to be', '2012-03-05'); + expect(formatDate(date.getTime(), 'yyyy-mm-dd', locales.en), 'to be', '2012-03-05'); + }); + + it('uses format: "D" as short day of week in given language to format date', function () { + const date = new Date(2012, 2, 5); + expect(formatDate(date, 'yyyy-mm-dd-D', locales.en), 'to be', '2012-03-05-Mon'); + expect(formatDate(date, 'yyyy-mm-dd-D', locales.es), 'to be', '2012-03-05-Lun'); + }); + + it('uses format: "DD" as long day of week in given language to format date', function () { + const date = new Date(2012, 2, 5); + expect(formatDate(date, 'yyyy-mm-dd-DD', locales.en), 'to be', '2012-03-05-Monday'); + expect(formatDate(date, 'yyyy-mm-dd-DD', locales.es), 'to be', '2012-03-05-Lunes'); + }); + + it('uses format: "m" as Month, no leading zero. to format date', function () { + expect(formatDate(new Date(2012, 2, 5), 'yyyy-m-dd', locales.en), 'to be', '2012-3-05'); + }); + + it('uses format: "mm" as Month, leading zero. to format date', function () { + expect(formatDate(new Date(2012, 2, 5), 'yyyy-mm-dd', locales.en), 'to be', '2012-03-05'); + }); + + it('uses format: "M" as month shortname in given language to format date', function () { + const date = new Date(2012, 2, 5); + expect(formatDate(date, 'yyyy-M-dd', locales.en), 'to be', '2012-Mar-05'); + expect(formatDate(date, 'yyyy-M-dd', locales.de), 'to be', '2012-Mär-05'); + }); + + it('uses format: "MM" as month full name in given language to format date', function () { + const date = new Date(2012, 2, 5); + expect(formatDate(date, 'yyyy-MM-dd', locales.en), 'to be', '2012-March-05'); + expect(formatDate(date, 'yyyy-MM-dd', locales.de), 'to be', '2012-März-05'); + }); + + it('uses format: "y" as Year, no leading zero. to format date', function () { + expect(formatDate(new Date(0, 2, 5).setFullYear(2), 'y-m-d', locales.en), 'to be', '2-3-5'); + expect(formatDate(new Date(0, 2, 5).setFullYear(12), 'y-m-d', locales.en), 'to be', '12-3-5'); + expect(formatDate(new Date(2012, 2, 5), 'y-m-d', locales.en), 'to be', '2012-3-5'); + }); + + it('uses format: "yy" as Year, two-digit. to format date', function () { + expect(formatDate(new Date(0, 2, 5).setFullYear(2), 'yy-mm-dd', locales.en), 'to be', '02-03-05'); + expect(formatDate(new Date(0, 2, 5).setFullYear(12), 'yy-mm-dd', locales.en), 'to be', '12-03-05'); + expect(formatDate(new Date(2012, 2, 5), 'yy-mm-dd', locales.en), 'to be', '12-03-05'); + }); + + it('uses format: "yyyy" as Year, four-digit. to format date', function () { + expect(formatDate(new Date(0, 2, 5).setFullYear(2), 'yyyy-mm-dd', locales.en), 'to be', '0002-03-05'); + expect(formatDate(new Date(0, 2, 5).setFullYear(12), 'yyyy-mm-dd', locales.en), 'to be', '0012-03-05'); + expect(formatDate(new Date(2012, 2, 5), 'yyyy-mm-dd', locales.en), 'to be', '2012-03-05'); + }); + + it('accepts separators come before and after the date numbers', function () { + expect(formatDate(new Date(2012, 2, 5), '西暦yyyy年mm月dd日', locales.en), 'to be', '西暦2012年03月05日'); + }); + + it('throws an Error if format is neither a valid format string nor an object w/ toValue property', function () { + const date = new Date(2012, 2, 5); + expect(() => formatDate(date, {}), 'to throw error'); + expect(() => formatDate(date, 1), 'to throw error'); + expect(() => formatDate(date, 'aa-bb-cc'), 'to throw error'); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/unit/lib/date.js b/node_modules/flowbite-datepicker/test/unit/lib/date.js new file mode 100644 index 0000000..a2e38ff --- /dev/null +++ b/node_modules/flowbite-datepicker/test/unit/lib/date.js @@ -0,0 +1,211 @@ +import '../_setup.js'; +import { + stripTime, + dateValue, + today, + addDays, + addWeeks, + addMonths, + addYears, + dayOfTheWeekOf, + getWeek, + startOfYearPeriod +} from '../../../js/lib/date.js'; + +describe('lib/date', function () { + describe('stripTime()', function () { + it('returns the time value of 00:00:00 local time of given time value or date', function () { + let origDate = new Date(2016, 8, 24, 13, 55, 32, 235); + expect(stripTime(origDate.getTime()), 'to be', new Date(2016, 8, 24).getTime()); + + origDate = new Date(2019, 1, 14, 20, 55); + expect(stripTime(origDate), 'to be', new Date(2019, 1, 14).getTime()); + }); + }); + + describe('today()', function () { + it('returns the time value of 00:00:00 local time of current date', function () { + const now = new Date(); + const timeValue = today(); + expect(timeValue, 'to be', now.setHours(0, 0, 0, 0)); + }); + }); + + describe('dateValue()', function () { + it('returns the time value of 00:00:00 local time of the date created by given Date constructor parameters', function () { + // from Date object + let origDate = new Date(2016, 8, 24, 13, 55, 32, 235); + let timeValue = dateValue(origDate); + expect(timeValue, 'to be', new Date(2016, 8, 24).getTime()); + + // from Date constructor args + timeValue = dateValue(2019, 1, 17, 9, 43, 18, 953); + expect(timeValue, 'to be', new Date(2019, 1, 17).getTime()); + + // from string + let origDateStr = '2020-04-20T02:27:15Z'; + origDate = new Date(origDateStr); + timeValue = dateValue(origDateStr); + expect(timeValue, 'to be', origDate.setHours(0, 0, 0, 0)); + + // from time value + origDate = new Date(2016, 8, 24, 13, 55, 32, 235); + timeValue = dateValue(origDate.getTime()); + expect(timeValue, 'to be', new Date(2016, 8, 24).getTime()); + }); + + it('does not map 2-digit year to 1900\'s', function () { + let date = new Date(dateValue(86, 8, 24)); + expect(date.getFullYear(), 'to be', 86); + expect(date.getMonth(), 'to be', 8); + expect(date.getDate(), 'to be', 24); + + date = new Date(dateValue(19, 1, 17)); + expect(date.getFullYear(), 'to be', 19); + expect(date.getMonth(), 'to be', 1); + expect(date.getDate(), 'to be', 17); + }); + }); + + describe('addDays()', function () { + it('returns the time value of N days after a date or time value', function () { + let date1 = new Date(2019, 11, 31); + let date2 = addDays(date1, 1); + expect(date2, 'to be', new Date(2020, 0, 1).getTime()); + expect(addDays(date2, 30), 'to be', new Date(2020, 0, 31).getTime()); + + date1 = new Date(2020, 0, 1); + expect(addDays(date1, -1), 'to be', new Date(2019, 11, 31).getTime()); + expect(addDays(date1, -10), 'to be', new Date(2019, 11, 22).getTime()); + }); + }); + + describe('addWeeks()', function () { + it('returns the time value of N weeks after a date or time value', function () { + let date1 = new Date(2019, 11, 28); + let date2 = addWeeks(date1, 1); + expect(date2, 'to be', new Date(2020, 0, 4).getTime()); + expect(addWeeks(date2, 4), 'to be', new Date(2020, 1, 1).getTime()); + + date1 = new Date(2020, 0, 4); + expect(addWeeks(date1, -1), 'to be', new Date(2019, 11, 28).getTime()); + expect(addWeeks(date1, -8), 'to be', new Date(2019, 10, 9).getTime()); + }); + }); + + describe('addMonths()', function () { + it('returns the time value of N months after a date or time value', function () { + let date1 = new Date(2019, 11, 31); + let date2 = addMonths(date1, 1); + expect(date2, 'to be', new Date(2020, 0, 31).getTime()); + expect(addMonths(date2, 29), 'to be', new Date(2022, 5, 30).getTime()); + + date1 = new Date(2020, 0, 1); + expect(addMonths(date1, -1), 'to be', new Date(2019, 11, 1).getTime()); + expect(addMonths(date1, -18), 'to be', new Date(2018, 6, 1).getTime()); + }); + + it('returns the end of the next/prev month if the day of the old date is not in the new month', function () { + let date = new Date(2019, 9, 31); + expect(addMonths(date, 1), 'to be', new Date(2019, 10, 30).getTime()); + expect(addMonths(date, 18), 'to be', new Date(2021, 3, 30).getTime()); + + date = new Date(2019, 11, 31); + expect(addMonths(date, -1), 'to be', new Date(2019, 10, 30).getTime()); + expect(addMonths(date, -30), 'to be', new Date(2017, 5, 30).getTime()); + + date = new Date(2019, 0, 31); + expect(addMonths(date, 1), 'to be', new Date(2019, 1, 28).getTime()); + expect(addMonths(date, 13), 'to be', new Date(2020, 1, 29).getTime()); + + date = new Date(2020, 0, 31); + expect(addMonths(date, 1), 'to be', new Date(2020, 1, 29).getTime()); + expect(addMonths(date, 13), 'to be', new Date(2021, 1, 28).getTime()); + + date = new Date(2019, 2, 30); + expect(addMonths(date, -1), 'to be', new Date(2019, 1, 28).getTime()); + expect(addMonths(date, -37), 'to be', new Date(2016, 1, 29).getTime()); + + date = new Date(2020, 2, 30); + expect(addMonths(date, -1), 'to be', new Date(2020, 1, 29).getTime()); + expect(addMonths(date, -37), 'to be', new Date(2017, 1, 28).getTime()); + + date = new Date(2020, 1, 29); + expect(addMonths(date, 12), 'to be', new Date(2021, 1, 28).getTime()); + expect(addMonths(date, -24), 'to be', new Date(2018, 1, 28).getTime()); + }); + }); + + describe('addYears()', function () { + it('returns the time value of N years after a date or time value', function () { + let date1 = new Date(2019, 11, 31); + let date2 = addYears(date1, 1); + expect(date2, 'to be', new Date(2020, 11, 31).getTime()); + expect(addYears(date2, 3), 'to be', new Date(2023, 11, 31).getTime()); + + date1 = new Date(2020, 0, 1); + expect(addYears(date1, -1), 'to be', new Date(2019, 0, 1).getTime()); + expect(addYears(date1, -3), 'to be', new Date(2017, 0, 1).getTime()); + }); + + it('returns 2/28 of the year if the old date is 2/29 and the new year is not a leap year', function () { + const date = new Date(2020, 1, 29); + expect(addYears(date, 1), 'to be', new Date(2021, 1, 28).getTime()); + expect(addYears(date, -1), 'to be', new Date(2019, 1, 28).getTime()); + expect(addYears(date, -4), 'to be', new Date(2016, 1, 29).getTime()); + }); + }); + + describe('dayOfTheWeekOf()', function () { + it('returns a date object of given day of the week of given date', function () { + expect(dayOfTheWeekOf(new Date(2017, 0, 1), 0), 'to be', new Date(2017, 0, 1).getTime()); + expect(dayOfTheWeekOf(new Date(2017, 3, 5), 1), 'to be', new Date(2017, 3, 3).getTime()); + expect(dayOfTheWeekOf(new Date(2017, 5, 8), 2), 'to be', new Date(2017, 5, 6).getTime()); + expect(dayOfTheWeekOf(new Date(2017, 9, 31), 3), 'to be', new Date(2017, 10, 1).getTime()); + expect(dayOfTheWeekOf(new Date(2018, 2, 10), 4), 'to be', new Date(2018, 2, 8).getTime()); + expect(dayOfTheWeekOf(new Date(2018, 5, 19), 5), 'to be', new Date(2018, 5, 22).getTime()); + expect(dayOfTheWeekOf(new Date(2018, 10, 20), 6), 'to be', new Date(2018, 10, 24).getTime()); + }); + + it('uses sepecified start day of week if it is given', function () { + expect(dayOfTheWeekOf(new Date(2017, 0, 1), 0, 1), 'to be', new Date(2017, 0, 1).getTime()); + expect(dayOfTheWeekOf(new Date(2017, 3, 5), 1, 3), 'to be', new Date(2017, 3, 10).getTime()); + expect(dayOfTheWeekOf(new Date(2017, 5, 8), 2, 4), 'to be', new Date(2017, 5, 13).getTime()); + expect(dayOfTheWeekOf(new Date(2017, 9, 31), 3, 6), 'to be', new Date(2017, 10, 1).getTime()); + expect(dayOfTheWeekOf(new Date(2018, 2, 10), 4, 5), 'to be', new Date(2018, 2, 15).getTime()); + expect(dayOfTheWeekOf(new Date(2018, 5, 19), 5, 2), 'to be', new Date(2018, 5, 22).getTime()); + }); + }); + + describe('getWeek()', function () { + it('returns ISO week number of given date', function () { + expect(getWeek(new Date(2015, 0, 1)), 'to be', 1); + expect(getWeek(new Date(2015, 3, 26)), 'to be', 17); + expect(getWeek(new Date(2015, 8, 12)), 'to be', 37); + expect(getWeek(new Date(2015, 10, 15)), 'to be', 46); + expect(getWeek(new Date(2016, 0, 1)), 'to be', 53); + expect(getWeek(new Date(2016, 0, 7)), 'to be', 1); + expect(getWeek(new Date(2016, 6, 21)), 'to be', 29); + expect(getWeek(new Date(2016, 8, 6)), 'to be', 36); + expect(getWeek(new Date(2016, 11, 1)), 'to be', 48); + expect(getWeek(new Date(2017, 0, 1)), 'to be', 52); + }); + }); + + describe('startOfYearPeriod()', function () { + it('returns the start year of given length of period of years', function () { + let date = new Date(2121, 0, 1); + expect(startOfYearPeriod(date, 10), 'to be', 2120); + expect(startOfYearPeriod(date, 100), 'to be', 2100); + expect(startOfYearPeriod(date, 1000), 'to be', 2000); + + date = new Date(1984, 0, 1); + expect(startOfYearPeriod(date, 10), 'to be', 1980); + expect(startOfYearPeriod(date, 100), 'to be', 1900); + expect(startOfYearPeriod(date, 1000), 'to be', 1000); + + expect(startOfYearPeriod(new Date(738, 5, 30), 20), 'to be', 720); + expect(startOfYearPeriod(new Date(0, 5, 30).setFullYear(88), 25), 'to be', 75); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/unit/lib/dom.js b/node_modules/flowbite-datepicker/test/unit/lib/dom.js new file mode 100644 index 0000000..92ae82a --- /dev/null +++ b/node_modules/flowbite-datepicker/test/unit/lib/dom.js @@ -0,0 +1,142 @@ +import '../_setup.js'; +import { + parseHTML, + isVisible, + hideElement, + showElement, + emptyChildNodes, + replaceChildNodes, +} from '../../../js/lib/dom.js'; + +describe('lib/dom', function () { + let el; + + before(function () { + testContainer.innerHTML = '
'; + el = testContainer.firstChild; + }); + + after(function () { + testContainer.removeChild(el); + }); + + describe('parseHTML()', function () { + it('parses an html fragment with Range.prototype.createContextualFragment()', function () { + const spyFragment = sinon.spy(Range.prototype, 'createContextualFragment'); + const html = '
test
'; + const result = parseHTML(html); + + expect(spyFragment.calledWith(html), 'to be true'); + expect(spyFragment.returned(result), 'to be true'); + + spyFragment.restore(); + }); + }); + + describe('isVisible()', function () { + it('returns true if either offsetHeight > 0, offsetWidth > 0 or getClientRects() has an item', function () { + expect(isVisible(el), 'to be false'); + + let stub = sinon.stub(el, "offsetHeight").get(() => 10); + expect(isVisible(el), 'to be true'); + stub.restore(); + + stub = sinon.stub(el, "offsetWidth").get(() => 10); + expect(isVisible(el), 'to be true'); + stub.restore(); + + stub = sinon.stub(el, 'getClientRects').callsFake(() => [{x: 10}, {x: 20}]); + expect(isVisible(el), 'to be true'); + stub.restore(); + }); + }); + + describe('hideElement()', function () { + it('sets none to style.display', function () { + hideElement(el); + expect(el.style.display, 'to be', 'none'); + el.removeAttribute('style'); + }); + + it('copies style.display to data-style-display attribute if other than none is set', function () { + el.style.display = 'flex'; + hideElement(el); + + expect(el.style.display, 'to be', 'none'); + expect(el.getAttribute('data-style-display'), 'to be', 'flex'); + + el.removeAttribute('data-style-display'); + el.style.display = 'none'; + hideElement(el); + + expect(el.hasAttribute('data-style-display'), 'to be false'); + + el.removeAttribute('style'); + }); + }); + + describe('showElement()', function () { + it('clears style.display if none is set', function () { + el.style.display = 'none'; + showElement(el); + expect(el.style.display, 'to be', ''); + + el.style.display = 'inline'; + showElement(el); + expect(el.style.display, 'to be', 'inline'); + + el.removeAttribute('style'); + }); + + it('restores the value of data-style-display attribute to style.display if it exists', function () { + el.style.display = 'none'; + el.setAttribute('data-style-display', 'flex'); + showElement(el); + + expect(el.style.display, 'to be', 'flex'); + expect(el.hasAttribute('data-style-display'), 'to be false'); + + el.removeAttribute('style'); + }); + }); + + describe('emptyChildNodes()', function () { + it('removes all child nodes', function () { + el.innerHTML = '
test
'; + emptyChildNodes(el); + + expect(el.innerHTML, 'to be empty'); + }); + }); + + describe('replaceChildNodes()', function () { + it('replace all child nodes with given nodes', function () { + const htmlBefore = '
test
'; + const htmlAfter = '
foo
bar
'; + + // with html + el.innerHTML = htmlBefore; + replaceChildNodes(el, htmlAfter); + expect(el.innerHTML, 'to be', htmlAfter); + + // with DocumentFragment + const fragment = document.createRange().createContextualFragment(htmlAfter); + el.innerHTML = htmlBefore; + replaceChildNodes(el, fragment); + expect(el.innerHTML, 'to be', htmlAfter); + + // with NodeList + const nodeList = el.querySelectorAll('div'); + el.innerHTML = htmlBefore; + replaceChildNodes(el, nodeList); + expect(el.innerHTML, 'to be', htmlAfter); + + // with array + el.innerHTML = htmlBefore; + replaceChildNodes(el, Array.from(nodeList)); + expect(el.innerHTML, 'to be', htmlAfter); + + el.innerHTML = ''; + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/unit/lib/event.js b/node_modules/flowbite-datepicker/test/unit/lib/event.js new file mode 100644 index 0000000..2ebaf10 --- /dev/null +++ b/node_modules/flowbite-datepicker/test/unit/lib/event.js @@ -0,0 +1,207 @@ +import '../_setup.js'; + +describe('lib/evnet', function () { + let listenerRegistry; + let spyAEL; + let spyREL; + // + let registerListeners; + let unregisterListeners; + let findElementInEventPath; + + before(function () { + spyAEL = sinon.spy(EventTarget.prototype, 'addEventListener'); + spyREL = sinon.spy(EventTarget.prototype, 'removeEventListener'); + + const origWeakMap = global.WeakMap; + global.WeakMap = function (...args) { + return listenerRegistry = new origWeakMap(...args); + }; + return import('../../../js/lib/event.js') + .then((module) => { + global.WeakMap = origWeakMap; + + registerListeners = module.registerListeners; + unregisterListeners = module.unregisterListeners; + findElementInEventPath = module.findElementInEventPath; + }); + }); + + after(function () { + spyAEL.restore(); + spyREL.restore(); + }); + + afterEach(function () { + spyAEL.resetHistory(); + spyREL.resetHistory(); + }); + + describe('registerListeners()', function () { + let target; + + before(function () { + target = document.createElement('input'); + testContainer.appendChild(target); + }); + + after(function () { + testContainer.removeChild(target); + }); + + it('registers event listeres with key object calling addEventListener()', function () { + const keyObj = {}; + const onClick = sinon.spy(); + const onKeydown = sinon.spy(); + const onMounseEnter = () => {}; + const listeners = [ + [document, 'click', onClick], + [target, 'keydown', onKeydown, {capture: false}], + [target, 'mouseenter', onMounseEnter, true], + ]; + + registerListeners(keyObj, listeners); + expect(listenerRegistry.get(keyObj), 'to equal', listeners); + expect(spyAEL.args, 'to equal', listeners.map(listener => listener.slice(1))); + + testContainer.click(); + expect(onClick.called, 'to be true'); + simulant.fire(target, 'keydown', {key: 'enter'}); + expect(onKeydown.called, 'to be true'); + + listeners.forEach((listener) => { + EventTarget.prototype.removeEventListener.call(...listener); + }); + listenerRegistry.delete(keyObj); + }); + + it('appends listeners if registration for key object already exists', function () { + const keyObj = {}; + const onClick = () => {}; + const onKeydown = () => {}; + const onMounseEnter = () => {}; + const listeners = [ + [document, 'click', onClick], + ]; + const listenersToAdd = [ + [target, 'keydown', onKeydown, {capture: false}], + [target, 'mouseenter', onMounseEnter, true], + ]; + listenerRegistry.set(keyObj, listeners); + + registerListeners(keyObj, listenersToAdd); + expect(listeners.length, 'to be', 3); + expect(listenerRegistry.get(keyObj), 'to equal', listeners); + expect(spyAEL.args, 'to equal', listenersToAdd.map(listener => listener.slice(1))); + + listenersToAdd.forEach((listener) => { + EventTarget.prototype.removeEventListener.call(...listener); + }); + listenerRegistry.delete(keyObj); + }); + }); + + describe('unregisterListeners()', function () { + let target; + + before(function () { + target = document.createElement('input'); + testContainer.appendChild(target); + }); + + after(function () { + testContainer.removeChild(target); + }); + + it('unregisters all event listeres for key object calling removeEventListener()', function () { + const keyObj = {}; + const onClick = sinon.spy(); + const onKeydown = sinon.spy(); + const onMounseEnter = () => {}; + const listeners = [ + [document, 'click', onClick], + [target, 'keydown', onKeydown, {capture: false}], + [target, 'mouseenter', onMounseEnter, true], + ]; + listeners.forEach((listener) => { + EventTarget.prototype.addEventListener.call(...listener); + }); + listenerRegistry.set(keyObj, listeners); + + unregisterListeners(keyObj); + expect(listenerRegistry.get(keyObj), 'to be undefined'); + expect(spyREL.args, 'to equal', listeners.map(listener => listener.slice(1))); + + testContainer.click(); + expect(onClick.called, 'to be false'); + simulant.fire(target, 'keydown', {key: 'enter'}); + expect(onKeydown.called, 'to be false'); + }); + }); + + describe('findElementInEventPath()', function () { + let field; + let control; + let input; + + before(function () { + input = document.createElement('input'); + control = document.createElement('div'); + control.className = 'control'; + control.appendChild(input); + field = document.createElement('div'); + field.className = 'field'; + field.appendChild(control); + testContainer.appendChild(field); + }); + + after(function () { + testContainer.removeChild(field); + }); + + it('returns the first element in event\'s path that matches given selector', function () { + const test = (ev) => { + expect(findElementInEventPath(ev, '.control'), 'to be', control); + expect(findElementInEventPath(ev, '.field'), 'to be', field); + expect(findElementInEventPath(ev, 'div'), 'to be', control); + }; + + document.addEventListener('click', test); + simulant.fire(input, 'click'); + document.removeEventListener('click', test); + }); + + it('returns undefined if no matched element is in event\'s path', function () { + const test = (ev) => { + expect(findElementInEventPath(ev, '.foo'), 'to be undefined',); + }; + + document.addEventListener('click', test); + simulant.fire(input, 'click'); + document.removeEventListener('click', test); + }); + + it('stops searching when it reaches event\'s currentTarget', function () { + const test = (ev) => { + expect(findElementInEventPath(ev, '.control'), 'to be', control); + expect(findElementInEventPath(ev, '.field'), 'to be undefined',); + }; + + control.addEventListener('click', test); + simulant.fire(input, 'click'); + control.removeEventListener('click', test); + }); + + it('function can be used to evaluate the condition instead of css selector', function () { + const test = (ev) => { + expect(findElementInEventPath(ev, target => [field, control].includes(target)), 'to be', control); + expect(findElementInEventPath(ev, target => target === field), 'to be', field); + expect(findElementInEventPath(ev, target => target.tagName === 'DIV'), 'to be', control); + }; + + document.addEventListener('click', test); + simulant.fire(input, 'click'); + document.removeEventListener('click', test); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/test/unit/lib/utils.js b/node_modules/flowbite-datepicker/test/unit/lib/utils.js new file mode 100644 index 0000000..6fea87a --- /dev/null +++ b/node_modules/flowbite-datepicker/test/unit/lib/utils.js @@ -0,0 +1,135 @@ +import '../_setup.js'; +import { + lastItemOf, + pushUnique, + stringToArray, + isInRange, + limitToRange, + createTagRepeat, + optimizeTemplateHTML +} from '../../../js/lib/utils.js'; + +describe('lib/utils', function () { + describe('lastItemOf()', function () { + it('returns the last item of array', function () { + expect(lastItemOf([1, 2, 3]), 'to be', 3); + expect(lastItemOf(['foo']), 'to be', 'foo'); + expect(lastItemOf([]), 'to be undefined'); + }); + }); + + describe('pushUnique()', function () { + it('add items to an array if the item is not in the array', function () { + let arr = ['foo', 'bar']; + pushUnique(arr, 'foo'); + expect(arr, 'to equal', arr); + + pushUnique(arr, 'baz'); + expect(arr, 'to equal', ['foo', 'bar', 'baz']); + + arr = ['foo', 'bar']; + pushUnique(arr, 'bar', 'baz', 'bam', 'baz'); + expect(arr, 'to equal', ['foo', 'bar', 'baz', 'bam']); + }); + + it('returns the given array', function () { + let arr = ['foo', 'bar']; + expect(pushUnique(arr, 'baz'), 'to be', arr); + }); + }); + + describe('stringToArray()', function () { + it('converts a string to array by spliting it with given separator', function () { + expect(stringToArray('foo,bar,baz', ','), 'to equal', ['foo', 'bar', 'baz']); + expect(stringToArray('abc-def', '-'), 'to equal', ['abc', 'def']); + }); + + it('return an empty array if string is empty', function () { + expect(stringToArray('', ','), 'to equal', []); + }); + }); + + describe('isInRange()', function () { + it('returns whether a value is between given min & max values', function () { + expect(isInRange(0, 1, 3), 'to be false'); + expect(isInRange(1, 1, 3), 'to be true'); + expect(isInRange(2, 1, 3), 'to be true'); + expect(isInRange(3, 1, 3), 'to be true'); + expect(isInRange(4, 1, 3), 'to be false'); + // + expect(isInRange('abb', 'abc', 'ccc'), 'to be false'); + expect(isInRange('bbc', 'abc', 'ccc'), 'to be true'); + expect(isInRange('ccb', 'abc', 'ccc'), 'to be true'); + expect(isInRange('ccd', 'abc', 'ccc'), 'to be false'); + }); + + it('omits minimum check if min = undefined', function () { + expect(isInRange(0, undefined, 3), 'to be true'); + expect(isInRange(4, undefined, 3), 'to be false'); + expect(isInRange(-Infinity, undefined, 3), 'to be true'); + }); + + it('omits maximum check if max = undefined', function () { + expect(isInRange(0, 1, undefined), 'to be false'); + expect(isInRange(4, 1, undefined), 'to be true'); + expect(isInRange(Infinity, 1, undefined), 'to be true'); + }); + }); + + describe('limitToRange()', function () { + it('returns min value if it\'s specified and the value < min', function () { + expect(limitToRange(0, 1, undefined), 'to be', 1); + expect(limitToRange(0, 1, 3), 'to be', 1); + expect(limitToRange('abb', 'abc', 'ccc'), 'to be', 'abc'); + }); + + it('returns max value if it\'s specified and the value > max', function () { + expect(limitToRange(4, undefined, 3), 'to be', 3); + expect(limitToRange(4, 1, 3), 'to be', 3); + expect(limitToRange('ccd', 'abc', 'ccc'), 'to be', 'ccc'); + }); + + it('returns the given value if it is within the specified min/max', function () { + expect(limitToRange(1, undefined, undefined), 'to be', 1); + expect(limitToRange(1, undefined, 3), 'to be', 1); + expect(limitToRange(3, 1, undefined), 'to be', 3); + expect(limitToRange(1, 1, 3), 'to be', 1); + expect(limitToRange(3, 1, 3), 'to be', 3); + + expect(limitToRange('abc', 'aaa', 'ccc'), 'to be', 'abc'); + expect(limitToRange('aaa', 'aaa', 'ccc'), 'to be', 'aaa'); + expect(limitToRange('ccc', 'aaa', 'ccc'), 'to be', 'ccc'); + }); + }); + + describe('createTagRepeat()', function () { + it('returns HTML of a tag repeated specified times', function () { + expect(createTagRepeat('div', 3), 'to be', '
'); + expect(createTagRepeat('span', 2), 'to be', ''); + + // returns at least 1 tag + expect(createTagRepeat('p', 0), 'to be', '

'); + }); + + it('adds addributes if name:value pairs are given', function () { + expect(createTagRepeat('p', 2, {class: 'foo bar'}), 'to be', '

'); + expect(createTagRepeat('p', 2, {'data-x': '0', 'data-y': '1'}), 'to be', '

'); + }); + + it('accepts function that takes current index as the argument for attribute value', function () { + expect(createTagRepeat('li', 3, {'data-cnt': ix => ix + 1}), 'to be', '
  • '); + }); + }); + + describe('optimizeTemplateHTML()', function () { + it('removes spacing before and after tags', function () { + let text = `
    +
    + test 123 +
    +
    `; + expect(optimizeTemplateHTML(text), 'to be', '
    test 123
    '); + expect(optimizeTemplateHTML('foo'), 'to be', 'foo'); + }); + }); +}); diff --git a/node_modules/flowbite-datepicker/tsconfig.json b/node_modules/flowbite-datepicker/tsconfig.json new file mode 100644 index 0000000..2753ac5 --- /dev/null +++ b/node_modules/flowbite-datepicker/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "typeRoots": ["./node_modules/@types", "./types"] + }, + "include": ["types/flowbite-datepicker.d.ts"] +} + \ No newline at end of file diff --git a/node_modules/flowbite-datepicker/types/flowbite-datepicker.d.ts b/node_modules/flowbite-datepicker/types/flowbite-datepicker.d.ts new file mode 100644 index 0000000..93c0cf9 --- /dev/null +++ b/node_modules/flowbite-datepicker/types/flowbite-datepicker.d.ts @@ -0,0 +1,4 @@ +declare module 'flowbite-datepicker-1.3.0' { + const value: any; + export default value; +} \ No newline at end of file diff --git a/node_modules/flowbite/LICENSE.md b/node_modules/flowbite/LICENSE.md new file mode 100644 index 0000000..6fff4a7 --- /dev/null +++ b/node_modules/flowbite/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Bergside Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/flowbite/README.md b/node_modules/flowbite/README.md new file mode 100644 index 0000000..98285f3 --- /dev/null +++ b/node_modules/flowbite/README.md @@ -0,0 +1,844 @@ +

    + + Flowbite - Tailwind CSS components +
    + Build websites even faster with components on top of Tailwind CSS +

    + +

    + Discord + Total Downloads + Latest Release + License +

    + +------ +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Documentation](#documentation) +- [Getting started](#getting-started) + - [Install using NPM](#install-using-npm) + - [Include via CDN](#include-via-cdn) + - [Bundled JavaScript](#bundled-javascript) + - [Data attributes](#data-attributes) + - [Init functions](#init-functions) + - [ESM and CJS](#esm-and-cjs) + - [TypeScript](#typescript) + - [RTL support](#rtl-support) + - [JavaScript Frameworks](#javascript-frameworks) + - [Back-end Frameworks](#back-end-frameworks) +- [Components](#components) +- [Figma Design System](#figma-design-system) +- [Flowbite Blocks](#flowbite-blocks) +- [Flowbite Icons](#flowbite-icons) +- [Flowbite GPT](#flowbite-gpt) +- [Pro version](#pro-version) +- [Hire us](#hire-us) +- [Learn Design Concepts](#learn-design-concepts) +- [Community](#community) +- [Copyright and license](#copyright-and-license) + +## Documentation + +For full documentation, visit [flowbite.com](https://flowbite.com/). + +## Getting started + +Flowbite can be included as a plugin into an existing Tailwind CSS project and it is supposed to help you build websites faster by having a set of web components to work with built with the utility classes from Tailwind CSS. + +### Install using NPM + +Make sure that you have Node.js and Tailwind CSS installed. + +1. Install Flowbite as a dependency using NPM by running the following command: + +```bash +npm install flowbite +``` + +2. Require Flowbite as a plugin inside the `tailwind.config.js` file: + +```javascript +module.exports = { + + plugins: [ + require('flowbite/plugin') + ] + +} +``` + +3. Make sure that you add the template path to the `tailwind.config.js` file: + +```javascript +module.exports = { + + content: [ + "./node_modules/flowbite/**/*.js" + ] + +} +``` + +4. Include the main JavaScript file to make interactive elements work: + +```html + +``` + +### Include via CDN + +The quickest way to get started working with Flowbite is to simply include the CSS and JavaScript into your project via a CDN service such as UNPKG or CDNJS (content delivery networks). + +Require the following minified stylesheet inside the `head` tag: + +```html + +``` + +And include the following javascript file before the end of the `body` tag: + +```html + +``` + +### Bundled JavaScript + +One of the most popular way of using Flowbite is to include the bundled Javascript file which is UMD ready using a bundler such as Webpack or Parcel which makes sure that all of the data attributes and functionality will work out-of-the-box. + +You can directly import the main JavaScript file inside your bundled `app-bundle.js` file like this: + +```javascript +import 'flowbite'; +``` + +This file has access to all of the components and it automatically applies event listeners to the data attributes. + +### Data attributes + +The preferred way to use the interactive UI components from Flowbite is via the data attributes interface which allows us to add functionality via the HTML element attributes and most of the examples on our documentation applies this strategy. + +For example, to set up a modal component all you need to do is use `data-modal-target` and `data-modal-{toggle|show|hide}` to toggle, show, or hide the component by clicking on any trigger element. + +```html + + + + +``` + +#### Init functions + +You can also use the init functions to set up the event listeners yourself. Here's an example how you can do it with Vue or Nuxt: + +``` + + + +``` + +The `initFlowbite` function sets up all of the init functions for dropdowns, modals, navbars, tooltips and so on to hook onto the data attributes. Alternatively, you can also initialise each component category class separately with `initDropdowns` or `initModals`. + +You can view more examples by browsing the [components from Flowbite](#components). + +### ESM and CJS + +Flowbite also offers an API for using the components programmatically and it supports both CJS and ESM for JavaScript which can be helpful if you need to expand the default capabilities of the data attributes interface and get access to function callbacks. + +Here's an example how you can import and create a new Modal component inside JavaScript: + +```javascript +import { Modal } from 'flowbite' + +const $modalElement = document.querySelector('#modalEl'); + +const modalOptions = { + placement: 'bottom-right', + backdrop: 'dynamic', + backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40', + onHide: () => { + console.log('modal is hidden'); + }, + onShow: () => { + console.log('modal is shown'); + }, + onToggle: () => { + console.log('modal has been toggled'); + } +} + +const modal = new Modal($modalElement, modalOptions); + +modal.show(); +``` + +Check out the JavaScript behaviour section of each component's page to learn how you can use this. + +### TypeScript + +Flowbite supports type declarations for the interactive UI components including object interfaces and parameter types. Check out the following examples to learn how you can use types with Flowbite. + +Additionally to our code above, we will now import some relevant types from the Flowbite package, namely the `ModalOptions` and `ModalInterface`: + +```javascript +import { Modal } from 'flowbite' +import type { ModalOptions, ModalInterface } from 'flowbite' + +// other code +``` + +Generally speaking, all of the components have an interface definition that you can use whenever you create a new object to make sure that you're using the correct types of parameters and methods. + +When creating a new modal you can set the `ModalInterface` as the main type: + +```javascript +const modal: ModalInterface = new Modal($modalElement, modalOptions); +``` + +Flowbite also supports type definitions for the options object so if you want to set the placement of the modal based on types, here's how you would do that: + +```javascript +const modalOptions: ModalOptions = { + placement: 'top-right' +} + +const modal: ModalInterface = new Modal($modalElement, modalOptions); +``` + +Learn more about Flowbite and TypeScript in the [quickstart guide](https://flowbite.com/docs/getting-started/typescript/). + +### RTL support + +All of the Flowbite UI components have native RTL support and you can easily set it up by using the `dir="rtl"` attribute on the HTML element. Read more about Flowbite and [RTL support here](https://flowbite.com/docs/customize/rtl/). + +### JavaScript Frameworks + +The awesome open-source community also built and currently maintains the following standalone libraries for React, Vue, Svelte, and Angular: + +- [🌀 Flowbite React Library](https://github.com/themesberg/flowbite-react) +- [🍀 Flowbite Vue Library](https://github.com/themesberg/flowbite-vue) +- [🎸 Flowbite Svelte Library](https://github.com/themesberg/flowbite-svelte) +- [📕 Flowbite Angular Library](https://github.com/themesberg/flowbite-angular) + +We also wrote integration guides for the following front-end frameworks and libraries: + +- [📝 Flowbite with React guide](https://flowbite.com/docs/getting-started/react/) +- [📝 Flowbite with Next.js guide](https://flowbite.com/docs/getting-started/next-js/) +- [📝 Flowbite with Remix guide](https://flowbite.com/docs/getting-started/remix/) +- [📝 Flowbite with Vue guide](https://flowbite.com/docs/getting-started/vue/) +- [📝 Flowbite with Nuxt guide](https://flowbite.com/docs/getting-started/nuxt-js/) +- [📝 Flowbite with Svelte guide](https://flowbite.com/docs/getting-started/svelte/) +- [📝 Flowbite with Astro guide](https://flowbite.com/docs/getting-started/astro/) +- [📝 Flowbite with MeteorJS guide](https://flowbite.com/docs/getting-started/meteor-js/) +- [📝 Flowbite with Gatsby guide](https://flowbite.com/docs/getting-started/gatsby/) +- [📝 Flowbite with SolidJS guide](https://flowbite.com/docs/getting-started/solid-js/) +- [📝 Flowbite with Qwik guide](https://flowbite.com/docs/getting-started/qwik/) + +### Back-end Frameworks + +Flowbite has a great integration with most of the back-end frameworks because it relies on vanilla JavaScript: + +- [📚 Using Flowbite with Laravel](https://flowbite.com/docs/getting-started/laravel/) +- [🎼 Using Flowbite with Symfony](https://flowbite.com/docs/getting-started/symfony/) +- [🚊 Using Flowbite with Ruby on Rails 7](https://flowbite.com/docs/getting-started/rails/) +- [🐉 Using Flowbite with Phoenix (Elixir)](https://flowbite.com/docs/getting-started/phoenix/) +- [🐸 Using Flowbite with Django](https://flowbite.com/docs/getting-started/django/) +- [🌶 Using Flowbite with Flask](https://flowbite.com/docs/getting-started/flask/) + +## Components + +Flowbite is an open source collection of UI components built with the utility classes from Tailwind CSS that you can use as a starting point when coding user interfaces and websites. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AlertsBadgeBreadcrumbs
    + + Tailwind CSS Alerts + + + + Tailwind CSS Badge + + + + Tailwind CSS Breadcrumbs + +
    ButtonsButton groupCards
    + + Tailwind CSS Buttons + + + + Tailwind CSS Button Group + + + + Tailwind CSS Cards + +
    DropdownFormsList group
    + + Tailwind CSS Dropdown + + + + Tailwind CSS Forms + + + + Tailwind CSS List group + +
    TypographyModalTabs
    + + Tailwind CSS Typography + + + + Tailwind CSS Modal + + + + Tailwind CSS Tabs + +
    NavbarPaginationTimeline
    + + Tailwind CSS Navbar + + + + Tailwind CSS Pagination + + + + Tailwind CSS Timeline + +
    Progress barTablesToast
    + + Tailwind CSS Progress Bar + + + + Tailwind CSS Tables + + + + Tailwind CSS Toast + +
    TooltipsDatepickerSpinner
    + + Tailwind CSS Tooltips + + + + Tailwind CSS Datepicker + + + + Tailwind CSS Spinner + +
    FooterAccordionSidebar
    + + Tailwind CSS Footer + + + + Tailwind CSS Accordion + + + + Tailwind CSS Sidebar + +
    CarouselAvatarRating
    + + Tailwind CSS Carousel + + + + Tailwind CSS Avatar + + + + Tailwind CSS Rating + +
    Input FieldFile InputSearch Input
    + + Tailwind CSS Input Field + + + + Tailwind CSS File Input + + + + Tailwind CSS Search Input + +
    SelectTextareaCheckbox
    + + Tailwind CSS Select + + + + Tailwind CSS Textarea + + + + Tailwind CSS Checkbox + +
    RadioToggleRange Slider
    + + Tailwind CSS Radio + + + + Tailwind CSS Toggle + + + + Tailwind CSS Range Slider + +
    Floating LabelMega MenuSkeleton
    + + Tailwind CSS Floating Label + + + + Tailwind CSS Mega Menu + + + + Tailwind CSS Skeleton + +
    KBD (keyboard)Drawer (offcanvas)Popover
    + + Tailwind CSS KBD (Keyboard) + + + + Tailwind CSS Drawer (offcanvas) + + + + Tailwind CSS Popover + +
    VideoHeadingParagraph
    + + Tailwind CSS Video + + + + Tailwind CSS Heading + + + + Tailwind CSS Paragraph + +
    BlockquoteImageList
    + + Tailwind CSS Blockquote + + + + Tailwind CSS Image + + + + Tailwind CSS List + +
    LinkTextHorizontal line (HR)
    + + Tailwind CSS Link + + + + Tailwind CSS Text + + + + Tailwind CSS HR + +
    Speed DialStepperIndicators
    + + Tailwind CSS Speed Dial + + + + Tailwind CSS Stepper + + + + Tailwind CSS Indicators + +
    Bottom NavigationSticky BannerGallery (Masonry)
    + + Tailwind CSS Bottom Navigation Bar + + + + Tailwind CSS Bottom Sticky Banner + + + + Tailwind CSS Image Gallery (Masonry) + +
    JumbotronDevice mockupsCharts
    + + Tailwind CSS Jumbotron + + + + Tailwind CSS Device Mockups + + + + Tailwind CSS Charts + +
    Number InputPhone InputChat Bubble
    + + Tailwind CSS Number Input + + + + Tailwind CSS Phone Input + + + + Tailwind CSS Chat Bubble + +
    Copy to ClipboardTimepickerDataTables
    + + Tailwind CSS Clipboard + + + + Tailwind CSS Timepicker + + + + Tailwind CSS DataTables + +
    + +## Figma Design System + +If you need the Figma files for the components you can check out our website for more information: + +🎨 [Get access to the Figma design files](https://flowbite.com/figma/) + +## Flowbite Blocks + +Check out Flowbite Blocks to get access to over 400+ website sections coded in Tailwind CSS and Flowbite: + +📦 [Check out Flowbite Blocks](https://flowbite.com/blocks/) + +## Flowbite Icons + +Start using over 450+ free and open-source collection of solid and outline SVG icons built for Tailwind CSS and with support for Figma and JSX (React): + +🔍 [Check out the icons](https://flowbite.com/icons/) + +## Flowbite GPT + +We've developed a custom trained ChatGPT model that you can use to generate website sections and pages based on the resources from Flowbite and Tailwind CSS. + +🤖 [Generate with Flowbite GPT](https://chat.openai.com/g/g-y7yC35HB9-flowbite-gpt) + +## Pro version + +Get access to all premium features including the Figma design system, access to all Flowbite Block sections and a dashboard UI interface: + +💎 [Check out Flowbite Pro](https://flowbite.com/pro/) + +## Hire us + +If you're ready to take your application to the next level you can work with us on your project with developers who have been using Flowbite and Tailwind CSS. + +🙋‍♂️ [Work with us](https://flowbite.com/work-with-us/) + +## Learn Design Concepts + +If you want to create even better Flowbite pages, learn design fundamentals from Teach Me Design - Enhance UI, a book that covers color theory, typography, UI and UX so you can make the most to implement the Flowbite Ecosystem! + +📖 [Learn with Enhance UI](https://www.enhanceui.com/?ref=flowbite-github) + +## Community + +If you need help or just want to discuss about the library join the community on Github: + +⌨️ [Discuss about Flowbite on GitHub](https://github.com/themesberg/flowbite/discussions) + +For casual chatting with others using the library: + +💬 [Join the Flowbite Discord Server](https://discord.gg/4eeurUVvTy) + +Video tutorials and presentations using Flowbite: + +🎥 [Subscribe to our YouTube channel](https://www.youtube.com/channel/UC_Ms4V2kYDsh7F_CSsHyQ6A) + +## Copyright and license + +The Flowbite name and logos are trademarks of Bergside Inc. + +- 📝 [Read about the licensing terms](https://flowbite.com/docs/getting-started/license/) +- 📀 [Brand guideline and trademark usage agreement](https://flowbite.com/brand/) diff --git a/node_modules/flowbite/dist/flowbite.css b/node_modules/flowbite/dist/flowbite.css new file mode 100644 index 0000000..4b2c610 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.css @@ -0,0 +1,9555 @@ +/* +! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com +*//* +1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) +2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) +*/ + +*, +::before, +::after { + box-sizing: border-box; /* 1 */ + border-width: 0; /* 2 */ + border-style: solid; /* 2 */ + border-color: #E5E7EB; /* 2 */ +} + +::before, +::after { + --tw-content: ''; +} + +/* +1. Use a consistent sensible line-height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +3. Use a more readable tab size. +4. Use the user's configured `sans` font-family by default. +5. Use the user's configured `sans` font-feature-settings by default. +6. Use the user's configured `sans` font-variation-settings by default. +7. Disable tap highlights on iOS +*/ + +html, +:host { + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + -moz-tab-size: 4; /* 3 */ + -o-tab-size: 4; + tab-size: 4; /* 3 */ + font-family: Inter, ui-sans-serif, system-ui, -apple-system, system-ui, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji; /* 4 */ + font-feature-settings: normal; /* 5 */ + font-variation-settings: normal; /* 6 */ + -webkit-tap-highlight-color: transparent; /* 7 */ +} + +/* +1. Remove the margin in all browsers. +2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. +*/ + +body { + margin: 0; /* 1 */ + line-height: inherit; /* 2 */ +} + +/* +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +3. Ensure horizontal rules are visible by default. +*/ + +hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ +} + +/* +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/* +Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* +Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + text-decoration: inherit; +} + +/* +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace; /* 1 */ + font-feature-settings: normal; /* 2 */ + font-variation-settings: normal; /* 3 */ + font-size: 1em; /* 4 */ +} + +/* +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* +Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ +} + +/* +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +3. Remove default padding in all browsers. +*/ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-feature-settings: inherit; /* 1 */ + font-variation-settings: inherit; /* 1 */ + font-size: 100%; /* 1 */ + font-weight: inherit; /* 1 */ + line-height: inherit; /* 1 */ + color: inherit; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 3 */ +} + +/* +Remove the inheritance of text transform in Edge and Firefox. +*/ + +button, +select { + text-transform: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Remove default button styles. +*/ + +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; /* 1 */ + background-color: transparent; /* 2 */ + background-image: none; /* 2 */ +} + +/* +Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* +Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* +Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* +Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ + +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/* +Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to `inherit` in Safari. +*/ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* +Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* +Removes the default spacing and border for appropriate elements. +*/ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +fieldset { + margin: 0; + padding: 0; +} + +legend { + padding: 0; +} + +ol, +ul, +menu { + list-style: none; + margin: 0; + padding: 0; +} + +/* +Reset default styling for dialogs. +*/ +dialog { + padding: 0; +} + +/* +Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* +1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +2. Set the default placeholder color to the user's configured gray 400 color. +*/ + +input::-moz-placeholder, textarea::-moz-placeholder { + opacity: 1; /* 1 */ + color: #9CA3AF; /* 2 */ +} + +input::placeholder, +textarea::placeholder { + opacity: 1; /* 1 */ + color: #9CA3AF; /* 2 */ +} + +/* +Set the default cursor for buttons. +*/ + +button, +[role="button"] { + cursor: pointer; +} + +/* +Make sure disabled buttons don't get the pointer cursor. +*/ +:disabled { + cursor: default; +} + +/* +1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) +2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; /* 1 */ + vertical-align: middle; /* 2 */ +} + +/* +Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* Make elements with the HTML hidden attribute stay hidden by default */ +[hidden] { + display: none; +} + +.tooltip-arrow,.tooltip-arrow:before { + position: absolute; + width: 8px; + height: 8px; + background: inherit; +} + +.tooltip-arrow { + visibility: hidden; +} + +.tooltip-arrow:before { + content: ""; + visibility: visible; + transform: rotate(45deg); +} + +[data-tooltip-style^='light'] + .tooltip > .tooltip-arrow:before { + border-style: solid; + border-color: #e5e7eb; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='top'] > .tooltip-arrow:before { + border-bottom-width: 1px; + border-right-width: 1px; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='right'] > .tooltip-arrow:before { + border-bottom-width: 1px; + border-left-width: 1px; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='bottom'] > .tooltip-arrow:before { + border-top-width: 1px; + border-left-width: 1px; +} + +[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='left'] > .tooltip-arrow:before { + border-top-width: 1px; + border-right-width: 1px; +} + +.tooltip[data-popper-placement^='top'] > .tooltip-arrow { + bottom: -4px; +} + +.tooltip[data-popper-placement^='bottom'] > .tooltip-arrow { + top: -4px; +} + +.tooltip[data-popper-placement^='left'] > .tooltip-arrow { + right: -4px; +} + +.tooltip[data-popper-placement^='right'] > .tooltip-arrow { + left: -4px; +} + +.tooltip.invisible > .tooltip-arrow:before { + visibility: hidden; +} + +[data-popper-arrow],[data-popper-arrow]:before { + position: absolute; + width: 8px; + height: 8px; + background: inherit; +} + +[data-popper-arrow] { + visibility: hidden; +} + +[data-popper-arrow]:before { + content: ""; + visibility: visible; + transform: rotate(45deg); +} + +[data-popper-arrow]:after { + content: ""; + visibility: visible; + transform: rotate(45deg); + position: absolute; + width: 9px; + height: 9px; + background: inherit; +} + +[role="tooltip"] > [data-popper-arrow]:before { + border-style: solid; + border-color: #e5e7eb; +} + +.dark [role="tooltip"] > [data-popper-arrow]:before { + border-style: solid; + border-color: #4b5563; +} + +[role="tooltip"] > [data-popper-arrow]:after { + border-style: solid; + border-color: #e5e7eb; +} + +.dark [role="tooltip"] > [data-popper-arrow]:after { + border-style: solid; + border-color: #4b5563; +} + +[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:before { + border-bottom-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:after { + border-bottom-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:before { + border-bottom-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:after { + border-bottom-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:before { + border-top-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:after { + border-top-width: 1px; + border-left-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:before { + border-top-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:after { + border-top-width: 1px; + border-right-width: 1px; +} + +[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow] { + bottom: -5px; +} + +[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow] { + top: -5px; +} + +[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow] { + right: -5px; +} + +[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow] { + left: -5px; +} + +[role="tooltip"].invisible > [data-popper-arrow]:before { + visibility: hidden; +} + +[role="tooltip"].invisible > [data-popper-arrow]:after { + visibility: hidden; +} + +[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + border-color: #6B7280; + border-width: 1px; + border-radius: 0px; + padding-top: 0.5rem; + padding-right: 0.75rem; + padding-bottom: 0.5rem; + padding-left: 0.75rem; + font-size: 1rem; + line-height: 1.5rem; + --tw-shadow: 0 0 #0000; +} + +[type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #1C64F2; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + border-color: #1C64F2; +} + +input::-moz-placeholder, textarea::-moz-placeholder { + color: #6B7280; + opacity: 1; +} + +input::placeholder,textarea::placeholder { + color: #6B7280; + opacity: 1; +} + +::-webkit-datetime-edit-fields-wrapper { + padding: 0; +} + +input[type="time"]::-webkit-calendar-picker-indicator { + background: none; +} + +select:not([size]) { + background-image: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e"); + background-position: right 0.75rem center; + background-repeat: no-repeat; + background-size: 0.75em 0.75em; + padding-right: 2.5rem; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} + +:is([dir=rtl]) select:not([size]) { + background-position: left 0.75rem center; + padding-right: 0.75rem; + padding-left: 0; +} + +[multiple] { + background-image: initial; + background-position: initial; + background-repeat: unset; + background-size: initial; + padding-right: 0.75rem; + -webkit-print-color-adjust: unset; + print-color-adjust: unset; +} + +[type='checkbox'],[type='radio'] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding: 0; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + display: inline-block; + vertical-align: middle; + background-origin: border-box; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + flex-shrink: 0; + height: 1rem; + width: 1rem; + color: #1C64F2; + background-color: #fff; + border-color: #6B7280; + border-width: 1px; + --tw-shadow: 0 0 #0000; +} + +[type='checkbox'] { + border-radius: 0px; +} + +[type='radio'] { + border-radius: 100%; +} + +[type='checkbox']:focus,[type='radio']:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 2px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #1C64F2; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); +} + +[type='checkbox']:checked,[type='radio']:checked,.dark [type='checkbox']:checked,.dark [type='radio']:checked { + border-color: transparent; + background-color: currentColor; + background-size: 0.55em 0.55em; + background-position: center; + background-repeat: no-repeat; +} + +[type='checkbox']:checked { + background-image: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e"); + background-repeat: no-repeat; + background-size: 0.55em 0.55em; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} + +[type='radio']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); + background-size: 1em 1em; +} + +.dark [type='radio']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); + background-size: 1em 1em; +} + +[type='checkbox']:indeterminate { + background-image: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M0.5 6h14'/%3e %3c/svg%3e"); + background-color: currentColor; + border-color: transparent; + background-position: center; + background-repeat: no-repeat; + background-size: 0.55em 0.55em; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} + +[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus { + border-color: transparent; + background-color: currentColor; +} + +[type='file'] { + background: unset; + border-color: inherit; + border-width: 0; + border-radius: 0; + padding: 0; + font-size: unset; + line-height: inherit; +} + +[type='file']:focus { + outline: 1px auto inherit; +} + +input[type=file]::file-selector-button { + color: white; + background: #1F2937; + border: 0; + font-weight: 500; + font-size: 0.875rem; + cursor: pointer; + padding-top: 0.625rem; + padding-bottom: 0.625rem; + padding-left: 2rem; + padding-right: 1rem; + -webkit-margin-start: -1rem; + margin-inline-start: -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} + +input[type=file]::file-selector-button:hover { + background: #374151; +} + +:is([dir=rtl]) input[type=file]::file-selector-button { + padding-right: 2rem; + padding-left: 1rem; +} + +.dark input[type=file]::file-selector-button { + color: white; + background: #4B5563; +} + +.dark input[type=file]::file-selector-button:hover { + background: #6B7280; +} + +input[type="range"]::-webkit-slider-thumb { + height: 1.25rem; + width: 1.25rem; + background: #1C64F2; + border-radius: 9999px; + border: 0; + appearance: none; + -moz-appearance: none; + -webkit-appearance: none; + cursor: pointer; +} + +input[type="range"]:disabled::-webkit-slider-thumb { + background: #9CA3AF; +} + +.dark input[type="range"]:disabled::-webkit-slider-thumb { + background: #6B7280; +} + +input[type="range"]:focus::-webkit-slider-thumb { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); + --tw-ring-opacity: 1px; + --tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity)); +} + +input[type="range"]::-moz-range-thumb { + height: 1.25rem; + width: 1.25rem; + background: #1C64F2; + border-radius: 9999px; + border: 0; + appearance: none; + -moz-appearance: none; + -webkit-appearance: none; + cursor: pointer; +} + +input[type="range"]:disabled::-moz-range-thumb { + background: #9CA3AF; +} + +.dark input[type="range"]:disabled::-moz-range-thumb { + background: #6B7280; +} + +input[type="range"]::-moz-range-progress { + background: #3F83F8; +} + +input[type="range"]::-ms-fill-lower { + background: #3F83F8; +} + +input[type="range"].range-sm::-webkit-slider-thumb { + height: 1rem; + width: 1rem; +} + +input[type="range"].range-lg::-webkit-slider-thumb { + height: 1.5rem; + width: 1.5rem; +} + +input[type="range"].range-sm::-moz-range-thumb { + height: 1rem; + width: 1rem; +} + +input[type="range"].range-lg::-moz-range-thumb { + height: 1.5rem; + width: 1.5rem; +} + +.toggle-bg:after { + content: ""; + position: absolute; + top: 0.125rem; + left: 0.125rem; + background: white; + border-color: #D1D5DB; + border-width: 1px; + border-radius: 9999px; + height: 1.25rem; + width: 1.25rem; + transition-property: background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter; + transition-duration: .15s; + box-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); +} + +input:checked + .toggle-bg:after { + transform: translateX(100%);; + border-color: white; +} + +input:checked + .toggle-bg { + background: #1C64F2; + border-color: #1C64F2; +} + +*, ::before, ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(63 131 248 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +} + +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(63 131 248 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +} +.container { + width: 100%; +} +@media (min-width: 640px) { + + .container { + max-width: 640px; + } +} +@media (min-width: 768px) { + + .container { + max-width: 768px; + } +} +@media (min-width: 1024px) { + + .container { + max-width: 1024px; + } +} +@media (min-width: 1280px) { + + .container { + max-width: 1280px; + } +} +@media (min-width: 1536px) { + + .container { + max-width: 1536px; + } +} +.selectedCell { + background-color: #F9FAFB; +} +.dark .selectedCell { + background-color: #374151; +} +.datatable-wrapper { + width: 100%; +} +.datatable-wrapper .datatable-top { + display: flex; + justify-content: space-between; + flex-direction: column-reverse; + align-items: start; + gap: 1rem; + margin-bottom: 1rem; +} +.datatable-wrapper .datatable-search .datatable-input, .datatable-wrapper .datatable-input { + color: #111827; + font-size: 0.875rem; + border: 1px solid #D1D5DB; + border-radius: 0.5rem; + background-color: #F9FAFB; + min-width: 16rem; +} +.dark .datatable-wrapper .datatable-search .datatable-input, .dark .datatable-wrapper .datatable-input { + color: white; + background-color: #1F2937; + border: 1px solid #374151; +} +.datatable-wrapper thead th .datatable-input { + background-color: white; + font-weight: 400; + color: #111827; + padding-top: .35rem; + padding-bottom: .35rem; + min-width: 0; +} +.dark .datatable-wrapper thead th .datatable-input { + background-color: #374151; + border-color: #4B5563; + color: white; +} +.datatable-wrapper .datatable-top .datatable-dropdown { + color: #6B7280; + font-size: 0.875rem; +} +.dark .datatable-wrapper .datatable-top .datatable-dropdown { + color: #9CA3AF; +} +.datatable-wrapper .datatable-top .datatable-dropdown .datatable-selector { + background-color: #F9FAFB; + color: #111827; + font-size: 0.875rem; + border: 1px solid #D1D5DB; + border-radius: 0.5rem; + margin-right: 0.25rem; + min-width: 4rem; +} +.dark .datatable-wrapper .datatable-top .datatable-dropdown .datatable-selector { + background-color: #1F2937; + border: 1px solid #374151; + color: white; +} +.datatable-wrapper .datatable-container thead tr.search-filtering-row th { + padding-top: 0; +} +.datatable-wrapper .datatable-search .datatable-input:focus { + border-color: #1C64F2; +} +.datatable-wrapper .datatable-container { + overflow-x: auto; +} +.datatable-wrapper .datatable-table { + width: 100%; + font-size: 0.875rem; + color: #6B7280; + text-align: left; +} +.dark .datatable-wrapper .datatable-table { + color: #9CA3AF; +} +.datatable-wrapper .datatable-table thead { + font-size: 0.75rem; + color: #6B7280; + background-color: #F9FAFB; +} +.dark .datatable-wrapper .datatable-table thead { + color: #9CA3AF; + background-color: #1F2937; +} +.datatable-wrapper .datatable-table thead th { + white-space: nowrap; +} +.datatable-wrapper .datatable-table thead th, .datatable-wrapper .datatable-table tbody th, .datatable-wrapper .datatable-table tbody td { + width: auto !important; + padding-top: 0.75rem; + padding-bottom: 0.75rem; + padding-left: 1.5rem; + padding-right: 1.5rem; +} +.datatable-wrapper .datatable-table thead th .datatable-sorter, .datatable-wrapper .datatable-table thead th { + text-transform: uppercase; +} +.datatable-wrapper .datatable-table thead th .datatable-sorter:hover, .datatable-wrapper .datatable-table thead th.datatable-ascending .datatable-sorter, .datatable-wrapper .datatable-table thead th.datatable-descending .datatable-sorter { + color: #111827; +} +.dark .datatable-wrapper .datatable-table thead th .datatable-sorter:hover, .dark .datatable-wrapper .datatable-table thead th.datatable-ascending .datatable-sorter, .dark .datatable-wrapper .datatable-table thead th.datatable-descending .datatable-sorter { + color: white; +} +.datatable-wrapper .datatable-table tbody tr.selected { + background-color: #F3F4F6; +} +.dark .datatable-wrapper .datatable-table tbody tr.selected { + background-color: #374151; +} +.datatable-wrapper .datatable-table tbody tr { + border-bottom: 1px solid #E5E7EB; +} +.dark .datatable-wrapper .datatable-table tbody tr { + border-bottom: 1px solid #374151; +} +.datatable-wrapper .datatable-table .datatable-empty { + text-align: center; +} +.datatable-wrapper .datatable-bottom { + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: start; + margin-top: 1rem; + gap: 1rem; +} +.datatable-wrapper .datatable-bottom .datatable-info { + color: #6B7280; + font-size: 0.875rem; +} +.dark .datatable-wrapper .datatable-bottom .datatable-info { + color: #9CA3AF; +} +.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list { + display: flex; + align-items: center; + height: 2rem; + font-size: 0.875rem; +} +.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link { + display: flex; + align-items: center; + color: #6B7280; + font-weight: 500; + padding-left: 0.75rem; + padding-right: 0.75rem; + height: 2rem; + font-size: 0.875rem; + border-top: 1px solid #D1D5DB; + border-bottom: 1px solid #D1D5DB; + border-right: 1px solid #D1D5DB; +} +.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link { + color: #9CA3AF; + border-color: #374151; +} +.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type, .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type { + position: relative; +} +.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link, .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link { + color: transparent; +} +.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link, .dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link { + color: transparent; +} +.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link::after { + content: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3e %3c/svg%3e"); + position: absolute; + top: 50%; + left: 50%; + width: 1.3rem; + height: 1.3rem; + transform: translate(-50%, -50%); +} +.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:hover::after { + content: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='%23111827' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3e %3c/svg%3e"); +} +.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link::after { + content: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='%239CA3AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3e %3c/svg%3e"); +} +.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:hover::after { + content: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3e %3c/svg%3e"); +} +.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link::after { + content: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3e %3c/svg%3e"); + position: absolute; + top: 50%; + right: 50%; + width: 1.3rem; + height: 1.3rem; + transform: translate(50%, -50%); +} +.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:hover::after { + content: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='%23111827' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3e %3c/svg%3e"); +} +.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link::after { + content: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='%239CA3AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3e %3c/svg%3e"); +} +.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:hover::after { + content: url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3e %3c/svg%3e"); +} +.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link { + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; + border-left: 1px solid #D1D5DB; +} +.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link { + border-left: 1px solid #374151; +} +.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link { + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; + border-left: 0; +} +.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link:hover { + background-color: #F9FAFB; + color: #374151; +} +.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link:hover { + background-color: #374151; + color: white; +} +@media (min-width: 640px) { + + .datatable-wrapper .datatable-top { + flex-direction: row-reverse; + align-items: center; + } + + .datatable-wrapper .datatable-bottom { + flex-direction: row; + align-items: center; + } +} +.apexcharts-canvas .apexcharts-tooltip { + background-color: white; + color: #6B7280; + border: 0 !important; + border-radius: 0.25rem; + box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); +} +.dark .apexcharts-canvas .apexcharts-tooltip { + background-color: #374151; + color: #9CA3AF; + border-color: transparent; + box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); +} +.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-right: 0.75rem; + padding-left: 0.75rem; + margin-bottom: 0.75rem; + background-color: #F3F4F6; + border-bottom-color: #E5E7EB; + font-size: 0.875rem !important; + font-weight: 400; + color: #6B7280; +} +.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title { + background-color: #4B5563; + border-color: #6B7280; + color: #9CA3AF; +} +.apexcharts-canvas .apexcharts-xaxistooltip { + color: #6B7280; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-right: 0.75rem; + padding-left: 0.75rem; + border-color: transparent; + background-color: white; + border-radius: 0.25rem; + box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); +} +.dark .apexcharts-canvas .apexcharts-xaxistooltip { + color: #9CA3AF; + background-color: #374151; +} +.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label { + color: #6B7280; + font-size: 0.875rem; +} +.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label { + color: #9CA3AF; +} +.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value { + color: #111827; + font-size: 0.875rem; +} +:is([dir=rtl]) .apexcharts-tooltip .apexcharts-tooltip-marker { + margin-right: 0px; + margin-left: e; +} +.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value { + color: white; +} +.apexcharts-canvas .apexcharts-xaxistooltip-text { + font-weight: 400; + font-size: 0.875rem !important; +} +.apexcharts-canvas .apexcharts-xaxistooltip:after, .apexcharts-canvas .apexcharts-xaxistooltip:before { + border-bottom-color: white; +} +.apexcharts-canvas .apexcharts-xaxistooltip:after { + border-width: 8px; + margin-left: -8px; +} +.apexcharts-canvas .apexcharts-xaxistooltip:before { + border-width: 10px; + margin-left: -10px; +} +.dark .apexcharts-canvas .apexcharts-xaxistooltip:after, .dark .apexcharts-canvas .apexcharts-xaxistooltip:before { + border-bottom-color: #374151; +} +.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-y-group { + padding: 0; +} +.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active { + padding-left: 0.75rem; + padding-right: 0.75rem; + padding-bottom: 0.75rem; + background-color: white !important; + color: #6B7280 !important; +} +.dark .apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active { + background-color: #374151 !important; + color: #9CA3AF !important; +} +.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active:first-of-type { + padding-top: 0.75rem; +} +.apexcharts-canvas .apexcharts-legend { + padding: 0 !important; +} +.apexcharts-canvas .apexcharts-legend-text { + font-size: 0.75rem; + font-weight: 500 !important; + padding-left: 1.25rem; + color: #6B7280 !important; +} +:is([dir=rtl]) .apexcharts-canvas .apexcharts-legend-text { + padding-right: 0.5rem; +} +.apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover { + color: #111827 !important; +} +.dark .apexcharts-canvas .apexcharts-legend-text { + color: #9CA3AF !important; +} +.dark .apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover { + color: white !important; +} +.apexcharts-canvas .apexcharts-legend-series { + margin-left: 0.5rem; + margin-right: 0.5rem; + margin-bottom: 0.25rem !important; + display: flex; + align-items: center; +} +.apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value { + fill: #111827 !important; + font-size: 1.875rem; + font-weight: 700; +} +.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value { + fill: white !important; +} +.apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label { + fill: #6B7280 !important; + font-size: 1rem; + font-weight: 400; +} +.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label { + fill: #9CA3AF !important; +} +.apexcharts-canvas .apexcharts-datalabels .apexcharts-text.apexcharts-pie-label { + font-size: 0.75rem !important; + font-weight: 600 !important; + text-shadow: none !important; + filter: none !important; +} +.apexcharts-gridline, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs { + stroke: #E5E7EB !important; +} +.dark .apexcharts-gridline, .dark .apexcharts-xcrosshairs, .dark .apexcharts-ycrosshairs { + stroke: #374151 !important; +} +.format { + color: var(--tw-format-body); + max-width: 65ch; +} +.format :where([class~="lead"]):not(:where([class~="not-format"] *)) { + color: var(--tw-format-lead); + font-size: 1.25em; + line-height: 1.6; + margin-top: 1.2em; + margin-bottom: 1.2em; +} +.format :where(a):not(:where([class~="not-format"] *)) { + color: var(--tw-format-links); + text-decoration: underline; + font-weight: 500; +} +.format :where(a):not(:where([class~="not-format"] *)):hover { + text-decoration: none; +} +.format :where(strong):not(:where([class~="not-format"] *)) { + color: var(--tw-format-bold); + font-weight: 700; +} +.format :where(a strong):not(:where([class~="not-format"] *)) { + color: inherit; +} +.format :where(blockquote strong):not(:where([class~="not-format"] *)) { + color: inherit; +} +.format :where(thead th strong):not(:where([class~="not-format"] *)) { + color: inherit; +} +.format :where(ol):not(:where([class~="not-format"] *)) { + list-style-type: decimal; + margin-top: 1.25em; + margin-bottom: 1.25em; + padding-left: 1.625em; +} +.format :where(ol[type="A"]):not(:where([class~="not-format"] *)) { + list-style-type: upper-alpha; +} +.format :where(ol[type="a"]):not(:where([class~="not-format"] *)) { + list-style-type: lower-alpha; +} +.format :where(ol[type="A" s]):not(:where([class~="not-format"] *)) { + list-style-type: upper-alpha; +} +.format :where(ol[type="a" s]):not(:where([class~="not-format"] *)) { + list-style-type: lower-alpha; +} +.format :where(ol[type="I"]):not(:where([class~="not-format"] *)) { + list-style-type: upper-roman; +} +.format :where(ol[type="i"]):not(:where([class~="not-format"] *)) { + list-style-type: lower-roman; +} +.format :where(ol[type="I" s]):not(:where([class~="not-format"] *)) { + list-style-type: upper-roman; +} +.format :where(ol[type="i" s]):not(:where([class~="not-format"] *)) { + list-style-type: lower-roman; +} +.format :where(ol[type="1"]):not(:where([class~="not-format"] *)) { + list-style-type: decimal; +} +.format :where(ul):not(:where([class~="not-format"] *)) { + list-style-type: disc; + margin-top: 1.25em; + margin-bottom: 1.25em; + padding-left: 1.625em; +} +.format :where(ol > li):not(:where([class~="not-format"] *))::marker { + font-weight: 400; + color: var(--tw-format-counters); +} +.format :where(ul > li):not(:where([class~="not-format"] *))::marker { + color: var(--tw-format-bullets); +} +.format :where(hr):not(:where([class~="not-format"] *)) { + border-color: var(--tw-format-hr); + border-top-width: 1px; + margin-top: 3em; + margin-bottom: 3em; +} +.format :where(blockquote):not(:where([class~="not-format"] *)) { + font-size: 1.1111111em; + font-weight: 700; + font-style: italic; + color: var(--tw-format-quotes); + quotes: "\201C""\201D""\2018""\2019"; + margin-bottom: 1.6em; +} +.format :where(blockquote):not(:where([class~="not-format"] *))::before { + content: ""; + background-image: url("data:image/svg+xml,%0A%3Csvg width='32' height='24' viewBox='0 0 32 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.6893 24V14.1453C18.6893 6.54 23.664 1.38533 30.6667 -7.15256e-07L31.9933 2.868C28.7507 4.09066 26.6667 7.71867 26.6667 10.6667H32V24H18.6893ZM-9.53674e-07 24V14.1453C-9.53674e-07 6.54 4.99733 1.384 12 -7.15256e-07L13.328 2.868C10.084 4.09066 8 7.71867 8 10.6667L13.3107 10.6667V24H-9.53674e-07Z' fill='%239CA3AF'/%3E%3C/svg%3E%0A"); + background-repeat: no-repeat; + color: var(--tw-format-quotes); + width: 1.7777778em; + height: 1.3333333em; + display: block; + margin-top: 1.6em; +} +.format :where(blockquote p:first-of-type):not(:where([class~="not-format"] *))::before { + content: open-quote; +} +.format :where(blockquote p:last-of-type):not(:where([class~="not-format"] *))::after { + content: close-quote; +} +.format :where(h1):not(:where([class~="not-format"] *)) { + color: var(--tw-format-headings); + font-weight: 800; + font-size: 2.25em; + margin-top: 0; + margin-bottom: 0.8888889em; + line-height: 1.1111111; +} +.format :where(h1 strong):not(:where([class~="not-format"] *)) { + font-weight: 900; + color: inherit; +} +.format :where(h2):not(:where([class~="not-format"] *)) { + color: var(--tw-format-headings); + font-weight: 700; + font-size: 1.5em; + margin-top: 0; + margin-bottom: 1em; + line-height: 1.3333333; +} +.format :where(h2 strong):not(:where([class~="not-format"] *)) { + font-weight: 800; + color: inherit; +} +.format :where(h3):not(:where([class~="not-format"] *)) { + color: var(--tw-format-headings); + font-weight: 700; + font-size: 1.25em; + margin-top: 0; + margin-bottom: 0.6em; + line-height: 1.6; +} +.format :where(h3 strong):not(:where([class~="not-format"] *)) { + font-weight: 800; + color: inherit; +} +.format :where(h4):not(:where([class~="not-format"] *)) { + color: var(--tw-format-headings); + font-weight: 600; + margin-top: 0; + margin-bottom: 0.5em; + line-height: 1.5; +} +.format :where(h4 strong):not(:where([class~="not-format"] *)) { + font-weight: 700; + color: inherit; +} +.format :where(img):not(:where([class~="not-format"] *)) { + margin-top: 2em; + margin-bottom: 2em; +} +.format :where(figure > *):not(:where([class~="not-format"] *)) { + margin-top: 0; + margin-bottom: 0; +} +.format :where(figcaption):not(:where([class~="not-format"] *)) { + color: var(--tw-format-captions); + font-size: 0.875em; + line-height: 1.4285714; + margin-top: 0.8571429em; +} +.format :where(code):not(:where([class~="not-format"] *)) { + color: var(--tw-format-code); + font-weight: 600; + background-color: var(--tw-format-code-bg); + padding-top: 0.3333333em; + padding-bottom: 0.3333333em; + padding-left: 0.5555556em; + padding-right: 0.5555556em; + border-radius: 0.2222222em; + font-size: 0.875em; +} +.format :where(a code):not(:where([class~="not-format"] *)) { + color: inherit; +} +.format :where(h1 code):not(:where([class~="not-format"] *)) { + color: inherit; +} +.format :where(h2 code):not(:where([class~="not-format"] *)) { + color: inherit; + font-size: 0.875em; +} +.format :where(h3 code):not(:where([class~="not-format"] *)) { + color: inherit; + font-size: 0.9em; +} +.format :where(h4 code):not(:where([class~="not-format"] *)) { + color: inherit; +} +.format :where(blockquote code):not(:where([class~="not-format"] *)) { + color: inherit; +} +.format :where(thead th code):not(:where([class~="not-format"] *)) { + color: inherit; +} +.format :where(pre):not(:where([class~="not-format"] *)) { + color: var(--tw-format-pre-code); + background-color: var(--tw-format-pre-bg); + overflow-x: auto; + font-weight: 400; + font-size: 0.875em; + line-height: 1.7142857; + margin-top: 1.7142857em; + margin-bottom: 1.7142857em; + border-radius: 0.375rem; + padding-top: 0.8571429em; + padding-right: 1.1428571em; + padding-bottom: 0.8571429em; + padding-left: 1.1428571em; +} +.format :where(pre code):not(:where([class~="not-format"] *)) { + background-color: transparent; + border-width: 0; + border-radius: 0; + padding: 0; + font-weight: inherit; + color: inherit; + font-size: inherit; + font-family: inherit; + line-height: inherit; +} +.format :where(pre code):not(:where([class~="not-format"] *))::before { + content: none; +} +.format :where(pre code):not(:where([class~="not-format"] *))::after { + content: none; +} +.format :where(table):not(:where([class~="not-format"] *)) { + width: 100%; + table-layout: auto; + text-align: left; + margin-top: 2em; + margin-bottom: 2em; + font-size: 0.875em; + line-height: 1.7142857; +} +.format :where(thead):not(:where([class~="not-format"] *)) { + background-color: var(--tw-format-th-bg); + border-radius: 0.2777778em; +} +.format :where(thead th):not(:where([class~="not-format"] *)) { + background-color: var(--tw-format-th-bg); + color: var(--tw-format-headings); + font-weight: 600; + vertical-align: bottom; + padding: 0.5555556em; + padding-right: 0.5714286em; + padding-bottom: 0.5714286em; + padding-left: 0.5714286em; +} +.format :where(tbody th):not(:where([class~="not-format"] *)) { + background-color: var(--tw-format-th-bg); + color: var(--tw-format-headings); + font-weight: 600; + vertical-align: bottom; + padding: 0.5555556em; +} +.format :where(tbody tr th p, tbody tr td p):not(:where([class~="not-format"] *)) { + margin: 0 !important; +} +.format :where(tbody tr th, tbody tr td):not(:where([class~="not-format"] *)) { + padding: 0.6666667em !important; +} +.format :where(tbody tr):not(:where([class~="not-format"] *)) { + border-bottom-width: 1px; + border-bottom-color: var(--tw-format-td-borders); +} +.format :where(tbody tr:last-child):not(:where([class~="not-format"] *)) { + border-bottom-width: 0; +} +.format :where(tbody td):not(:where([class~="not-format"] *)) { + vertical-align: baseline; +} +.format :where(tfoot):not(:where([class~="not-format"] *)) { + border-top-width: 1px; + border-top-color: var(--tw-format-th-borders); +} +.format :where(tfoot td):not(:where([class~="not-format"] *)) { + vertical-align: top; +} +.format { + --tw-format-body: #6b7280; + --tw-format-headings: #111827; + --tw-format-lead: #6b7280; + --tw-format-links: #4b5563; + --tw-format-bold: #111827; + --tw-format-counters: #6b7280; + --tw-format-bullets: #6b7280; + --tw-format-hr: #e5e7eb; + --tw-format-quotes: #111827; + --tw-format-quote-borders: #e5e7eb; + --tw-format-captions: #6b7280; + --tw-format-code: #111827; + --tw-format-code-bg: #f3f4f6; + --tw-format-pre-code: #4b5563; + --tw-format-pre-bg: #f3f4f6; + --tw-format-th-borders: #e5e7eb; + --tw-format-th-bg: #f9fafb; + --tw-format-td-borders: #e5e7eb; + --tw-format-invert-body: #9ca3af; + --tw-format-invert-headings: #fff; + --tw-format-invert-lead: #9ca3af; + --tw-format-invert-links: #fff; + --tw-format-invert-bold: #fff; + --tw-format-invert-counters: #9ca3af; + --tw-format-invert-bullets: #4b5563; + --tw-format-invert-hr: #374151; + --tw-format-invert-quotes: #f3f4f6; + --tw-format-invert-quote-borders: #374151; + --tw-format-invert-captions: #9ca3af; + --tw-format-invert-code: #fff; + --tw-format-invert-code-bg: #1f2937; + --tw-format-invert-pre-code: #d1d5db; + --tw-format-invert-pre-bg: #374151; + --tw-format-invert-th-borders: #4b5563; + --tw-format-invert-td-borders: #374151; + --tw-format-invert-th-bg: #374151; + font-size: 1rem; + line-height: 1.75; +} +.format :where(p):not(:where([class~="not-format"] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; +} +.format :where(blockquote > p:first-child):not(:where([class~="not-format"] *)) { + margin-top: 0; +} +.format :where(video):not(:where([class~="not-format"] *)) { + margin-top: 2em; + margin-bottom: 2em; +} +.format :where(figure):not(:where([class~="not-format"] *)) { + margin-top: 2em; + margin-bottom: 2em; +} +.format :where(li):not(:where([class~="not-format"] *)) { + margin-top: 0.5em; + margin-bottom: 0.5em; +} +.format :where(ol > li):not(:where([class~="not-format"] *)) { + padding-left: 0.375em; +} +.format :where(ul > li):not(:where([class~="not-format"] *)) { + padding-left: 0.375em; +} +.format :where(.format > ul > li p):not(:where([class~="not-format"] *)) { + margin-top: 0.75em; + margin-bottom: 0.75em; +} +.format :where(.format > ul > li > *:first-child):not(:where([class~="not-format"] *)) { + margin-top: 1.25em; +} +.format :where(.format > ul > li > *:last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 1.25em; +} +.format :where(.format > ol > li > *:first-child):not(:where([class~="not-format"] *)) { + margin-top: 1.25em; +} +.format :where(.format > ol > li > *:last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 1.25em; +} +.format :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-format"] *)) { + margin-top: 0.75em; + margin-bottom: 0.75em; +} +.format :where(hr + *):not(:where([class~="not-format"] *)) { + margin-top: 0; +} +.format :where(h2 + *):not(:where([class~="not-format"] *)) { + margin-top: 0; +} +.format :where(h3 + *):not(:where([class~="not-format"] *)) { + margin-top: 0; +} +.format :where(h4 + *):not(:where([class~="not-format"] *)) { + margin-top: 0; +} +.format :where(thead th:last-child):not(:where([class~="not-format"] *)) { + padding-right: 0; +} +.format :where(tbody td, tfoot td):not(:where([class~="not-format"] *)) { + padding-top: 0.5714286em; + padding-right: 0.5714286em; + padding-bottom: 0.5714286em; + padding-left: 0.5714286em; +} +.format :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-format"] *)) { + padding-right: 0; +} +.format :where(.format > :first-child):not(:where([class~="not-format"] *)) { + margin-top: 0; +} +.format :where(.format > :last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 0; +} +.format-sm :where(.format > ul > li p):not(:where([class~="not-format"] *)) { + margin-top: 0.5em; + margin-bottom: 0.5em; +} +.format-sm :where(.format > ul > li > *:first-child):not(:where([class~="not-format"] *)) { + margin-top: 1em; +} +.format-sm :where(.format > ul > li > *:last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 1em; +} +.format-sm :where(.format > ol > li > *:first-child):not(:where([class~="not-format"] *)) { + margin-top: 1em; +} +.format-sm :where(.format > ol > li > *:last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 1em; +} +.format-sm :where(.format > :first-child):not(:where([class~="not-format"] *)) { + margin-top: 0; +} +.format-sm :where(.format > :last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 0; +} +.format-base :where(.format > ul > li p):not(:where([class~="not-format"] *)) { + margin-top: 0.75em; + margin-bottom: 0.75em; +} +.format-base :where(.format > ul > li > *:first-child):not(:where([class~="not-format"] *)) { + margin-top: 1.25em; +} +.format-base :where(.format > ul > li > *:last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 1.25em; +} +.format-base :where(.format > ol > li > *:first-child):not(:where([class~="not-format"] *)) { + margin-top: 1.25em; +} +.format-base :where(.format > ol > li > *:last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 1.25em; +} +.format-base :where(.format > :first-child):not(:where([class~="not-format"] *)) { + margin-top: 0; +} +.format-base :where(.format > :last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 0; +} +.format-lg :where(.format > ul > li p):not(:where([class~="not-format"] *)) { + margin-top: 0.8888889em; + margin-bottom: 0.8888889em; +} +.format-lg :where(.format > ul > li > *:first-child):not(:where([class~="not-format"] *)) { + margin-top: 1.3333333em; +} +.format-lg :where(.format > ul > li > *:last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 1.3333333em; +} +.format-lg :where(.format > ol > li > *:first-child):not(:where([class~="not-format"] *)) { + margin-top: 1.3333333em; +} +.format-lg :where(.format > ol > li > *:last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 1.3333333em; +} +.format-lg :where(.format > :first-child):not(:where([class~="not-format"] *)) { + margin-top: 0; +} +.format-lg :where(.format > :last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 0; +} +.format-red { + --tw-format-links: #dc2626; + --tw-format-invert-links: #ef4444; +} +.format-blue { + --tw-format-links: #2563eb; + --tw-format-invert-links: #3b82f6; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} +.pointer-events-none { + pointer-events: none; +} +.visible { + visibility: visible; +} +.invisible { + visibility: hidden; +} +.collapse { + visibility: collapse; +} +.static { + position: static; +} +.fixed { + position: fixed; +} +.absolute { + position: absolute; +} +.relative { + position: relative; +} +.sticky { + position: sticky; +} +.inset-0 { + inset: 0px; +} +.inset-y-0 { + top: 0px; + bottom: 0px; +} +.-bottom-6 { + bottom: -1.5rem; +} +.-end-2 { + inset-inline-end: -0.5rem; +} +.-end-\[16px\] { + inset-inline-end: -16px; +} +.-end-\[17px\] { + inset-inline-end: -17px; +} +.-left-1 { + left: -0.25rem; +} +.-start-1 { + inset-inline-start: -0.25rem; +} +.-start-1\.5 { + inset-inline-start: -0.375rem; +} +.-start-14 { + inset-inline-start: -3.5rem; +} +.-start-3 { + inset-inline-start: -0.75rem; +} +.-start-3\.5 { + inset-inline-start: -0.875rem; +} +.-start-4 { + inset-inline-start: -1rem; +} +.-start-\[17px\] { + inset-inline-start: -17px; +} +.-top-0 { + top: -0px; +} +.-top-0\.5 { + top: -0.125rem; +} +.-top-2 { + top: -0.5rem; +} +.-top-\[140px\] { + top: -140px; +} +.bottom-0 { + bottom: 0px; +} +.bottom-1 { + bottom: 0.25rem; +} +.bottom-2 { + bottom: 0.5rem; +} +.bottom-2\.5 { + bottom: 0.625rem; +} +.bottom-3 { + bottom: 0.75rem; +} +.bottom-4 { + bottom: 1rem; +} +.bottom-5 { + bottom: 1.25rem; +} +.bottom-6 { + bottom: 1.5rem; +} +.bottom-\[\*px\] { + bottom: *px; +} +.bottom-\[60px\] { + bottom: 60px; +} +.end-0 { + inset-inline-end: 0px; +} +.end-2 { + inset-inline-end: 0.5rem; +} +.end-2\.5 { + inset-inline-end: 0.625rem; +} +.end-24 { + inset-inline-end: 6rem; +} +.end-6 { + inset-inline-end: 1.5rem; +} +.left-0 { + left: 0px; +} +.left-1\/2 { + left: 50%; +} +.left-5 { + left: 1.25rem; +} +.left-7 { + left: 1.75rem; +} +.left-8 { + left: 2rem; +} +.left-auto { + left: auto; +} +.right-0 { + right: 0px; +} +.right-1\/2 { + right: 50%; +} +.right-2 { + right: 0.5rem; +} +.right-2\.5 { + right: 0.625rem; +} +.right-24 { + right: 6rem; +} +.right-5 { + right: 1.25rem; +} +.right-6 { + right: 1.5rem; +} +.right-auto { + right: auto; +} +.start-0 { + inset-inline-start: 0px; +} +.start-1 { + inset-inline-start: 0.25rem; +} +.start-1\/2 { + inset-inline-start: 50%; +} +.start-1\/3 { + inset-inline-start: 33.333333%; +} +.start-2 { + inset-inline-start: 0.5rem; +} +.start-2\.5 { + inset-inline-start: 0.625rem; +} +.start-2\/3 { + inset-inline-start: 66.666667%; +} +.start-6 { + inset-inline-start: 1.5rem; +} +.start-7 { + inset-inline-start: 1.75rem; +} +.top-0 { + top: 0px; +} +.top-1 { + top: 0.25rem; +} +.top-1\/2 { + top: 50%; +} +.top-2 { + top: 0.5rem; +} +.top-2\.5 { + top: 0.625rem; +} +.top-2\/4 { + top: 50%; +} +.top-28 { + top: 7rem; +} +.top-3 { + top: 0.75rem; +} +.top-4 { + top: 1rem; +} +.top-5 { + top: 1.25rem; +} +.top-6 { + top: 1.5rem; +} +.top-\[124px\] { + top: 124px; +} +.top-\[142px\] { + top: 142px; +} +.top-\[178px\] { + top: 178px; +} +.top-\[40px\] { + top: 40px; +} +.top-\[72px\] { + top: 72px; +} +.top-\[88px\] { + top: 88px; +} +.-z-10 { + z-index: -10; +} +.z-0 { + z-index: 0; +} +.z-10 { + z-index: 10; +} +.z-20 { + z-index: 20; +} +.z-30 { + z-index: 30; +} +.z-40 { + z-index: 40; +} +.z-50 { + z-index: 50; +} +.col-span-1 { + grid-column: span 1 / span 1; +} +.col-span-2 { + grid-column: span 2 / span 2; +} +.col-span-3 { + grid-column: span 3 / span 3; +} +.col-span-6 { + grid-column: span 6 / span 6; +} +.m-0 { + margin: 0px; +} +.m-0\.5 { + margin: 0.125rem; +} +.m-2 { + margin: 0.5rem; +} +.m-2\.5 { + margin: 0.625rem; +} +.m-4 { + margin: 1rem; +} +.-mx-1 { + margin-left: -0.25rem; + margin-right: -0.25rem; +} +.-mx-1\.5 { + margin-left: -0.375rem; + margin-right: -0.375rem; +} +.-my-1 { + margin-top: -0.25rem; + margin-bottom: -0.25rem; +} +.-my-1\.5 { + margin-top: -0.375rem; + margin-bottom: -0.375rem; +} +.mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; +} +.mx-1\.5 { + margin-left: 0.375rem; + margin-right: 0.375rem; +} +.mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; +} +.mx-4 { + margin-left: 1rem; + margin-right: 1rem; +} +.mx-auto { + margin-left: auto; + margin-right: auto; +} +.my-10 { + margin-top: 2.5rem; + margin-bottom: 2.5rem; +} +.my-12 { + margin-top: 3rem; + margin-bottom: 3rem; +} +.my-2 { + margin-top: 0.5rem; + margin-bottom: 0.5rem; +} +.my-2\.5 { + margin-top: 0.625rem; + margin-bottom: 0.625rem; +} +.my-3 { + margin-top: 0.75rem; + margin-bottom: 0.75rem; +} +.my-4 { + margin-top: 1rem; + margin-bottom: 1rem; +} +.my-5 { + margin-top: 1.25rem; + margin-bottom: 1.25rem; +} +.my-6 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} +.my-7 { + margin-top: 1.75rem; + margin-bottom: 1.75rem; +} +.my-8 { + margin-top: 2rem; + margin-bottom: 2rem; +} +.-mb-5 { + margin-bottom: -1.25rem; +} +.-mb-px { + margin-bottom: -1px; +} +.-me-0 { + -webkit-margin-end: -0px; + margin-inline-end: -0px; +} +.-me-0\.5 { + -webkit-margin-end: -0.125rem; + margin-inline-end: -0.125rem; +} +.-ml-1 { + margin-left: -0.25rem; +} +.-mr-1 { + margin-right: -0.25rem; +} +.-ms-1 { + -webkit-margin-start: -0.25rem; + margin-inline-start: -0.25rem; +} +.-mt-1 { + margin-top: -0.25rem; +} +.-mt-5 { + margin-top: -1.25rem; +} +.mb-0 { + margin-bottom: 0px; +} +.mb-1 { + margin-bottom: 0.25rem; +} +.mb-1\.5 { + margin-bottom: 0.375rem; +} +.mb-10 { + margin-bottom: 2.5rem; +} +.mb-2 { + margin-bottom: 0.5rem; +} +.mb-2\.5 { + margin-bottom: 0.625rem; +} +.mb-3 { + margin-bottom: 0.75rem; +} +.mb-4 { + margin-bottom: 1rem; +} +.mb-5 { + margin-bottom: 1.25rem; +} +.mb-6 { + margin-bottom: 1.5rem; +} +.mb-7 { + margin-bottom: 1.75rem; +} +.mb-8 { + margin-bottom: 2rem; +} +.mb-px { + margin-bottom: 1px; +} +.me-1 { + -webkit-margin-end: 0.25rem; + margin-inline-end: 0.25rem; +} +.me-1\.5 { + -webkit-margin-end: 0.375rem; + margin-inline-end: 0.375rem; +} +.me-2 { + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} +.me-2\.5 { + -webkit-margin-end: 0.625rem; + margin-inline-end: 0.625rem; +} +.me-3 { + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; +} +.me-4 { + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} +.me-5 { + -webkit-margin-end: 1.25rem; + margin-inline-end: 1.25rem; +} +.me-auto { + -webkit-margin-end: auto; + margin-inline-end: auto; +} +.ml-0 { + margin-left: 0px; +} +.ml-1 { + margin-left: 0.25rem; +} +.ml-1\.5 { + margin-left: 0.375rem; +} +.ml-2 { + margin-left: 0.5rem; +} +.ml-2\.5 { + margin-left: 0.625rem; +} +.ml-3 { + margin-left: 0.75rem; +} +.ml-6 { + margin-left: 1.5rem; +} +.ml-auto { + margin-left: auto; +} +.mr-1 { + margin-right: 0.25rem; +} +.mr-2 { + margin-right: 0.5rem; +} +.mr-3 { + margin-right: 0.75rem; +} +.mr-5 { + margin-right: 1.25rem; +} +.mr-8 { + margin-right: 2rem; +} +.mr-auto { + margin-right: auto; +} +.ms-0 { + -webkit-margin-start: 0px; + margin-inline-start: 0px; +} +.ms-0\.5 { + -webkit-margin-start: 0.125rem; + margin-inline-start: 0.125rem; +} +.ms-1 { + -webkit-margin-start: 0.25rem; + margin-inline-start: 0.25rem; +} +.ms-1\.5 { + -webkit-margin-start: 0.375rem; + margin-inline-start: 0.375rem; +} +.ms-2 { + -webkit-margin-start: 0.5rem; + margin-inline-start: 0.5rem; +} +.ms-2\.5 { + -webkit-margin-start: 0.625rem; + margin-inline-start: 0.625rem; +} +.ms-3 { + -webkit-margin-start: 0.75rem; + margin-inline-start: 0.75rem; +} +.ms-3\.5 { + -webkit-margin-start: 0.875rem; + margin-inline-start: 0.875rem; +} +.ms-4 { + -webkit-margin-start: 1rem; + margin-inline-start: 1rem; +} +.ms-5 { + -webkit-margin-start: 1.25rem; + margin-inline-start: 1.25rem; +} +.ms-6 { + -webkit-margin-start: 1.5rem; + margin-inline-start: 1.5rem; +} +.ms-8 { + -webkit-margin-start: 2rem; + margin-inline-start: 2rem; +} +.ms-auto { + -webkit-margin-start: auto; + margin-inline-start: auto; +} +.mt-0 { + margin-top: 0px; +} +.mt-1 { + margin-top: 0.25rem; +} +.mt-1\.5 { + margin-top: 0.375rem; +} +.mt-10 { + margin-top: 2.5rem; +} +.mt-14 { + margin-top: 3.5rem; +} +.mt-2 { + margin-top: 0.5rem; +} +.mt-2\.5 { + margin-top: 0.625rem; +} +.mt-3 { + margin-top: 0.75rem; +} +.mt-4 { + margin-top: 1rem; +} +.mt-5 { + margin-top: 1.25rem; +} +.mt-6 { + margin-top: 1.5rem; +} +.mt-7 { + margin-top: 1.75rem; +} +.mt-8 { + margin-top: 2rem; +} +.mt-\[2px\] { + margin-top: 2px; +} +.block { + display: block; +} +.inline-block { + display: inline-block; +} +.inline { + display: inline; +} +.flex { + display: flex; +} +.inline-flex { + display: inline-flex; +} +.table { + display: table; +} +.flow-root { + display: flow-root; +} +.grid { + display: grid; +} +.contents { + display: contents; +} +.hidden { + display: none; +} +.h-0 { + height: 0px; +} +.h-0\.5 { + height: 0.125rem; +} +.h-1 { + height: 0.25rem; +} +.h-1\.5 { + height: 0.375rem; +} +.h-10 { + height: 2.5rem; +} +.h-11 { + height: 2.75rem; +} +.h-12 { + height: 3rem; +} +.h-14 { + height: 3.5rem; +} +.h-16 { + height: 4rem; +} +.h-2 { + height: 0.5rem; +} +.h-2\.5 { + height: 0.625rem; +} +.h-20 { + height: 5rem; +} +.h-24 { + height: 6rem; +} +.h-28 { + height: 7rem; +} +.h-3 { + height: 0.75rem; +} +.h-3\.5 { + height: 0.875rem; +} +.h-36 { + height: 9rem; +} +.h-4 { + height: 1rem; +} +.h-48 { + height: 12rem; +} +.h-5 { + height: 1.25rem; +} +.h-56 { + height: 14rem; +} +.h-6 { + height: 1.5rem; +} +.h-64 { + height: 16rem; +} +.h-7 { + height: 1.75rem; +} +.h-72 { + height: 18rem; +} +.h-8 { + height: 2rem; +} +.h-80 { + height: 20rem; +} +.h-9 { + height: 2.25rem; +} +.h-96 { + height: 24rem; +} +.h-\[1\.1rem\] { + height: 1.1rem; +} +.h-\[140px\] { + height: 140px; +} +.h-\[156px\] { + height: 156px; +} +.h-\[172px\] { + height: 172px; +} +.h-\[17px\] { + height: 17px; +} +.h-\[18px\] { + height: 18px; +} +.h-\[193px\] { + height: 193px; +} +.h-\[213px\] { + height: 213px; +} +.h-\[24px\] { + height: 24px; +} +.h-\[32px\] { + height: 32px; +} +.h-\[41px\] { + height: 41px; +} +.h-\[426px\] { + height: 426px; +} +.h-\[454px\] { + height: 454px; +} +.h-\[46px\] { + height: 46px; +} +.h-\[48px\] { + height: 48px; +} +.h-\[52px\] { + height: 52px; +} +.h-\[55px\] { + height: 55px; +} +.h-\[56px\] { + height: 56px; +} +.h-\[572px\] { + height: 572px; +} +.h-\[5px\] { + height: 5px; +} +.h-\[600px\] { + height: 600px; +} +.h-\[63px\] { + height: 63px; +} +.h-\[64px\] { + height: 64px; +} +.h-\[78px\] { + height: 78px; +} +.h-\[calc\(100\%-1rem\)\] { + height: calc(100% - 1rem); +} +.h-\[calc\(100vh-5rem\)\] { + height: calc(100vh - 5rem); +} +.h-auto { + height: auto; +} +.h-full { + height: 100%; +} +.h-px { + height: 1px; +} +.h-screen { + height: 100vh; +} +.max-h-72 { + max-height: 18rem; +} +.max-h-\[48px\] { + max-height: 48px; +} +.max-h-full { + max-height: 100%; +} +.w-1 { + width: 0.25rem; +} +.w-1\/2 { + width: 50%; +} +.w-10 { + width: 2.5rem; +} +.w-11 { + width: 2.75rem; +} +.w-12 { + width: 3rem; +} +.w-14 { + width: 3.5rem; +} +.w-16 { + width: 4rem; +} +.w-2 { + width: 0.5rem; +} +.w-2\.5 { + width: 0.625rem; +} +.w-2\/4 { + width: 50%; +} +.w-20 { + width: 5rem; +} +.w-24 { + width: 6rem; +} +.w-3 { + width: 0.75rem; +} +.w-3\.5 { + width: 0.875rem; +} +.w-32 { + width: 8rem; +} +.w-36 { + width: 9rem; +} +.w-4 { + width: 1rem; +} +.w-40 { + width: 10rem; +} +.w-44 { + width: 11rem; +} +.w-48 { + width: 12rem; +} +.w-5 { + width: 1.25rem; +} +.w-52 { + width: 13rem; +} +.w-56 { + width: 14rem; +} +.w-6 { + width: 1.5rem; +} +.w-60 { + width: 15rem; +} +.w-64 { + width: 16rem; +} +.w-7 { + width: 1.75rem; +} +.w-72 { + width: 18rem; +} +.w-8 { + width: 2rem; +} +.w-80 { + width: 20rem; +} +.w-9 { + width: 2.25rem; +} +.w-96 { + width: 24rem; +} +.w-\[1\.1rem\] { + width: 1.1rem; +} +.w-\[145px\] { + width: 145px; +} +.w-\[148px\] { + width: 148px; +} +.w-\[16rem\] { + width: 16rem; +} +.w-\[188px\] { + width: 188px; +} +.w-\[208px\] { + width: 208px; +} +.w-\[272px\] { + width: 272px; +} +.w-\[300px\] { + width: 300px; +} +.w-\[3px\] { + width: 3px; +} +.w-\[48px\] { + width: 48px; +} +.w-\[52px\] { + width: 52px; +} +.w-\[56px\] { + width: 56px; +} +.w-\[6px\] { + width: 6px; +} +.w-\[calc\(100\%-2rem\)\] { + width: calc(100% - 2rem); +} +.w-auto { + width: auto; +} +.w-full { + width: 100%; +} +.w-px { + width: 1px; +} +.min-w-0 { + min-width: 0px; +} +.min-w-\[4rem\] { + min-width: 4rem; +} +.min-w-max { + min-width: -moz-max-content; + min-width: max-content; +} +.max-w-2xl { + max-width: 42rem; +} +.max-w-2xs { + max-width: 16rem; +} +.max-w-4xl { + max-width: 56rem; +} +.max-w-7xl { + max-width: 80rem; +} +.max-w-8xl { + max-width: 90rem; +} +.max-w-\[11rem\] { + max-width: 11rem; +} +.max-w-\[128px\] { + max-width: 128px; +} +.max-w-\[133px\] { + max-width: 133px; +} +.max-w-\[13rem\] { + max-width: 13rem; +} +.max-w-\[16rem\] { + max-width: 16rem; +} +.max-w-\[18rem\] { + max-width: 18rem; +} +.max-w-\[2\.5rem\] { + max-width: 2.5rem; +} +.max-w-\[23rem\] { + max-width: 23rem; +} +.max-w-\[24rem\] { + max-width: 24rem; +} +.max-w-\[300px\] { + max-width: 300px; +} +.max-w-\[301px\] { + max-width: 301px; +} +.max-w-\[320px\] { + max-width: 320px; +} +.max-w-\[326px\] { + max-width: 326px; +} +.max-w-\[330px\] { + max-width: 330px; +} +.max-w-\[341px\] { + max-width: 341px; +} +.max-w-\[351px\] { + max-width: 351px; +} +.max-w-\[360px\] { + max-width: 360px; +} +.max-w-\[380px\] { + max-width: 380px; +} +.max-w-\[400px\] { + max-width: 400px; +} +.max-w-\[440px\] { + max-width: 440px; +} +.max-w-\[450px\] { + max-width: 450px; +} +.max-w-\[460px\] { + max-width: 460px; +} +.max-w-\[480px\] { + max-width: 480px; +} +.max-w-\[48px\] { + max-width: 48px; +} +.max-w-\[500px\] { + max-width: 500px; +} +.max-w-\[540px\] { + max-width: 540px; +} +.max-w-\[640px\] { + max-width: 640px; +} +.max-w-\[7rem\] { + max-width: 7rem; +} +.max-w-\[8\.5rem\] { + max-width: 8.5rem; +} +.max-w-\[83px\] { + max-width: 83px; +} +.max-w-\[8rem\] { + max-width: 8rem; +} +.max-w-full { + max-width: 100%; +} +.max-w-lg { + max-width: 32rem; +} +.max-w-md { + max-width: 28rem; +} +.max-w-none { + max-width: none; +} +.max-w-screen-md { + max-width: 768px; +} +.max-w-screen-xl { + max-width: 1280px; +} +.max-w-sm { + max-width: 24rem; +} +.max-w-xl { + max-width: 36rem; +} +.max-w-xs { + max-width: 20rem; +} +.flex-1 { + flex: 1 1 0%; +} +.flex-auto { + flex: 1 1 auto; +} +.flex-none { + flex: none; +} +.flex-shrink-0 { + flex-shrink: 0; +} +.shrink-0 { + flex-shrink: 0; +} +.grow { + flex-grow: 1; +} +.origin-\[0\] { + transform-origin: 0; +} +.-translate-x-1\/2 { + --tw-translate-x: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-x-full { + --tw-translate-x: -100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-y-1\/2 { + --tw-translate-y: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-y-3 { + --tw-translate-y: -0.75rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-y-4 { + --tw-translate-y: -1rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-y-6 { + --tw-translate-y: -1.5rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.-translate-y-full { + --tw-translate-y: -100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-x-0 { + --tw-translate-x: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-x-1\/2 { + --tw-translate-x: 50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-x-full { + --tw-translate-x: 100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-y-1\/2 { + --tw-translate-y: 50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-y-1\/4 { + --tw-translate-y: 25%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.translate-y-full { + --tw-translate-y: 100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.rotate-180 { + --tw-rotate: 180deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.rotate-45 { + --tw-rotate: 45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.rotate-90 { + --tw-rotate: 90deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.scale-75 { + --tw-scale-x: .75; + --tw-scale-y: .75; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.transform { + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.transform-none { + transform: none; +} +@keyframes pulse { + + 50% { + opacity: .5; + } +} +.animate-pulse { + animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; +} +@keyframes spin { + + to { + transform: rotate(360deg); + } +} +.animate-spin { + animation: spin 1s linear infinite; +} +.cursor-not-allowed { + cursor: not-allowed; +} +.cursor-pointer { + cursor: pointer; +} +.list-inside { + list-style-position: inside; +} +.list-decimal { + list-style-type: decimal; +} +.list-disc { + list-style-type: disc; +} +.list-none { + list-style-type: none; +} +.appearance-none { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +.grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); +} +.grid-cols-10 { + grid-template-columns: repeat(10, minmax(0, 1fr)); +} +.grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); +} +.grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); +} +.grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); +} +.grid-cols-5 { + grid-template-columns: repeat(5, minmax(0, 1fr)); +} +.grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); +} +.grid-cols-7 { + grid-template-columns: repeat(7, minmax(0, 1fr)); +} +.grid-cols-8 { + grid-template-columns: repeat(8, minmax(0, 1fr)); +} +.flex-row { + flex-direction: row; +} +.flex-col { + flex-direction: column; +} +.flex-wrap { + flex-wrap: wrap; +} +.items-start { + align-items: flex-start; +} +.items-end { + align-items: flex-end; +} +.items-center { + align-items: center; +} +.items-baseline { + align-items: baseline; +} +.justify-start { + justify-content: flex-start; +} +.justify-end { + justify-content: flex-end; +} +.justify-center { + justify-content: center; +} +.justify-between { + justify-content: space-between; +} +.gap-1 { + gap: 0.25rem; +} +.gap-12 { + gap: 3rem; +} +.gap-16 { + gap: 4rem; +} +.gap-2 { + gap: 0.5rem; +} +.gap-2\.5 { + gap: 0.625rem; +} +.gap-3 { + gap: 0.75rem; +} +.gap-4 { + gap: 1rem; +} +.gap-5 { + gap: 1.25rem; +} +.gap-6 { + gap: 1.5rem; +} +.gap-8 { + gap: 2rem; +} +.gap-x-16 { + -moz-column-gap: 4rem; + column-gap: 4rem; +} +.gap-x-4 { + -moz-column-gap: 1rem; + column-gap: 1rem; +} +.gap-y-3 { + row-gap: 0.75rem; +} +.-space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(-0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(-0.75rem * calc(1 - var(--tw-space-x-reverse))); +} +.-space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(-1rem * var(--tw-space-x-reverse)); + margin-left: calc(-1rem * calc(1 - var(--tw-space-x-reverse))); +} +.-space-x-px > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(-1px * var(--tw-space-x-reverse)); + margin-left: calc(-1px * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0px * var(--tw-space-x-reverse)); + margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-0\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.125rem * var(--tw-space-x-reverse)); + margin-left: calc(0.125rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-1 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.25rem * var(--tw-space-x-reverse)); + margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-1\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.375rem * var(--tw-space-x-reverse)); + margin-left: calc(0.375rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.5rem * var(--tw-space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-2\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.625rem * var(--tw-space-x-reverse)); + margin-left: calc(0.625rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1.25rem * var(--tw-space-x-reverse)); + margin-left: calc(1.25rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-6 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1.5rem * var(--tw-space-x-reverse)); + margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-x-8 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(2rem * var(--tw-space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse))); +} +.space-y-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0px * var(--tw-space-y-reverse)); +} +.space-y-0\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.125rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.125rem * var(--tw-space-y-reverse)); +} +.space-y-1 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); +} +.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.375rem * var(--tw-space-y-reverse)); +} +.space-y-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); +} +.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.625rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.625rem * var(--tw-space-y-reverse)); +} +.space-y-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); +} +.space-y-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1rem * var(--tw-space-y-reverse)); +} +.space-y-5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1.25rem * var(--tw-space-y-reverse)); +} +.space-y-6 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); +} +.space-y-8 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(2rem * var(--tw-space-y-reverse)); +} +.divide-x > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 0; + border-right-width: calc(1px * var(--tw-divide-x-reverse)); + border-left-width: calc(1px * calc(1 - var(--tw-divide-x-reverse))); +} +.divide-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 0; + border-right-width: calc(2px * var(--tw-divide-x-reverse)); + border-left-width: calc(2px * calc(1 - var(--tw-divide-x-reverse))); +} +.divide-y > :not([hidden]) ~ :not([hidden]) { + --tw-divide-y-reverse: 0; + border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); + border-bottom-width: calc(1px * var(--tw-divide-y-reverse)); +} +.divide-gray-100 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(243 244 246 / var(--tw-divide-opacity)); +} +.divide-gray-200 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-divide-opacity)); +} +.divide-gray-300 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-divide-opacity)); +} +.divide-gray-500 > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(107 114 128 / var(--tw-divide-opacity)); +} +.place-self-center { + place-self: center; +} +.self-center { + align-self: center; +} +.overflow-hidden { + overflow: hidden; +} +.overflow-scroll { + overflow: scroll; +} +.overflow-x-auto { + overflow-x: auto; +} +.overflow-y-auto { + overflow-y: auto; +} +.overflow-x-hidden { + overflow-x: hidden; +} +.overflow-y-scroll { + overflow-y: scroll; +} +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.whitespace-normal { + white-space: normal; +} +.whitespace-nowrap { + white-space: nowrap; +} +.whitespace-pre { + white-space: pre; +} +.whitespace-pre-line { + white-space: pre-line; +} +.break-all { + word-break: break-all; +} +.rounded { + border-radius: 0.25rem; +} +.rounded-\[2\.5rem\] { + border-radius: 2.5rem; +} +.rounded-\[2rem\] { + border-radius: 2rem; +} +.rounded-full { + border-radius: 9999px; +} +.rounded-lg { + border-radius: 0.5rem; +} +.rounded-md { + border-radius: 0.375rem; +} +.rounded-none { + border-radius: 0px; +} +.rounded-sm { + border-radius: 0.125rem; +} +.rounded-xl { + border-radius: 0.75rem; +} +.rounded-b { + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} +.rounded-b-\[1rem\] { + border-bottom-right-radius: 1rem; + border-bottom-left-radius: 1rem; +} +.rounded-b-\[2\.5rem\] { + border-bottom-right-radius: 2.5rem; + border-bottom-left-radius: 2.5rem; +} +.rounded-b-lg { + border-bottom-right-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; +} +.rounded-b-xl { + border-bottom-right-radius: 0.75rem; + border-bottom-left-radius: 0.75rem; +} +.rounded-e { + border-start-end-radius: 0.25rem; + border-end-end-radius: 0.25rem; +} +.rounded-e-full { + border-start-end-radius: 9999px; + border-end-end-radius: 9999px; +} +.rounded-e-lg { + border-start-end-radius: 0.5rem; + border-end-end-radius: 0.5rem; +} +.rounded-e-md { + border-start-end-radius: 0.375rem; + border-end-end-radius: 0.375rem; +} +.rounded-e-xl { + border-start-end-radius: 0.75rem; + border-end-end-radius: 0.75rem; +} +.rounded-l-lg { + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; +} +.rounded-r-lg { + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; +} +.rounded-s { + border-start-start-radius: 0.25rem; + border-end-start-radius: 0.25rem; +} +.rounded-s-full { + border-start-start-radius: 9999px; + border-end-start-radius: 9999px; +} +.rounded-s-lg { + border-start-start-radius: 0.5rem; + border-end-start-radius: 0.5rem; +} +.rounded-s-md { + border-start-start-radius: 0.375rem; + border-end-start-radius: 0.375rem; +} +.rounded-t { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; +} +.rounded-t-\[2\.5rem\] { + border-top-left-radius: 2.5rem; + border-top-right-radius: 2.5rem; +} +.rounded-t-lg { + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; +} +.rounded-t-md { + border-top-left-radius: 0.375rem; + border-top-right-radius: 0.375rem; +} +.rounded-t-sm { + border-top-left-radius: 0.125rem; + border-top-right-radius: 0.125rem; +} +.rounded-t-xl { + border-top-left-radius: 0.75rem; + border-top-right-radius: 0.75rem; +} +.rounded-es-xl { + border-end-start-radius: 0.75rem; +} +.rounded-se-lg { + border-start-end-radius: 0.5rem; +} +.rounded-ss-lg { + border-start-start-radius: 0.5rem; +} +.border { + border-width: 1px; +} +.border-0 { + border-width: 0px; +} +.border-2 { + border-width: 2px; +} +.border-\[10px\] { + border-width: 10px; +} +.border-\[14px\] { + border-width: 14px; +} +.border-\[16px\] { + border-width: 16px; +} +.border-\[8px\] { + border-width: 8px; +} +.border-x { + border-left-width: 1px; + border-right-width: 1px; +} +.border-x-0 { + border-left-width: 0px; + border-right-width: 0px; +} +.border-y { + border-top-width: 1px; + border-bottom-width: 1px; +} +.border-b { + border-bottom-width: 1px; +} +.border-b-0 { + border-bottom-width: 0px; +} +.border-b-2 { + border-bottom-width: 2px; +} +.border-e { + border-inline-end-width: 1px; +} +.border-e-0 { + border-inline-end-width: 0px; +} +.border-e-2 { + border-inline-end-width: 2px; +} +.border-l { + border-left-width: 1px; +} +.border-r { + border-right-width: 1px; +} +.border-s { + border-inline-start-width: 1px; +} +.border-s-0 { + border-inline-start-width: 0px; +} +.border-s-2 { + border-inline-start-width: 2px; +} +.border-s-4 { + border-inline-start-width: 4px; +} +.border-t { + border-top-width: 1px; +} +.border-t-0 { + border-top-width: 0px; +} +.border-t-4 { + border-top-width: 4px; +} +.border-dashed { + border-style: dashed; +} +.\!border-blue-700 { + --tw-border-opacity: 1 !important; + border-color: rgb(26 86 219 / var(--tw-border-opacity)) !important; +} +.border-blue-100 { + --tw-border-opacity: 1; + border-color: rgb(225 239 254 / var(--tw-border-opacity)); +} +.border-blue-300 { + --tw-border-opacity: 1; + border-color: rgb(164 202 254 / var(--tw-border-opacity)); +} +.border-blue-400 { + --tw-border-opacity: 1; + border-color: rgb(118 169 250 / var(--tw-border-opacity)); +} +.border-blue-600 { + --tw-border-opacity: 1; + border-color: rgb(28 100 242 / var(--tw-border-opacity)); +} +.border-blue-700 { + --tw-border-opacity: 1; + border-color: rgb(26 86 219 / var(--tw-border-opacity)); +} +.border-blue-800 { + --tw-border-opacity: 1; + border-color: rgb(30 66 159 / var(--tw-border-opacity)); +} +.border-gray-100 { + --tw-border-opacity: 1; + border-color: rgb(243 244 246 / var(--tw-border-opacity)); +} +.border-gray-200 { + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} +.border-gray-300 { + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)); +} +.border-gray-500 { + --tw-border-opacity: 1; + border-color: rgb(107 114 128 / var(--tw-border-opacity)); +} +.border-gray-700 { + --tw-border-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-border-opacity)); +} +.border-gray-800 { + --tw-border-opacity: 1; + border-color: rgb(31 41 55 / var(--tw-border-opacity)); +} +.border-gray-900 { + --tw-border-opacity: 1; + border-color: rgb(17 24 39 / var(--tw-border-opacity)); +} +.border-green-300 { + --tw-border-opacity: 1; + border-color: rgb(132 225 188 / var(--tw-border-opacity)); +} +.border-green-400 { + --tw-border-opacity: 1; + border-color: rgb(49 196 141 / var(--tw-border-opacity)); +} +.border-green-500 { + --tw-border-opacity: 1; + border-color: rgb(14 159 110 / var(--tw-border-opacity)); +} +.border-green-600 { + --tw-border-opacity: 1; + border-color: rgb(5 122 85 / var(--tw-border-opacity)); +} +.border-green-700 { + --tw-border-opacity: 1; + border-color: rgb(4 108 78 / var(--tw-border-opacity)); +} +.border-green-800 { + --tw-border-opacity: 1; + border-color: rgb(3 84 63 / var(--tw-border-opacity)); +} +.border-indigo-400 { + --tw-border-opacity: 1; + border-color: rgb(141 162 251 / var(--tw-border-opacity)); +} +.border-pink-400 { + --tw-border-opacity: 1; + border-color: rgb(241 126 184 / var(--tw-border-opacity)); +} +.border-purple-400 { + --tw-border-opacity: 1; + border-color: rgb(172 148 250 / var(--tw-border-opacity)); +} +.border-purple-600 { + --tw-border-opacity: 1; + border-color: rgb(126 58 242 / var(--tw-border-opacity)); +} +.border-purple-700 { + --tw-border-opacity: 1; + border-color: rgb(108 43 217 / var(--tw-border-opacity)); +} +.border-red-300 { + --tw-border-opacity: 1; + border-color: rgb(248 180 180 / var(--tw-border-opacity)); +} +.border-red-400 { + --tw-border-opacity: 1; + border-color: rgb(249 128 128 / var(--tw-border-opacity)); +} +.border-red-500 { + --tw-border-opacity: 1; + border-color: rgb(240 82 82 / var(--tw-border-opacity)); +} +.border-red-600 { + --tw-border-opacity: 1; + border-color: rgb(224 36 36 / var(--tw-border-opacity)); +} +.border-red-700 { + --tw-border-opacity: 1; + border-color: rgb(200 30 30 / var(--tw-border-opacity)); +} +.border-red-800 { + --tw-border-opacity: 1; + border-color: rgb(155 28 28 / var(--tw-border-opacity)); +} +.border-transparent { + border-color: transparent; +} +.border-white { + --tw-border-opacity: 1; + border-color: rgb(255 255 255 / var(--tw-border-opacity)); +} +.border-yellow-300 { + --tw-border-opacity: 1; + border-color: rgb(250 202 21 / var(--tw-border-opacity)); +} +.border-yellow-400 { + --tw-border-opacity: 1; + border-color: rgb(227 160 8 / var(--tw-border-opacity)); +} +.border-yellow-800 { + --tw-border-opacity: 1; + border-color: rgb(114 59 19 / var(--tw-border-opacity)); +} +.border-e-gray-50 { + --tw-border-opacity: 1; + border-inline-end-color: rgb(249 250 251 / var(--tw-border-opacity)); +} +.border-s-gray-100 { + --tw-border-opacity: 1; + border-inline-start-color: rgb(243 244 246 / var(--tw-border-opacity)); +} +.border-s-gray-50 { + --tw-border-opacity: 1; + border-inline-start-color: rgb(249 250 251 / var(--tw-border-opacity)); +} +.\!bg-gray-200 { + --tw-bg-opacity: 1 !important; + background-color: rgb(229 231 235 / var(--tw-bg-opacity)) !important; +} +.\!bg-gray-50 { + --tw-bg-opacity: 1 !important; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)) !important; +} +.bg-\[\#050708\] { + --tw-bg-opacity: 1; + background-color: rgb(5 7 8 / var(--tw-bg-opacity)); +} +.bg-\[\#1da1f2\] { + --tw-bg-opacity: 1; + background-color: rgb(29 161 242 / var(--tw-bg-opacity)); +} +.bg-\[\#24292F\] { + --tw-bg-opacity: 1; + background-color: rgb(36 41 47 / var(--tw-bg-opacity)); +} +.bg-\[\#2557D6\] { + --tw-bg-opacity: 1; + background-color: rgb(37 87 214 / var(--tw-bg-opacity)); +} +.bg-\[\#3b5998\] { + --tw-bg-opacity: 1; + background-color: rgb(59 89 152 / var(--tw-bg-opacity)); +} +.bg-\[\#4285F4\] { + --tw-bg-opacity: 1; + background-color: rgb(66 133 244 / var(--tw-bg-opacity)); +} +.bg-\[\#F7BE38\] { + --tw-bg-opacity: 1; + background-color: rgb(247 190 56 / var(--tw-bg-opacity)); +} +.bg-\[\#FF9119\] { + --tw-bg-opacity: 1; + background-color: rgb(255 145 25 / var(--tw-bg-opacity)); +} +.bg-\[\#hex\] { + background-color: #hex; +} +.bg-blue-100 { + --tw-bg-opacity: 1; + background-color: rgb(225 239 254 / var(--tw-bg-opacity)); +} +.bg-blue-200 { + --tw-bg-opacity: 1; + background-color: rgb(195 221 253 / var(--tw-bg-opacity)); +} +.bg-blue-300 { + --tw-bg-opacity: 1; + background-color: rgb(164 202 254 / var(--tw-bg-opacity)); +} +.bg-blue-400 { + --tw-bg-opacity: 1; + background-color: rgb(118 169 250 / var(--tw-bg-opacity)); +} +.bg-blue-50 { + --tw-bg-opacity: 1; + background-color: rgb(235 245 255 / var(--tw-bg-opacity)); +} +.bg-blue-500 { + --tw-bg-opacity: 1; + background-color: rgb(63 131 248 / var(--tw-bg-opacity)); +} +.bg-blue-600 { + --tw-bg-opacity: 1; + background-color: rgb(28 100 242 / var(--tw-bg-opacity)); +} +.bg-blue-700 { + --tw-bg-opacity: 1; + background-color: rgb(26 86 219 / var(--tw-bg-opacity)); +} +.bg-blue-800 { + --tw-bg-opacity: 1; + background-color: rgb(30 66 159 / var(--tw-bg-opacity)); +} +.bg-blue-900 { + --tw-bg-opacity: 1; + background-color: rgb(35 56 118 / var(--tw-bg-opacity)); +} +.bg-gray-100 { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} +.bg-gray-200 { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity)); +} +.bg-gray-300 { + --tw-bg-opacity: 1; + background-color: rgb(209 213 219 / var(--tw-bg-opacity)); +} +.bg-gray-400 { + --tw-bg-opacity: 1; + background-color: rgb(156 163 175 / var(--tw-bg-opacity)); +} +.bg-gray-50 { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} +.bg-gray-500 { + --tw-bg-opacity: 1; + background-color: rgb(107 114 128 / var(--tw-bg-opacity)); +} +.bg-gray-600 { + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity)); +} +.bg-gray-700 { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} +.bg-gray-800 { + --tw-bg-opacity: 1; + background-color: rgb(31 41 55 / var(--tw-bg-opacity)); +} +.bg-gray-900 { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} +.bg-gray-900\/50 { + background-color: rgb(17 24 39 / 0.5); +} +.bg-gray-900\/90 { + background-color: rgb(17 24 39 / 0.9); +} +.bg-green-100 { + --tw-bg-opacity: 1; + background-color: rgb(222 247 236 / var(--tw-bg-opacity)); +} +.bg-green-200 { + --tw-bg-opacity: 1; + background-color: rgb(188 240 218 / var(--tw-bg-opacity)); +} +.bg-green-300 { + --tw-bg-opacity: 1; + background-color: rgb(132 225 188 / var(--tw-bg-opacity)); +} +.bg-green-400 { + --tw-bg-opacity: 1; + background-color: rgb(49 196 141 / var(--tw-bg-opacity)); +} +.bg-green-50 { + --tw-bg-opacity: 1; + background-color: rgb(243 250 247 / var(--tw-bg-opacity)); +} +.bg-green-500 { + --tw-bg-opacity: 1; + background-color: rgb(14 159 110 / var(--tw-bg-opacity)); +} +.bg-green-600 { + --tw-bg-opacity: 1; + background-color: rgb(5 122 85 / var(--tw-bg-opacity)); +} +.bg-green-700 { + --tw-bg-opacity: 1; + background-color: rgb(4 108 78 / var(--tw-bg-opacity)); +} +.bg-green-800 { + --tw-bg-opacity: 1; + background-color: rgb(3 84 63 / var(--tw-bg-opacity)); +} +.bg-green-900 { + --tw-bg-opacity: 1; + background-color: rgb(1 71 55 / var(--tw-bg-opacity)); +} +.bg-indigo-100 { + --tw-bg-opacity: 1; + background-color: rgb(229 237 255 / var(--tw-bg-opacity)); +} +.bg-indigo-200 { + --tw-bg-opacity: 1; + background-color: rgb(205 219 254 / var(--tw-bg-opacity)); +} +.bg-indigo-300 { + --tw-bg-opacity: 1; + background-color: rgb(180 198 252 / var(--tw-bg-opacity)); +} +.bg-indigo-400 { + --tw-bg-opacity: 1; + background-color: rgb(141 162 251 / var(--tw-bg-opacity)); +} +.bg-indigo-50 { + --tw-bg-opacity: 1; + background-color: rgb(240 245 255 / var(--tw-bg-opacity)); +} +.bg-indigo-500 { + --tw-bg-opacity: 1; + background-color: rgb(104 117 245 / var(--tw-bg-opacity)); +} +.bg-indigo-600 { + --tw-bg-opacity: 1; + background-color: rgb(88 80 236 / var(--tw-bg-opacity)); +} +.bg-indigo-700 { + --tw-bg-opacity: 1; + background-color: rgb(81 69 205 / var(--tw-bg-opacity)); +} +.bg-indigo-800 { + --tw-bg-opacity: 1; + background-color: rgb(66 56 157 / var(--tw-bg-opacity)); +} +.bg-indigo-900 { + --tw-bg-opacity: 1; + background-color: rgb(54 47 120 / var(--tw-bg-opacity)); +} +.bg-orange-100 { + --tw-bg-opacity: 1; + background-color: rgb(254 236 220 / var(--tw-bg-opacity)); +} +.bg-orange-300 { + --tw-bg-opacity: 1; + background-color: rgb(253 186 140 / var(--tw-bg-opacity)); +} +.bg-orange-50 { + --tw-bg-opacity: 1; + background-color: rgb(255 248 241 / var(--tw-bg-opacity)); +} +.bg-orange-500 { + --tw-bg-opacity: 1; + background-color: rgb(255 90 31 / var(--tw-bg-opacity)); +} +.bg-pink-100 { + --tw-bg-opacity: 1; + background-color: rgb(252 232 243 / var(--tw-bg-opacity)); +} +.bg-pink-200 { + --tw-bg-opacity: 1; + background-color: rgb(250 209 232 / var(--tw-bg-opacity)); +} +.bg-pink-300 { + --tw-bg-opacity: 1; + background-color: rgb(248 180 217 / var(--tw-bg-opacity)); +} +.bg-pink-400 { + --tw-bg-opacity: 1; + background-color: rgb(241 126 184 / var(--tw-bg-opacity)); +} +.bg-pink-50 { + --tw-bg-opacity: 1; + background-color: rgb(253 242 248 / var(--tw-bg-opacity)); +} +.bg-pink-500 { + --tw-bg-opacity: 1; + background-color: rgb(231 70 148 / var(--tw-bg-opacity)); +} +.bg-pink-600 { + --tw-bg-opacity: 1; + background-color: rgb(214 31 105 / var(--tw-bg-opacity)); +} +.bg-pink-700 { + --tw-bg-opacity: 1; + background-color: rgb(191 18 93 / var(--tw-bg-opacity)); +} +.bg-pink-800 { + --tw-bg-opacity: 1; + background-color: rgb(153 21 75 / var(--tw-bg-opacity)); +} +.bg-pink-900 { + --tw-bg-opacity: 1; + background-color: rgb(117 26 61 / var(--tw-bg-opacity)); +} +.bg-purple-100 { + --tw-bg-opacity: 1; + background-color: rgb(237 235 254 / var(--tw-bg-opacity)); +} +.bg-purple-200 { + --tw-bg-opacity: 1; + background-color: rgb(220 215 254 / var(--tw-bg-opacity)); +} +.bg-purple-300 { + --tw-bg-opacity: 1; + background-color: rgb(202 191 253 / var(--tw-bg-opacity)); +} +.bg-purple-400 { + --tw-bg-opacity: 1; + background-color: rgb(172 148 250 / var(--tw-bg-opacity)); +} +.bg-purple-50 { + --tw-bg-opacity: 1; + background-color: rgb(246 245 255 / var(--tw-bg-opacity)); +} +.bg-purple-500 { + --tw-bg-opacity: 1; + background-color: rgb(144 97 249 / var(--tw-bg-opacity)); +} +.bg-purple-600 { + --tw-bg-opacity: 1; + background-color: rgb(126 58 242 / var(--tw-bg-opacity)); +} +.bg-purple-700 { + --tw-bg-opacity: 1; + background-color: rgb(108 43 217 / var(--tw-bg-opacity)); +} +.bg-purple-800 { + --tw-bg-opacity: 1; + background-color: rgb(85 33 181 / var(--tw-bg-opacity)); +} +.bg-purple-900 { + --tw-bg-opacity: 1; + background-color: rgb(74 29 150 / var(--tw-bg-opacity)); +} +.bg-red-100 { + --tw-bg-opacity: 1; + background-color: rgb(253 232 232 / var(--tw-bg-opacity)); +} +.bg-red-200 { + --tw-bg-opacity: 1; + background-color: rgb(251 213 213 / var(--tw-bg-opacity)); +} +.bg-red-300 { + --tw-bg-opacity: 1; + background-color: rgb(248 180 180 / var(--tw-bg-opacity)); +} +.bg-red-400 { + --tw-bg-opacity: 1; + background-color: rgb(249 128 128 / var(--tw-bg-opacity)); +} +.bg-red-50 { + --tw-bg-opacity: 1; + background-color: rgb(253 242 242 / var(--tw-bg-opacity)); +} +.bg-red-500 { + --tw-bg-opacity: 1; + background-color: rgb(240 82 82 / var(--tw-bg-opacity)); +} +.bg-red-600 { + --tw-bg-opacity: 1; + background-color: rgb(224 36 36 / var(--tw-bg-opacity)); +} +.bg-red-700 { + --tw-bg-opacity: 1; + background-color: rgb(200 30 30 / var(--tw-bg-opacity)); +} +.bg-red-800 { + --tw-bg-opacity: 1; + background-color: rgb(155 28 28 / var(--tw-bg-opacity)); +} +.bg-red-900 { + --tw-bg-opacity: 1; + background-color: rgb(119 29 29 / var(--tw-bg-opacity)); +} +.bg-teal-100 { + --tw-bg-opacity: 1; + background-color: rgb(213 245 246 / var(--tw-bg-opacity)); +} +.bg-teal-50 { + --tw-bg-opacity: 1; + background-color: rgb(237 250 250 / var(--tw-bg-opacity)); +} +.bg-teal-500 { + --tw-bg-opacity: 1; + background-color: rgb(6 148 162 / var(--tw-bg-opacity)); +} +.bg-transparent { + background-color: transparent; +} +.bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} +.bg-white\/30 { + background-color: rgb(255 255 255 / 0.3); +} +.bg-white\/50 { + background-color: rgb(255 255 255 / 0.5); +} +.bg-yellow-100 { + --tw-bg-opacity: 1; + background-color: rgb(253 246 178 / var(--tw-bg-opacity)); +} +.bg-yellow-200 { + --tw-bg-opacity: 1; + background-color: rgb(252 233 106 / var(--tw-bg-opacity)); +} +.bg-yellow-300 { + --tw-bg-opacity: 1; + background-color: rgb(250 202 21 / var(--tw-bg-opacity)); +} +.bg-yellow-400 { + --tw-bg-opacity: 1; + background-color: rgb(227 160 8 / var(--tw-bg-opacity)); +} +.bg-yellow-50 { + --tw-bg-opacity: 1; + background-color: rgb(253 253 234 / var(--tw-bg-opacity)); +} +.bg-yellow-500 { + --tw-bg-opacity: 1; + background-color: rgb(194 120 3 / var(--tw-bg-opacity)); +} +.bg-yellow-600 { + --tw-bg-opacity: 1; + background-color: rgb(159 88 10 / var(--tw-bg-opacity)); +} +.bg-yellow-700 { + --tw-bg-opacity: 1; + background-color: rgb(142 75 16 / var(--tw-bg-opacity)); +} +.bg-yellow-800 { + --tw-bg-opacity: 1; + background-color: rgb(114 59 19 / var(--tw-bg-opacity)); +} +.bg-yellow-900 { + --tw-bg-opacity: 1; + background-color: rgb(99 49 18 / var(--tw-bg-opacity)); +} +.bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/conference\.jpg\'\)\] { + background-image: url('https://flowbite.s3.amazonaws.com/docs/jumbotron/conference.jpg'); +} +.bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/hero-pattern\.svg\'\)\] { + background-image: url('https://flowbite.s3.amazonaws.com/docs/jumbotron/hero-pattern.svg'); +} +.bg-gradient-to-b { + background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); +} +.bg-gradient-to-br { + background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); +} +.bg-gradient-to-r { + background-image: linear-gradient(to right, var(--tw-gradient-stops)); +} +.from-blue-50 { + --tw-gradient-from: #EBF5FF var(--tw-gradient-from-position); + --tw-gradient-to: rgb(235 245 255 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-blue-500 { + --tw-gradient-from: #3F83F8 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-cyan-400 { + --tw-gradient-from: #22d3ee var(--tw-gradient-from-position); + --tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-cyan-500 { + --tw-gradient-from: #06b6d4 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-green-400 { + --tw-gradient-from: #31C48D var(--tw-gradient-from-position); + --tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-lime-200 { + --tw-gradient-from: #d9f99d var(--tw-gradient-from-position); + --tw-gradient-to: rgb(217 249 157 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-pink-400 { + --tw-gradient-from: #F17EB8 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(241 126 184 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-pink-500 { + --tw-gradient-from: #E74694 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-purple-500 { + --tw-gradient-from: #9061F9 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-purple-600 { + --tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-red-200 { + --tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-red-400 { + --tw-gradient-from: #F98080 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(249 128 128 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-sky-400 { + --tw-gradient-from: #38bdf8 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(56 189 248 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-teal-200 { + --tw-gradient-from: #AFECEF var(--tw-gradient-from-position); + --tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-teal-300 { + --tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.from-teal-400 { + --tw-gradient-from: #16BDCA var(--tw-gradient-from-position); + --tw-gradient-to: rgb(22 189 202 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} +.via-blue-600 { + --tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-cyan-500 { + --tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), #06b6d4 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-green-500 { + --tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), #0E9F6E var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-lime-400 { + --tw-gradient-to: rgb(163 230 53 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), #a3e635 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-pink-500 { + --tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), #E74694 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-purple-600 { + --tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-red-300 { + --tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-red-500 { + --tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), #F05252 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.via-teal-500 { + --tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), #0694A2 var(--tw-gradient-via-position), var(--tw-gradient-to); +} +.to-blue-500 { + --tw-gradient-to: #3F83F8 var(--tw-gradient-to-position); +} +.to-blue-600 { + --tw-gradient-to: #1C64F2 var(--tw-gradient-to-position); +} +.to-blue-700 { + --tw-gradient-to: #1A56DB var(--tw-gradient-to-position); +} +.to-cyan-600 { + --tw-gradient-to: #0891b2 var(--tw-gradient-to-position); +} +.to-emerald-600 { + --tw-gradient-to: #059669 var(--tw-gradient-to-position); +} +.to-green-600 { + --tw-gradient-to: #057A55 var(--tw-gradient-to-position); +} +.to-lime-200 { + --tw-gradient-to: #d9f99d var(--tw-gradient-to-position); +} +.to-lime-300 { + --tw-gradient-to: #bef264 var(--tw-gradient-to-position); +} +.to-lime-500 { + --tw-gradient-to: #84cc16 var(--tw-gradient-to-position); +} +.to-orange-400 { + --tw-gradient-to: #FF8A4C var(--tw-gradient-to-position); +} +.to-pink-500 { + --tw-gradient-to: #E74694 var(--tw-gradient-to-position); +} +.to-pink-600 { + --tw-gradient-to: #D61F69 var(--tw-gradient-to-position); +} +.to-purple-700 { + --tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position); +} +.to-red-600 { + --tw-gradient-to: #E02424 var(--tw-gradient-to-position); +} +.to-teal-600 { + --tw-gradient-to: #047481 var(--tw-gradient-to-position); +} +.to-transparent { + --tw-gradient-to: transparent var(--tw-gradient-to-position); +} +.to-yellow-200 { + --tw-gradient-to: #FCE96A var(--tw-gradient-to-position); +} +.bg-cover { + background-size: cover; +} +.bg-local { + background-attachment: local; +} +.bg-clip-text { + -webkit-background-clip: text; + background-clip: text; +} +.bg-center { + background-position: center; +} +.bg-no-repeat { + background-repeat: no-repeat; +} +.fill-blue-600 { + fill: #1C64F2; +} +.fill-gray-500 { + fill: #6B7280; +} +.fill-gray-600 { + fill: #4B5563; +} +.fill-green-500 { + fill: #0E9F6E; +} +.fill-pink-600 { + fill: #D61F69; +} +.fill-purple-600 { + fill: #7E3AF2; +} +.fill-red-600 { + fill: #E02424; +} +.fill-yellow-400 { + fill: #E3A008; +} +.object-cover { + -o-object-fit: cover; + object-fit: cover; +} +.\!p-0 { + padding: 0px !important; +} +.p-0 { + padding: 0px; +} +.p-0\.5 { + padding: 0.125rem; +} +.p-1 { + padding: 0.25rem; +} +.p-1\.5 { + padding: 0.375rem; +} +.p-2 { + padding: 0.5rem; +} +.p-2\.5 { + padding: 0.625rem; +} +.p-3 { + padding: 0.75rem; +} +.p-4 { + padding: 1rem; +} +.p-5 { + padding: 1.25rem; +} +.p-6 { + padding: 1.5rem; +} +.p-8 { + padding: 2rem; +} +.p-px { + padding: 1px; +} +.px-0 { + padding-left: 0px; + padding-right: 0px; +} +.px-0\.5 { + padding-left: 0.125rem; + padding-right: 0.125rem; +} +.px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; +} +.px-1\.5 { + padding-left: 0.375rem; + padding-right: 0.375rem; +} +.px-16 { + padding-left: 4rem; + padding-right: 4rem; +} +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} +.px-2\.5 { + padding-left: 0.625rem; + padding-right: 0.625rem; +} +.px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} +.px-4 { + padding-left: 1rem; + padding-right: 1rem; +} +.px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; +} +.px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; +} +.px-8 { + padding-left: 2rem; + padding-right: 2rem; +} +.py-0 { + padding-top: 0px; + padding-bottom: 0px; +} +.py-0\.5 { + padding-top: 0.125rem; + padding-bottom: 0.125rem; +} +.py-1 { + padding-top: 0.25rem; + padding-bottom: 0.25rem; +} +.py-1\.5 { + padding-top: 0.375rem; + padding-bottom: 0.375rem; +} +.py-12 { + padding-top: 3rem; + padding-bottom: 3rem; +} +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} +.py-2\.5 { + padding-top: 0.625rem; + padding-bottom: 0.625rem; +} +.py-24 { + padding-top: 6rem; + padding-bottom: 6rem; +} +.py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; +} +.py-3\.5 { + padding-top: 0.875rem; + padding-bottom: 0.875rem; +} +.py-4 { + padding-top: 1rem; + padding-bottom: 1rem; +} +.py-48 { + padding-top: 12rem; + padding-bottom: 12rem; +} +.py-5 { + padding-top: 1.25rem; + padding-bottom: 1.25rem; +} +.py-6 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; +} +.py-8 { + padding-top: 2rem; + padding-bottom: 2rem; +} +.py-px { + padding-top: 1px; + padding-bottom: 1px; +} +.pb-0 { + padding-bottom: 0px; +} +.pb-1 { + padding-bottom: 0.25rem; +} +.pb-1\.5 { + padding-bottom: 0.375rem; +} +.pb-10 { + padding-bottom: 2.5rem; +} +.pb-16 { + padding-bottom: 4rem; +} +.pb-2 { + padding-bottom: 0.5rem; +} +.pb-2\.5 { + padding-bottom: 0.625rem; +} +.pb-3 { + padding-bottom: 0.75rem; +} +.pb-4 { + padding-bottom: 1rem; +} +.pb-48 { + padding-bottom: 12rem; +} +.pb-5 { + padding-bottom: 1.25rem; +} +.pb-6 { + padding-bottom: 1.5rem; +} +.pb-8 { + padding-bottom: 2rem; +} +.pb-96 { + padding-bottom: 24rem; +} +.pe-0 { + -webkit-padding-end: 0px; + padding-inline-end: 0px; +} +.pe-1 { + -webkit-padding-end: 0.25rem; + padding-inline-end: 0.25rem; +} +.pe-10 { + -webkit-padding-end: 2.5rem; + padding-inline-end: 2.5rem; +} +.pe-3 { + -webkit-padding-end: 0.75rem; + padding-inline-end: 0.75rem; +} +.pe-3\.5 { + -webkit-padding-end: 0.875rem; + padding-inline-end: 0.875rem; +} +.pe-4 { + -webkit-padding-end: 1rem; + padding-inline-end: 1rem; +} +.pe-5 { + -webkit-padding-end: 1.25rem; + padding-inline-end: 1.25rem; +} +.pl-10 { + padding-left: 2.5rem; +} +.pl-11 { + padding-left: 2.75rem; +} +.pl-2 { + padding-left: 0.5rem; +} +.pl-2\.5 { + padding-left: 0.625rem; +} +.pl-3 { + padding-left: 0.75rem; +} +.pl-3\.5 { + padding-left: 0.875rem; +} +.pl-5 { + padding-left: 1.25rem; +} +.pl-8 { + padding-left: 2rem; +} +.pr-4 { + padding-right: 1rem; +} +.pr-5 { + padding-right: 1.25rem; +} +.ps-0 { + -webkit-padding-start: 0px; + padding-inline-start: 0px; +} +.ps-1 { + -webkit-padding-start: 0.25rem; + padding-inline-start: 0.25rem; +} +.ps-1\.5 { + -webkit-padding-start: 0.375rem; + padding-inline-start: 0.375rem; +} +.ps-10 { + -webkit-padding-start: 2.5rem; + padding-inline-start: 2.5rem; +} +.ps-2 { + -webkit-padding-start: 0.5rem; + padding-inline-start: 0.5rem; +} +.ps-2\.5 { + -webkit-padding-start: 0.625rem; + padding-inline-start: 0.625rem; +} +.ps-3 { + -webkit-padding-start: 0.75rem; + padding-inline-start: 0.75rem; +} +.ps-3\.5 { + -webkit-padding-start: 0.875rem; + padding-inline-start: 0.875rem; +} +.ps-4 { + -webkit-padding-start: 1rem; + padding-inline-start: 1rem; +} +.ps-5 { + -webkit-padding-start: 1.25rem; + padding-inline-start: 1.25rem; +} +.ps-6 { + -webkit-padding-start: 1.5rem; + padding-inline-start: 1.5rem; +} +.pt-0 { + padding-top: 0px; +} +.pt-10 { + padding-top: 2.5rem; +} +.pt-16 { + padding-top: 4rem; +} +.pt-2 { + padding-top: 0.5rem; +} +.pt-20 { + padding-top: 5rem; +} +.pt-24 { + padding-top: 6rem; +} +.pt-3 { + padding-top: 0.75rem; +} +.pt-32 { + padding-top: 8rem; +} +.pt-36 { + padding-top: 9rem; +} +.pt-4 { + padding-top: 1rem; +} +.pt-5 { + padding-top: 1.25rem; +} +.pt-52 { + padding-top: 13rem; +} +.pt-6 { + padding-top: 1.5rem; +} +.pt-60 { + padding-top: 15rem; +} +.pt-64 { + padding-top: 16rem; +} +.pt-8 { + padding-top: 2rem; +} +.pt-80 { + padding-top: 20rem; +} +.text-left { + text-align: left; +} +.text-center { + text-align: center; +} +.text-right { + text-align: right; +} +.text-justify { + text-align: justify; +} +.font-sans { + font-family: Inter, ui-sans-serif, system-ui, -apple-system, system-ui, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji; +} +.text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} +.text-2xs { + font-size: 0.625rem; +} +.text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; +} +.text-4xl { + font-size: 2.25rem; + line-height: 2.5rem; +} +.text-5xl { + font-size: 3rem; + line-height: 1; +} +.text-6xl { + font-size: 3.75rem; + line-height: 1; +} +.text-7xl { + font-size: 4.5rem; + line-height: 1; +} +.text-8xl { + font-size: 6rem; + line-height: 1; +} +.text-9xl { + font-size: 8rem; + line-height: 1; +} +.text-base { + font-size: 1rem; + line-height: 1.5rem; +} +.text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +} +.text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} +.text-xl { + font-size: 1.25rem; + line-height: 1.75rem; +} +.text-xs { + font-size: 0.75rem; + line-height: 1rem; +} +.font-black { + font-weight: 900; +} +.font-bold { + font-weight: 700; +} +.font-extrabold { + font-weight: 800; +} +.font-extralight { + font-weight: 200; +} +.font-medium { + font-weight: 500; +} +.font-normal { + font-weight: 400; +} +.font-semibold { + font-weight: 600; +} +.font-thin { + font-weight: 100; +} +.uppercase { + text-transform: uppercase; +} +.lowercase { + text-transform: lowercase; +} +.italic { + font-style: italic; +} +.not-italic { + font-style: normal; +} +.leading-6 { + line-height: 1.5rem; +} +.leading-9 { + line-height: 2.25rem; +} +.leading-loose { + line-height: 2; +} +.leading-none { + line-height: 1; +} +.leading-normal { + line-height: 1.5; +} +.leading-relaxed { + line-height: 1.625; +} +.leading-tight { + line-height: 1.25; +} +.tracking-normal { + letter-spacing: 0em; +} +.tracking-tight { + letter-spacing: -0.025em; +} +.tracking-tighter { + letter-spacing: -0.05em; +} +.tracking-wide { + letter-spacing: 0.025em; +} +.tracking-wider { + letter-spacing: 0.05em; +} +.tracking-widest { + letter-spacing: 0.1em; +} +.\!text-blue-700 { + --tw-text-opacity: 1 !important; + color: rgb(26 86 219 / var(--tw-text-opacity)) !important; +} +.text-\[\#1434CB\] { + --tw-text-opacity: 1; + color: rgb(20 52 203 / var(--tw-text-opacity)); +} +.text-\[\#626890\] { + --tw-text-opacity: 1; + color: rgb(98 104 144 / var(--tw-text-opacity)); +} +.text-\[\#ff2d20\] { + --tw-text-opacity: 1; + color: rgb(255 45 32 / var(--tw-text-opacity)); +} +.text-blue-100 { + --tw-text-opacity: 1; + color: rgb(225 239 254 / var(--tw-text-opacity)); +} +.text-blue-400 { + --tw-text-opacity: 1; + color: rgb(118 169 250 / var(--tw-text-opacity)); +} +.text-blue-50 { + --tw-text-opacity: 1; + color: rgb(235 245 255 / var(--tw-text-opacity)); +} +.text-blue-500 { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} +.text-blue-600 { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} +.text-blue-600\/100 { + color: rgb(28 100 242 / 1); +} +.text-blue-600\/25 { + color: rgb(28 100 242 / 0.25); +} +.text-blue-600\/50 { + color: rgb(28 100 242 / 0.5); +} +.text-blue-600\/75 { + color: rgb(28 100 242 / 0.75); +} +.text-blue-700 { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); +} +.text-blue-800 { + --tw-text-opacity: 1; + color: rgb(30 66 159 / var(--tw-text-opacity)); +} +.text-blue-900 { + --tw-text-opacity: 1; + color: rgb(35 56 118 / var(--tw-text-opacity)); +} +.text-gray-200 { + --tw-text-opacity: 1; + color: rgb(229 231 235 / var(--tw-text-opacity)); +} +.text-gray-300 { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} +.text-gray-400 { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); +} +.text-gray-500 { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} +.text-gray-600 { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} +.text-gray-700 { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); +} +.text-gray-800 { + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity)); +} +.text-gray-900 { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} +.text-green-400 { + --tw-text-opacity: 1; + color: rgb(49 196 141 / var(--tw-text-opacity)); +} +.text-green-500 { + --tw-text-opacity: 1; + color: rgb(14 159 110 / var(--tw-text-opacity)); +} +.text-green-600 { + --tw-text-opacity: 1; + color: rgb(5 122 85 / var(--tw-text-opacity)); +} +.text-green-700 { + --tw-text-opacity: 1; + color: rgb(4 108 78 / var(--tw-text-opacity)); +} +.text-green-800 { + --tw-text-opacity: 1; + color: rgb(3 84 63 / var(--tw-text-opacity)); +} +.text-green-900 { + --tw-text-opacity: 1; + color: rgb(1 71 55 / var(--tw-text-opacity)); +} +.text-indigo-400 { + --tw-text-opacity: 1; + color: rgb(141 162 251 / var(--tw-text-opacity)); +} +.text-indigo-700 { + --tw-text-opacity: 1; + color: rgb(81 69 205 / var(--tw-text-opacity)); +} +.text-indigo-800 { + --tw-text-opacity: 1; + color: rgb(66 56 157 / var(--tw-text-opacity)); +} +.text-orange-500 { + --tw-text-opacity: 1; + color: rgb(255 90 31 / var(--tw-text-opacity)); +} +.text-orange-600 { + --tw-text-opacity: 1; + color: rgb(208 56 1 / var(--tw-text-opacity)); +} +.text-orange-800 { + --tw-text-opacity: 1; + color: rgb(138 44 13 / var(--tw-text-opacity)); +} +.text-pink-400 { + --tw-text-opacity: 1; + color: rgb(241 126 184 / var(--tw-text-opacity)); +} +.text-pink-800 { + --tw-text-opacity: 1; + color: rgb(153 21 75 / var(--tw-text-opacity)); +} +.text-purple-400 { + --tw-text-opacity: 1; + color: rgb(172 148 250 / var(--tw-text-opacity)); +} +.text-purple-600 { + --tw-text-opacity: 1; + color: rgb(126 58 242 / var(--tw-text-opacity)); +} +.text-purple-700 { + --tw-text-opacity: 1; + color: rgb(108 43 217 / var(--tw-text-opacity)); +} +.text-purple-800 { + --tw-text-opacity: 1; + color: rgb(85 33 181 / var(--tw-text-opacity)); +} +.text-red-400 { + --tw-text-opacity: 1; + color: rgb(249 128 128 / var(--tw-text-opacity)); +} +.text-red-500 { + --tw-text-opacity: 1; + color: rgb(240 82 82 / var(--tw-text-opacity)); +} +.text-red-600 { + --tw-text-opacity: 1; + color: rgb(224 36 36 / var(--tw-text-opacity)); +} +.text-red-700 { + --tw-text-opacity: 1; + color: rgb(200 30 30 / var(--tw-text-opacity)); +} +.text-red-800 { + --tw-text-opacity: 1; + color: rgb(155 28 28 / var(--tw-text-opacity)); +} +.text-red-900 { + --tw-text-opacity: 1; + color: rgb(119 29 29 / var(--tw-text-opacity)); +} +.text-sky-500 { + --tw-text-opacity: 1; + color: rgb(14 165 233 / var(--tw-text-opacity)); +} +.text-teal-600 { + --tw-text-opacity: 1; + color: rgb(4 116 129 / var(--tw-text-opacity)); +} +.text-transparent { + color: transparent; +} +.text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} +.text-yellow-300 { + --tw-text-opacity: 1; + color: rgb(250 202 21 / var(--tw-text-opacity)); +} +.text-yellow-400 { + --tw-text-opacity: 1; + color: rgb(227 160 8 / var(--tw-text-opacity)); +} +.text-yellow-500 { + --tw-text-opacity: 1; + color: rgb(194 120 3 / var(--tw-text-opacity)); +} +.text-yellow-700 { + --tw-text-opacity: 1; + color: rgb(142 75 16 / var(--tw-text-opacity)); +} +.text-yellow-800 { + --tw-text-opacity: 1; + color: rgb(114 59 19 / var(--tw-text-opacity)); +} +.underline { + text-decoration-line: underline; +} +.line-through { + text-decoration-line: line-through; +} +.no-underline { + text-decoration-line: none; +} +.decoration-blue-400 { + text-decoration-color: #76A9FA; +} +.decoration-blue-500 { + text-decoration-color: #3F83F8; +} +.decoration-gray-500 { + text-decoration-color: #6B7280; +} +.decoration-green-500 { + text-decoration-color: #0E9F6E; +} +.decoration-indigo-500 { + text-decoration-color: #6875F5; +} +.decoration-red-500 { + text-decoration-color: #F05252; +} +.decoration-sky-500 { + text-decoration-color: #0ea5e9; +} +.decoration-solid { + text-decoration-style: solid; +} +.decoration-double { + text-decoration-style: double; +} +.decoration-dotted { + text-decoration-style: dotted; +} +.decoration-dashed { + text-decoration-style: dashed; +} +.decoration-wavy { + text-decoration-style: wavy; +} +.decoration-8 { + text-decoration-thickness: 8px; +} +.underline-offset-2 { + text-underline-offset: 2px; +} +.antialiased { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.placeholder-green-700::-moz-placeholder { + --tw-placeholder-opacity: 1; + color: rgb(4 108 78 / var(--tw-placeholder-opacity)); +} +.placeholder-green-700::placeholder { + --tw-placeholder-opacity: 1; + color: rgb(4 108 78 / var(--tw-placeholder-opacity)); +} +.placeholder-red-700::-moz-placeholder { + --tw-placeholder-opacity: 1; + color: rgb(200 30 30 / var(--tw-placeholder-opacity)); +} +.placeholder-red-700::placeholder { + --tw-placeholder-opacity: 1; + color: rgb(200 30 30 / var(--tw-placeholder-opacity)); +} +.opacity-0 { + opacity: 0; +} +.opacity-100 { + opacity: 1; +} +.opacity-20 { + opacity: 0.2; +} +.bg-blend-multiply { + background-blend-mode: multiply; +} +.shadow { + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} +.shadow-lg { + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} +.shadow-md { + --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} +.shadow-sm { + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} +.shadow-xl { + --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} +.shadow-blue-500\/50 { + --tw-shadow-color: rgb(63 131 248 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-cyan-500\/50 { + --tw-shadow-color: rgb(6 182 212 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-green-500\/50 { + --tw-shadow-color: rgb(14 159 110 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-lime-500\/50 { + --tw-shadow-color: rgb(132 204 22 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-pink-500\/50 { + --tw-shadow-color: rgb(231 70 148 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-purple-500\/50 { + --tw-shadow-color: rgb(144 97 249 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-red-500\/50 { + --tw-shadow-color: rgb(240 82 82 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.shadow-teal-500\/50 { + --tw-shadow-color: rgb(6 148 162 / 0.5); + --tw-shadow: var(--tw-shadow-colored); +} +.outline { + outline-style: solid; +} +.ring-0 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} +.ring-1 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} +.ring-2 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} +.ring-4 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} +.ring-8 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} +.ring-inset { + --tw-ring-inset: inset; +} +.ring-black { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity)); +} +.ring-gray-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity)); +} +.ring-white { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); +} +.ring-opacity-0 { + --tw-ring-opacity: 0; +} +.blur { + --tw-blur: blur(8px); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} +.blur-sm { + --tw-blur: blur(4px); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} +.grayscale { + --tw-grayscale: grayscale(100%); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} +.invert { + --tw-invert: invert(100%); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} +.filter { + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} +.transition { + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.transition-all { + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.transition-colors { + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.transition-opacity { + transition-property: opacity; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.transition-transform { + transition-property: transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.duration-200 { + transition-duration: 200ms; +} +.duration-300 { + transition-duration: 300ms; +} +.duration-700 { + transition-duration: 700ms; +} +.duration-75 { + transition-duration: 75ms; +} +.ease-in { + transition-timing-function: cubic-bezier(0.4, 0, 1, 1); +} +.ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} +.ease-linear { + transition-timing-function: linear; +} +.ease-out { + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); +} + +/* +“Have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.” +― Steve Jobs +*/ + +:is(.dark .dark\:format-invert) { + --tw-format-body: var(--tw-format-invert-body); + --tw-format-headings: var(--tw-format-invert-headings); + --tw-format-lead: var(--tw-format-invert-lead); + --tw-format-links: var(--tw-format-invert-links); + --tw-format-bold: var(--tw-format-invert-bold); + --tw-format-counters: var(--tw-format-invert-counters); + --tw-format-bullets: var(--tw-format-invert-bullets); + --tw-format-hr: var(--tw-format-invert-hr); + --tw-format-quotes: var(--tw-format-invert-quotes); + --tw-format-quote-borders: var(--tw-format-invert-quote-borders); + --tw-format-captions: var(--tw-format-invert-captions); + --tw-format-code: var(--tw-format-invert-code); + --tw-format-code-bg: var(--tw-format-invert-code-bg); + --tw-format-pre-code: var(--tw-format-invert-pre-code); + --tw-format-pre-bg: var(--tw-format-invert-pre-bg); + --tw-format-th-borders: var(--tw-format-invert-th-borders); + --tw-format-td-borders: var(--tw-format-invert-td-borders); + --tw-format-th-bg: var(--tw-format-invert-th-bg); +} + +@media (min-width: 1024px) { + + .lg\:format-lg { + font-size: 1.125rem; + line-height: 1.7777778; + } + + .lg\:format-lg :where(p):not(:where([class~="not-format"] *)) { + margin-top: 1.3333333em; + margin-bottom: 1.3333333em; + } + + .lg\:format-lg :where([class~="lead"]):not(:where([class~="not-format"] *)) { + font-size: 1.2222222em; + line-height: 1.4545455; + margin-top: 1.0909091em; + margin-bottom: 1.0909091em; + } + + .lg\:format-lg :where(blockquote):not(:where([class~="not-format"] *))::before { + margin-top: 1.6666667em; + } + + .lg\:format-lg :where(blockquote > p:first-child):not(:where([class~="not-format"] *)) { + margin-top: 0.5em; + } + + .lg\:format-lg :where(h1):not(:where([class~="not-format"] *)) { + font-size: 2.6666667em; + margin-top: 0; + margin-bottom: 0.8333333em; + line-height: 1; + } + + .lg\:format-lg :where(h2):not(:where([class~="not-format"] *)) { + font-size: 2em; + margin-top: 0; + margin-bottom: 0.6666667em; + line-height: 1.3333333; + } + + .lg\:format-lg :where(h3):not(:where([class~="not-format"] *)) { + font-size: 1.3333333em; + margin-top: 0; + margin-bottom: 0.6666667em; + line-height: 1.5; + } + + .lg\:format-lg :where(h4):not(:where([class~="not-format"] *)) { + margin-top: 0; + margin-bottom: 0.4444444em; + line-height: 1.5555556; + } + + .lg\:format-lg :where(img):not(:where([class~="not-format"] *)) { + margin-top: 1.7777778em; + margin-bottom: 1.7777778em; + } + + .lg\:format-lg :where(video):not(:where([class~="not-format"] *)) { + margin-top: 1.7777778em; + margin-bottom: 1.7777778em; + } + + .lg\:format-lg :where(figure):not(:where([class~="not-format"] *)) { + margin-top: 1.7777778em; + margin-bottom: 1.7777778em; + } + + .lg\:format-lg :where(figure > *):not(:where([class~="not-format"] *)) { + margin-top: 0; + margin-bottom: 0; + } + + .lg\:format-lg :where(figcaption):not(:where([class~="not-format"] *)) { + font-size: 0.8888889em; + line-height: 1.5; + margin-top: 1em; + } + + .lg\:format-lg :where(code):not(:where([class~="not-format"] *)) { + font-size: 0.8888889em; + } + + .lg\:format-lg :where(h2 code):not(:where([class~="not-format"] *)) { + font-size: 0.8666667em; + } + + .lg\:format-lg :where(h3 code):not(:where([class~="not-format"] *)) { + font-size: 0.875em; + } + + .lg\:format-lg :where(pre):not(:where([class~="not-format"] *)) { + font-size: 0.8888889em; + line-height: 1.75; + margin-top: 2em; + margin-bottom: 2em; + border-radius: 0.375rem; + padding-top: 1em; + padding-right: 1.5em; + padding-bottom: 1em; + padding-left: 1.5em; + } + + .lg\:format-lg :where(ol):not(:where([class~="not-format"] *)) { + margin-top: 1.3333333em; + margin-bottom: 1.3333333em; + padding-left: 1.5555556em; + } + + .lg\:format-lg :where(ul):not(:where([class~="not-format"] *)) { + margin-top: 1.3333333em; + margin-bottom: 1.3333333em; + padding-left: 1.5555556em; + } + + .lg\:format-lg :where(li):not(:where([class~="not-format"] *)) { + margin-top: 0.6666667em; + margin-bottom: 0.6666667em; + } + + .lg\:format-lg :where(ol > li):not(:where([class~="not-format"] *)) { + padding-left: 0.4444444em; + } + + .lg\:format-lg :where(ul > li):not(:where([class~="not-format"] *)) { + padding-left: 0.4444444em; + } + + .lg\:format-lg :where(.format > ul > li p):not(:where([class~="not-format"] *)) { + margin-top: 0.8888889em; + margin-bottom: 0.8888889em; + } + + .lg\:format-lg :where(.format > ul > li > *:first-child):not(:where([class~="not-format"] *)) { + margin-top: 1.3333333em; + } + + .lg\:format-lg :where(.format > ul > li > *:last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 1.3333333em; + } + + .lg\:format-lg :where(.format > ol > li > *:first-child):not(:where([class~="not-format"] *)) { + margin-top: 1.3333333em; + } + + .lg\:format-lg :where(.format > ol > li > *:last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 1.3333333em; + } + + .lg\:format-lg :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-format"] *)) { + margin-top: 0.8888889em; + margin-bottom: 0.8888889em; + } + + .lg\:format-lg :where(hr):not(:where([class~="not-format"] *)) { + margin-top: 3.1111111em; + margin-bottom: 3.1111111em; + } + + .lg\:format-lg :where(hr + *):not(:where([class~="not-format"] *)) { + margin-top: 0; + } + + .lg\:format-lg :where(h2 + *):not(:where([class~="not-format"] *)) { + margin-top: 0; + } + + .lg\:format-lg :where(h3 + *):not(:where([class~="not-format"] *)) { + margin-top: 0; + } + + .lg\:format-lg :where(h4 + *):not(:where([class~="not-format"] *)) { + margin-top: 0; + } + + .lg\:format-lg :where(table):not(:where([class~="not-format"] *)) { + font-size: 0.8888889em; + line-height: 1.5; + } + + .lg\:format-lg :where(thead th):not(:where([class~="not-format"] *)) { + padding-right: 0.75em; + padding-bottom: 0.75em; + padding-left: 0.75em; + } + + .lg\:format-lg :where(thead th:last-child):not(:where([class~="not-format"] *)) { + padding-right: 0; + } + + .lg\:format-lg :where(tbody td, tfoot td):not(:where([class~="not-format"] *)) { + padding-top: 0.75em; + padding-right: 0.75em; + padding-bottom: 0.75em; + padding-left: 0.75em; + } + + .lg\:format-lg :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-format"] *)) { + padding-right: 0; + } + + .lg\:format-lg :where(.format > :first-child):not(:where([class~="not-format"] *)) { + margin-top: 0; + } + + .lg\:format-lg :where(.format > :last-child):not(:where([class~="not-format"] *)) { + margin-bottom: 0; + } +} + +.first-letter\:float-start::first-letter { + float: inline-start; +} + +.first-letter\:me-3::first-letter { + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; +} + +.first-letter\:text-7xl::first-letter { + font-size: 4.5rem; + line-height: 1; +} + +.first-letter\:font-bold::first-letter { + font-weight: 700; +} + +.first-letter\:text-gray-900::first-letter { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.first-line\:uppercase::first-line { + text-transform: uppercase; +} + +.first-line\:tracking-widest::first-line { + letter-spacing: 0.1em; +} + +.after\:absolute::after { + content: var(--tw-content); + position: absolute; +} + +.after\:start-\[2px\]::after { + content: var(--tw-content); + inset-inline-start: 2px; +} + +.after\:start-\[4px\]::after { + content: var(--tw-content); + inset-inline-start: 4px; +} + +.after\:top-0::after { + content: var(--tw-content); + top: 0px; +} + +.after\:top-0\.5::after { + content: var(--tw-content); + top: 0.125rem; +} + +.after\:top-\[2px\]::after { + content: var(--tw-content); + top: 2px; +} + +.after\:mx-2::after { + content: var(--tw-content); + margin-left: 0.5rem; + margin-right: 0.5rem; +} + +.after\:mx-6::after { + content: var(--tw-content); + margin-left: 1.5rem; + margin-right: 1.5rem; +} + +.after\:inline-block::after { + content: var(--tw-content); + display: inline-block; +} + +.after\:hidden::after { + content: var(--tw-content); + display: none; +} + +.after\:h-1::after { + content: var(--tw-content); + height: 0.25rem; +} + +.after\:h-4::after { + content: var(--tw-content); + height: 1rem; +} + +.after\:h-5::after { + content: var(--tw-content); + height: 1.25rem; +} + +.after\:h-6::after { + content: var(--tw-content); + height: 1.5rem; +} + +.after\:w-4::after { + content: var(--tw-content); + width: 1rem; +} + +.after\:w-5::after { + content: var(--tw-content); + width: 1.25rem; +} + +.after\:w-6::after { + content: var(--tw-content); + width: 1.5rem; +} + +.after\:w-full::after { + content: var(--tw-content); + width: 100%; +} + +.after\:rounded-full::after { + content: var(--tw-content); + border-radius: 9999px; +} + +.after\:border::after { + content: var(--tw-content); + border-width: 1px; +} + +.after\:border-4::after { + content: var(--tw-content); + border-width: 4px; +} + +.after\:border-b::after { + content: var(--tw-content); + border-bottom-width: 1px; +} + +.after\:border-blue-100::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(225 239 254 / var(--tw-border-opacity)); +} + +.after\:border-gray-100::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(243 244 246 / var(--tw-border-opacity)); +} + +.after\:border-gray-200::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} + +.after\:border-gray-300::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)); +} + +.after\:bg-white::after { + content: var(--tw-content); + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.after\:text-gray-200::after { + content: var(--tw-content); + --tw-text-opacity: 1; + color: rgb(229 231 235 / var(--tw-text-opacity)); +} + +.after\:transition-all::after { + content: var(--tw-content); + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.after\:content-\[\'\'\]::after { + --tw-content: ''; + content: var(--tw-content); +} + +.after\:content-\[\'\/\'\]::after { + --tw-content: '/'; + content: var(--tw-content); +} + +.odd\:bg-white:nth-child(odd) { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.even\:bg-gray-50:nth-child(even) { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} + +.focus-within\:z-10:focus-within { + z-index: 10; +} + +.hover\:border-blue-700:hover { + --tw-border-opacity: 1; + border-color: rgb(26 86 219 / var(--tw-border-opacity)); +} + +.hover\:border-blue-800:hover { + --tw-border-opacity: 1; + border-color: rgb(30 66 159 / var(--tw-border-opacity)); +} + +.hover\:border-gray-200:hover { + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} + +.hover\:border-gray-300:hover { + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)); +} + +.hover\:bg-\[\#050708\]\/80:hover { + background-color: rgb(5 7 8 / 0.8); +} + +.hover\:bg-\[\#050708\]\/90:hover { + background-color: rgb(5 7 8 / 0.9); +} + +.hover\:bg-\[\#1da1f2\]\/90:hover { + background-color: rgb(29 161 242 / 0.9); +} + +.hover\:bg-\[\#24292F\]\/90:hover { + background-color: rgb(36 41 47 / 0.9); +} + +.hover\:bg-\[\#2557D6\]\/90:hover { + background-color: rgb(37 87 214 / 0.9); +} + +.hover\:bg-\[\#3b5998\]\/90:hover { + background-color: rgb(59 89 152 / 0.9); +} + +.hover\:bg-\[\#4285F4\]\/90:hover { + background-color: rgb(66 133 244 / 0.9); +} + +.hover\:bg-\[\#F7BE38\]\/90:hover { + background-color: rgb(247 190 56 / 0.9); +} + +.hover\:bg-\[\#FF9119\]\/80:hover { + background-color: rgb(255 145 25 / 0.8); +} + +.hover\:bg-blue-100:hover { + --tw-bg-opacity: 1; + background-color: rgb(225 239 254 / var(--tw-bg-opacity)); +} + +.hover\:bg-blue-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(195 221 253 / var(--tw-bg-opacity)); +} + +.hover\:bg-blue-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(63 131 248 / var(--tw-bg-opacity)); +} + +.hover\:bg-blue-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(26 86 219 / var(--tw-bg-opacity)); +} + +.hover\:bg-blue-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(30 66 159 / var(--tw-bg-opacity)); +} + +.hover\:bg-blue-900:hover { + --tw-bg-opacity: 1; + background-color: rgb(35 56 118 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-100:hover { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-300:hover { + --tw-bg-opacity: 1; + background-color: rgb(209 213 219 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-50:hover { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(107 114 128 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-600:hover { + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(31 41 55 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-900:hover { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-900\/50:hover { + background-color: rgb(17 24 39 / 0.5); +} + +.hover\:bg-green-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(188 240 218 / var(--tw-bg-opacity)); +} + +.hover\:bg-green-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(3 84 63 / var(--tw-bg-opacity)); +} + +.hover\:bg-green-900:hover { + --tw-bg-opacity: 1; + background-color: rgb(1 71 55 / var(--tw-bg-opacity)); +} + +.hover\:bg-indigo-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(205 219 254 / var(--tw-bg-opacity)); +} + +.hover\:bg-pink-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(250 209 232 / var(--tw-bg-opacity)); +} + +.hover\:bg-purple-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(220 215 254 / var(--tw-bg-opacity)); +} + +.hover\:bg-purple-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(85 33 181 / var(--tw-bg-opacity)); +} + +.hover\:bg-red-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(251 213 213 / var(--tw-bg-opacity)); +} + +.hover\:bg-red-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(155 28 28 / var(--tw-bg-opacity)); +} + +.hover\:bg-red-900:hover { + --tw-bg-opacity: 1; + background-color: rgb(119 29 29 / var(--tw-bg-opacity)); +} + +.hover\:bg-white:hover { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.hover\:bg-white\/50:hover { + background-color: rgb(255 255 255 / 0.5); +} + +.hover\:bg-yellow-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(252 233 106 / var(--tw-bg-opacity)); +} + +.hover\:bg-yellow-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(194 120 3 / var(--tw-bg-opacity)); +} + +.hover\:bg-yellow-900:hover { + --tw-bg-opacity: 1; + background-color: rgb(99 49 18 / var(--tw-bg-opacity)); +} + +.hover\:bg-gradient-to-bl:hover { + background-image: linear-gradient(to bottom left, var(--tw-gradient-stops)); +} + +.hover\:bg-gradient-to-br:hover { + background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); +} + +.hover\:bg-gradient-to-l:hover { + background-image: linear-gradient(to left, var(--tw-gradient-stops)); +} + +.hover\:from-teal-200:hover { + --tw-gradient-from: #AFECEF var(--tw-gradient-from-position); + --tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.hover\:to-lime-200:hover { + --tw-gradient-to: #d9f99d var(--tw-gradient-to-position); +} + +.hover\:\!text-blue-700:hover { + --tw-text-opacity: 1 !important; + color: rgb(26 86 219 / var(--tw-text-opacity)) !important; +} + +.hover\:text-blue-600:hover { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +.hover\:text-blue-700:hover { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); +} + +.hover\:text-blue-800:hover { + --tw-text-opacity: 1; + color: rgb(30 66 159 / var(--tw-text-opacity)); +} + +.hover\:text-blue-900:hover { + --tw-text-opacity: 1; + color: rgb(35 56 118 / var(--tw-text-opacity)); +} + +.hover\:text-gray-500:hover { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +.hover\:text-gray-600:hover { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} + +.hover\:text-gray-700:hover { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); +} + +.hover\:text-gray-800:hover { + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity)); +} + +.hover\:text-gray-900:hover { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.hover\:text-green-900:hover { + --tw-text-opacity: 1; + color: rgb(1 71 55 / var(--tw-text-opacity)); +} + +.hover\:text-indigo-900:hover { + --tw-text-opacity: 1; + color: rgb(54 47 120 / var(--tw-text-opacity)); +} + +.hover\:text-pink-900:hover { + --tw-text-opacity: 1; + color: rgb(117 26 61 / var(--tw-text-opacity)); +} + +.hover\:text-purple-600:hover { + --tw-text-opacity: 1; + color: rgb(126 58 242 / var(--tw-text-opacity)); +} + +.hover\:text-purple-900:hover { + --tw-text-opacity: 1; + color: rgb(74 29 150 / var(--tw-text-opacity)); +} + +.hover\:text-red-900:hover { + --tw-text-opacity: 1; + color: rgb(119 29 29 / var(--tw-text-opacity)); +} + +.hover\:text-white:hover { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.hover\:text-yellow-900:hover { + --tw-text-opacity: 1; + color: rgb(99 49 18 / var(--tw-text-opacity)); +} + +.hover\:underline:hover { + text-decoration-line: underline; +} + +.hover\:no-underline:hover { + text-decoration-line: none; +} + +.hover\:bg-blend-soft-light:hover { + background-blend-mode: soft-light; +} + +.hover\:shadow:hover { + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.hover\:blur-none:hover { + --tw-blur: blur(0); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.hover\:grayscale-0:hover { + --tw-grayscale: grayscale(0); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.focus\:z-10:focus { + z-index: 10; +} + +.focus\:border-blue-500:focus { + --tw-border-opacity: 1; + border-color: rgb(63 131 248 / var(--tw-border-opacity)); +} + +.focus\:border-blue-600:focus { + --tw-border-opacity: 1; + border-color: rgb(28 100 242 / var(--tw-border-opacity)); +} + +.focus\:border-gray-200:focus { + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} + +.focus\:border-green-500:focus { + --tw-border-opacity: 1; + border-color: rgb(14 159 110 / var(--tw-border-opacity)); +} + +.focus\:border-green-600:focus { + --tw-border-opacity: 1; + border-color: rgb(5 122 85 / var(--tw-border-opacity)); +} + +.focus\:border-red-500:focus { + --tw-border-opacity: 1; + border-color: rgb(240 82 82 / var(--tw-border-opacity)); +} + +.focus\:border-red-600:focus { + --tw-border-opacity: 1; + border-color: rgb(224 36 36 / var(--tw-border-opacity)); +} + +.focus\:bg-gray-100:focus { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} + +.focus\:bg-gray-900:focus { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} + +.focus\:text-blue-700:focus { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); +} + +.focus\:text-white:focus { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.focus\:outline-none:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.focus\:ring-0:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-2:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-4:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-\[\#050708\]\/50:focus { + --tw-ring-color: rgb(5 7 8 / 0.5); +} + +.focus\:ring-\[\#1da1f2\]\/50:focus { + --tw-ring-color: rgb(29 161 242 / 0.5); +} + +.focus\:ring-\[\#24292F\]\/50:focus { + --tw-ring-color: rgb(36 41 47 / 0.5); +} + +.focus\:ring-\[\#2557D6\]\/50:focus { + --tw-ring-color: rgb(37 87 214 / 0.5); +} + +.focus\:ring-\[\#3b5998\]\/50:focus { + --tw-ring-color: rgb(59 89 152 / 0.5); +} + +.focus\:ring-\[\#4285F4\]\/50:focus { + --tw-ring-color: rgb(66 133 244 / 0.5); +} + +.focus\:ring-\[\#F7BE38\]\/50:focus { + --tw-ring-color: rgb(247 190 56 / 0.5); +} + +.focus\:ring-\[\#FF9119\]\/50:focus { + --tw-ring-color: rgb(255 145 25 / 0.5); +} + +.focus\:ring-blue-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity)); +} + +.focus\:ring-blue-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity)); +} + +.focus\:ring-blue-400:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity)); +} + +.focus\:ring-blue-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity)); +} + +.focus\:ring-blue-600:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity)); +} + +.focus\:ring-blue-700:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity)); +} + +.focus\:ring-cyan-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity)); +} + +.focus\:ring-cyan-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-100:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(243 244 246 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-400:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-50:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(249 250 251 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)); +} + +.focus\:ring-gray-700:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity)); +} + +.focus\:ring-green-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity)); +} + +.focus\:ring-green-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity)); +} + +.focus\:ring-green-400:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity)); +} + +.focus\:ring-green-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(14 159 110 / var(--tw-ring-opacity)); +} + +.focus\:ring-lime-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity)); +} + +.focus\:ring-lime-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity)); +} + +.focus\:ring-orange-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(255 90 31 / var(--tw-ring-opacity)); +} + +.focus\:ring-pink-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity)); +} + +.focus\:ring-pink-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity)); +} + +.focus\:ring-purple-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity)); +} + +.focus\:ring-purple-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity)); +} + +.focus\:ring-purple-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(144 97 249 / var(--tw-ring-opacity)); +} + +.focus\:ring-red-100:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity)); +} + +.focus\:ring-red-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity)); +} + +.focus\:ring-red-400:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity)); +} + +.focus\:ring-red-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity)); +} + +.focus\:ring-teal-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity)); +} + +.focus\:ring-teal-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(6 148 162 / var(--tw-ring-opacity)); +} + +.focus\:ring-yellow-300:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity)); +} + +.focus\:ring-yellow-400:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity)); +} + +.focus\:ring-yellow-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(194 120 3 / var(--tw-ring-opacity)); +} + +.group:hover .group-hover\:rotate-45 { + --tw-rotate: 45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.group:hover .group-hover\:bg-gray-50 { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} + +.group:hover .group-hover\:bg-white\/50 { + background-color: rgb(255 255 255 / 0.5); +} + +.group:hover .group-hover\:bg-opacity-0 { + --tw-bg-opacity: 0; +} + +.group:hover .group-hover\:from-cyan-500 { + --tw-gradient-from: #06b6d4 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-green-400 { + --tw-gradient-from: #31C48D var(--tw-gradient-from-position); + --tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-pink-500 { + --tw-gradient-from: #E74694 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-purple-500 { + --tw-gradient-from: #9061F9 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-purple-600 { + --tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-red-200 { + --tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:from-teal-300 { + --tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.group:hover .group-hover\:via-red-300 { + --tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to); +} + +.group:hover .group-hover\:to-blue-500 { + --tw-gradient-to: #3F83F8 var(--tw-gradient-to-position); +} + +.group:hover .group-hover\:to-blue-600 { + --tw-gradient-to: #1C64F2 var(--tw-gradient-to-position); +} + +.group:hover .group-hover\:to-lime-300 { + --tw-gradient-to: #bef264 var(--tw-gradient-to-position); +} + +.group:hover .group-hover\:to-orange-400 { + --tw-gradient-to: #FF8A4C var(--tw-gradient-to-position); +} + +.group:hover .group-hover\:to-pink-500 { + --tw-gradient-to: #E74694 var(--tw-gradient-to-position); +} + +.group:hover .group-hover\:to-yellow-200 { + --tw-gradient-to: #FCE96A var(--tw-gradient-to-position); +} + +.group:hover .group-hover\:text-blue-600 { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +.group:hover .group-hover\:text-gray-500 { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +.group:hover .group-hover\:text-gray-900 { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.group:hover .group-hover\:opacity-100 { + opacity: 1; +} + +.group:focus .group-focus\:text-gray-900 { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.group:focus .group-focus\:outline-none { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.group:focus .group-focus\:ring-4 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.group:focus .group-focus\:ring-white { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); +} + +.peer:checked ~ .peer-checked\:border-blue-600 { + --tw-border-opacity: 1; + border-color: rgb(28 100 242 / var(--tw-border-opacity)); +} + +.peer:checked ~ .peer-checked\:border-blue-700 { + --tw-border-opacity: 1; + border-color: rgb(26 86 219 / var(--tw-border-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-blue-50 { + --tw-bg-opacity: 1; + background-color: rgb(235 245 255 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-blue-600 { + --tw-bg-opacity: 1; + background-color: rgb(28 100 242 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-green-600 { + --tw-bg-opacity: 1; + background-color: rgb(5 122 85 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-orange-500 { + --tw-bg-opacity: 1; + background-color: rgb(255 90 31 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-purple-600 { + --tw-bg-opacity: 1; + background-color: rgb(126 58 242 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-red-600 { + --tw-bg-opacity: 1; + background-color: rgb(224 36 36 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-teal-600 { + --tw-bg-opacity: 1; + background-color: rgb(4 116 129 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:bg-yellow-400 { + --tw-bg-opacity: 1; + background-color: rgb(227 160 8 / var(--tw-bg-opacity)); +} + +.peer:checked ~ .peer-checked\:text-blue-600 { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +.peer:checked ~ .peer-checked\:text-blue-700 { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); +} + +.peer:checked ~ .peer-checked\:text-gray-600 { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} + +.peer:checked ~ .peer-checked\:text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.peer:checked ~ .peer-checked\:after\:translate-x-full::after { + content: var(--tw-content); + --tw-translate-x: 100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:checked ~ .peer-checked\:after\:border-white::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(255 255 255 / var(--tw-border-opacity)); +} + +.peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:start-6 { + inset-inline-start: 1.5rem; +} + +.peer:placeholder-shown ~ .peer-placeholder-shown\:start-6 { + inset-inline-start: 1.5rem; +} + +.peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:top-1\/2 { + top: 50%; +} + +.peer:placeholder-shown ~ .peer-placeholder-shown\:top-1\/2 { + top: 50%; +} + +.peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:-translate-y-1\/2 { + --tw-translate-y: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:placeholder-shown ~ .peer-placeholder-shown\:-translate-y-1\/2 { + --tw-translate-y: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:translate-y-0 { + --tw-translate-y: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:placeholder-shown ~ .peer-placeholder-shown\:translate-y-0 { + --tw-translate-y: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:scale-100 { + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:placeholder-shown ~ .peer-placeholder-shown\:scale-100 { + --tw-scale-x: 1; + --tw-scale-y: 1; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:focus ~ .peer-focus\:start-0 { + inset-inline-start: 0px; +} + +.peer:focus ~ .peer-focus\:top-1 { + top: 0.25rem; +} + +.peer:focus ~ .peer-focus\:top-2 { + top: 0.5rem; +} + +.peer:focus ~ .peer-focus\:-translate-y-3 { + --tw-translate-y: -0.75rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:focus ~ .peer-focus\:-translate-y-4 { + --tw-translate-y: -1rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:focus ~ .peer-focus\:-translate-y-6 { + --tw-translate-y: -1.5rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:focus ~ .peer-focus\:scale-75 { + --tw-scale-x: .75; + --tw-scale-y: .75; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:focus ~ .peer-focus\:px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.peer:focus ~ .peer-focus\:font-medium { + font-weight: 500; +} + +.peer:focus ~ .peer-focus\:text-blue-600 { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +.peer:focus ~ .peer-focus\:outline-none { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.peer:focus ~ .peer-focus\:ring-4 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.peer:focus ~ .peer-focus\:ring-blue-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-green-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-orange-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(253 186 140 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-purple-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-red-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-teal-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity)); +} + +.peer:focus ~ .peer-focus\:ring-yellow-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:block) { + display: block; +} + +:is(.dark .dark\:inline-block) { + display: inline-block; +} + +:is(.dark .dark\:hidden) { + display: none; +} + +:is(.dark .dark\:divide-gray-600) > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(75 85 99 / var(--tw-divide-opacity)); +} + +:is(.dark .dark\:divide-gray-700) > :not([hidden]) ~ :not([hidden]) { + --tw-divide-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-divide-opacity)); +} + +:is(.dark .dark\:\!border-blue-500) { + --tw-border-opacity: 1 !important; + border-color: rgb(63 131 248 / var(--tw-border-opacity)) !important; +} + +:is(.dark .dark\:border-blue-400) { + --tw-border-opacity: 1; + border-color: rgb(118 169 250 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-blue-500) { + --tw-border-opacity: 1; + border-color: rgb(63 131 248 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-blue-600) { + --tw-border-opacity: 1; + border-color: rgb(28 100 242 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-blue-800) { + --tw-border-opacity: 1; + border-color: rgb(30 66 159 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-400) { + --tw-border-opacity: 1; + border-color: rgb(156 163 175 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-500) { + --tw-border-opacity: 1; + border-color: rgb(107 114 128 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-600) { + --tw-border-opacity: 1; + border-color: rgb(75 85 99 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-700) { + --tw-border-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-800) { + --tw-border-opacity: 1; + border-color: rgb(31 41 55 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-gray-900) { + --tw-border-opacity: 1; + border-color: rgb(17 24 39 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-green-500) { + --tw-border-opacity: 1; + border-color: rgb(14 159 110 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-green-600) { + --tw-border-opacity: 1; + border-color: rgb(5 122 85 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-green-800) { + --tw-border-opacity: 1; + border-color: rgb(3 84 63 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-purple-400) { + --tw-border-opacity: 1; + border-color: rgb(172 148 250 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-purple-500) { + --tw-border-opacity: 1; + border-color: rgb(144 97 249 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-red-500) { + --tw-border-opacity: 1; + border-color: rgb(240 82 82 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-red-600) { + --tw-border-opacity: 1; + border-color: rgb(224 36 36 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-red-800) { + --tw-border-opacity: 1; + border-color: rgb(155 28 28 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-transparent) { + border-color: transparent; +} + +:is(.dark .dark\:border-white) { + --tw-border-opacity: 1; + border-color: rgb(255 255 255 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-yellow-300) { + --tw-border-opacity: 1; + border-color: rgb(250 202 21 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-yellow-800) { + --tw-border-opacity: 1; + border-color: rgb(114 59 19 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-e-gray-700) { + --tw-border-opacity: 1; + border-inline-end-color: rgb(55 65 81 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:border-s-gray-700) { + --tw-border-opacity: 1; + border-inline-start-color: rgb(55 65 81 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:\!bg-gray-700) { + --tw-bg-opacity: 1 !important; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)) !important; +} + +:is(.dark .dark\:bg-blue-200) { + --tw-bg-opacity: 1; + background-color: rgb(195 221 253 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-blue-400) { + --tw-bg-opacity: 1; + background-color: rgb(118 169 250 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-blue-500) { + --tw-bg-opacity: 1; + background-color: rgb(63 131 248 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-blue-600) { + --tw-bg-opacity: 1; + background-color: rgb(28 100 242 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-blue-800) { + --tw-bg-opacity: 1; + background-color: rgb(30 66 159 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-blue-900) { + --tw-bg-opacity: 1; + background-color: rgb(35 56 118 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-300) { + --tw-bg-opacity: 1; + background-color: rgb(209 213 219 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-400) { + --tw-bg-opacity: 1; + background-color: rgb(156 163 175 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-500) { + --tw-bg-opacity: 1; + background-color: rgb(107 114 128 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-600) { + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-700) { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-800) { + --tw-bg-opacity: 1; + background-color: rgb(31 41 55 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-800\/30) { + background-color: rgb(31 41 55 / 0.3); +} + +:is(.dark .dark\:bg-gray-800\/50) { + background-color: rgb(31 41 55 / 0.5); +} + +:is(.dark .dark\:bg-gray-900) { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-gray-900\/60) { + background-color: rgb(17 24 39 / 0.6); +} + +:is(.dark .dark\:bg-gray-900\/80) { + background-color: rgb(17 24 39 / 0.8); +} + +:is(.dark .dark\:bg-green-500) { + --tw-bg-opacity: 1; + background-color: rgb(14 159 110 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-green-600) { + --tw-bg-opacity: 1; + background-color: rgb(5 122 85 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-green-800) { + --tw-bg-opacity: 1; + background-color: rgb(3 84 63 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-green-900) { + --tw-bg-opacity: 1; + background-color: rgb(1 71 55 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-indigo-500) { + --tw-bg-opacity: 1; + background-color: rgb(104 117 245 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-indigo-900) { + --tw-bg-opacity: 1; + background-color: rgb(54 47 120 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-orange-200) { + --tw-bg-opacity: 1; + background-color: rgb(252 217 189 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-orange-400) { + --tw-bg-opacity: 1; + background-color: rgb(255 138 76 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-orange-700) { + --tw-bg-opacity: 1; + background-color: rgb(180 52 3 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-pink-900) { + --tw-bg-opacity: 1; + background-color: rgb(117 26 61 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-purple-500) { + --tw-bg-opacity: 1; + background-color: rgb(144 97 249 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-purple-600) { + --tw-bg-opacity: 1; + background-color: rgb(126 58 242 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-purple-900) { + --tw-bg-opacity: 1; + background-color: rgb(74 29 150 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-red-500) { + --tw-bg-opacity: 1; + background-color: rgb(240 82 82 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-red-600) { + --tw-bg-opacity: 1; + background-color: rgb(224 36 36 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-red-800) { + --tw-bg-opacity: 1; + background-color: rgb(155 28 28 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-red-900) { + --tw-bg-opacity: 1; + background-color: rgb(119 29 29 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-white) { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-yellow-300) { + --tw-bg-opacity: 1; + background-color: rgb(250 202 21 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-yellow-900) { + --tw-bg-opacity: 1; + background-color: rgb(99 49 18 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/hero-pattern-dark\.svg\'\)\]) { + background-image: url('https://flowbite.s3.amazonaws.com/docs/jumbotron/hero-pattern-dark.svg'); +} + +:is(.dark .dark\:from-blue-900) { + --tw-gradient-from: #233876 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +:is(.dark .dark\:fill-gray-300) { + fill: #D1D5DB; +} + +:is(.dark .dark\:fill-gray-400) { + fill: #9CA3AF; +} + +:is(.dark .dark\:fill-gray-500) { + fill: #6B7280; +} + +:is(.dark .dark\:fill-white) { + fill: #ffffff; +} + +:is(.dark .dark\:\!text-blue-500) { + --tw-text-opacity: 1 !important; + color: rgb(63 131 248 / var(--tw-text-opacity)) !important; +} + +:is(.dark .dark\:text-blue-100) { + --tw-text-opacity: 1; + color: rgb(225 239 254 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-200) { + --tw-text-opacity: 1; + color: rgb(195 221 253 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-300) { + --tw-text-opacity: 1; + color: rgb(164 202 254 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-400) { + --tw-text-opacity: 1; + color: rgb(118 169 250 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-500) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-500\/100) { + color: rgb(63 131 248 / 1); +} + +:is(.dark .dark\:text-blue-500\/25) { + color: rgb(63 131 248 / 0.25); +} + +:is(.dark .dark\:text-blue-500\/50) { + color: rgb(63 131 248 / 0.5); +} + +:is(.dark .dark\:text-blue-500\/75) { + color: rgb(63 131 248 / 0.75); +} + +:is(.dark .dark\:text-blue-600) { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-blue-800) { + --tw-text-opacity: 1; + color: rgb(30 66 159 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-100) { + --tw-text-opacity: 1; + color: rgb(243 244 246 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-200) { + --tw-text-opacity: 1; + color: rgb(229 231 235 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-300) { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-400) { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-500) { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-600) { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-700) { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-800) { + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-gray-900) { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-green-200) { + --tw-text-opacity: 1; + color: rgb(188 240 218 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-green-300) { + --tw-text-opacity: 1; + color: rgb(132 225 188 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-green-400) { + --tw-text-opacity: 1; + color: rgb(49 196 141 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-green-500) { + --tw-text-opacity: 1; + color: rgb(14 159 110 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-green-600) { + --tw-text-opacity: 1; + color: rgb(5 122 85 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-indigo-300) { + --tw-text-opacity: 1; + color: rgb(180 198 252 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-indigo-400) { + --tw-text-opacity: 1; + color: rgb(141 162 251 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-indigo-500) { + --tw-text-opacity: 1; + color: rgb(104 117 245 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-orange-200) { + --tw-text-opacity: 1; + color: rgb(252 217 189 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-orange-300) { + --tw-text-opacity: 1; + color: rgb(253 186 140 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-orange-900) { + --tw-text-opacity: 1; + color: rgb(119 29 29 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-pink-300) { + --tw-text-opacity: 1; + color: rgb(248 180 217 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-pink-400) { + --tw-text-opacity: 1; + color: rgb(241 126 184 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-purple-300) { + --tw-text-opacity: 1; + color: rgb(202 191 253 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-purple-400) { + --tw-text-opacity: 1; + color: rgb(172 148 250 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-purple-500) { + --tw-text-opacity: 1; + color: rgb(144 97 249 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-red-200) { + --tw-text-opacity: 1; + color: rgb(251 213 213 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-red-300) { + --tw-text-opacity: 1; + color: rgb(248 180 180 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-red-400) { + --tw-text-opacity: 1; + color: rgb(249 128 128 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-red-500) { + --tw-text-opacity: 1; + color: rgb(240 82 82 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-teal-300) { + --tw-text-opacity: 1; + color: rgb(126 220 226 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-white) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-yellow-300) { + --tw-text-opacity: 1; + color: rgb(250 202 21 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:text-yellow-500) { + --tw-text-opacity: 1; + color: rgb(194 120 3 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:decoration-blue-600) { + text-decoration-color: #1C64F2; +} + +:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder { + --tw-placeholder-opacity: 1; + color: rgb(156 163 175 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:placeholder-gray-400)::placeholder { + --tw-placeholder-opacity: 1; + color: rgb(156 163 175 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:placeholder-green-500)::-moz-placeholder { + --tw-placeholder-opacity: 1; + color: rgb(14 159 110 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:placeholder-green-500)::placeholder { + --tw-placeholder-opacity: 1; + color: rgb(14 159 110 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:placeholder-red-500)::-moz-placeholder { + --tw-placeholder-opacity: 1; + color: rgb(240 82 82 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:placeholder-red-500)::placeholder { + --tw-placeholder-opacity: 1; + color: rgb(240 82 82 / var(--tw-placeholder-opacity)); +} + +:is(.dark .dark\:shadow-lg) { + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +:is(.dark .dark\:shadow-sm-light) { + --tw-shadow: 0 2px 5px 0px rgba(255, 255, 255, 0.08); + --tw-shadow-colored: 0 2px 5px 0px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +:is(.dark .dark\:shadow-blue-800\/80) { + --tw-shadow-color: rgb(30 66 159 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-cyan-800\/80) { + --tw-shadow-color: rgb(21 94 117 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-gray-800) { + --tw-shadow-color: #1F2937; + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-green-800\/80) { + --tw-shadow-color: rgb(3 84 63 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-lime-800\/80) { + --tw-shadow-color: rgb(63 98 18 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-pink-800\/80) { + --tw-shadow-color: rgb(153 21 75 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-purple-800\/80) { + --tw-shadow-color: rgb(85 33 181 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-red-800\/80) { + --tw-shadow-color: rgb(155 28 28 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:shadow-teal-800\/80) { + --tw-shadow-color: rgb(5 80 92 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} + +:is(.dark .dark\:ring-gray-500) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:ring-gray-700) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:ring-gray-900) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(17 24 39 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:ring-offset-gray-700) { + --tw-ring-offset-color: #374151; +} + +:is(.dark .dark\:ring-offset-gray-800) { + --tw-ring-offset-color: #1F2937; +} + +:is(.dark .dark\:first-letter\:text-gray-100)::first-letter { + --tw-text-opacity: 1; + color: rgb(243 244 246 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:after\:border-blue-800)::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(30 66 159 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:after\:border-gray-700)::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:after\:text-gray-500)::after { + content: var(--tw-content); + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +:is(.dark .odd\:dark\:bg-gray-900):nth-child(odd) { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} + +:is(.dark .even\:dark\:bg-gray-800):nth-child(even) { + --tw-bg-opacity: 1; + background-color: rgb(31 41 55 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:border-blue-600:hover) { + --tw-border-opacity: 1; + border-color: rgb(28 100 242 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:hover\:border-blue-700:hover) { + --tw-border-opacity: 1; + border-color: rgb(26 86 219 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:hover\:border-gray-500:hover) { + --tw-border-opacity: 1; + border-color: rgb(107 114 128 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:hover\:border-gray-600:hover) { + --tw-border-opacity: 1; + border-color: rgb(75 85 99 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:hover\:border-gray-700:hover) { + --tw-border-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:hover\:bg-\[\#050708\]\/30:hover) { + background-color: rgb(5 7 8 / 0.3); +} + +:is(.dark .dark\:hover\:bg-\[\#050708\]\/40:hover) { + background-color: rgb(5 7 8 / 0.4); +} + +:is(.dark .dark\:hover\:bg-\[\#FF9119\]\/80:hover) { + background-color: rgb(255 145 25 / 0.8); +} + +:is(.dark .dark\:hover\:bg-blue-500:hover) { + --tw-bg-opacity: 1; + background-color: rgb(63 131 248 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-blue-600:hover) { + --tw-bg-opacity: 1; + background-color: rgb(28 100 242 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-blue-700:hover) { + --tw-bg-opacity: 1; + background-color: rgb(26 86 219 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-blue-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(30 66 159 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-gray-200:hover) { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-gray-500:hover) { + --tw-bg-opacity: 1; + background-color: rgb(107 114 128 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-gray-600:hover) { + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-gray-700:hover) { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-gray-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(31 41 55 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-green-600:hover) { + --tw-bg-opacity: 1; + background-color: rgb(5 122 85 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-green-700:hover) { + --tw-bg-opacity: 1; + background-color: rgb(4 108 78 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-green-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(3 84 63 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-indigo-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(66 56 157 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-pink-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(153 21 75 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-purple-500:hover) { + --tw-bg-opacity: 1; + background-color: rgb(144 97 249 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-purple-700:hover) { + --tw-bg-opacity: 1; + background-color: rgb(108 43 217 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-purple-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(85 33 181 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-red-600:hover) { + --tw-bg-opacity: 1; + background-color: rgb(224 36 36 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-red-700:hover) { + --tw-bg-opacity: 1; + background-color: rgb(200 30 30 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-red-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(155 28 28 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-yellow-300:hover) { + --tw-bg-opacity: 1; + background-color: rgb(250 202 21 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-yellow-400:hover) { + --tw-bg-opacity: 1; + background-color: rgb(227 160 8 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:bg-yellow-800:hover) { + --tw-bg-opacity: 1; + background-color: rgb(114 59 19 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:hover\:\!text-blue-500:hover) { + --tw-text-opacity: 1 !important; + color: rgb(63 131 248 / var(--tw-text-opacity)) !important; +} + +:is(.dark .dark\:hover\:text-blue-300:hover) { + --tw-text-opacity: 1; + color: rgb(164 202 254 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-blue-400:hover) { + --tw-text-opacity: 1; + color: rgb(118 169 250 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-blue-500:hover) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-blue-600:hover) { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-blue-700:hover) { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-gray-100:hover) { + --tw-text-opacity: 1; + color: rgb(243 244 246 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-gray-300:hover) { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-gray-400:hover) { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-gray-800:hover) { + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-gray-900:hover) { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-green-300:hover) { + --tw-text-opacity: 1; + color: rgb(132 225 188 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-indigo-300:hover) { + --tw-text-opacity: 1; + color: rgb(180 198 252 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-pink-300:hover) { + --tw-text-opacity: 1; + color: rgb(248 180 217 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-purple-300:hover) { + --tw-text-opacity: 1; + color: rgb(202 191 253 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-purple-500:hover) { + --tw-text-opacity: 1; + color: rgb(144 97 249 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-red-300:hover) { + --tw-text-opacity: 1; + color: rgb(248 180 180 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-white:hover) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:text-yellow-300:hover) { + --tw-text-opacity: 1; + color: rgb(250 202 21 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:hover\:bg-blend-darken:hover) { + background-blend-mode: darken; +} + +:is(.dark .dark\:focus\:border-blue-500:focus) { + --tw-border-opacity: 1; + border-color: rgb(63 131 248 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:focus\:border-green-500:focus) { + --tw-border-opacity: 1; + border-color: rgb(14 159 110 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:focus\:border-red-500:focus) { + --tw-border-opacity: 1; + border-color: rgb(240 82 82 / var(--tw-border-opacity)); +} + +:is(.dark .dark\:focus\:bg-blue-600:focus) { + --tw-bg-opacity: 1; + background-color: rgb(28 100 242 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:focus\:bg-gray-700:focus) { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +:is(.dark .dark\:focus\:text-white:focus) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +:is(.dark .dark\:focus\:ring-\[\#050708\]\/50:focus) { + --tw-ring-color: rgb(5 7 8 / 0.5); +} + +:is(.dark .dark\:focus\:ring-\[\#1da1f2\]\/55:focus) { + --tw-ring-color: rgb(29 161 242 / 0.55); +} + +:is(.dark .dark\:focus\:ring-\[\#2557D6\]\/50:focus) { + --tw-ring-color: rgb(37 87 214 / 0.5); +} + +:is(.dark .dark\:focus\:ring-\[\#3b5998\]\/55:focus) { + --tw-ring-color: rgb(59 89 152 / 0.55); +} + +:is(.dark .dark\:focus\:ring-\[\#4285F4\]\/55:focus) { + --tw-ring-color: rgb(66 133 244 / 0.55); +} + +:is(.dark .dark\:focus\:ring-\[\#F7BE38\]\/50:focus) { + --tw-ring-color: rgb(247 190 56 / 0.5); +} + +:is(.dark .dark\:focus\:ring-\[\#FF9119\]\/40:focus) { + --tw-ring-color: rgb(255 145 25 / 0.4); +} + +:is(.dark .dark\:focus\:ring-blue-500:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-blue-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-blue-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-blue-900:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(35 56 118 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-cyan-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-gray-400:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-gray-500:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-gray-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-gray-700:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-gray-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-green-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(5 122 85 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-green-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-lime-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-orange-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(208 56 1 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-pink-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-purple-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(126 58 242 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-purple-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-purple-900:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-red-400:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-red-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(224 36 36 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-red-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-red-900:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-teal-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(4 116 129 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-teal-700:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-teal-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-yellow-600:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(159 88 10 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-yellow-800:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(114 59 19 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-yellow-900:focus) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity)); +} + +:is(.dark .dark\:focus\:ring-offset-gray-700:focus) { + --tw-ring-offset-color: #374151; +} + +:is(.dark .dark\:focus\:ring-offset-gray-800:focus) { + --tw-ring-offset-color: #1F2937; +} + +:is(.dark .group:hover .dark\:group-hover\:bg-gray-700) { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +:is(.dark .group:hover .dark\:group-hover\:bg-gray-800\/60) { + background-color: rgb(31 41 55 / 0.6); +} + +:is(.dark .group:hover .dark\:group-hover\:text-blue-500) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} + +:is(.dark .group:hover .dark\:group-hover\:text-gray-300) { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + +:is(.dark .group:hover .dark\:group-hover\:text-white) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +:is(.dark .group:focus .dark\:group-focus\:text-white) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +:is(.dark .group:focus .dark\:group-focus\:ring-gray-800\/70) { + --tw-ring-color: rgb(31 41 55 / 0.7); +} + +:is(.dark .peer:checked ~ .dark\:peer-checked\:border-blue-500) { + --tw-border-opacity: 1; + border-color: rgb(63 131 248 / var(--tw-border-opacity)); +} + +:is(.dark .peer:checked ~ .dark\:peer-checked\:bg-blue-500) { + --tw-bg-opacity: 1; + background-color: rgb(63 131 248 / var(--tw-bg-opacity)); +} + +:is(.dark .peer:checked ~ .dark\:peer-checked\:bg-blue-900) { + --tw-bg-opacity: 1; + background-color: rgb(35 56 118 / var(--tw-bg-opacity)); +} + +:is(.dark .peer:checked ~ .dark\:peer-checked\:text-blue-500) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} + +:is(.dark .peer:checked ~ .dark\:peer-checked\:text-gray-300) { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + +.peer:focus ~ :is(.dark .peer-focus\:dark\:text-blue-500) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-blue-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-green-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-orange-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(138 44 13 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-purple-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-red-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-teal-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity)); +} + +:is(.dark .peer:focus ~ .dark\:peer-focus\:ring-yellow-800) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(114 59 19 / var(--tw-ring-opacity)); +} + +@media (min-width: 640px) { + + .sm\:order-last { + order: 9999; + } + + .sm\:col-span-1 { + grid-column: span 1 / span 1; + } + + .sm\:col-span-3 { + grid-column: span 3 / span 3; + } + + .sm\:mx-0 { + margin-left: 0px; + margin-right: 0px; + } + + .sm\:mx-auto { + margin-left: auto; + margin-right: auto; + } + + .sm\:mb-0 { + margin-bottom: 0px; + } + + .sm\:mb-4 { + margin-bottom: 1rem; + } + + .sm\:mb-5 { + margin-bottom: 1.25rem; + } + + .sm\:ml-3 { + margin-left: 0.75rem; + } + + .sm\:ml-64 { + margin-left: 16rem; + } + + .sm\:ms-2 { + -webkit-margin-start: 0.5rem; + margin-inline-start: 0.5rem; + } + + .sm\:ms-4 { + -webkit-margin-start: 1rem; + margin-inline-start: 1rem; + } + + .sm\:ms-7 { + -webkit-margin-start: 1.75rem; + margin-inline-start: 1.75rem; + } + + .sm\:ms-auto { + -webkit-margin-start: auto; + margin-inline-start: auto; + } + + .sm\:mt-0 { + margin-top: 0px; + } + + .sm\:block { + display: block; + } + + .sm\:flex { + display: flex; + } + + .sm\:inline-flex { + display: inline-flex; + } + + .sm\:grid { + display: grid; + } + + .sm\:hidden { + display: none; + } + + .sm\:h-4 { + height: 1rem; + } + + .sm\:h-64 { + height: 16rem; + } + + .sm\:h-7 { + height: 1.75rem; + } + + .sm\:h-9 { + height: 2.25rem; + } + + .sm\:h-96 { + height: 24rem; + } + + .sm\:w-4 { + width: 1rem; + } + + .sm\:w-96 { + width: 24rem; + } + + .sm\:w-auto { + width: auto; + } + + .sm\:max-w-\[15rem\] { + max-width: 15rem; + } + + .sm\:translate-x-0 { + --tw-translate-x: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + } + + .sm\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .sm\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .sm\:flex-row { + flex-direction: row; + } + + .sm\:items-center { + align-items: center; + } + + .sm\:justify-center { + justify-content: center; + } + + .sm\:justify-between { + justify-content: space-between; + } + + .sm\:gap-6 { + gap: 1.5rem; + } + + .sm\:space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); + } + + .sm\:space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); + } + + .sm\:space-x-5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1.25rem * var(--tw-space-x-reverse)); + margin-left: calc(1.25rem * calc(1 - var(--tw-space-x-reverse))); + } + + .sm\:space-x-8 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(2rem * var(--tw-space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse))); + } + + .sm\:space-y-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0px * var(--tw-space-y-reverse)); + } + + .sm\:divide-x > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 0; + border-right-width: calc(1px * var(--tw-divide-x-reverse)); + border-left-width: calc(1px * calc(1 - var(--tw-divide-x-reverse))); + } + + .sm\:rounded-lg { + border-radius: 0.5rem; + } + + .sm\:border-b-0 { + border-bottom-width: 0px; + } + + .sm\:border-r { + border-right-width: 1px; + } + + .sm\:border-s { + border-inline-start-width: 1px; + } + + .sm\:p-4 { + padding: 1rem; + } + + .sm\:p-6 { + padding: 1.5rem; + } + + .sm\:p-8 { + padding: 2rem; + } + + .sm\:px-16 { + padding-left: 4rem; + padding-right: 4rem; + } + + .sm\:px-4 { + padding-left: 1rem; + padding-right: 1rem; + } + + .sm\:px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; + } + + .sm\:py-16 { + padding-top: 4rem; + padding-bottom: 4rem; + } + + .sm\:py-4 { + padding-top: 1rem; + padding-bottom: 1rem; + } + + .sm\:pb-4 { + padding-bottom: 1rem; + } + + .sm\:pe-4 { + -webkit-padding-end: 1rem; + padding-inline-end: 1rem; + } + + .sm\:pe-8 { + -webkit-padding-end: 2rem; + padding-inline-end: 2rem; + } + + .sm\:ps-2 { + -webkit-padding-start: 0.5rem; + padding-inline-start: 0.5rem; + } + + .sm\:ps-4 { + -webkit-padding-start: 1rem; + padding-inline-start: 1rem; + } + + .sm\:ps-5 { + -webkit-padding-start: 1.25rem; + padding-inline-start: 1.25rem; + } + + .sm\:pt-4 { + padding-top: 1rem; + } + + .sm\:text-center { + text-align: center; + } + + .sm\:text-2xl { + font-size: 1.5rem; + line-height: 2rem; + } + + .sm\:text-base { + font-size: 1rem; + line-height: 1.5rem; + } + + .sm\:text-lg { + font-size: 1.125rem; + line-height: 1.75rem; + } + + .sm\:text-xl { + font-size: 1.25rem; + line-height: 1.75rem; + } + + .sm\:ring-8 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); + } + + .sm\:after\:inline-block::after { + content: var(--tw-content); + display: inline-block; + } + + .sm\:after\:hidden::after { + content: var(--tw-content); + display: none; + } + + .sm\:after\:content-\[\'\'\]::after { + --tw-content: ''; + content: var(--tw-content); + } +} + +@media (min-width: 768px) { + + .md\:absolute { + position: absolute; + } + + .md\:relative { + position: relative; + } + + .md\:inset-0 { + inset: 0px; + } + + .md\:end-auto { + inset-inline-end: auto; + } + + .md\:top-auto { + top: auto; + } + + .md\:order-1 { + order: 1; + } + + .md\:order-2 { + order: 2; + } + + .md\:m-0 { + margin: 0px; + } + + .md\:mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; + } + + .md\:my-0 { + margin-top: 0px; + margin-bottom: 0px; + } + + .md\:my-10 { + margin-top: 2.5rem; + margin-bottom: 2.5rem; + } + + .md\:my-12 { + margin-top: 3rem; + margin-bottom: 3rem; + } + + .md\:mb-0 { + margin-bottom: 0px; + } + + .md\:mb-12 { + margin-bottom: 3rem; + } + + .md\:mb-5 { + margin-bottom: 1.25rem; + } + + .md\:me-0 { + -webkit-margin-end: 0px; + margin-inline-end: 0px; + } + + .md\:me-24 { + -webkit-margin-end: 6rem; + margin-inline-end: 6rem; + } + + .md\:me-4 { + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; + } + + .md\:me-6 { + -webkit-margin-end: 1.5rem; + margin-inline-end: 1.5rem; + } + + .md\:ml-2 { + margin-left: 0.5rem; + } + + .md\:mr-0 { + margin-right: 0px; + } + + .md\:ms-1 { + -webkit-margin-start: 0.25rem; + margin-inline-start: 0.25rem; + } + + .md\:ms-2 { + -webkit-margin-start: 0.5rem; + margin-inline-start: 0.5rem; + } + + .md\:mt-0 { + margin-top: 0px; + } + + .md\:mt-6 { + margin-top: 1.5rem; + } + + .md\:block { + display: block; + } + + .md\:inline { + display: inline; + } + + .md\:flex { + display: flex; + } + + .md\:inline-flex { + display: inline-flex; + } + + .md\:grid { + display: grid; + } + + .md\:hidden { + display: none; + } + + .md\:h-96 { + height: 24rem; + } + + .md\:h-\[21px\] { + height: 21px; + } + + .md\:h-\[262px\] { + height: 262px; + } + + .md\:h-\[278px\] { + height: 278px; + } + + .md\:h-\[294px\] { + height: 294px; + } + + .md\:h-\[40px\] { + height: 40px; + } + + .md\:h-\[42px\] { + height: 42px; + } + + .md\:h-\[654px\] { + height: 654px; + } + + .md\:h-\[682px\] { + height: 682px; + } + + .md\:h-\[8px\] { + height: 8px; + } + + .md\:h-\[95px\] { + height: 95px; + } + + .md\:h-auto { + height: auto; + } + + .md\:w-32 { + width: 8rem; + } + + .md\:w-48 { + width: 12rem; + } + + .md\:w-64 { + width: 16rem; + } + + .md\:w-\[185px\] { + width: 185px; + } + + .md\:w-\[96px\] { + width: 96px; + } + + .md\:w-auto { + width: auto; + } + + .md\:w-full { + width: 100%; + } + + .md\:max-w-\[142px\] { + max-width: 142px; + } + + .md\:max-w-\[512px\] { + max-width: 512px; + } + + .md\:max-w-\[597px\] { + max-width: 597px; + } + + .md\:max-w-screen-md { + max-width: 768px; + } + + .md\:max-w-xl { + max-width: 36rem; + } + + .md\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .md\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .md\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + .md\:flex-row { + flex-direction: row; + } + + .md\:items-center { + align-items: center; + } + + .md\:justify-between { + justify-content: space-between; + } + + .md\:gap-12 { + gap: 3rem; + } + + .md\:gap-6 { + gap: 1.5rem; + } + + .md\:gap-8 { + gap: 2rem; + } + + .md\:space-x-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0px * var(--tw-space-x-reverse)); + margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse))); + } + + .md\:space-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.5rem * var(--tw-space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); + } + + .md\:space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); + } + + .md\:space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); + } + + .md\:space-x-8 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(2rem * var(--tw-space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse))); + } + + .md\:space-y-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0px * var(--tw-space-y-reverse)); + } + + .md\:rounded-none { + border-radius: 0px; + } + + .md\:rounded-s-lg { + border-start-start-radius: 0.5rem; + border-end-start-radius: 0.5rem; + } + + .md\:rounded-t-none { + border-top-left-radius: 0px; + border-top-right-radius: 0px; + } + + .md\:rounded-es-lg { + border-end-start-radius: 0.5rem; + } + + .md\:rounded-se-lg { + border-start-end-radius: 0.5rem; + } + + .md\:rounded-ss-lg { + border-start-start-radius: 0.5rem; + } + + .md\:border-0 { + border-width: 0px; + } + + .md\:border-b-0 { + border-bottom-width: 0px; + } + + .md\:border-e { + border-inline-end-width: 1px; + } + + .md\:bg-transparent { + background-color: transparent; + } + + .md\:bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + } + + .md\:p-0 { + padding: 0px; + } + + .md\:p-12 { + padding: 3rem; + } + + .md\:p-5 { + padding: 1.25rem; + } + + .md\:p-6 { + padding: 1.5rem; + } + + .md\:p-8 { + padding: 2rem; + } + + .md\:px-4 { + padding-left: 1rem; + padding-right: 1rem; + } + + .md\:px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; + } + + .md\:px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; + } + + .md\:py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + } + + .md\:py-2\.5 { + padding-top: 0.625rem; + padding-bottom: 0.625rem; + } + + .md\:py-8 { + padding-top: 2rem; + padding-bottom: 2rem; + } + + .md\:pb-0 { + padding-bottom: 0px; + } + + .md\:pb-4 { + padding-bottom: 1rem; + } + + .md\:pb-5 { + padding-bottom: 1.25rem; + } + + .md\:pe-4 { + -webkit-padding-end: 1rem; + padding-inline-end: 1rem; + } + + .md\:pt-0 { + padding-top: 0px; + } + + .md\:text-4xl { + font-size: 2.25rem; + line-height: 2.5rem; + } + + .md\:text-5xl { + font-size: 3rem; + line-height: 1; + } + + .md\:text-lg { + font-size: 1.125rem; + line-height: 1.75rem; + } + + .md\:text-sm { + font-size: 0.875rem; + line-height: 1.25rem; + } + + .md\:text-xl { + font-size: 1.25rem; + line-height: 1.75rem; + } + + .md\:font-medium { + font-weight: 500; + } + + .md\:text-blue-700 { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); + } + + .md\:text-green-700 { + --tw-text-opacity: 1; + color: rgb(4 108 78 / var(--tw-text-opacity)); + } + + .md\:hover\:bg-transparent:hover { + background-color: transparent; + } + + .md\:hover\:text-blue-600:hover { + --tw-text-opacity: 1; + color: rgb(28 100 242 / var(--tw-text-opacity)); + } + + .md\:hover\:text-blue-700:hover { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); + } + + .md\:hover\:text-green-700:hover { + --tw-text-opacity: 1; + color: rgb(4 108 78 / var(--tw-text-opacity)); + } + + :is(.dark .md\:dark\:bg-gray-900) { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); + } + + :is(.dark .md\:dark\:bg-transparent) { + background-color: transparent; + } + + :is(.dark .md\:dark\:text-blue-500) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); + } + + :is(.dark .md\:dark\:text-white) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + } + + :is(.dark .md\:dark\:hover\:bg-transparent:hover) { + background-color: transparent; + } + + :is(.dark .md\:dark\:hover\:text-blue-500:hover) { + --tw-text-opacity: 1; + color: rgb(63 131 248 / var(--tw-text-opacity)); + } + + :is(.dark .md\:dark\:hover\:text-white:hover) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + } +} + +@media (min-width: 1024px) { + + .lg\:static { + position: static; + } + + .lg\:sticky { + position: sticky; + } + + .lg\:top-28 { + top: 7rem; + } + + .lg\:order-1 { + order: 1; + } + + .lg\:order-2 { + order: 2; + } + + .lg\:col-span-5 { + grid-column: span 5 / span 5; + } + + .lg\:col-span-7 { + grid-column: span 7 / span 7; + } + + .lg\:my-12 { + margin-top: 3rem; + margin-bottom: 3rem; + } + + .lg\:my-8 { + margin-top: 2rem; + margin-bottom: 2rem; + } + + .lg\:mb-0 { + margin-bottom: 0px; + } + + .lg\:mb-16 { + margin-bottom: 4rem; + } + + .lg\:mb-8 { + margin-bottom: 2rem; + } + + .lg\:mr-0 { + margin-right: 0px; + } + + .lg\:mt-0 { + margin-top: 0px; + } + + .lg\:mt-10 { + margin-top: 2.5rem; + } + + .lg\:block { + display: block; + } + + .lg\:flex { + display: flex; + } + + .lg\:grid { + display: grid; + } + + .lg\:hidden { + display: none; + } + + .lg\:h-12 { + height: 3rem; + } + + .lg\:h-4 { + height: 1rem; + } + + .lg\:h-5 { + height: 1.25rem; + } + + .lg\:h-6 { + height: 1.5rem; + } + + .lg\:h-\[calc\(100vh-3rem\)\] { + height: calc(100vh - 3rem); + } + + .lg\:h-auto { + height: auto; + } + + .lg\:max-h-full { + max-height: 100%; + } + + .lg\:w-12 { + width: 3rem; + } + + .lg\:w-4 { + width: 1rem; + } + + .lg\:w-48 { + width: 12rem; + } + + .lg\:w-5 { + width: 1.25rem; + } + + .lg\:w-6 { + width: 1.5rem; + } + + .lg\:w-96 { + width: 24rem; + } + + .lg\:w-auto { + width: auto; + } + + .lg\:max-w-7xl { + max-width: 80rem; + } + + .lg\:max-w-screen-lg { + max-width: 1024px; + } + + .lg\:max-w-xl { + max-width: 36rem; + } + + .lg\:grid-cols-12 { + grid-template-columns: repeat(12, minmax(0, 1fr)); + } + + .lg\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .lg\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .lg\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + .lg\:flex-row { + flex-direction: row; + } + + .lg\:gap-16 { + gap: 4rem; + } + + .lg\:gap-8 { + gap: 2rem; + } + + .lg\:space-x-8 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(2rem * var(--tw-space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse))); + } + + .lg\:self-center { + align-self: center; + } + + .lg\:overflow-visible { + overflow: visible; + } + + .lg\:overflow-y-visible { + overflow-y: visible; + } + + .lg\:border-0 { + border-width: 0px; + } + + .lg\:bg-transparent { + background-color: transparent; + } + + .lg\:p-0 { + padding: 0px; + } + + .lg\:p-8 { + padding: 2rem; + } + + .lg\:px-12 { + padding-left: 3rem; + padding-right: 3rem; + } + + .lg\:px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; + } + + .lg\:px-36 { + padding-left: 9rem; + padding-right: 9rem; + } + + .lg\:px-4 { + padding-left: 1rem; + padding-right: 1rem; + } + + .lg\:px-48 { + padding-left: 12rem; + padding-right: 12rem; + } + + .lg\:px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; + } + + .lg\:px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; + } + + .lg\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } + + .lg\:py-0 { + padding-top: 0px; + padding-bottom: 0px; + } + + .lg\:py-16 { + padding-top: 4rem; + padding-bottom: 4rem; + } + + .lg\:py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + } + + .lg\:py-2\.5 { + padding-top: 0.625rem; + padding-bottom: 0.625rem; + } + + .lg\:py-4 { + padding-top: 1rem; + padding-bottom: 1rem; + } + + .lg\:py-56 { + padding-top: 14rem; + padding-bottom: 14rem; + } + + .lg\:py-8 { + padding-top: 2rem; + padding-bottom: 2rem; + } + + .lg\:pb-16 { + padding-bottom: 4rem; + } + + .lg\:pb-20 { + padding-bottom: 5rem; + } + + .lg\:pl-0 { + padding-left: 0px; + } + + .lg\:pl-3 { + padding-left: 0.75rem; + } + + .lg\:pt-0 { + padding-top: 0px; + } + + .lg\:pt-2 { + padding-top: 0.5rem; + } + + .lg\:pt-8 { + padding-top: 2rem; + } + + .lg\:text-2xl { + font-size: 1.5rem; + line-height: 2rem; + } + + .lg\:text-6xl { + font-size: 3.75rem; + line-height: 1; + } + + .lg\:text-sm { + font-size: 0.875rem; + line-height: 1.25rem; + } + + .lg\:text-xl { + font-size: 1.25rem; + line-height: 1.75rem; + } + + .lg\:text-xs { + font-size: 0.75rem; + line-height: 1rem; + } + + .lg\:text-blue-700 { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); + } + + .lg\:hover\:bg-transparent:hover { + background-color: transparent; + } + + .lg\:hover\:text-blue-700:hover { + --tw-text-opacity: 1; + color: rgb(26 86 219 / var(--tw-text-opacity)); + } + + :is(.dark .lg\:dark\:hover\:bg-transparent:hover) { + background-color: transparent; + } + + :is(.dark .lg\:dark\:hover\:text-white:hover) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + } +} + +@media (min-width: 1280px) { + + .xl\:ml-20 { + margin-left: 5rem; + } + + .xl\:block { + display: block; + } + + .xl\:inline-flex { + display: inline-flex; + } + + .xl\:hidden { + display: none; + } + + .xl\:h-80 { + height: 20rem; + } + + .xl\:grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); + } + + .xl\:gap-0 { + gap: 0px; + } + + .xl\:gap-16 { + gap: 4rem; + } + + .xl\:gap-24 { + gap: 6rem; + } + + .xl\:px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; + } + + .xl\:px-48 { + padding-left: 12rem; + padding-right: 12rem; + } + + .xl\:pb-24 { + padding-bottom: 6rem; + } + + .xl\:pt-24 { + padding-top: 6rem; + } + + .xl\:text-6xl { + font-size: 3.75rem; + line-height: 1; + } + + .xl\:text-sm { + font-size: 0.875rem; + line-height: 1.25rem; + } + + .xl\:after\:mx-10::after { + content: var(--tw-content); + margin-left: 2.5rem; + margin-right: 2.5rem; + } +} + +@media (min-width: 1536px) { + + .\32xl\:block { + display: block; + } + + .\32xl\:h-96 { + height: 24rem; + } + + .\32xl\:grid-cols-10 { + grid-template-columns: repeat(10, minmax(0, 1fr)); + } + + .\32xl\:gap-x-2 { + -moz-column-gap: 0.5rem; + column-gap: 0.5rem; + } + + .\32xl\:space-x-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0px * var(--tw-space-x-reverse)); + margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse))); + } +} + +.rtl\:inset-x-0:where([dir="rtl"], [dir="rtl"] *) { + left: 0px; + right: 0px; +} + +.rtl\:right-0:where([dir="rtl"], [dir="rtl"] *) { + right: 0px; +} + +.rtl\:ml-0:where([dir="rtl"], [dir="rtl"] *) { + margin-left: 0px; +} + +.rtl\:ml-2:where([dir="rtl"], [dir="rtl"] *) { + margin-left: 0.5rem; +} + +.rtl\:translate-x-1\/2:where([dir="rtl"], [dir="rtl"] *) { + --tw-translate-x: 50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.rtl\:-rotate-90:where([dir="rtl"], [dir="rtl"] *) { + --tw-rotate: -90deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.rtl\:rotate-180:where([dir="rtl"], [dir="rtl"] *) { + --tw-rotate: 180deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.rtl\:rotate-\[270deg\]:where([dir="rtl"], [dir="rtl"] *) { + --tw-rotate: 270deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.rtl\:justify-end:where([dir="rtl"], [dir="rtl"] *) { + justify-content: flex-end; +} + +.rtl\:gap-8:where([dir="rtl"], [dir="rtl"] *) { + gap: 2rem; +} + +.rtl\:space-x-reverse:where([dir="rtl"], [dir="rtl"] *) > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 1; +} + +.rtl\:divide-x-reverse:where([dir="rtl"], [dir="rtl"] *) > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 1; +} + +.rtl\:text-left:where([dir="rtl"], [dir="rtl"] *) { + text-align: left; +} + +.rtl\:text-right:where([dir="rtl"], [dir="rtl"] *) { + text-align: right; +} + +.peer:checked ~ .rtl\:peer-checked\:after\:-translate-x-full:where([dir="rtl"], [dir="rtl"] *)::after { + content: var(--tw-content); + --tw-translate-x: -100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:checked ~ .rtl\:peer-checked\:after\:translate-x-\[-100\%\]:where([dir="rtl"], [dir="rtl"] *)::after { + content: var(--tw-content); + --tw-translate-x: -100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:focus ~ .rtl\:peer-focus\:left-auto:where([dir="rtl"], [dir="rtl"] *) { + left: auto; +} + +.peer:focus ~ .rtl\:peer-focus\:translate-x-1\/4:where([dir="rtl"], [dir="rtl"] *) { + --tw-translate-x: 25%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +@media (min-width: 640px) { + + .sm\:rtl\:divide-x-reverse:where([dir="rtl"], [dir="rtl"] *) > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 1; + } +} + +@media (min-width: 768px) { + + .md\:rtl\:space-x-reverse:where([dir="rtl"], [dir="rtl"] *) > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 1; + } +} + +.\[\&\>div\>div\]\:bg-gray-50>div>div { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} + +.\[\&\>div\>div\]\:shadow-none>div>div { + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.\[\&\>div\]\:mx-auto>div { + margin-left: auto; + margin-right: auto; +} + +.\[\&_div\>button\]\:bg-gray-50 div>button { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} diff --git a/node_modules/flowbite/dist/flowbite.js b/node_modules/flowbite/dist/flowbite.js new file mode 100644 index 0000000..0d244b5 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.js @@ -0,0 +1,8542 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("Flowbite", [], factory); + else if(typeof exports === 'object') + exports["Flowbite"] = factory(); + else + root["Flowbite"] = factory(); +})(self, function() { +return /******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 647: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ 853: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "afterMain": function() { return /* reexport */ afterMain; }, + "afterRead": function() { return /* reexport */ afterRead; }, + "afterWrite": function() { return /* reexport */ afterWrite; }, + "applyStyles": function() { return /* reexport */ modifiers_applyStyles; }, + "arrow": function() { return /* reexport */ modifiers_arrow; }, + "auto": function() { return /* reexport */ auto; }, + "basePlacements": function() { return /* reexport */ basePlacements; }, + "beforeMain": function() { return /* reexport */ beforeMain; }, + "beforeRead": function() { return /* reexport */ beforeRead; }, + "beforeWrite": function() { return /* reexport */ beforeWrite; }, + "bottom": function() { return /* reexport */ bottom; }, + "clippingParents": function() { return /* reexport */ clippingParents; }, + "computeStyles": function() { return /* reexport */ modifiers_computeStyles; }, + "createPopper": function() { return /* reexport */ popper_createPopper; }, + "createPopperBase": function() { return /* reexport */ createPopper; }, + "createPopperLite": function() { return /* reexport */ popper_lite_createPopper; }, + "detectOverflow": function() { return /* reexport */ detectOverflow; }, + "end": function() { return /* reexport */ end; }, + "eventListeners": function() { return /* reexport */ eventListeners; }, + "flip": function() { return /* reexport */ modifiers_flip; }, + "hide": function() { return /* reexport */ modifiers_hide; }, + "left": function() { return /* reexport */ left; }, + "main": function() { return /* reexport */ main; }, + "modifierPhases": function() { return /* reexport */ modifierPhases; }, + "offset": function() { return /* reexport */ modifiers_offset; }, + "placements": function() { return /* reexport */ enums_placements; }, + "popper": function() { return /* reexport */ popper; }, + "popperGenerator": function() { return /* reexport */ popperGenerator; }, + "popperOffsets": function() { return /* reexport */ modifiers_popperOffsets; }, + "preventOverflow": function() { return /* reexport */ modifiers_preventOverflow; }, + "read": function() { return /* reexport */ read; }, + "reference": function() { return /* reexport */ reference; }, + "right": function() { return /* reexport */ right; }, + "start": function() { return /* reexport */ start; }, + "top": function() { return /* reexport */ enums_top; }, + "variationPlacements": function() { return /* reexport */ variationPlacements; }, + "viewport": function() { return /* reexport */ viewport; }, + "write": function() { return /* reexport */ write; } +}); + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/enums.js +var enums_top = 'top'; +var bottom = 'bottom'; +var right = 'right'; +var left = 'left'; +var auto = 'auto'; +var basePlacements = [enums_top, bottom, right, left]; +var start = 'start'; +var end = 'end'; +var clippingParents = 'clippingParents'; +var viewport = 'viewport'; +var popper = 'popper'; +var reference = 'reference'; +var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); +}, []); +var enums_placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); +}, []); // modifiers that need to read the DOM + +var beforeRead = 'beforeRead'; +var read = 'read'; +var afterRead = 'afterRead'; // pure-logic modifiers + +var beforeMain = 'beforeMain'; +var main = 'main'; +var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state) + +var beforeWrite = 'beforeWrite'; +var write = 'write'; +var afterWrite = 'afterWrite'; +var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +function getNodeName(element) { + return element ? (element.nodeName || '').toLowerCase() : null; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindow.js +function getWindow(node) { + if (node == null) { + return window; + } + + if (node.toString() !== '[object Window]') { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + + return node; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js + + +function isElement(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; +} + +function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; +} + +function isShadowRoot(node) { + // IE 11 has no ShadowRoot + if (typeof ShadowRoot === 'undefined') { + return false; + } + + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; +} + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/applyStyles.js + + // This modifier takes the styles prepared by the `computeStyles` modifier +// and applies them to the HTMLElements such as popper and arrow + +function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function (name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } // Flow doesn't support to extend this property, but it's the most + // effective way to apply styles to an HTMLElement + // $FlowFixMe[cannot-write] + + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (name) { + var value = attributes[name]; + + if (value === false) { + element.removeAttribute(name); + } else { + element.setAttribute(name, value === true ? '' : value); + } + }); + }); +} + +function effect(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: '0', + top: '0', + margin: '0' + }, + arrow: { + position: 'absolute' + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + + return function () { + Object.keys(state.elements).forEach(function (name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them + + var style = styleProperties.reduce(function (style, property) { + style[property] = ''; + return style; + }, {}); // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (attribute) { + element.removeAttribute(attribute); + }); + }); + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_applyStyles = ({ + name: 'applyStyles', + enabled: true, + phase: 'write', + fn: applyStyles, + effect: effect, + requires: ['computeStyles'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getBasePlacement.js + +function getBasePlacement(placement) { + return placement.split('-')[0]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/math.js +var math_max = Math.max; +var math_min = Math.min; +var round = Math.round; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/userAgent.js +function getUAString() { + var uaData = navigator.userAgentData; + + if (uaData != null && uaData.brands) { + return uaData.brands.map(function (item) { + return item.brand + "/" + item.version; + }).join(' '); + } + + return navigator.userAgent; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js + +function isLayoutViewport() { + return !/^((?!chrome|android).)*safari/i.test(getUAString()); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js + + + + +function getBoundingClientRect(element, includeScale, isFixedStrategy) { + if (includeScale === void 0) { + includeScale = false; + } + + if (isFixedStrategy === void 0) { + isFixedStrategy = false; + } + + var clientRect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + + if (includeScale && isHTMLElement(element)) { + scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1; + scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1; + } + + var _ref = isElement(element) ? getWindow(element) : window, + visualViewport = _ref.visualViewport; + + var addVisualOffsets = !isLayoutViewport() && isFixedStrategy; + var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX; + var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY; + var width = clientRect.width / scaleX; + var height = clientRect.height / scaleY; + return { + width: width, + height: height, + top: y, + right: x + width, + bottom: y + height, + left: x, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js + // Returns the layout rect of an element relative to its offsetParent. Layout +// means it doesn't take into account transforms. + +function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed. + // Fixes https://github.com/popperjs/popper-core/issues/1223 + + var width = element.offsetWidth; + var height = element.offsetHeight; + + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + + return { + x: element.offsetLeft, + y: element.offsetTop, + width: width, + height: height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/contains.js + +function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method + + if (parent.contains(child)) { + return true; + } // then fallback to custom implementation with Shadow DOM support + else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + + do { + if (next && parent.isSameNode(next)) { + return true; + } // $FlowFixMe[prop-missing]: need a better way to handle this... + + + next = next.parentNode || next.host; + } while (next); + } // Give up, the result is false + + + return false; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js + +function getComputedStyle(element) { + return getWindow(element).getComputedStyle(element); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js + +function isTableElement(element) { + return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js + +function getDocumentElement(element) { + // $FlowFixMe[incompatible-return]: assume body is always available + return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing] + element.document) || window.document).documentElement; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js + + + +function getParentNode(element) { + if (getNodeName(element) === 'html') { + return element; + } + + return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || ( // DOM Element detected + isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) // fallback + + ); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js + + + + + + + + +function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle(element).position === 'fixed') { + return null; + } + + return element.offsetParent; +} // `.offsetParent` reports `null` for fixed elements, while absolute elements +// return the containing block + + +function getContainingBlock(element) { + var isFirefox = /firefox/i.test(getUAString()); + var isIE = /Trident/i.test(getUAString()); + + if (isIE && isHTMLElement(element)) { + // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport + var elementCss = getComputedStyle(element); + + if (elementCss.position === 'fixed') { + return null; + } + } + + var currentNode = getParentNode(element); + + if (isShadowRoot(currentNode)) { + currentNode = currentNode.host; + } + + while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that + // create a containing block. + // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block + + if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + + return null; +} // Gets the closest ancestor positioned element. Handles some edge cases, +// such as table ancestors and cross browser bugs. + + +function getOffsetParent(element) { + var window = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + + while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') { + offsetParent = getTrueOffsetParent(offsetParent); + } + + if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) { + return window; + } + + return offsetParent || getContainingBlock(element) || window; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +function getMainAxisFromPlacement(placement) { + return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/within.js + +function within(min, value, max) { + return math_max(min, math_min(value, max)); +} +function withinMaxClamp(min, value, max) { + var v = within(min, value, max); + return v > max ? max : v; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js + +function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/expandToHashMap.js +function expandToHashMap(value, keys) { + return keys.reduce(function (hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/arrow.js + + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var toPaddingObject = function toPaddingObject(padding, state) { + padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); +}; + +function arrow(_ref) { + var _state$modifiersData$; + + var state = _ref.state, + name = _ref.name, + options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? 'height' : 'width'; + + if (!arrowElement || !popperOffsets) { + return; + } + + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === 'y' ? enums_top : left; + var maxProp = axis === 'y' ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len]; + var startDiff = popperOffsets[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is + // outside of the popper bounds + + var min = paddingObject[minProp]; + var max = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset = within(min, center, max); // Prevents breaking syntax highlighting... + + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$); +} + +function arrow_effect(_ref2) { + var state = _ref2.state, + options = _ref2.options; + var _options$element = options.element, + arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element; + + if (arrowElement == null) { + return; + } // CSS selector + + + if (typeof arrowElement === 'string') { + arrowElement = state.elements.popper.querySelector(arrowElement); + + if (!arrowElement) { + return; + } + } + + if (false) {} + + if (!contains(state.elements.popper, arrowElement)) { + if (false) {} + + return; + } + + state.elements.arrow = arrowElement; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_arrow = ({ + name: 'arrow', + enabled: true, + phase: 'main', + fn: arrow, + effect: arrow_effect, + requires: ['popperOffsets'], + requiresIfExists: ['preventOverflow'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getVariation.js +function getVariation(placement) { + return placement.split('-')[1]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/computeStyles.js + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var unsetSides = { + top: 'auto', + right: 'auto', + bottom: 'auto', + left: 'auto' +}; // Round the offsets to the nearest suitable subpixel based on the DPR. +// Zooming can change the DPR, but it seems to report a value that will +// cleanly divide the values into the appropriate subpixels. + +function roundOffsetsByDPR(_ref) { + var x = _ref.x, + y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; +} + +function mapToStyles(_ref2) { + var _Object$assign2; + + var popper = _ref2.popper, + popperRect = _ref2.popperRect, + placement = _ref2.placement, + variation = _ref2.variation, + offsets = _ref2.offsets, + position = _ref2.position, + gpuAcceleration = _ref2.gpuAcceleration, + adaptive = _ref2.adaptive, + roundOffsets = _ref2.roundOffsets, + isFixed = _ref2.isFixed; + var _offsets$x = offsets.x, + x = _offsets$x === void 0 ? 0 : _offsets$x, + _offsets$y = offsets.y, + y = _offsets$y === void 0 ? 0 : _offsets$y; + + var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref3.x; + y = _ref3.y; + var hasX = offsets.hasOwnProperty('x'); + var hasY = offsets.hasOwnProperty('y'); + var sideX = left; + var sideY = enums_top; + var win = window; + + if (adaptive) { + var offsetParent = getOffsetParent(popper); + var heightProp = 'clientHeight'; + var widthProp = 'clientWidth'; + + if (offsetParent === getWindow(popper)) { + offsetParent = getDocumentElement(popper); + + if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') { + heightProp = 'scrollHeight'; + widthProp = 'scrollWidth'; + } + } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it + + + offsetParent = offsetParent; + + if (placement === enums_top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] + offsetParent[heightProp]; + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + + if (placement === left || (placement === enums_top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] + offsetParent[widthProp]; + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + + var commonStyles = Object.assign({ + position: position + }, adaptive && unsetSides); + + var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref4.x; + y = _ref4.y; + + if (gpuAcceleration) { + var _Object$assign; + + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); +} + +function computeStyles(_ref5) { + var state = _ref5.state, + options = _ref5.options; + var _options$gpuAccelerat = options.gpuAcceleration, + gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, + _options$adaptive = options.adaptive, + adaptive = _options$adaptive === void 0 ? true : _options$adaptive, + _options$roundOffsets = options.roundOffsets, + roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + + if (false) { var transitionProperty; } + + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration: gpuAcceleration, + isFixed: state.options.strategy === 'fixed' + }; + + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive: adaptive, + roundOffsets: roundOffsets + }))); + } + + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: 'absolute', + adaptive: false, + roundOffsets: roundOffsets + }))); + } + + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-placement': state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_computeStyles = ({ + name: 'computeStyles', + enabled: true, + phase: 'beforeWrite', + fn: computeStyles, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/eventListeners.js + // eslint-disable-next-line import/no-unused-modules + +var passive = { + passive: true +}; + +function eventListeners_effect(_ref) { + var state = _ref.state, + instance = _ref.instance, + options = _ref.options; + var _options$scroll = options.scroll, + scroll = _options$scroll === void 0 ? true : _options$scroll, + _options$resize = options.resize, + resize = _options$resize === void 0 ? true : _options$resize; + var window = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.addEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.addEventListener('resize', instance.update, passive); + } + + return function () { + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.removeEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.removeEventListener('resize', instance.update, passive); + } + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var eventListeners = ({ + name: 'eventListeners', + enabled: true, + phase: 'write', + fn: function fn() {}, + effect: eventListeners_effect, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +var hash = { + left: 'right', + right: 'left', + bottom: 'top', + top: 'bottom' +}; +function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function (matched) { + return hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +var getOppositeVariationPlacement_hash = { + start: 'end', + end: 'start' +}; +function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function (matched) { + return getOppositeVariationPlacement_hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js + +function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft: scrollLeft, + scrollTop: scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js + + + +function getWindowScrollBarX(element) { + // If has a CSS width greater than the viewport, then this will be + // incorrect for RTL. + // Popper 1 is broken in this case and never had a bug report so let's assume + // it's not an issue. I don't think anyone ever specifies width on + // anyway. + // Browsers where the left scrollbar doesn't cause an issue report `0` for + // this (e.g. Edge 2019, IE11, Safari) + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js + + + + +function getViewportRect(element, strategy) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + var layoutViewport = isLayoutViewport(); + + if (layoutViewport || !layoutViewport && strategy === 'fixed') { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + + return { + width: width, + height: height, + x: x + getWindowScrollBarX(element), + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js + + + + + // Gets the entire size of the scrollable document area, even extending outside +// of the `` and `` rect bounds if horizontally scrollable + +function getDocumentRect(element) { + var _element$ownerDocumen; + + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = math_max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = math_max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + + if (getComputedStyle(body || html).direction === 'rtl') { + x += math_max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + + return { + width: width, + height: height, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js + +function isScrollParent(element) { + // Firefox wants us to check `-x` and `-y` variations as well + var _getComputedStyle = getComputedStyle(element), + overflow = _getComputedStyle.overflow, + overflowX = _getComputedStyle.overflowX, + overflowY = _getComputedStyle.overflowY; + + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js + + + + +function getScrollParent(node) { + if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) { + // $FlowFixMe[incompatible-return]: assume body is always available + return node.ownerDocument.body; + } + + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + + return getScrollParent(getParentNode(node)); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js + + + + +/* +given a DOM element, return the list of all scroll parents, up the list of ancesors +until we get to the top window object. This list is what we attach scroll listeners +to, because if any of these parent elements scroll, we'll need to re-calculate the +reference element's position. +*/ + +function listScrollParents(element, list) { + var _element$ownerDocumen; + + if (list === void 0) { + list = []; + } + + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js +function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js + + + + + + + + + + + + + + + +function getInnerBoundingClientRect(element, strategy) { + var rect = getBoundingClientRect(element, false, strategy === 'fixed'); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; +} + +function getClientRectFromMixedType(element, clippingParent, strategy) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element))); +} // A "clipping parent" is an overflowable container with the characteristic of +// clipping (or hiding) overflowing elements with a position different from +// `initial` + + +function getClippingParents(element) { + var clippingParents = listScrollParents(getParentNode(element)); + var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + + if (!isElement(clipperElement)) { + return []; + } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414 + + + return clippingParents.filter(function (clippingParent) { + return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; + }); +} // Gets the maximum area that the element is visible in due to any number of +// clipping parents + + +function getClippingRect(element, boundary, rootBoundary, strategy) { + var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary); + var clippingParents = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents[0]; + var clippingRect = clippingParents.reduce(function (accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent, strategy); + accRect.top = math_max(rect.top, accRect.top); + accRect.right = math_min(rect.right, accRect.right); + accRect.bottom = math_min(rect.bottom, accRect.bottom); + accRect.left = math_max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent, strategy)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeOffsets.js + + + + +function computeOffsets(_ref) { + var reference = _ref.reference, + element = _ref.element, + placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference.x + reference.width / 2 - element.width / 2; + var commonY = reference.y + reference.height / 2 - element.height / 2; + var offsets; + + switch (basePlacement) { + case enums_top: + offsets = { + x: commonX, + y: reference.y - element.height + }; + break; + + case bottom: + offsets = { + x: commonX, + y: reference.y + reference.height + }; + break; + + case right: + offsets = { + x: reference.x + reference.width, + y: commonY + }; + break; + + case left: + offsets = { + x: reference.x - element.width, + y: commonY + }; + break; + + default: + offsets = { + x: reference.x, + y: reference.y + }; + } + + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + + if (mainAxis != null) { + var len = mainAxis === 'y' ? 'height' : 'width'; + + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2); + break; + + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2); + break; + + default: + } + } + + return offsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/detectOverflow.js + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + _options$placement = _options.placement, + placement = _options$placement === void 0 ? state.placement : _options$placement, + _options$strategy = _options.strategy, + strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, + _options$boundary = _options.boundary, + boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, + _options$rootBoundary = _options.rootBoundary, + rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, + _options$elementConte = _options.elementContext, + elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, + _options$altBoundary = _options.altBoundary, + altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, + _options$padding = _options.padding, + padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: 'absolute', + placement: placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect + // 0 or negative = within the clipping rect + + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element + + if (elementContext === popper && offsetData) { + var offset = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function (key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [enums_top, bottom].indexOf(key) >= 0 ? 'y' : 'x'; + overflowOffsets[key] += offset[axis] * multiply; + }); + } + + return overflowOffsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js + + + + +function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + placement = _options.placement, + boundary = _options.boundary, + rootBoundary = _options.rootBoundary, + padding = _options.padding, + flipVariations = _options.flipVariations, + _options$allowedAutoP = _options.allowedAutoPlacements, + allowedAutoPlacements = _options$allowedAutoP === void 0 ? enums_placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) { + return getVariation(placement) === variation; + }) : basePlacements; + var allowedPlacements = placements.filter(function (placement) { + return allowedAutoPlacements.indexOf(placement) >= 0; + }); + + if (allowedPlacements.length === 0) { + allowedPlacements = placements; + + if (false) {} + } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions... + + + var overflows = allowedPlacements.reduce(function (acc, placement) { + acc[placement] = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding + })[getBasePlacement(placement)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function (a, b) { + return overflows[a] - overflows[b]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/flip.js + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; +} + +function flip(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + + if (state.modifiersData[name]._skip) { + return; + } + + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, + specifiedFallbackPlacements = options.fallbackPlacements, + padding = options.padding, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + _options$flipVariatio = options.flipVariations, + flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, + allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) { + return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + flipVariations: flipVariations, + allowedAutoPlacements: allowedAutoPlacements + }) : placement); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements[0]; + + for (var i = 0; i < placements.length; i++) { + var placement = placements[i]; + + var _basePlacement = getBasePlacement(placement); + + var isStartVariation = getVariation(placement) === start; + var isVertical = [enums_top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? 'width' : 'height'; + var overflow = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + altBoundary: altBoundary, + padding: padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : enums_top; + + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + + if (checks.every(function (check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + + checksMap.set(placement, checks); + } + + if (makeFallbackChecks) { + // `2` may be desired in some cases – research later + var numberOfChecks = flipVariations ? 3 : 1; + + var _loop = function _loop(_i) { + var fittingPlacement = placements.find(function (placement) { + var checks = checksMap.get(placement); + + if (checks) { + return checks.slice(0, _i).every(function (check) { + return check; + }); + } + }); + + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + + if (_ret === "break") break; + } + } + + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_flip = ({ + name: 'flip', + enabled: true, + phase: 'main', + fn: flip, + requiresIfExists: ['offset'], + data: { + _skip: false + } +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/hide.js + + + +function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; +} + +function isAnySideFullyClipped(overflow) { + return [enums_top, right, bottom, left].some(function (side) { + return overflow[side] >= 0; + }); +} + +function hide(_ref) { + var state = _ref.state, + name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: 'reference' + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets: referenceClippingOffsets, + popperEscapeOffsets: popperEscapeOffsets, + isReferenceHidden: isReferenceHidden, + hasPopperEscaped: hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-reference-hidden': isReferenceHidden, + 'data-popper-escaped': hasPopperEscaped + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_hide = ({ + name: 'hide', + enabled: true, + phase: 'main', + requiresIfExists: ['preventOverflow'], + fn: hide +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/offset.js + + // eslint-disable-next-line import/no-unused-modules + +function distanceAndSkiddingToXY(placement, rects, offset) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, enums_top].indexOf(basePlacement) >= 0 ? -1 : 1; + + var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { + placement: placement + })) : offset, + skidding = _ref[0], + distance = _ref[1]; + + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; +} + +function offset(_ref2) { + var state = _ref2.state, + options = _ref2.options, + name = _ref2.name; + var _options$offset = options.offset, + offset = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = enums_placements.reduce(function (acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset); + return acc; + }, {}); + var _data$state$placement = data[state.placement], + x = _data$state$placement.x, + y = _data$state$placement.y; + + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_offset = ({ + name: 'offset', + enabled: true, + phase: 'main', + requires: ['popperOffsets'], + fn: offset +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js + + +function popperOffsets(_ref) { + var state = _ref.state, + name = _ref.name; + // Offsets are the actual position the popper needs to have to be + // properly positioned near its reference element + // This is the most basic placement, and will be adjusted by + // the modifiers in the next step + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: 'absolute', + placement: state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_popperOffsets = ({ + name: 'popperOffsets', + enabled: true, + phase: 'read', + fn: popperOffsets, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getAltAxis.js +function getAltAxis(axis) { + return axis === 'x' ? 'y' : 'x'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js + + + + + + + + + + + + +function preventOverflow(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + padding = options.padding, + _options$tether = options.tether, + tether = _options$tether === void 0 ? true : _options$tether, + _options$tetherOffset = options.tetherOffset, + tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + altBoundary: altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + + if (!popperOffsets) { + return; + } + + if (checkMainAxis) { + var _offsetModifierState$; + + var mainSide = mainAxis === 'y' ? enums_top : left; + var altSide = mainAxis === 'y' ? bottom : right; + var len = mainAxis === 'y' ? 'height' : 'width'; + var offset = popperOffsets[mainAxis]; + var min = offset + overflow[mainSide]; + var max = offset - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go + // outside the reference bounds + + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want + // to include its full size in the calculation. If the reference is small + // and near the edge of a boundary, the popper can overflow even if the + // reference is not overflowing as well (e.g. virtual elements with no + // width or height) + + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? math_min(min, tetherMin) : min, offset, tether ? math_max(max, tetherMax) : max); + popperOffsets[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset; + } + + if (checkAltAxis) { + var _offsetModifierState$2; + + var _mainSide = mainAxis === 'x' ? enums_top : left; + + var _altSide = mainAxis === 'x' ? bottom : right; + + var _offset = popperOffsets[altAxis]; + + var _len = altAxis === 'y' ? 'height' : 'width'; + + var _min = _offset + overflow[_mainSide]; + + var _max = _offset - overflow[_altSide]; + + var isOriginSide = [enums_top, left].indexOf(basePlacement) !== -1; + + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + + popperOffsets[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_preventOverflow = ({ + name: 'preventOverflow', + enabled: true, + phase: 'main', + fn: preventOverflow, + requiresIfExists: ['offset'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/index.js + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js + + + + +function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js + + + + + + + + + +function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; +} // Returns the composite rect of an element relative to its offsetParent. +// Composite means it takes into account transforms as well as layout. + + +function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/orderModifiers.js + // source: https://stackoverflow.com/questions/49875255 + +function order(modifiers) { + var map = new Map(); + var visited = new Set(); + var result = []; + modifiers.forEach(function (modifier) { + map.set(modifier.name, modifier); + }); // On visiting object, check for its dependencies and visit them recursively + + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function (dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + + modifiers.forEach(function (modifier) { + if (!visited.has(modifier.name)) { + // check for visited object + sort(modifier); + } + }); + return result; +} + +function orderModifiers(modifiers) { + // order based on dependencies + var orderedModifiers = order(modifiers); // order based on phase + + return modifierPhases.reduce(function (acc, phase) { + return acc.concat(orderedModifiers.filter(function (modifier) { + return modifier.phase === phase; + })); + }, []); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/debounce.js +function debounce(fn) { + var pending; + return function () { + if (!pending) { + pending = new Promise(function (resolve) { + Promise.resolve().then(function () { + pending = undefined; + resolve(fn()); + }); + }); + } + + return pending; + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergeByName.js +function mergeByName(modifiers) { + var merged = modifiers.reduce(function (merged, current) { + var existing = merged[current.name]; + merged[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged; + }, {}); // IE11 does not support Object.values + + return Object.keys(merged).map(function (key) { + return merged[key]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/createPopper.js + + + + + + + + + + + + + + +var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.'; +var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.'; +var DEFAULT_OPTIONS = { + placement: 'bottom', + modifiers: [], + strategy: 'absolute' +}; + +function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return !args.some(function (element) { + return !(element && typeof element.getBoundingClientRect === 'function'); + }); +} + +function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + + var _generatorOptions = generatorOptions, + _generatorOptions$def = _generatorOptions.defaultModifiers, + defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, + _generatorOptions$def2 = _generatorOptions.defaultOptions, + defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper(reference, popper, options) { + if (options === void 0) { + options = defaultOptions; + } + + var state = { + placement: 'bottom', + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference, + popper: popper + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state: state, + setOptions: function setOptions(setOptionsAction) { + var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options); + state.scrollParents = { + reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], + popper: listScrollParents(popper) + }; // Orders the modifiers based on their dependencies and `phase` + // properties + + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers + + state.orderedModifiers = orderedModifiers.filter(function (m) { + return m.enabled; + }); // Validate the provided modifiers so that the consumer will get warned + // if one of the modifiers is invalid for any reason + + if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; } + + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + + var _state$elements = state.elements, + reference = _state$elements.reference, + popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements + // anymore + + if (!areValidElements(reference, popper)) { + if (false) {} + + return; + } // Store the reference and popper rects to be read by modifiers + + + state.rects = { + reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'), + popper: getLayoutRect(popper) + }; // Modifiers have the ability to reset the current update cycle. The + // most common use case for this is the `flip` modifier changing the + // placement, which then needs to re-run all the modifiers, because the + // logic was previously ran for the previous placement and is therefore + // stale/incorrect + + state.reset = false; + state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier + // is filled with the initial data specified by the modifier. This means + // it doesn't persist and is fresh on each update. + // To ensure persistent data, use `${name}#persistent` + + state.orderedModifiers.forEach(function (modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (false) {} + + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + + var _state$orderedModifie = state.orderedModifiers[index], + fn = _state$orderedModifie.fn, + _state$orderedModifie2 = _state$orderedModifie.options, + _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, + name = _state$orderedModifie.name; + + if (typeof fn === 'function') { + state = fn({ + state: state, + options: _options, + name: name, + instance: instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function () { + return new Promise(function (resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + + if (!areValidElements(reference, popper)) { + if (false) {} + + return instance; + } + + instance.setOptions(options).then(function (state) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state); + } + }); // Modifiers have the ability to execute arbitrary code before the first + // update cycle runs. They will be executed in the same order as the update + // cycle. This is useful when a modifier adds some persistent data that + // other modifiers need to use, but the modifier is run after the dependent + // one. + + function runModifierEffects() { + state.orderedModifiers.forEach(function (_ref3) { + var name = _ref3.name, + _ref3$options = _ref3.options, + options = _ref3$options === void 0 ? {} : _ref3$options, + effect = _ref3.effect; + + if (typeof effect === 'function') { + var cleanupFn = effect({ + state: state, + name: name, + instance: instance, + options: options + }); + + var noopFn = function noopFn() {}; + + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + + function cleanupModifierEffects() { + effectCleanupFns.forEach(function (fn) { + return fn(); + }); + effectCleanupFns = []; + } + + return instance; + }; +} +var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper.js + + + + + + + + + + +var defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles, modifiers_offset, modifiers_flip, modifiers_preventOverflow, modifiers_arrow, modifiers_hide]; +var popper_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper-lite.js + + + + + +var popper_lite_defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles]; +var popper_lite_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: popper_lite_defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/index.js + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + + +/***/ }), + +/***/ 554: +/***/ (function(__unused_webpack_module, exports) { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; +} +function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); +} +function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); +} +function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); + } +} +function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; +} +function _get() { + return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { + var p = _superPropBase(e, t); + if (p) { + var n = Object.getOwnPropertyDescriptor(p, t); + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; + } + }, _get.apply(null, arguments); +} +function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, _getPrototypeOf(t); +} +function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), Object.defineProperty(t, "prototype", { + writable: !1 + }), e && _setPrototypeOf(t, e); +} +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function () { + return !!t; + })(); +} +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _possibleConstructorReturn(t, e) { + if (e && ("object" == typeof e || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t); +} +function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { + return t.__proto__ = e, t; + }, _setPrototypeOf(t, e); +} +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); +} +function _superPropBase(t, o) { + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); + return t; +} +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; +} +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } +} + +function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +function lastItemOf(arr) { + return arr[arr.length - 1]; +} + +// push only the items not included in the array +function pushUnique(arr) { + for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + items[_key - 1] = arguments[_key]; + } + items.forEach(function (item) { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; +} +function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; +} +function isInRange(testVal, min, max) { + var minOK = min === undefined || testVal >= min; + var maxOK = max === undefined || testVal <= max; + return minOK && maxOK; +} +function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +} +function createTagRepeat(tagName, repeat) { + var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ''; + var openTagSrc = Object.keys(attributes).reduce(function (src, attr) { + var val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return "".concat(src, " ").concat(attr, "=\"").concat(val, "\""); + }, tagName); + html += "<".concat(openTagSrc, ">"); + var next = index + 1; + return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html; +} + +// Remove the spacing surrounding tags for HTML parser not to create text nodes +// before/after elements +function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0; + var baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); +} + +// Get the ISO week of a date +function getWeek(date) { + // start of ISO week is Monday + var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; +} + +// Get the start year of the period of years that includes given date +// years: length of the year period +function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + var year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; +} + +// pattern for format parts +var reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/; +// pattern for non date parts +var reNonDateParts = /[\s!-/:-@[-`{-~年月日]+/; +// cache for persed formats +var knownFormats = {}; +// parse funtions for date parts +var parseFns = { + y: function y(date, year) { + return new Date(date).setFullYear(parseInt(year, 10)); + }, + m: function m(date, month, locale) { + var newDate = new Date(date); + var monthIndex = parseInt(month, 10) - 1; + if (isNaN(monthIndex)) { + if (!month) { + return NaN; + } + var monthName = month.toLowerCase(); + var compareNames = function compareNames(name) { + return name.toLowerCase().startsWith(monthName); + }; + // compare with both short and full names because some locales have periods + // in the short names (not equal to the first X letters of the full names) + monthIndex = locale.monthsShort.findIndex(compareNames); + if (monthIndex < 0) { + monthIndex = locale.months.findIndex(compareNames); + } + if (monthIndex < 0) { + return NaN; + } + } + newDate.setMonth(monthIndex); + return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime(); + }, + d: function d(date, day) { + return new Date(date).setDate(parseInt(day, 10)); + } +}; +// format functions for date parts +var formatFns = { + d: function d(date) { + return date.getDate(); + }, + dd: function dd(date) { + return padZero(date.getDate(), 2); + }, + D: function D(date, locale) { + return locale.daysShort[date.getDay()]; + }, + DD: function DD(date, locale) { + return locale.days[date.getDay()]; + }, + m: function m(date) { + return date.getMonth() + 1; + }, + mm: function mm(date) { + return padZero(date.getMonth() + 1, 2); + }, + M: function M(date, locale) { + return locale.monthsShort[date.getMonth()]; + }, + MM: function MM(date, locale) { + return locale.months[date.getMonth()]; + }, + y: function y(date) { + return date.getFullYear(); + }, + yy: function yy(date) { + return padZero(date.getFullYear(), 2).slice(-2); + }, + yyyy: function yyyy(date) { + return padZero(date.getFullYear(), 4); + } +}; + +// get month index in normal range (0 - 11) from any number +function normalizeMonth(monthIndex) { + return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); +} +function padZero(num, length) { + return num.toString().padStart(length, '0'); +} +function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + var separators = format.split(reFormatTokens); + var parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + var partFormatters = parts.map(function (token) { + return formatFns[token]; + }); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) { + var token = parts.find(function (part) { + return part[0] !== 'D' && part[0].toLowerCase() === key; + }); + if (token) { + keys.push(key); + } + return keys; + }, []); + return knownFormats[format] = { + parser: function parser(dateStr, locale) { + var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) { + if (part.length > 0 && parts[index]) { + var token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce(function (origDate, key) { + var newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, today()); + }, + formatter: function formatter(date, locale) { + var dateStr = partFormatters.reduce(function (str, fn, index) { + return str += "".concat(separators[index]).concat(fn(date, locale)); + }, ''); + // separators' length is always parts' length + 1, + return dateStr += lastItemOf(separators); + } + }; +} +function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + var date = stripTime(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return today(); + } + if (format && format.toValue) { + var _date = format.toValue(dateStr, format, locale); + return isNaN(_date) ? undefined : stripTime(_date); + } + return parseFormatString(format).parser(dateStr, locale); +} +function formatDate(date, format, locale) { + if (isNaN(date) || !date && date !== 0) { + return ''; + } + var dateObj = typeof date === 'number' ? new Date(date) : date; + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + return parseFormatString(format).formatter(dateObj, locale); +} + +var listenerRegistry = new WeakMap(); +var _EventTarget$prototyp = EventTarget.prototype, + addEventListener = _EventTarget$prototyp.addEventListener, + removeEventListener = _EventTarget$prototyp.removeEventListener; + +// Register event listeners to a key object +// listeners: array of listener definitions; +// - each definition must be a flat array of event target and the arguments +// used to call addEventListener() on the target +function registerListeners(keyObj, listeners) { + var registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach(function (listener) { + addEventListener.call.apply(addEventListener, _toConsumableArray(listener)); + registered.push(listener); + }); +} +function unregisterListeners(keyObj) { + var listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach(function (listener) { + removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener)); + }); + listenerRegistry["delete"](keyObj); +} + +// Event.composedPath() polyfill for Edge +// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec +if (!Event.prototype.composedPath) { + var getComposedPath = function getComposedPath(node) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + path.push(node); + var parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { + // ShadowRoot + parent = node.host; + } else if (node.defaultView) { + // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; +} +function findFromPath(path, criteria, currentTarget) { + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); +} + +// Search for the actual target of a delegated event +function findElementInEventPath(ev, selector) { + var criteria = typeof selector === 'function' ? selector : function (el) { + return el.matches(selector); + }; + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); +} + +// default locales +var locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } +}; + +// config options updatable by setOptions() and their default values +var defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, + // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0 +}; + +var range = document.createRange(); +function parseHTML(html) { + return range.createContextualFragment(html); +} +function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; +} +function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } +} +function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } +} +function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach(function (node) { + el.appendChild(node); + }); + } +} + +var defaultLang = defaultOptions.language, + defaultFormat = defaultOptions.format, + defaultWeekStart = defaultOptions.weekStart; + +// Reducer function to filter out invalid day-of-week from the input +function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow; +} +function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; +} + +// validate input date. if invalid, fallback to the original value +function validateDate(value, format, locale, origValue) { + var date = parseDate(value, format, locale); + return date !== undefined ? date : origValue; +} + +// Validate viewId. if invalid, fallback to the original value +function validateViewId(value, origValue) { + var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; + var viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; +} + +// Create Datepicker configuration to set +function processOptions(options, datepicker) { + var inOpts = Object.assign({}, options); + var config = {}; + var locales = datepicker.constructor.locales; + var _ref = datepicker.config || {}, + format = _ref.format, + language = _ref.language, + locale = _ref.locale, + maxDate = _ref.maxDate, + maxView = _ref.maxView, + minDate = _ref.minDate, + pickLevel = _ref.pickLevel, + startView = _ref.startView, + weekStart = _ref.weekStart; + if (inOpts.language) { + var lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + var origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + if (inOpts.format) { + var hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + var hasToValue = typeof inOpts.format.toValue === 'function'; + var validFormatString = reFormatTokens.test(inOpts.format); + if (hasToDisplay && hasToValue || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + var minDt = minDate; + var maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) { + var date = parseDate(dt, format, locale); + return date !== undefined ? pushUnique(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + var viewDate = parseDate(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + var wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + var newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + var newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + var newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + var prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + var nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + var orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(function (x) { + return x === 'left' || x === 'right'; + }) || 'auto', + y: orientation.find(function (y) { + return y === 'top' || y === 'bottom'; + }) || 'auto' + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch (inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach(function (key) { + if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + return config; +} + +var pickerTemplate = optimizeTemplateHTML("
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    "); + +var daysTemplate = optimizeTemplateHTML("
    \n
    ".concat(createTagRepeat('span', 7, { + "class": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
    \n
    ").concat(createTagRepeat('span', 42, { + "class": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400' +}), "
    \n
    ")); + +var calendarWeeksTemplate = optimizeTemplateHTML("
    \n
    \n
    ".concat(createTagRepeat('span', 6, { + "class": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
    \n
    ")); + +// Base class of the view classes +var View = /*#__PURE__*/function () { + function View(picker, config) { + _classCallCheck(this, View); + Object.assign(this, config, { + picker: picker, + element: parseHTML("
    ").firstChild, + selected: [] + }); + this.init(this.picker.datepicker.config); + } + return _createClass(View, [{ + key: "init", + value: function init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + }, { + key: "performBeforeHook", + value: function performBeforeHook(el, current, timeValue) { + var result = this.beforeShow(new Date(timeValue)); + switch (_typeof(result)) { + case 'boolean': + result = { + enabled: result + }; + break; + case 'string': + result = { + classes: result + }; + } + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + var _el$classList; + var extraClasses = result.classes.split(/\s+/); + (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses)); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } + }]); +}(); + +var DaysView = /*#__PURE__*/function (_View) { + function DaysView(picker) { + _classCallCheck(this, DaysView); + return _callSuper(this, DaysView, [picker, { + id: 0, + name: 'days', + cellClass: 'day' + }]); + } + _inherits(DaysView, _View); + return _createClass(DaysView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + var inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + _get(_getPrototypeOf(DaysView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + var _this = this; + var updateDOW; + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + var locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined; + } + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + var weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach(function (el, index) { + var dow = (_this.weekStart + index) % 7; + el.textContent = _this.dayNames[dow]; + el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var viewYear = viewDate.getFullYear(); + var viewMonth = viewDate.getMonth(); + var firstOfMonth = dateValue(viewYear, viewMonth, 1); + var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = _toConsumableArray(this.datesDisabled); + var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + var startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = addDays(_this2.start, index); + var date = new Date(current); + var day = date.getDay(); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + el.dataset.date = current; + el.textContent = date.getDate(); + if (current < _this2.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > _this2.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (_this2.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (_this2.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(_this2.disabled, current); + } + if (_this2.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.dataset.date); + var classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg'); + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + var _range = _slicedToArray(range, 2), + _range$ = _slicedToArray(_range[0], 2), + startY = _range$[0], + startM = _range$[1], + _range$2 = _slicedToArray(_range[1], 2), + endY = _range$2[0], + endM = _range$2[1]; + if (startY > thisYear || endY < thisYear) { + return; + } + return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12]; +} +var MonthsView = /*#__PURE__*/function (_View) { + function MonthsView(picker) { + _classCallCheck(this, MonthsView); + return _callSuper(this, MonthsView, [picker, { + id: 1, + name: 'months', + cellClass: 'month' + }]); + } + _inherits(MonthsView, _View); + return _createClass(MonthsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, { + 'data-month': function dataMonth(ix) { + return ix; + } + }))); + } + _get(_getPrototypeOf(MonthsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + var minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + var maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (selected, timeValue) { + var date = new Date(timeValue); + var year = date.getFullYear(); + var month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + var date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this = this; + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + var selected = this.selected[this.year] || []; + var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + var isMinYear = this.year === this.minYear; + var isMaxYear = this.year === this.maxYear; + var range = computeMonthRange(this.range, this.year); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var date = dateValue(_this.year, index, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this.cellClass); + if (_this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = _this.monthNames[index]; + if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) { + classList.add('disabled'); + } + if (range) { + var _range2 = _slicedToArray(range, 2), + rangeStart = _range2[0], + rangeEnd = _range2[1]; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this.focused) { + classList.add('focused'); + } + if (_this.beforeShow) { + _this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this2 = this; + var selected = this.selected[this.year] || []; + var _ref = computeMonthRange(this.range, this.year) || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this2.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } + }]); +}(View); + +function toTitleCase(word) { + return _toConsumableArray(word).reduce(function (str, ch, ix) { + return str += ix ? ch : ch.toUpperCase(); + }, ''); +} + +// Class representing the years and decades view elements +var YearsView = /*#__PURE__*/function (_View) { + function YearsView(picker, config) { + _classCallCheck(this, YearsView); + return _callSuper(this, YearsView, [picker, config]); + } + _inherits(YearsView, _View); + return _createClass(YearsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = "beforeShow".concat(toTitleCase(this.cellClass)); + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + _get(_getPrototypeOf(YearsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + var beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var first = startOfYearPeriod(viewDate, this.navStep); + var last = first + 9 * this.step; + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this = this; + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (years, timeValue) { + return pushUnique(years, startOfYearPeriod(timeValue, _this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, _this.step); + } + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel("".concat(this.first, "-").concat(this.last)); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = _this2.start + index * _this2.step; + var date = dateValue(current, 0, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + if (_this2.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < _this2.minYear || current > _this2.maxYear) { + classList.add('disabled'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.textContent); + var classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function triggerDatepickerEvent(datepicker, type) { + var detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker: datepicker + }; + datepicker.element.dispatchEvent(new CustomEvent(type, { + detail: detail + })); +} + +// direction: -1 (to previous), 1 (to next) +function goToPrevOrNext(datepicker, direction) { + var _datepicker$config = datepicker.config, + minDate = _datepicker$config.minDate, + maxDate = _datepicker$config.maxDate; + var _datepicker$picker = datepicker.picker, + currentView = _datepicker$picker.currentView, + viewDate = _datepicker$picker.viewDate; + var newViewDate; + switch (currentView.id) { + case 0: + newViewDate = addMonths(viewDate, direction); + break; + case 1: + newViewDate = addYears(viewDate, direction); + break; + default: + newViewDate = addYears(viewDate, direction * currentView.navStep); + } + newViewDate = limitToRange(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); +} +function switchView(datepicker) { + var viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); +} +function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({ + autohide: true + }); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } +} + +function goToSelectedMonthOrYear(datepicker, selection) { + var picker = datepicker.picker; + var viewDate = new Date(picker.viewDate); + var viewId = picker.currentView.id; + var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear()); + picker.changeFocus(newDate).changeView(viewId - 1).render(); +} +function onClickTodayBtn(datepicker) { + var picker = datepicker.picker; + var currentDate = today(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, { + render: false + }); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); +} +function onClickClearBtn(datepicker) { + datepicker.setDate({ + clear: true + }); +} +function onClickViewSwitch(datepicker) { + switchView(datepicker); +} +function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); +} +function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); +} + +// For the picker's main block to delegete the events from `datepicker-cell`s +function onClickView(datepicker, ev) { + var target = findElementInEventPath(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + var _datepicker$picker$cu = datepicker.picker.currentView, + id = _datepicker$picker$cu.id, + isMinView = _datepicker$picker$cu.isMinView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } +} +function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } +} + +function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + var prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach(function (node) { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + var nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach(function (node) { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) { + var _picker$datepicker$co = picker.datepicker.config, + minDate = _picker$datepicker$co.minDate, + maxDate = _picker$datepicker$co.maxDate; + picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } +} + +// Compute view date to reset, which will be... +// - the last item of the selected dates or defaultViewDate if no selection +// - limitted to minDate or maxDate if it exceeds the range +function computeResetViewDate(datepicker) { + var dates = datepicker.dates, + config = datepicker.config; + var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate; + return limitToRange(viewDate, config.minDate, config.maxDate); +} + +// Change current view's view date +function setViewDate(picker, newDate) { + var oldViewDate = new Date(picker.viewDate); + var newViewDate = new Date(newDate); + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + year = _picker$currentView.year, + first = _picker$currentView.first, + last = _picker$currentView.last; + var viewYear = newViewDate.getFullYear(); + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } +} +function getTextDirection(el) { + return window.getComputedStyle(el).direction; +} + +// Class representing the picker UI +var Picker = /*#__PURE__*/function () { + function Picker(datepicker) { + _classCallCheck(this, Picker); + this.datepicker = datepicker; + var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + var element = this.element = parseHTML(template).firstChild; + var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3), + header = _element$firstChild$c[0], + main = _element$firstChild$c[1], + footer = _element$firstChild$c[2]; + var title = header.firstElementChild; + var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3), + prevBtn = _header$lastElementCh[0], + viewSwitch = _header$lastElementCh[1], + nextBtn = _header$lastElementCh[2]; + var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2), + todayBtn = _footer$firstChild$ch[0], + clearBtn = _footer$firstChild$ch[1]; + var controls = { + title: title, + prevBtn: prevBtn, + viewSwitch: viewSwitch, + nextBtn: nextBtn, + todayBtn: todayBtn, + clearBtn: clearBtn + }; + this.main = main; + this.controls = controls; + var elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add("datepicker-".concat(elementClass)); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), { + capture: true + }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]); + + // set up views + this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, { + id: 2, + name: 'years', + cellClass: 'year', + step: 1 + }), new YearsView(this, { + id: 3, + name: 'decades', + cellClass: 'decade', + step: 10 + })]; + this.currentView = this.views[datepicker.config.startView]; + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + return _createClass(Picker, [{ + key: "setOptions", + value: function setOptions(options) { + processPickerOptions(this, options); + this.views.forEach(function (view) { + view.init(options, false); + }); + this.currentView.render(); + } + }, { + key: "detach", + value: function detach() { + this.datepicker.config.container.removeChild(this.element); + } + }, { + key: "show", + value: function show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + var datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + var inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + }, { + key: "hide", + value: function hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + }, { + key: "place", + value: function place() { + var _this$element = this.element, + classList = _this$element.classList, + style = _this$element.style; + var _this$datepicker = this.datepicker, + config = _this$datepicker.config, + inputField = _this$datepicker.inputField; + var container = config.container; + var _this$element$getBoun = this.element.getBoundingClientRect(), + calendarWidth = _this$element$getBoun.width, + calendarHeight = _this$element$getBoun.height; + var _container$getBoundin = container.getBoundingClientRect(), + containerLeft = _container$getBoundin.left, + containerTop = _container$getBoundin.top, + containerWidth = _container$getBoundin.width; + var _inputField$getBoundi = inputField.getBoundingClientRect(), + inputLeft = _inputField$getBoundi.left, + inputTop = _inputField$getBoundi.top, + inputWidth = _inputField$getBoundi.width, + inputHeight = _inputField$getBoundi.height; + var _config$orientation = config.orientation, + orientX = _config$orientation.x, + orientY = _config$orientation.y; + var scrollTop; + var left; + var top; + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left'); + classList.add("datepicker-orient-".concat(orientY), "datepicker-orient-".concat(orientX)); + style.top = top ? "".concat(top, "px") : top; + style.left = left ? "".concat(left, "px") : left; + } + }, { + key: "setViewSwitchLabel", + value: function setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + }, { + key: "setPrevBtnDisabled", + value: function setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + }, { + key: "setNextBtnDisabled", + value: function setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + }, { + key: "changeView", + value: function changeView(viewId) { + var oldView = this.currentView; + var newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + }, { + key: "changeFocus", + value: function changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach(function (view) { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + }, { + key: "update", + value: function update() { + var newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach(function (view) { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + }, { + key: "render", + value: function render() { + var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var renderMethod = quickRender && this._renderMethod || 'render'; + delete this._renderMethod; + this.currentView[renderMethod](); + } + }]); +}(); + +// Find the closest date that doesn't meet the condition for unavailable date +// Returns undefined if no available date is found +// addFn: function to calculate the next date +// - args: time value, amount +// increase: amount to pass to addFn +// testFn: function to test the unavailablity of the date +// - args: time value; retun: true if unavailable +function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!isInRange(date, min, max)) { + return; + } + if (testFn(date)) { + var newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; +} + +// direction: -1 (left/up), 1 (right/down) +// vertical: true for up/down, false for left/right +function moveByArrowKey(datepicker, ev, direction, vertical) { + var picker = datepicker.picker; + var currentView = picker.currentView; + var step = currentView.step || 1; + var viewDate = picker.viewDate; + var addFn; + var testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = addDays(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = addYears(viewDate, direction); + } else { + viewDate = addDays(viewDate, direction); + } + addFn = addDays; + testFn = function testFn(date) { + return currentView.disabled.includes(date); + }; + break; + case 1: + viewDate = addMonths(viewDate, vertical ? direction * 4 : direction); + addFn = addMonths; + testFn = function testFn(date) { + var dt = new Date(date); + var year = currentView.year, + disabled = currentView.disabled; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = addYears; + testFn = function testFn(date) { + return currentView.disabled.includes(startOfYearPeriod(date, step)); + }; + } + viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } +} +function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + var picker = datepicker.picker; + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + isMinView = _picker$currentView.isMinView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({ + update: true, + autohide: datepicker.config.autohide + }); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); +} +function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } +} + +// for the prevention for entering edit mode while getting focus on click +function onMousedown(datepicker, ev) { + var el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(function () { + delete el._active; + delete el._clicking; + }, 2000); + } +} +function onClickInput(datepicker, ev) { + var el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + if (datepicker.config.showOnClick) { + datepicker.show(); + } +} +function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } +} + +// for the `document` to delegate the events from outside the picker/input field +function onClickOutside(datepicker, ev) { + var element = datepicker.element; + if (element !== document.activeElement) { + return; + } + var pickerElem = datepicker.picker.element; + if (findElementInEventPath(ev, function (el) { + return el === element || el === pickerElem; + })) { + return; + } + unfocus(datepicker); +} + +function stringifyDates(dates, config) { + return dates.map(function (dt) { + return formatDate(dt, config.format, config.locale); + }).join(config.dateDelimiter); +} + +// parse input dates and create an array of time values for selection +// returns undefined if there are no valid dates in inputDates +// when origDates (current selection) is passed, the function works to mix +// the input dates into the current selection +function processInputDates(datepicker, inputDates) { + var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var config = datepicker.config, + origDates = datepicker.dates, + rangepicker = datepicker.rangepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + var newDates = inputDates.reduce(function (dates, dt) { + var date = parseDate(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + var _dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1); + } else { + date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1); + } + } + if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce(function (dates, date) { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(function (date) { + return !newDates.includes(date); + })); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates; +} + +// refresh the UI elements +// modes: 1: input only, 2, picker only, 3 both +function refreshUI(datepicker) { + var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3; + var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var config = datepicker.config, + picker = datepicker.picker, + inputField = datepicker.inputField; + if (mode & 2) { + var newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } +} +function _setDate(datepicker, inputDates, options) { + var clear = options.clear, + render = options.render, + autohide = options.autohide; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + var newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } +} + +/** + * Class representing a date picker + */ +var Datepicker = /*#__PURE__*/function () { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + function Datepicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + _classCallCheck(this, Datepicker); + element.datepicker = this; + this.element = element; + + // set up config + var config = this.config = Object.assign({ + buttonClass: options.buttonClass && String(options.buttonClass) || 'button', + container: document.body, + defaultViewDate: today(), + maxDate: undefined, + minDate: undefined + }, processOptions(defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + var inline = this.inline = element.tagName !== 'INPUT'; + var inputField; + var initialDates; + if (inline) { + config.container = element; + initialDates = stringToArray(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + var container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = stringToArray(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + var index = rangepicker.inputs.indexOf(inputField); + var datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get: function get() { + return rangepicker; + } + }); + } + + // set initial dates + this.dates = []; + // process initial value + var inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + var picker = this.picker = new Picker(this); + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + var onMousedownDocument = onClickOutside.bind(null, this); + var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]]; + registerListeners(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + return _createClass(Datepicker, [{ + key: "active", + get: + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + function get() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + }, { + key: "pickerElement", + get: function get() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + var picker = this.picker; + var newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + }, { + key: "show", + value: function show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + }, { + key: "hide", + value: function hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.hide(); + unregisterListeners(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + }, { + key: "getDate", + value: function getDate() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.config.locale); + } : function (date) { + return new Date(date); + }; + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + }, { + key: "setDate", + value: function setDate() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + var dates = [].concat(args); + var opts = {}; + var lastArg = lastItemOf(args); + if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) { + Object.assign(opts, dates.pop()); + } + var inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + _setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + }, { + key: "update", + value: function update() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline) { + return; + } + var opts = { + clear: true, + autohide: !!(options && options.autohide) + }; + var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter); + _setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + }, { + key: "refresh", + value: function refresh() { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + var mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + }, { + key: "enterEditMode", + value: function enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + }, { + key: "exitEditMode", + value: function exitEditMode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline || !this.editMode) { + return; + } + var opts = Object.assign({ + update: false + }, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700'); + if (opts.update) { + this.update(opts); + } + } + }], [{ + key: "formatDate", + value: function formatDate$1(date, format, lang) { + return formatDate(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + }, { + key: "parseDate", + value: function parseDate$1(dateStr, format, lang) { + return parseDate(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + }, { + key: "locales", + get: function get() { + return locales; + } + }]); +}(); + +// filter out the config options inapproprite to pass to Datepicker +function filterOptions(options) { + var newOpts = Object.assign({}, options); + delete newOpts.inputs; + delete newOpts.allowOneSidedRange; + delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date + + return newOpts; +} +function setupDatepicker(rangepicker, changeDateListener, el, options) { + registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]); + new Datepicker(el, options, rangepicker); +} +function onChangeDate(rangepicker, ev) { + // to prevent both datepickers trigger the other side's update each other + if (rangepicker._updating) { + return; + } + rangepicker._updating = true; + var target = ev.target; + if (target.datepicker === undefined) { + return; + } + var datepickers = rangepicker.datepickers; + var setDateOptions = { + render: false + }; + var changedSide = rangepicker.inputs.indexOf(target); + var otherSide = changedSide === 0 ? 1 : 0; + var changedDate = datepickers[changedSide].dates[0]; + var otherDate = datepickers[otherSide].dates[0]; + if (changedDate !== undefined && otherDate !== undefined) { + // if the start of the range > the end, swap them + if (changedSide === 0 && changedDate > otherDate) { + datepickers[0].setDate(otherDate, setDateOptions); + datepickers[1].setDate(changedDate, setDateOptions); + } else if (changedSide === 1 && changedDate < otherDate) { + datepickers[0].setDate(changedDate, setDateOptions); + datepickers[1].setDate(otherDate, setDateOptions); + } + } else if (!rangepicker.allowOneSidedRange) { + // to prevent the range from becoming one-sided, copy changed side's + // selection (no matter if it's empty) to the other side + if (changedDate !== undefined || otherDate !== undefined) { + setDateOptions.clear = true; + datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions); + } + } + datepickers[0].picker.update().render(); + datepickers[1].picker.update().render(); + delete rangepicker._updating; +} + +/** + * Class representing a date range picker + */ +var DateRangePicker = /*#__PURE__*/function () { + /** + * Create a date range picker + * @param {Element} element - element to bind a date range picker + * @param {Object} [options] - config options + */ + function DateRangePicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + _classCallCheck(this, DateRangePicker); + var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input')); + if (inputs.length < 2) { + return; + } + element.rangepicker = this; + this.element = element; + this.inputs = inputs.slice(0, 2); + this.allowOneSidedRange = !!options.allowOneSidedRange; + var changeDateListener = onChangeDate.bind(null, this); + var cleanOptions = filterOptions(options); + // in order for initial date setup to work right when pcicLvel > 0, + // let Datepicker constructor add the instance to the rangepicker + var datepickers = []; + Object.defineProperty(this, 'datepickers', { + get: function get() { + return datepickers; + } + }); + setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions); + setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions); + Object.freeze(datepickers); + // normalize the range if inital dates are given + if (datepickers[0].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[0] + }); + } else if (datepickers[1].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[1] + }); + } + } + + /** + * @type {Array} - selected date of the linked date pickers + */ + return _createClass(DateRangePicker, [{ + key: "dates", + get: function get() { + return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + this.allowOneSidedRange = !!options.allowOneSidedRange; + var cleanOptions = filterOptions(options); + this.datepickers[0].setOptions(cleanOptions); + this.datepickers[1].setOptions(cleanOptions); + } + + /** + * Destroy the DateRangePicker instance + * @return {DateRangePicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.datepickers[0].destroy(); + this.datepickers[1].destroy(); + unregisterListeners(this); + delete this.element.rangepicker; + } + + /** + * Get the start and end dates of the date range + * + * The method returns Date objects by default. If format string is passed, + * it returns date strings formatted in given format. + * The result array always contains 2 items (start date/end date) and + * undefined is used for unselected side. (e.g. If none is selected, + * the result will be [undefined, undefined]. If only the end date is set + * when allowOneSidedRange config option is true, [undefined, endDate] will + * be returned.) + * + * @param {String} [format] - Format string to stringify the dates + * @return {Array} - Start and end dates + */ + }, { + key: "getDates", + value: function getDates() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.datepickers[0].config.locale); + } : function (date) { + return new Date(date); + }; + return this.dates.map(function (date) { + return date === undefined ? date : callback(date); + }); + } + + /** + * Set the start and end dates of the date range + * + * The method calls datepicker.setDate() internally using each of the + * arguments in start→end order. + * + * When a clear: true option object is passed instead of a date, the method + * clears the date. + * + * If an invalid date, the same date as the current one or an option object + * without clear: true is passed, the method considers that argument as an + * "ineffective" argument because calling datepicker.setDate() with those + * values makes no changes to the date selection. + * + * When the allowOneSidedRange config option is false, passing {clear: true} + * to clear the range works only when it is done to the last effective + * argument (in other words, passed to rangeEnd or to rangeStart along with + * ineffective rangeEnd). This is because when the date range is changed, + * it gets normalized based on the last change at the end of the changing + * process. + * + * @param {Date|Number|String|Object} rangeStart - Start date of the range + * or {clear: true} to clear the date + * @param {Date|Number|String|Object} rangeEnd - End date of the range + * or {clear: true} to clear the date + */ + }, { + key: "setDates", + value: function setDates(rangeStart, rangeEnd) { + var _this$datepickers = _slicedToArray(this.datepickers, 2), + datepicker0 = _this$datepickers[0], + datepicker1 = _this$datepickers[1]; + var origDates = this.dates; + + // If range normalization runs on every change, we can't set a new range + // that starts after the end of the current range correctly because the + // normalization process swaps start↔︎end right after setting the new start + // date. To prevent this, the normalization process needs to run once after + // both of the new dates are set. + this._updating = true; + datepicker0.setDate(rangeStart); + datepicker1.setDate(rangeEnd); + delete this._updating; + if (datepicker1.dates[0] !== origDates[1]) { + onChangeDate(this, { + target: this.inputs[1] + }); + } else if (datepicker0.dates[0] !== origDates[0]) { + onChangeDate(this, { + target: this.inputs[0] + }); + } + } + }]); +}(); + +exports.DateRangePicker = DateRangePicker; +exports.Datepicker = Datepicker; + + +/***/ }), + +/***/ 902: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initAccordions = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + alwaysOpen: false, + activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white', + inactiveClasses: 'text-gray-500 dark:text-gray-400', + onOpen: function () { }, + onClose: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Accordion = /** @class */ (function () { + function Accordion(accordionEl, items, options, instanceOptions) { + if (accordionEl === void 0) { accordionEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : accordionEl.id; + this._accordionEl = accordionEl; + this._items = items; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Accordion', this, this._instanceId, instanceOptions.override); + } + Accordion.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + // show accordion item based on click + this._items.forEach(function (item) { + if (item.active) { + _this.open(item.id); + } + var clickHandler = function () { + _this.toggle(item.id); + }; + item.triggerEl.addEventListener('click', clickHandler); + // Store the clickHandler in a property of the item for removal later + item.clickHandler = clickHandler; + }); + this._initialized = true; + } + }; + Accordion.prototype.destroy = function () { + if (this._items.length && this._initialized) { + this._items.forEach(function (item) { + item.triggerEl.removeEventListener('click', item.clickHandler); + // Clean up by deleting the clickHandler property from the item + delete item.clickHandler; + }); + this._initialized = false; + } + }; + Accordion.prototype.removeInstance = function () { + instances_1.default.removeInstance('Accordion', this._instanceId); + }; + Accordion.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Accordion.prototype.getItem = function (id) { + return this._items.filter(function (item) { return item.id === id; })[0]; + }; + Accordion.prototype.open = function (id) { + var _a, _b; + var _this = this; + var item = this.getItem(id); + // don't hide other accordions if always open + if (!this._options.alwaysOpen) { + this._items.map(function (i) { + var _a, _b; + if (i !== item) { + (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + i.targetEl.classList.add('hidden'); + i.triggerEl.setAttribute('aria-expanded', 'false'); + i.active = false; + // rotate icon if set + if (i.iconEl) { + i.iconEl.classList.add('rotate-180'); + } + } + }); + } + // show active item + (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + item.triggerEl.setAttribute('aria-expanded', 'true'); + item.targetEl.classList.remove('hidden'); + item.active = true; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.remove('rotate-180'); + } + // callback function + this._options.onOpen(this, item); + }; + Accordion.prototype.toggle = function (id) { + var item = this.getItem(id); + if (item.active) { + this.close(id); + } + else { + this.open(id); + } + // callback function + this._options.onToggle(this, item); + }; + Accordion.prototype.close = function (id) { + var _a, _b; + var item = this.getItem(id); + (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' ')); + item.targetEl.classList.add('hidden'); + item.triggerEl.setAttribute('aria-expanded', 'false'); + item.active = false; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.add('rotate-180'); + } + // callback function + this._options.onClose(this, item); + }; + Accordion.prototype.updateOnOpen = function (callback) { + this._options.onOpen = callback; + }; + Accordion.prototype.updateOnClose = function (callback) { + this._options.onClose = callback; + }; + Accordion.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Accordion; +}()); +function initAccordions() { + document.querySelectorAll('[data-accordion]').forEach(function ($accordionEl) { + var alwaysOpen = $accordionEl.getAttribute('data-accordion'); + var activeClasses = $accordionEl.getAttribute('data-active-classes'); + var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes'); + var items = []; + $accordionEl + .querySelectorAll('[data-accordion-target]') + .forEach(function ($triggerEl) { + // Consider only items that directly belong to $accordionEl + // (to make nested accordions work). + if ($triggerEl.closest('[data-accordion]') === $accordionEl) { + var item = { + id: $triggerEl.getAttribute('data-accordion-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')), + iconEl: $triggerEl.querySelector('[data-accordion-icon]'), + active: $triggerEl.getAttribute('aria-expanded') === 'true' + ? true + : false, + }; + items.push(item); + } + }); + new Accordion($accordionEl, items, { + alwaysOpen: alwaysOpen === 'open' ? true : false, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initAccordions = initAccordions; +if (typeof window !== 'undefined') { + window.Accordion = Accordion; + window.initAccordions = initAccordions; +} +exports["default"] = Accordion; + + +/***/ }), + +/***/ 33: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCarousels = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + defaultPosition: 0, + indicators: { + items: [], + activeClasses: 'bg-white dark:bg-gray-800', + inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800', + }, + interval: 3000, + onNext: function () { }, + onPrev: function () { }, + onChange: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Carousel = /** @class */ (function () { + function Carousel(carouselEl, items, options, instanceOptions) { + if (carouselEl === void 0) { carouselEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : carouselEl.id; + this._carouselEl = carouselEl; + this._items = items; + this._options = __assign(__assign(__assign({}, Default), options), { indicators: __assign(__assign({}, Default.indicators), options.indicators) }); + this._activeItem = this.getItem(this._options.defaultPosition); + this._indicators = this._options.indicators.items; + this._intervalDuration = this._options.interval; + this._intervalInstance = null; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Carousel', this, this._instanceId, instanceOptions.override); + } + /** + * initialize carousel and items based on active one + */ + Carousel.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + this._items.map(function (item) { + item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform'); + }); + // if no active item is set then first position is default + if (this.getActiveItem()) { + this.slideTo(this.getActiveItem().position); + } + else { + this.slideTo(0); + } + this._indicators.map(function (indicator, position) { + indicator.el.addEventListener('click', function () { + _this.slideTo(position); + }); + }); + this._initialized = true; + } + }; + Carousel.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + } + }; + Carousel.prototype.removeInstance = function () { + instances_1.default.removeInstance('Carousel', this._instanceId); + }; + Carousel.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Carousel.prototype.getItem = function (position) { + return this._items[position]; + }; + /** + * Slide to the element based on id + * @param {*} position + */ + Carousel.prototype.slideTo = function (position) { + var nextItem = this._items[position]; + var rotationItems = { + left: nextItem.position === 0 + ? this._items[this._items.length - 1] + : this._items[nextItem.position - 1], + middle: nextItem, + right: nextItem.position === this._items.length - 1 + ? this._items[0] + : this._items[nextItem.position + 1], + }; + this._rotate(rotationItems); + this._setActiveItem(nextItem); + if (this._intervalInstance) { + this.pause(); + this.cycle(); + } + this._options.onChange(this); + }; + /** + * Based on the currently active item it will go to the next position + */ + Carousel.prototype.next = function () { + var activeItem = this.getActiveItem(); + var nextItem = null; + // check if last item + if (activeItem.position === this._items.length - 1) { + nextItem = this._items[0]; + } + else { + nextItem = this._items[activeItem.position + 1]; + } + this.slideTo(nextItem.position); + // callback function + this._options.onNext(this); + }; + /** + * Based on the currently active item it will go to the previous position + */ + Carousel.prototype.prev = function () { + var activeItem = this.getActiveItem(); + var prevItem = null; + // check if first item + if (activeItem.position === 0) { + prevItem = this._items[this._items.length - 1]; + } + else { + prevItem = this._items[activeItem.position - 1]; + } + this.slideTo(prevItem.position); + // callback function + this._options.onPrev(this); + }; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + Carousel.prototype._rotate = function (rotationItems) { + // reset + this._items.map(function (item) { + item.el.classList.add('hidden'); + }); + // Handling the case when there is only one item + if (this._items.length === 1) { + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-20'); + return; + } + // left item (previously active) + rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.left.el.classList.add('-translate-x-full', 'z-10'); + // currently active item + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-30'); + // right item (upcoming active) + rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-30'); + rotationItems.right.el.classList.add('translate-x-full', 'z-20'); + }; + /** + * Set an interval to cycle through the carousel items + */ + Carousel.prototype.cycle = function () { + var _this = this; + if (typeof window !== 'undefined') { + this._intervalInstance = window.setInterval(function () { + _this.next(); + }, this._intervalDuration); + } + }; + /** + * Clears the cycling interval + */ + Carousel.prototype.pause = function () { + clearInterval(this._intervalInstance); + }; + /** + * Get the currently active item + */ + Carousel.prototype.getActiveItem = function () { + return this._activeItem; + }; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + Carousel.prototype._setActiveItem = function (item) { + var _a, _b; + var _this = this; + this._activeItem = item; + var position = item.position; + // update the indicators if available + if (this._indicators.length) { + this._indicators.map(function (indicator) { + var _a, _b; + indicator.el.setAttribute('aria-current', 'false'); + (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' ')); + (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' ')); + }); + (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' ')); + (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' ')); + this._indicators[position].el.setAttribute('aria-current', 'true'); + } + }; + Carousel.prototype.updateOnNext = function (callback) { + this._options.onNext = callback; + }; + Carousel.prototype.updateOnPrev = function (callback) { + this._options.onPrev = callback; + }; + Carousel.prototype.updateOnChange = function (callback) { + this._options.onChange = callback; + }; + return Carousel; +}()); +function initCarousels() { + document.querySelectorAll('[data-carousel]').forEach(function ($carouselEl) { + var interval = $carouselEl.getAttribute('data-carousel-interval'); + var slide = $carouselEl.getAttribute('data-carousel') === 'slide' + ? true + : false; + var items = []; + var defaultPosition = 0; + if ($carouselEl.querySelectorAll('[data-carousel-item]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function ($carouselItemEl, position) { + items.push({ + position: position, + el: $carouselItemEl, + }); + if ($carouselItemEl.getAttribute('data-carousel-item') === + 'active') { + defaultPosition = position; + } + }); + } + var indicators = []; + if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function ($indicatorEl) { + indicators.push({ + position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')), + el: $indicatorEl, + }); + }); + } + var carousel = new Carousel($carouselEl, items, { + defaultPosition: defaultPosition, + indicators: { + items: indicators, + }, + interval: interval ? interval : Default.interval, + }); + if (slide) { + carousel.cycle(); + } + // check for controls + var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]'); + var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]'); + if (carouselNextEl) { + carouselNextEl.addEventListener('click', function () { + carousel.next(); + }); + } + if (carouselPrevEl) { + carouselPrevEl.addEventListener('click', function () { + carousel.prev(); + }); + } + }); +} +exports.initCarousels = initCarousels; +if (typeof window !== 'undefined') { + window.Carousel = Carousel; + window.initCarousels = initCarousels; +} +exports["default"] = Carousel; + + +/***/ }), + +/***/ 673: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCopyClipboards = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + htmlEntities: false, + contentType: 'input', + onCopy: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var CopyClipboard = /** @class */ (function () { + function CopyClipboard(triggerEl, targetEl, options, instanceOptions) { + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('CopyClipboard', this, this._instanceId, instanceOptions.override); + } + CopyClipboard.prototype.init = function () { + var _this = this; + if (this._targetEl && this._triggerEl && !this._initialized) { + this._triggerElClickHandler = function () { + _this.copy(); + }; + // clicking on the trigger element should copy the value of the target element + if (this._triggerEl) { + this._triggerEl.addEventListener('click', this._triggerElClickHandler); + } + this._initialized = true; + } + }; + CopyClipboard.prototype.destroy = function () { + if (this._triggerEl && this._targetEl && this._initialized) { + if (this._triggerEl) { + this._triggerEl.removeEventListener('click', this._triggerElClickHandler); + } + this._initialized = false; + } + }; + CopyClipboard.prototype.removeInstance = function () { + instances_1.default.removeInstance('CopyClipboard', this._instanceId); + }; + CopyClipboard.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + CopyClipboard.prototype.getTargetValue = function () { + if (this._options.contentType === 'input') { + return this._targetEl.value; + } + if (this._options.contentType === 'innerHTML') { + return this._targetEl.innerHTML; + } + if (this._options.contentType === 'textContent') { + return this._targetEl.textContent.replace(/\s+/g, ' ').trim(); + } + }; + CopyClipboard.prototype.copy = function () { + var textToCopy = this.getTargetValue(); + // Check if HTMLEntities option is enabled + if (this._options.htmlEntities) { + // Encode the text using HTML entities + textToCopy = this.decodeHTML(textToCopy); + } + // Create a temporary textarea element + var tempTextArea = document.createElement('textarea'); + tempTextArea.value = textToCopy; + document.body.appendChild(tempTextArea); + // Select the text inside the textarea and copy it to the clipboard + tempTextArea.select(); + document.execCommand('copy'); + // Remove the temporary textarea + document.body.removeChild(tempTextArea); + // Callback function + this._options.onCopy(this); + return textToCopy; + }; + // Function to encode text into HTML entities + CopyClipboard.prototype.decodeHTML = function (html) { + var textarea = document.createElement('textarea'); + textarea.innerHTML = html; + return textarea.textContent; + }; + CopyClipboard.prototype.updateOnCopyCallback = function (callback) { + this._options.onCopy = callback; + }; + return CopyClipboard; +}()); +function initCopyClipboards() { + document + .querySelectorAll('[data-copy-to-clipboard-target]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-copy-to-clipboard-target'); + var $targetEl = document.getElementById(targetId); + var contentType = $triggerEl.getAttribute('data-copy-to-clipboard-content-type'); + var htmlEntities = $triggerEl.getAttribute('data-copy-to-clipboard-html-entities'); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('CopyClipboard', $targetEl.getAttribute('id'))) { + new CopyClipboard($triggerEl, $targetEl, { + htmlEntities: htmlEntities && htmlEntities === 'true' + ? true + : Default.htmlEntities, + contentType: contentType + ? contentType + : Default.contentType, + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-copy-to-clipboard-target attribute.")); + } + }); +} +exports.initCopyClipboards = initCopyClipboards; +if (typeof window !== 'undefined') { + window.CopyClipboard = CopyClipboard; + window.initClipboards = initCopyClipboards; +} +exports["default"] = CopyClipboard; + + +/***/ }), + +/***/ 922: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCollapses = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + onCollapse: function () { }, + onExpand: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Collapse = /** @class */ (function () { + function Collapse(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Collapse', this, this._instanceId, instanceOptions.override); + } + Collapse.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + if (this._triggerEl.hasAttribute('aria-expanded')) { + this._visible = + this._triggerEl.getAttribute('aria-expanded') === 'true'; + } + else { + // fix until v2 not to break previous single collapses which became dismiss + this._visible = !this._targetEl.classList.contains('hidden'); + } + this._clickHandler = function () { + _this.toggle(); + }; + this._triggerEl.addEventListener('click', this._clickHandler); + this._initialized = true; + } + }; + Collapse.prototype.destroy = function () { + if (this._triggerEl && this._initialized) { + this._triggerEl.removeEventListener('click', this._clickHandler); + this._initialized = false; + } + }; + Collapse.prototype.removeInstance = function () { + instances_1.default.removeInstance('Collapse', this._instanceId); + }; + Collapse.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Collapse.prototype.collapse = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onCollapse(this); + }; + Collapse.prototype.expand = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onExpand(this); + }; + Collapse.prototype.toggle = function () { + if (this._visible) { + this.collapse(); + } + else { + this.expand(); + } + // callback function + this._options.onToggle(this); + }; + Collapse.prototype.updateOnCollapse = function (callback) { + this._options.onCollapse = callback; + }; + Collapse.prototype.updateOnExpand = function (callback) { + this._options.onExpand = callback; + }; + Collapse.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Collapse; +}()); +function initCollapses() { + document + .querySelectorAll('[data-collapse-toggle]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-collapse-toggle'); + var $targetEl = document.getElementById(targetId); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('Collapse', $targetEl.getAttribute('id'))) { + new Collapse($targetEl, $triggerEl); + } + else { + // if instance exists already for the same target element then create a new one with a different trigger element + new Collapse($targetEl, $triggerEl, {}, { + id: $targetEl.getAttribute('id') + + '_' + + instances_1.default._generateRandomId(), + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-collapse-toggle attribute.")); + } + }); +} +exports.initCollapses = initCollapses; +if (typeof window !== 'undefined') { + window.Collapse = Collapse; + window.initCollapses = initCollapses; +} +exports["default"] = Collapse; + + +/***/ }), + +/***/ 132: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDatepickers = void 0; +var instances_1 = __webpack_require__(423); +var flowbite_datepicker_1 = __webpack_require__(554); +var Default = { + defaultDatepickerId: null, + autohide: false, + format: 'mm/dd/yyyy', + maxDate: null, + minDate: null, + orientation: 'bottom', + buttons: false, + autoSelectToday: 0, + title: null, + language: 'en', + rangePicker: false, + onShow: function () { }, + onHide: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Datepicker = /** @class */ (function () { + function Datepicker(datepickerEl, options, instanceOptions) { + if (datepickerEl === void 0) { datepickerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : datepickerEl.id; + this._datepickerEl = datepickerEl; + this._datepickerInstance = null; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Datepicker', this, this._instanceId, instanceOptions.override); + } + Datepicker.prototype.init = function () { + if (this._datepickerEl && !this._initialized) { + if (this._options.rangePicker) { + this._datepickerInstance = new flowbite_datepicker_1.DateRangePicker(this._datepickerEl, this._getDatepickerOptions(this._options)); + } + else { + this._datepickerInstance = new flowbite_datepicker_1.Datepicker(this._datepickerEl, this._getDatepickerOptions(this._options)); + } + this._initialized = true; + } + }; + Datepicker.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + this._datepickerInstance.destroy(); + } + }; + Datepicker.prototype.removeInstance = function () { + this.destroy(); + instances_1.default.removeInstance('Datepicker', this._instanceId); + }; + Datepicker.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Datepicker.prototype.getDatepickerInstance = function () { + return this._datepickerInstance; + }; + Datepicker.prototype.getDate = function () { + if (this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.DateRangePicker) { + return this._datepickerInstance.getDates(); + } + if (!this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.Datepicker) { + return this._datepickerInstance.getDate(); + } + }; + Datepicker.prototype.setDate = function (date) { + if (this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.DateRangePicker) { + return this._datepickerInstance.setDates(date); + } + if (!this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.Datepicker) { + return this._datepickerInstance.setDate(date); + } + }; + Datepicker.prototype.show = function () { + this._datepickerInstance.show(); + this._options.onShow(this); + }; + Datepicker.prototype.hide = function () { + this._datepickerInstance.hide(); + this._options.onHide(this); + }; + Datepicker.prototype._getDatepickerOptions = function (options) { + var datepickerOptions = {}; + if (options.buttons) { + datepickerOptions.todayBtn = true; + datepickerOptions.clearBtn = true; + if (options.autoSelectToday) { + datepickerOptions.todayBtnMode = 1; + } + } + if (options.autohide) { + datepickerOptions.autohide = true; + } + if (options.format) { + datepickerOptions.format = options.format; + } + if (options.maxDate) { + datepickerOptions.maxDate = options.maxDate; + } + if (options.minDate) { + datepickerOptions.minDate = options.minDate; + } + if (options.orientation) { + datepickerOptions.orientation = options.orientation; + } + if (options.title) { + datepickerOptions.title = options.title; + } + if (options.language) { + datepickerOptions.language = options.language; + } + return datepickerOptions; + }; + Datepicker.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Datepicker.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + return Datepicker; +}()); +function initDatepickers() { + document + .querySelectorAll('[datepicker], [inline-datepicker], [date-rangepicker]') + .forEach(function ($datepickerEl) { + if ($datepickerEl) { + var buttons = $datepickerEl.hasAttribute('datepicker-buttons'); + var autoselectToday = $datepickerEl.hasAttribute('datepicker-autoselect-today'); + var autohide = $datepickerEl.hasAttribute('datepicker-autohide'); + var format = $datepickerEl.getAttribute('datepicker-format'); + var maxDate = $datepickerEl.getAttribute('datepicker-max-date'); + var minDate = $datepickerEl.getAttribute('datepicker-min-date'); + var orientation = $datepickerEl.getAttribute('datepicker-orientation'); + var title = $datepickerEl.getAttribute('datepicker-title'); + var language = $datepickerEl.getAttribute('datepicker-language'); + var rangePicker = $datepickerEl.hasAttribute('date-rangepicker'); + new Datepicker($datepickerEl, { + buttons: buttons ? buttons : Default.buttons, + autoSelectToday: autoselectToday + ? autoselectToday + : Default.autoSelectToday, + autohide: autohide ? autohide : Default.autohide, + format: format ? format : Default.format, + maxDate: maxDate ? maxDate : Default.maxDate, + minDate: minDate ? minDate : Default.minDate, + orientation: orientation + ? orientation + : Default.orientation, + title: title ? title : Default.title, + language: language ? language : Default.language, + rangePicker: rangePicker + ? rangePicker + : Default.rangePicker, + }); + } + else { + console.error("The datepicker element does not exist. Please check the datepicker attribute."); + } + }); +} +exports.initDatepickers = initDatepickers; +if (typeof window !== 'undefined') { + window.Datepicker = Datepicker; + window.initDatepickers = initDatepickers; +} +exports["default"] = Datepicker; + + +/***/ }), + +/***/ 556: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDials = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dial = /** @class */ (function () { + function Dial(parentEl, triggerEl, targetEl, options, instanceOptions) { + if (parentEl === void 0) { parentEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._parentEl = parentEl; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dial', this, this._instanceId, instanceOptions.override); + } + Dial.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + this._showEventHandler = function () { + _this.show(); + }; + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showEventHandler); + _this._targetEl.addEventListener(ev, _this._showEventHandler); + }); + this._hideEventHandler = function () { + if (!_this._parentEl.matches(':hover')) { + _this.hide(); + } + }; + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.addEventListener(ev, _this._hideEventHandler); + }); + this._initialized = true; + } + }; + Dial.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showEventHandler); + _this._targetEl.removeEventListener(ev, _this._showEventHandler); + }); + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.removeEventListener(ev, _this._hideEventHandler); + }); + this._initialized = false; + } + }; + Dial.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dial', this._instanceId); + }; + Dial.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dial.prototype.hide = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Dial.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dial.prototype.toggle = function () { + if (this._visible) { + this.hide(); + } + else { + this.show(); + } + }; + Dial.prototype.isHidden = function () { + return !this._visible; + }; + Dial.prototype.isVisible = function () { + return this._visible; + }; + Dial.prototype._getTriggerEventTypes = function (triggerType) { + switch (triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Dial.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Dial.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Dial.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Dial; +}()); +function initDials() { + document.querySelectorAll('[data-dial-init]').forEach(function ($parentEl) { + var $triggerEl = $parentEl.querySelector('[data-dial-toggle]'); + if ($triggerEl) { + var dialId = $triggerEl.getAttribute('data-dial-toggle'); + var $dialEl = document.getElementById(dialId); + if ($dialEl) { + var triggerType = $triggerEl.getAttribute('data-dial-trigger'); + new Dial($parentEl, $triggerEl, $dialEl, { + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("Dial with id ".concat(dialId, " does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?")); + } + } + else { + console.error("Dial with id ".concat($parentEl.id, " does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?")); + } + }); +} +exports.initDials = initDials; +if (typeof window !== 'undefined') { + window.Dial = Dial; + window.initDials = initDials; +} +exports["default"] = Dial; + + +/***/ }), + +/***/ 791: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDismisses = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + transition: 'transition-opacity', + duration: 300, + timing: 'ease-out', + onHide: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dismiss = /** @class */ (function () { + function Dismiss(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dismiss', this, this._instanceId, instanceOptions.override); + } + Dismiss.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + this._clickHandler = function () { + _this.hide(); + }; + this._triggerEl.addEventListener('click', this._clickHandler); + this._initialized = true; + } + }; + Dismiss.prototype.destroy = function () { + if (this._triggerEl && this._initialized) { + this._triggerEl.removeEventListener('click', this._clickHandler); + this._initialized = false; + } + }; + Dismiss.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dismiss', this._instanceId); + }; + Dismiss.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dismiss.prototype.hide = function () { + var _this = this; + this._targetEl.classList.add(this._options.transition, "duration-".concat(this._options.duration), this._options.timing, 'opacity-0'); + setTimeout(function () { + _this._targetEl.classList.add('hidden'); + }, this._options.duration); + // callback function + this._options.onHide(this, this._targetEl); + }; + Dismiss.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + return Dismiss; +}()); +function initDismisses() { + document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-dismiss-target'); + var $dismissEl = document.querySelector(targetId); + if ($dismissEl) { + new Dismiss($dismissEl, $triggerEl); + } + else { + console.error("The dismiss element with id \"".concat(targetId, "\" does not exist. Please check the data-dismiss-target attribute.")); + } + }); +} +exports.initDismisses = initDismisses; +if (typeof window !== 'undefined') { + window.Dismiss = Dismiss; + window.initDismisses = initDismisses; +} +exports["default"] = Dismiss; + + +/***/ }), + +/***/ 340: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDrawers = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'left', + bodyScrolling: false, + backdrop: true, + edge: false, + edgeOffset: 'bottom-[60px]', + backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Drawer = /** @class */ (function () { + function Drawer(targetEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._eventListenerInstances = []; + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Drawer', this, this._instanceId, instanceOptions.override); + } + Drawer.prototype.init = function () { + var _this = this; + // set initial accessibility attributes + if (this._targetEl && !this._initialized) { + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.classList.add('transition-transform'); + // set base placement classes + this._getPlacementClasses(this._options.placement).base.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._handleEscapeKey = function (event) { + if (event.key === 'Escape') { + // if 'Escape' key is pressed + if (_this.isVisible()) { + // if the Drawer is visible + _this.hide(); // hide the Drawer + } + } + }; + // add keyboard event listener to document + document.addEventListener('keydown', this._handleEscapeKey); + this._initialized = true; + } + }; + Drawer.prototype.destroy = function () { + if (this._initialized) { + this.removeAllEventListenerInstances(); + this._destroyBackdropEl(); + // Remove the keyboard event listener + document.removeEventListener('keydown', this._handleEscapeKey); + this._initialized = false; + } + }; + Drawer.prototype.removeInstance = function () { + instances_1.default.removeInstance('Drawer', this._instanceId); + }; + Drawer.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Drawer.prototype.hide = function () { + var _this = this; + // based on the edge option show placement classes + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + // enable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.remove('overflow-hidden'); + } + // destroy backdrop + if (this._options.backdrop) { + this._destroyBackdropEl(); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Drawer.prototype.show = function () { + var _this = this; + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + // disable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.add('overflow-hidden'); + } + // show backdrop + if (this._options.backdrop) { + this._createBackdrop(); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Drawer.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Drawer.prototype._createBackdrop = function () { + var _a; + var _this = this; + if (!this._visible) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('drawer-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + backdropEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Drawer.prototype._destroyBackdropEl = function () { + if (this._visible && + document.querySelector('[drawer-backdrop]') !== null) { + document.querySelector('[drawer-backdrop]').remove(); + } + }; + Drawer.prototype._getPlacementClasses = function (placement) { + switch (placement) { + case 'top': + return { + base: ['top-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['-translate-y-full'], + }; + case 'right': + return { + base: ['right-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-x-full'], + }; + case 'bottom': + return { + base: ['bottom-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['translate-y-full'], + }; + case 'left': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + case 'bottom-edge': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-y-full', this._options.edgeOffset], + }; + default: + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + } + }; + Drawer.prototype.isHidden = function () { + return !this._visible; + }; + Drawer.prototype.isVisible = function () { + return this._visible; + }; + Drawer.prototype.addEventListenerInstance = function (element, type, handler) { + this._eventListenerInstances.push({ + element: element, + type: type, + handler: handler, + }); + }; + Drawer.prototype.removeAllEventListenerInstances = function () { + this._eventListenerInstances.map(function (eventListenerInstance) { + eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler); + }); + this._eventListenerInstances = []; + }; + Drawer.prototype.getAllEventListenerInstances = function () { + return this._eventListenerInstances; + }; + Drawer.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Drawer.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Drawer.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Drawer; +}()); +function initDrawers() { + document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) { + // mandatory + var drawerId = $triggerEl.getAttribute('data-drawer-target'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var placement = $triggerEl.getAttribute('data-drawer-placement'); + var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling'); + var backdrop = $triggerEl.getAttribute('data-drawer-backdrop'); + var edge = $triggerEl.getAttribute('data-drawer-edge'); + var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset'); + new Drawer($drawerEl, { + placement: placement ? placement : Default.placement, + bodyScrolling: bodyScrolling + ? bodyScrolling === 'true' + ? true + : false + : Default.bodyScrolling, + backdrop: backdrop + ? backdrop === 'true' + ? true + : false + : Default.backdrop, + edge: edge ? (edge === 'true' ? true : false) : Default.edge, + edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset, + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-toggle'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_1 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_1) { + var toggleDrawer = function () { + drawer_1.toggle(); + }; + $triggerEl.addEventListener('click', toggleDrawer); + drawer_1.addEventListenerInstance($triggerEl, 'click', toggleDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document + .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]') + .forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-dismiss') + ? $triggerEl.getAttribute('data-drawer-dismiss') + : $triggerEl.getAttribute('data-drawer-hide'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_2 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_2) { + var hideDrawer = function () { + drawer_2.hide(); + }; + $triggerEl.addEventListener('click', hideDrawer); + drawer_2.addEventListenerInstance($triggerEl, 'click', hideDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id")); + } + }); + document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-show'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_3 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_3) { + var showDrawer = function () { + drawer_3.show(); + }; + $triggerEl.addEventListener('click', showDrawer); + drawer_3.addEventListenerInstance($triggerEl, 'click', showDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); +} +exports.initDrawers = initDrawers; +if (typeof window !== 'undefined') { + window.Drawer = Drawer; + window.initDrawers = initDrawers; +} +exports["default"] = Drawer; + + +/***/ }), + +/***/ 316: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDropdowns = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'bottom', + triggerType: 'click', + offsetSkidding: 0, + offsetDistance: 10, + delay: 300, + ignoreClickOutsideClass: false, + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dropdown = /** @class */ (function () { + function Dropdown(targetElement, triggerElement, options, instanceOptions) { + if (targetElement === void 0) { targetElement = null; } + if (triggerElement === void 0) { triggerElement = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetElement.id; + this._targetEl = targetElement; + this._triggerEl = triggerElement; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dropdown', this, this._instanceId, instanceOptions.override); + } + Dropdown.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._popperInstance = this._createPopperInstance(); + this._setupEventListeners(); + this._initialized = true; + } + }; + Dropdown.prototype.destroy = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + // Remove click event listeners for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._clickHandler); + }); + } + // Remove hover event listeners for trigger and target elements + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hoverShowTriggerElHandler); + _this._targetEl.removeEventListener(ev, _this._hoverShowTargetElHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hoverHideHandler); + _this._targetEl.removeEventListener(ev, _this._hoverHideHandler); + }); + } + this._popperInstance.destroy(); + this._initialized = false; + }; + Dropdown.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dropdown', this._instanceId); + }; + Dropdown.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dropdown.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._clickHandler = function () { + _this.toggle(); + }; + // click event handling for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._clickHandler); + }); + } + this._hoverShowTriggerElHandler = function (ev) { + if (ev.type === 'click') { + _this.toggle(); + } + else { + setTimeout(function () { + _this.show(); + }, _this._options.delay); + } + }; + this._hoverShowTargetElHandler = function () { + _this.show(); + }; + this._hoverHideHandler = function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }; + // hover event handling for trigger element + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hoverShowTriggerElHandler); + _this._targetEl.addEventListener(ev, _this._hoverShowTargetElHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hoverHideHandler); + _this._targetEl.addEventListener(ev, _this._hoverHideHandler); + }); + } + }; + Dropdown.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [ + this._options.offsetSkidding, + this._options.offsetDistance, + ], + }, + }, + ], + }); + }; + Dropdown.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + // Ignore clicks on the trigger element (ie. a datepicker input) + var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass; + var isIgnored = false; + if (ignoreClickOutsideClass) { + var ignoredClickOutsideEls = document.querySelectorAll(".".concat(ignoreClickOutsideClass)); + ignoredClickOutsideEls.forEach(function (el) { + if (el.contains(clickedEl)) { + isIgnored = true; + return; + } + }); + } + // Ignore clicks on the target element (ie. dropdown itself) + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + !isIgnored && + this.isVisible()) { + this.hide(); + } + }; + Dropdown.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'click'], + hideEvents: ['mouseleave'], + }; + case 'click': + return { + showEvents: ['click'], + hideEvents: [], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['click'], + hideEvents: [], + }; + } + }; + Dropdown.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Dropdown.prototype.isVisible = function () { + return this._visible; + }; + Dropdown.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + this._targetEl.classList.add('block'); + this._targetEl.removeAttribute('aria-hidden'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + this._setupClickOutsideListener(); + // Update its position + this._popperInstance.update(); + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dropdown.prototype.hide = function () { + this._targetEl.classList.remove('block'); + this._targetEl.classList.add('hidden'); + this._targetEl.setAttribute('aria-hidden', 'true'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + this._visible = false; + this._removeClickOutsideListener(); + // callback function + this._options.onHide(this); + }; + Dropdown.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Dropdown.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Dropdown.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Dropdown; +}()); +function initDropdowns() { + document + .querySelectorAll('[data-dropdown-toggle]') + .forEach(function ($triggerEl) { + var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle'); + var $dropdownEl = document.getElementById(dropdownId); + if ($dropdownEl) { + var placement = $triggerEl.getAttribute('data-dropdown-placement'); + var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding'); + var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance'); + var triggerType = $triggerEl.getAttribute('data-dropdown-trigger'); + var delay = $triggerEl.getAttribute('data-dropdown-delay'); + var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class'); + new Dropdown($dropdownEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + offsetSkidding: offsetSkidding + ? parseInt(offsetSkidding) + : Default.offsetSkidding, + offsetDistance: offsetDistance + ? parseInt(offsetDistance) + : Default.offsetDistance, + delay: delay ? parseInt(delay) : Default.delay, + ignoreClickOutsideClass: ignoreClickOutsideClass + ? ignoreClickOutsideClass + : Default.ignoreClickOutsideClass, + }); + } + else { + console.error("The dropdown element with id \"".concat(dropdownId, "\" does not exist. Please check the data-dropdown-toggle attribute.")); + } + }); +} +exports.initDropdowns = initDropdowns; +if (typeof window !== 'undefined') { + window.Dropdown = Dropdown; + window.initDropdowns = initDropdowns; +} +exports["default"] = Dropdown; + + +/***/ }), + +/***/ 311: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initFlowbite = void 0; +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var clipboard_1 = __webpack_require__(673); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var input_counter_1 = __webpack_require__(656); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +var datepicker_1 = __webpack_require__(132); +function initFlowbite() { + (0, accordion_1.initAccordions)(); + (0, collapse_1.initCollapses)(); + (0, carousel_1.initCarousels)(); + (0, dismiss_1.initDismisses)(); + (0, dropdown_1.initDropdowns)(); + (0, modal_1.initModals)(); + (0, drawer_1.initDrawers)(); + (0, tabs_1.initTabs)(); + (0, tooltip_1.initTooltips)(); + (0, popover_1.initPopovers)(); + (0, dial_1.initDials)(); + (0, input_counter_1.initInputCounters)(); + (0, clipboard_1.initCopyClipboards)(); + (0, datepicker_1.initDatepickers)(); +} +exports.initFlowbite = initFlowbite; +if (typeof window !== 'undefined') { + window.initFlowbite = initFlowbite; +} + + +/***/ }), + +/***/ 656: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initInputCounters = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + minValue: null, + maxValue: null, + onIncrement: function () { }, + onDecrement: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var InputCounter = /** @class */ (function () { + function InputCounter(targetEl, incrementEl, decrementEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (incrementEl === void 0) { incrementEl = null; } + if (decrementEl === void 0) { decrementEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._incrementEl = incrementEl; + this._decrementEl = decrementEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('InputCounter', this, this._instanceId, instanceOptions.override); + } + InputCounter.prototype.init = function () { + var _this = this; + if (this._targetEl && !this._initialized) { + this._inputHandler = function (event) { + { + var target = event.target; + // check if the value is numeric + if (!/^\d*$/.test(target.value)) { + // Regex to check if the value is numeric + target.value = target.value.replace(/[^\d]/g, ''); // Remove non-numeric characters + } + // check for max value + if (_this._options.maxValue !== null && + parseInt(target.value) > _this._options.maxValue) { + target.value = _this._options.maxValue.toString(); + } + // check for min value + if (_this._options.minValue !== null && + parseInt(target.value) < _this._options.minValue) { + target.value = _this._options.minValue.toString(); + } + } + }; + this._incrementClickHandler = function () { + _this.increment(); + }; + this._decrementClickHandler = function () { + _this.decrement(); + }; + // Add event listener to restrict input to numeric values only + this._targetEl.addEventListener('input', this._inputHandler); + if (this._incrementEl) { + this._incrementEl.addEventListener('click', this._incrementClickHandler); + } + if (this._decrementEl) { + this._decrementEl.addEventListener('click', this._decrementClickHandler); + } + this._initialized = true; + } + }; + InputCounter.prototype.destroy = function () { + if (this._targetEl && this._initialized) { + this._targetEl.removeEventListener('input', this._inputHandler); + if (this._incrementEl) { + this._incrementEl.removeEventListener('click', this._incrementClickHandler); + } + if (this._decrementEl) { + this._decrementEl.removeEventListener('click', this._decrementClickHandler); + } + this._initialized = false; + } + }; + InputCounter.prototype.removeInstance = function () { + instances_1.default.removeInstance('InputCounter', this._instanceId); + }; + InputCounter.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + InputCounter.prototype.getCurrentValue = function () { + return parseInt(this._targetEl.value) || 0; + }; + InputCounter.prototype.increment = function () { + // don't increment if the value is already at the maximum value + if (this._options.maxValue !== null && + this.getCurrentValue() >= this._options.maxValue) { + return; + } + this._targetEl.value = (this.getCurrentValue() + 1).toString(); + this._options.onIncrement(this); + }; + InputCounter.prototype.decrement = function () { + // don't decrement if the value is already at the minimum value + if (this._options.minValue !== null && + this.getCurrentValue() <= this._options.minValue) { + return; + } + this._targetEl.value = (this.getCurrentValue() - 1).toString(); + this._options.onDecrement(this); + }; + InputCounter.prototype.updateOnIncrement = function (callback) { + this._options.onIncrement = callback; + }; + InputCounter.prototype.updateOnDecrement = function (callback) { + this._options.onDecrement = callback; + }; + return InputCounter; +}()); +function initInputCounters() { + document.querySelectorAll('[data-input-counter]').forEach(function ($targetEl) { + var targetId = $targetEl.id; + var $incrementEl = document.querySelector('[data-input-counter-increment="' + targetId + '"]'); + var $decrementEl = document.querySelector('[data-input-counter-decrement="' + targetId + '"]'); + var minValue = $targetEl.getAttribute('data-input-counter-min'); + var maxValue = $targetEl.getAttribute('data-input-counter-max'); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('InputCounter', $targetEl.getAttribute('id'))) { + new InputCounter($targetEl, $incrementEl ? $incrementEl : null, $decrementEl ? $decrementEl : null, { + minValue: minValue ? parseInt(minValue) : null, + maxValue: maxValue ? parseInt(maxValue) : null, + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-input-counter attribute.")); + } + }); +} +exports.initInputCounters = initInputCounters; +if (typeof window !== 'undefined') { + window.InputCounter = InputCounter; + window.initInputCounters = initInputCounters; +} +exports["default"] = InputCounter; + + +/***/ }), + +/***/ 16: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initModals = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'center', + backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40', + backdrop: 'dynamic', + closable: true, + onHide: function () { }, + onShow: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Modal = /** @class */ (function () { + function Modal(targetEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._eventListenerInstances = []; + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._isHidden = true; + this._backdropEl = null; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Modal', this, this._instanceId, instanceOptions.override); + } + Modal.prototype.init = function () { + var _this = this; + if (this._targetEl && !this._initialized) { + this._getPlacementClasses().map(function (c) { + _this._targetEl.classList.add(c); + }); + this._initialized = true; + } + }; + Modal.prototype.destroy = function () { + if (this._initialized) { + this.removeAllEventListenerInstances(); + this._destroyBackdropEl(); + this._initialized = false; + } + }; + Modal.prototype.removeInstance = function () { + instances_1.default.removeInstance('Modal', this._instanceId); + }; + Modal.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Modal.prototype._createBackdrop = function () { + var _a; + if (this._isHidden) { + var backdropEl = document.createElement('div'); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + this._backdropEl = backdropEl; + } + }; + Modal.prototype._destroyBackdropEl = function () { + if (!this._isHidden && this._backdropEl) { + this._backdropEl.remove(); + this._backdropEl = null; + } + }; + Modal.prototype._setupModalCloseEventListeners = function () { + var _this = this; + if (this._options.backdrop === 'dynamic') { + this._clickOutsideEventListener = function (ev) { + _this._handleOutsideClick(ev.target); + }; + this._targetEl.addEventListener('click', this._clickOutsideEventListener, true); + } + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._removeModalCloseEventListeners = function () { + if (this._options.backdrop === 'dynamic') { + this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true); + } + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._handleOutsideClick = function (target) { + if (target === this._targetEl || + (target === this._backdropEl && this.isVisible())) { + this.hide(); + } + }; + Modal.prototype._getPlacementClasses = function () { + switch (this._options.placement) { + // top + case 'top-left': + return ['justify-start', 'items-start']; + case 'top-center': + return ['justify-center', 'items-start']; + case 'top-right': + return ['justify-end', 'items-start']; + // center + case 'center-left': + return ['justify-start', 'items-center']; + case 'center': + return ['justify-center', 'items-center']; + case 'center-right': + return ['justify-end', 'items-center']; + // bottom + case 'bottom-left': + return ['justify-start', 'items-end']; + case 'bottom-center': + return ['justify-center', 'items-end']; + case 'bottom-right': + return ['justify-end', 'items-end']; + default: + return ['justify-center', 'items-center']; + } + }; + Modal.prototype.toggle = function () { + if (this._isHidden) { + this.show(); + } + else { + this.hide(); + } + // callback function + this._options.onToggle(this); + }; + Modal.prototype.show = function () { + if (this.isHidden) { + this._targetEl.classList.add('flex'); + this._targetEl.classList.remove('hidden'); + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + this._createBackdrop(); + this._isHidden = false; + // Add keyboard event listener to the document + if (this._options.closable) { + this._setupModalCloseEventListeners(); + } + // prevent body scroll + document.body.classList.add('overflow-hidden'); + // callback function + this._options.onShow(this); + } + }; + Modal.prototype.hide = function () { + if (this.isVisible) { + this._targetEl.classList.add('hidden'); + this._targetEl.classList.remove('flex'); + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + this._destroyBackdropEl(); + this._isHidden = true; + // re-apply body scroll + document.body.classList.remove('overflow-hidden'); + if (this._options.closable) { + this._removeModalCloseEventListeners(); + } + // callback function + this._options.onHide(this); + } + }; + Modal.prototype.isVisible = function () { + return !this._isHidden; + }; + Modal.prototype.isHidden = function () { + return this._isHidden; + }; + Modal.prototype.addEventListenerInstance = function (element, type, handler) { + this._eventListenerInstances.push({ + element: element, + type: type, + handler: handler, + }); + }; + Modal.prototype.removeAllEventListenerInstances = function () { + this._eventListenerInstances.map(function (eventListenerInstance) { + eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler); + }); + this._eventListenerInstances = []; + }; + Modal.prototype.getAllEventListenerInstances = function () { + return this._eventListenerInstances; + }; + Modal.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Modal.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Modal.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Modal; +}()); +function initModals() { + // initiate modal based on data-modal-target + document.querySelectorAll('[data-modal-target]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-target'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + new Modal($modalEl, { + placement: placement ? placement : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }); + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.")); + } + }); + // toggle modal visibility + document.querySelectorAll('[data-modal-toggle]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-toggle'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_1 = instances_1.default.getInstance('Modal', modalId); + if (modal_1) { + var toggleModal = function () { + modal_1.toggle(); + }; + $triggerEl.addEventListener('click', toggleModal); + modal_1.addEventListenerInstance($triggerEl, 'click', toggleModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?")); + } + }); + // show modal on click if exists based on id + document.querySelectorAll('[data-modal-show]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-show'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_2 = instances_1.default.getInstance('Modal', modalId); + if (modal_2) { + var showModal = function () { + modal_2.show(); + }; + $triggerEl.addEventListener('click', showModal); + modal_2.addEventListenerInstance($triggerEl, 'click', showModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?")); + } + }); + // hide modal on click if exists based on id + document.querySelectorAll('[data-modal-hide]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-hide'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_3 = instances_1.default.getInstance('Modal', modalId); + if (modal_3) { + var hideModal = function () { + modal_3.hide(); + }; + $triggerEl.addEventListener('click', hideModal); + modal_3.addEventListenerInstance($triggerEl, 'click', hideModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?")); + } + }); +} +exports.initModals = initModals; +if (typeof window !== 'undefined') { + window.Modal = Modal; + window.initModals = initModals; +} +exports["default"] = Modal; + + +/***/ }), + +/***/ 903: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initPopovers = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'top', + offset: 10, + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Popover = /** @class */ (function () { + function Popover(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Popover', this, instanceOptions.id ? instanceOptions.id : this._targetEl.id, instanceOptions.override); + } + Popover.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._setupEventListeners(); + this._popperInstance = this._createPopperInstance(); + this._initialized = true; + } + }; + Popover.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + // remove event listeners associated with the trigger element and target element + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showHandler); + _this._targetEl.removeEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hideHandler); + _this._targetEl.removeEventListener(ev, _this._hideHandler); + }); + // remove event listeners for keydown + this._removeKeydownListener(); + // remove event listeners for click outside + this._removeClickOutsideListener(); + // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance) + if (this._popperInstance) { + this._popperInstance.destroy(); + } + this._initialized = false; + } + }; + Popover.prototype.removeInstance = function () { + instances_1.default.removeInstance('Popover', this._instanceId); + }; + Popover.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Popover.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._showHandler = function () { + _this.show(); + }; + this._hideHandler = function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }; + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showHandler); + _this._targetEl.addEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hideHandler); + _this._targetEl.addEventListener(ev, _this._hideHandler); + }); + }; + Popover.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, this._options.offset], + }, + }, + ], + }); + }; + Popover.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Popover.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Popover.prototype.isVisible = function () { + return this._visible; + }; + Popover.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Popover.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility to true + this._visible = true; + // callback function + this._options.onShow(this); + }; + Popover.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility to false + this._visible = false; + // callback function + this._options.onHide(this); + }; + Popover.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Popover.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Popover.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Popover; +}()); +function initPopovers() { + document.querySelectorAll('[data-popover-target]').forEach(function ($triggerEl) { + var popoverID = $triggerEl.getAttribute('data-popover-target'); + var $popoverEl = document.getElementById(popoverID); + if ($popoverEl) { + var triggerType = $triggerEl.getAttribute('data-popover-trigger'); + var placement = $triggerEl.getAttribute('data-popover-placement'); + var offset = $triggerEl.getAttribute('data-popover-offset'); + new Popover($popoverEl, $triggerEl, { + placement: placement ? placement : Default.placement, + offset: offset ? parseInt(offset) : Default.offset, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The popover element with id \"".concat(popoverID, "\" does not exist. Please check the data-popover-target attribute.")); + } + }); +} +exports.initPopovers = initPopovers; +if (typeof window !== 'undefined') { + window.Popover = Popover; + window.initPopovers = initPopovers; +} +exports["default"] = Popover; + + +/***/ }), + +/***/ 247: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTabs = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + defaultTabId: null, + activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500', + inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300', + onShow: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Tabs = /** @class */ (function () { + function Tabs(tabsEl, items, options, instanceOptions) { + if (tabsEl === void 0) { tabsEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id; + this._tabsEl = tabsEl; + this._items = items; + this._activeTab = options ? this.getTab(options.defaultTabId) : null; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Tabs', this, this._instanceId, instanceOptions.override); + } + Tabs.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + // set the first tab as active if not set by explicitly + if (!this._activeTab) { + this.setActiveTab(this._items[0]); + } + // force show the first default tab + this.show(this._activeTab.id, true); + // show tab content based on click + this._items.map(function (tab) { + tab.triggerEl.addEventListener('click', function (event) { + event.preventDefault(); + _this.show(tab.id); + }); + }); + } + }; + Tabs.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + } + }; + Tabs.prototype.removeInstance = function () { + this.destroy(); + instances_1.default.removeInstance('Tabs', this._instanceId); + }; + Tabs.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Tabs.prototype.getActiveTab = function () { + return this._activeTab; + }; + Tabs.prototype.setActiveTab = function (tab) { + this._activeTab = tab; + }; + Tabs.prototype.getTab = function (id) { + return this._items.filter(function (t) { return t.id === id; })[0]; + }; + Tabs.prototype.show = function (id, forceShow) { + var _a, _b; + var _this = this; + if (forceShow === void 0) { forceShow = false; } + var tab = this.getTab(id); + // don't do anything if already active + if (tab === this._activeTab && !forceShow) { + return; + } + // hide other tabs + this._items.map(function (t) { + var _a, _b; + if (t !== tab) { + (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + t.targetEl.classList.add('hidden'); + t.triggerEl.setAttribute('aria-selected', 'false'); + } + }); + // show active tab + (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + tab.triggerEl.setAttribute('aria-selected', 'true'); + tab.targetEl.classList.remove('hidden'); + this.setActiveTab(tab); + // callback function + this._options.onShow(this, tab); + }; + Tabs.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + return Tabs; +}()); +function initTabs() { + document.querySelectorAll('[data-tabs-toggle]').forEach(function ($parentEl) { + var tabItems = []; + var activeClasses = $parentEl.getAttribute('data-tabs-active-classes'); + var inactiveClasses = $parentEl.getAttribute('data-tabs-inactive-classes'); + var defaultTabId = null; + $parentEl + .querySelectorAll('[role="tab"]') + .forEach(function ($triggerEl) { + var isActive = $triggerEl.getAttribute('aria-selected') === 'true'; + var tab = { + id: $triggerEl.getAttribute('data-tabs-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target')), + }; + tabItems.push(tab); + if (isActive) { + defaultTabId = tab.id; + } + }); + new Tabs($parentEl, tabItems, { + defaultTabId: defaultTabId, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initTabs = initTabs; +if (typeof window !== 'undefined') { + window.Tabs = Tabs; + window.initTabs = initTabs; +} +exports["default"] = Tabs; + + +/***/ }), + +/***/ 671: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTooltips = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'top', + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Tooltip = /** @class */ (function () { + function Tooltip(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Tooltip', this, this._instanceId, instanceOptions.override); + } + Tooltip.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._setupEventListeners(); + this._popperInstance = this._createPopperInstance(); + this._initialized = true; + } + }; + Tooltip.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + // remove event listeners associated with the trigger element + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hideHandler); + }); + // remove event listeners for keydown + this._removeKeydownListener(); + // remove event listeners for click outside + this._removeClickOutsideListener(); + // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance) + if (this._popperInstance) { + this._popperInstance.destroy(); + } + this._initialized = false; + } + }; + Tooltip.prototype.removeInstance = function () { + instances_1.default.removeInstance('Tooltip', this._instanceId); + }; + Tooltip.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Tooltip.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._showHandler = function () { + _this.show(); + }; + this._hideHandler = function () { + _this.hide(); + }; + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hideHandler); + }); + }; + Tooltip.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, 8], + }, + }, + ], + }); + }; + Tooltip.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Tooltip.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Tooltip.prototype.isVisible = function () { + return this._visible; + }; + Tooltip.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Tooltip.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility + this._visible = true; + // callback function + this._options.onShow(this); + }; + Tooltip.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility + this._visible = false; + // callback function + this._options.onHide(this); + }; + Tooltip.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Tooltip.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Tooltip.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Tooltip; +}()); +function initTooltips() { + document.querySelectorAll('[data-tooltip-target]').forEach(function ($triggerEl) { + var tooltipId = $triggerEl.getAttribute('data-tooltip-target'); + var $tooltipEl = document.getElementById(tooltipId); + if ($tooltipEl) { + var triggerType = $triggerEl.getAttribute('data-tooltip-trigger'); + var placement = $triggerEl.getAttribute('data-tooltip-placement'); + new Tooltip($tooltipEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The tooltip element with id \"".concat(tooltipId, "\" does not exist. Please check the data-tooltip-target attribute.")); + } + }); +} +exports.initTooltips = initTooltips; +if (typeof window !== 'undefined') { + window.Tooltip = Tooltip; + window.initTooltips = initTooltips; +} +exports["default"] = Tooltip; + + +/***/ }), + +/***/ 947: +/***/ (function(__unused_webpack_module, exports) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Events = /** @class */ (function () { + function Events(eventType, eventFunctions) { + if (eventFunctions === void 0) { eventFunctions = []; } + this._eventType = eventType; + this._eventFunctions = eventFunctions; + } + Events.prototype.init = function () { + var _this = this; + this._eventFunctions.forEach(function (eventFunction) { + if (typeof window !== 'undefined') { + window.addEventListener(_this._eventType, eventFunction); + } + }); + }; + return Events; +}()); +exports["default"] = Events; + + +/***/ }), + +/***/ 423: +/***/ (function(__unused_webpack_module, exports) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Instances = /** @class */ (function () { + function Instances() { + this._instances = { + Accordion: {}, + Carousel: {}, + Collapse: {}, + Dial: {}, + Dismiss: {}, + Drawer: {}, + Dropdown: {}, + Modal: {}, + Popover: {}, + Tabs: {}, + Tooltip: {}, + InputCounter: {}, + CopyClipboard: {}, + Datepicker: {}, + }; + } + Instances.prototype.addInstance = function (component, instance, id, override) { + if (override === void 0) { override = false; } + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + if (this._instances[component][id] && !override) { + console.warn("Flowbite: Instance with ID ".concat(id, " already exists.")); + return; + } + if (override && this._instances[component][id]) { + this._instances[component][id].destroyAndRemoveInstance(); + } + this._instances[component][id ? id : this._generateRandomId()] = + instance; + }; + Instances.prototype.getAllInstances = function () { + return this._instances; + }; + Instances.prototype.getInstances = function (component) { + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + return this._instances[component]; + }; + Instances.prototype.getInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + if (!this._instances[component][id]) { + console.warn("Flowbite: Instance with ID ".concat(id, " does not exist.")); + return; + } + return this._instances[component][id]; + }; + Instances.prototype.destroyAndRemoveInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + this.destroyInstanceObject(component, id); + this.removeInstance(component, id); + }; + Instances.prototype.removeInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + delete this._instances[component][id]; + }; + Instances.prototype.destroyInstanceObject = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + this._instances[component][id].destroy(); + }; + Instances.prototype.instanceExists = function (component, id) { + if (!this._instances[component]) { + return false; + } + if (!this._instances[component][id]) { + return false; + } + return true; + }; + Instances.prototype._generateRandomId = function () { + return Math.random().toString(36).substr(2, 9); + }; + Instances.prototype._componentAndInstanceCheck = function (component, id) { + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + if (!this._instances[component][id]) { + console.warn("Flowbite: Instance with ID ".concat(id, " does not exist.")); + return false; + } + return true; + }; + return Instances; +}()); +var instances = new Instances(); +exports["default"] = instances; +if (typeof window !== 'undefined') { + window.FlowbiteInstances = instances; +} + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ !function() { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +var exports = __webpack_exports__; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +__webpack_require__(647); +// core components +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +var input_counter_1 = __webpack_require__(656); +var clipboard_1 = __webpack_require__(673); +var datepicker_1 = __webpack_require__(132); +__webpack_require__(311); +var events_1 = __webpack_require__(947); +var events = new events_1.default('load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, + clipboard_1.initCopyClipboards, + input_counter_1.initInputCounters, + datepicker_1.initDatepickers, +]); +events.init(); +exports["default"] = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + InputCounter: input_counter_1.default, + CopyClipboard: clipboard_1.default, + Datepicker: datepicker_1.default, + Events: events_1.default, +}; + +}(); +/******/ return __webpack_exports__; +/******/ })() +; +}); +//# sourceMappingURL=flowbite.js.map \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.js.map b/node_modules/flowbite/dist/flowbite.js.map new file mode 100644 index 0000000..d8a239a --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flowbite.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;ACVA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAO,IAAI,SAAG;AACP;AACA;AACA;AACA;AACA,sBAAsB,SAAG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA,CAAC;AACM,IAAI,gBAAU;AACrB;AACA,CAAC,OAAO;;AAED;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;;AC9BQ;AACf;AACA;;ACFe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;ACXuC;;AAEvC;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;;;ACpBsD;AACK,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,SAAS,aAAa,cAAc,WAAW;AAC/C;AACA,MAAM;AACN;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uHAAuH;;AAEvH;AACA;AACA;AACA,OAAO,IAAI,GAAG;;AAEd,WAAW,aAAa,cAAc,WAAW;AACjD;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,EAAE;;;AAGF,0DAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;ACnFkC;AACpB;AACf;AACA;;ACHO,IAAI,QAAG;AACP,IAAI,QAAG;AACP;;ACFQ;AACf;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;ACVgD;AACjC;AACf,gDAAgD,WAAW;AAC3D;;ACH2D;AAClB;AACF;AACc;AACtC;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,aAAa;AACnC,uCAAuC,KAAK;AAC5C,wCAAwC,KAAK;AAC7C;;AAEA,aAAa,SAAS,YAAY,SAAS;AAC3C;;AAEA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxC+D,CAAC;AAChE;;AAEe;AACf,mBAAmB,qBAAqB,WAAW;AACnD;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxB+C;AAChC;AACf,2DAA2D;;AAE3D;AACA;AACA,IAAI;AACJ,uBAAuB,YAAY;AACnC;;AAEA;AACA;AACA;AACA,UAAU;;;AAGV;AACA,QAAQ;AACR,MAAM;;;AAGN;AACA;;ACtBuC;AACxB;AACf,SAAS,SAAS;AAClB;;ACH2C;AAC5B;AACf,uCAAuC,WAAW;AAClD;;ACH4C;AAC7B;AACf;AACA,WAAW,SAAS;AACpB;AACA;;AC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;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,2BAA2B,oCAAoC;AAC/D;;AAEA,yBAAyB,qCAAqC;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,KAAqC,EAAE,2BAQ1C;;AAEH;AACA,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,mDAAmD;AAC7F;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,yCAAyC,kDAAkD;AAC3F;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,4CAA4C;AAC5C;AACA,GAAG;AACH,EAAE;;;AAGF,4DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACpLiD,CAAC;;AAEnD;AACA;AACA;;AAEA,SAAS,qBAAM;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA,sBAAsB;AACtB,UAAU,qBAAM;AAChB;AACA,CAAC;;AChDD;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA,GAAG;AACH;;ACVA,IAAI,kCAAI;AACR;AACA;AACA;AACe;AACf;AACA,WAAW,kCAAI;AACf,GAAG;AACH;;ACRuC;AACxB;AACf,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;ACT+D;AACN;AACN;AACpC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,kBAAkB,kBAAkB,eAAe;AAClF;;ACZuC;AACkB;AACE;AACN;AACtC;AACf,YAAY,SAAS;AACrB,aAAa,kB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DAA4D,KAAK,GAAG,IAAI,sBAAsB,MAAM,GAAG,SAAG;;AAE1G;AACA,0BAA0B,oBAAoB;AAC9C;;AAEA,2BAA2B,oBAAoB;AAC/C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,QAAQ;AAC1C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AClJsD;AACC;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,SAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI;AAClC;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AC5D2D;AACD,CAAC;;AAErD;AACP,sBAAsB,gBAAgB;AACtC,wBAAwB,IAAI,EAAE,SAAG;;AAEjC,mEAAmE;AACnE;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,UAAU,IAAI,EAAE,KAAK;AACrB;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAiB;AAC9B;AACA;AACA,GAAG,IAAI;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF,qDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACrDuD;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,4DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACxBc;AACf;AACA;;ACF8D;AACF;AACgB;AAC5B;AACY;AACF;AACI;AACN;AACJ;AACY;AACE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,gBAAgB;AACtC,kBAAkB,YAAY;AAC9B;AACA,iBAAiB,wBAAwB;AACzC,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA,4FAA4F;AAC5F;AACA,GAAG;AACH;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,sCAAsC,SAAG,GAAG,IAAI;AAChD,qCAAqC,MAAM,GAAG,KAAK;AACnD;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC,+BAA+B,KAAK,2CAA2C;AAC/E;;AAEA;AACA,6CAA6C,aAAa;AAC1D;AACA;AACA;AACA,yHAAyH,kBAAkB;AAC3I;AACA,uDAAuD;AACvD;AACA;AACA;AACA;;AAEA,mBAAmB,MAAM;AACzB;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;AACA;AACA,0BAA0B,MAAM,UAAU,QAAO,yCAAyC,QAAO;AACjG;AACA;AACA;;AAEA;AACA;;AAEA,uCAAuC,SAAG,GAAG,IAAI;;AAEjD,sCAAsC,MAAM,GAAG,KAAK;;AAEpD;;AAEA;;AAEA;;AAEA;;AAEA,wBAAwB,SAAG,EAAE,IAAI;;AAEjC;;AAEA;;AAEA;;AAEA,oDAAoD,cAAc,oCAAoC,MAAM;;AAE5G;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF,8DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AC7IyD;AACZ;AACgB;AACE;AACpB;AACA;AACI;AACc;;;ACP/C;AACf;AACA;AACA;AACA;AACA;;ACLmD;AACZ;AACS;AACa;AAC9C;AACf,eAAe,SAAS,WAAW,aAAa;AAChD,WAAW,eAAe;AAC1B,IAAI;AACJ,WAAW,oBAAoB;AAC/B;AACA;;ACV+D;AAChB;AACJ;AACK;AACW;AACF;AACR;AACR;;AAEzC;AACA;AACA,eAAe,KAAK;AACpB,eAAe,KAAK;AACpB;AACA,EAAE;AACF;;;AAGe;AACf;AACA;AACA;;AAEA,gCAAgC,aAAa;AAC7C,6BAA6B,aAAa;AAC1C,wBAAwB,kBAAkB;AAC1C,aAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,WAAW;AACnB,IAAI,cAAc;AAClB,eAAe,aAAa;AAC5B;;AAEA,QAAQ,aAAa;AACrB,gBAAgB,qBAAqB;AACrC;AACA;AACA,MAAM;AACN,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzD6C,CAAC;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEe;AACf;AACA,2CAA2C;;AAE3C,SAAS,qBAAqB;AAC9B;AACA;AACA,KAAK;AACL,GAAG;AACH;;AC3Ce;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;;ACde;AACf;AACA;AACA,sDAAsD;AACtD,+BAA+B;AAC/B,4BAA4B;AAC5B,KAAK;AACL;AACA,GAAG,IAAI,GAAG;;AAEV;AACA;AACA,GAAG;AACH;;ACb+D;AACN;AACQ;AACJ;AACE;AACR;AACZ;AACkB;AAClB;AACgB;AACV;AACM;AACD;AACpB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sEAAsE,aAAa;AACnF;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B;AAC/B,uBAAuB;AACvB;AACA;AACA;AACA,OAAO;AACP,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qBAAqB,SAAS,cAAc,iBAAiB,yCAAyC,iBAAiB;AACvH,kBAAkB,iBAAiB;AACnC,WAAW;AACX;;AAEA,+BAA+B,cAAc,CAAC,WAAW,yDAAyD;;AAElH;AACA;AACA,SAAS,GAAG;AACZ;;AAEA,YAAY,KAAqC,EAAE,qGA+B1C;;AAET;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C;AAC7C;;AAEA;AACA,cAAc,KAAqC,EAAE,EAE1C;;AAEX;AACA,UAAU;;;AAGV;AACA,qBAAqB,gBAAgB,YAAY,eAAe;AAChE,kBAAkB,aAAa;AAC/B,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;AACA,6CAA6C,KAAK;;AAElD;AACA,sEAAsE;AACtE,SAAS;AACT;;AAEA,4BAA4B,uCAAuC;AACnE,cAAc,KAAqC,EAAE,EAO1C;;AAEX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gEAAgE;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,OAAO;AACP;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,KAAqC,EAAE,EAE1C;;AAEP;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACO,mDAAmD;;;;AChQU;AACT;AACF;AACA;AACJ;AACV;AACJ;AACsB;AACpB;AACF;AACvC,wBAAwB,cAAc,EAAE,uBAAa,EAAE,uBAAa,EAAE,qBAAW,EAAE,gBAAM,EAAE,cAAI,EAAE,yBAAe,EAAE,eAAK,EAAE,cAAI;AAC7H,IAAI,mBAAY,gBAAgB,eAAe;AAC/C;AACA,CAAC,GAAG;;AAEuE,CAAC;;AAER,CAAC;;;;ACjBD;AACT;AACF;AACA;AACJ;AACrD,IAAI,4BAAgB,IAAI,cAAc,EAAE,uBAAa,EAAE,uBAAa,EAAE,qBAAW;AACjF,IAAI,wBAAY,gBAAgB,eAAe;AAC/C,oBAAoB,4BAAgB;AACpC,CAAC,GAAG;;;;ACRuB;AACU,CAAC;;AAEgE,CAAC;;AAE5D,CAAC;;;;;;;;;ACL/B;;AAEb,8CAA6C,EAAE,aAAa,EAAC;;AAE7D;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,yFAAyF;AACzF,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,kEAAkE;AACtF,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,SAAS,GAAG,gEAAgE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0FAA0F,aAAa;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,OAAO,IAAI;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA,CAAC;AACD;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO,IAAI;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B;AACA;AACA,gBAAgB,MAAM;AACtB,kBAAkB,QAAQ;AAC1B,kBAAkB,QAAQ;AAC1B;AACA,UAAU,QAAQ;AAClB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;;AAEA;AACA,cAAc,gBAAgB;AAC9B;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,6BAA6B;AAC7C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,eAAe,QAAQ;AACvB,iBAAiB,SAAS;AAC1B;AACA,kBAAkB,SAAS;AAC3B;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,0EAA0E,aAAa;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,oBAAoB,SAAS;AAC7B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,SAAS;AACxB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA,qBAAqB,oBAAoB;AACzC,oBAAoB,QAAQ;AAC5B,oBAAoB,QAAQ;AAC5B;AACA,YAAY,aAAa;AACzB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA,gCAAgC;AAChC;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,OAAO;AACvB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C,WAAW,aAAa;AACxB,eAAe,2BAA2B;AAC1C,WAAW,aAAa;AACxB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH,CAAC;;AAED,uBAAuB;AACvB,kBAAkB;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UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;ACNA,yBAAwB;AAExB,kBAAkB;AAClB,2CAAmE;AACnE,yCAAgE;AAChE,0CAAgE;AAChE,sCAAoD;AACpD,yCAA8D;AAC9D,wCAA0D;AAC1D,0CAAgE;AAChE,sCAAuD;AACvD,yCAA6D;AAC7D,sCAAmD;AACnD,yCAA6D;AAC7D,+CAA6E;AAC7E,2CAA2E;AAC3E,4CAAsE;AACtE,yBAA4B;AAC5B,wCAAkC;AAElC,IAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,MAAM,EAAE;IAC9B,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;IACT,8BAAkB;IAClB,iCAAiB;IACjB,4BAAe;CAClB,CAAC,CAAC;AACH,MAAM,CAAC,IAAI,EAAE,CAAC;AAEd,qBAAe;IACX,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK;IACL,OAAO;IACP,IAAI;IACJ,OAAO;IACP,YAAY;IACZ,aAAa;IACb,UAAU;IACV,MAAM;CACT,CAAC","sources":["webpack:///webpack/universalModuleDefinition","webpack:///./src/flowbite.css?5b3c","webpack:///./node_modules/@popperjs/core/lib/enums.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack:///./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/math.js","webpack:///./node_modules/@popperjs/core/lib/utils/userAgent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack:///./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/within.js","webpack:///./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack:///./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack:///./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/index.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack:///./node_modules/@popperjs/core/lib/utils/debounce.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack:///./node_modules/@popperjs/core/lib/createPopper.js","webpack:///./node_modules/@popperjs/core/lib/popper.js","webpack:///./node_modules/@popperjs/core/lib/popper-lite.js","webpack:///./node_modules/@popperjs/core/lib/index.js","webpack:///./node_modules/flowbite-datepicker/dist/main.cjs.js","webpack:///./src/components/accordion/index.ts","webpack:///./src/components/carousel/index.ts","webpack:///./src/components/clipboard/index.ts","webpack:///./src/components/collapse/index.ts","webpack:///./src/components/datepicker/index.ts","webpack:///./src/components/dial/index.ts","webpack:///./src/components/dismiss/index.ts","webpack:///./src/components/drawer/index.ts","webpack:///./src/components/dropdown/index.ts","webpack:///./src/components/index.ts","webpack:///./src/components/input-counter/index.ts","webpack:///./src/components/modal/index.ts","webpack:///./src/components/popover/index.ts","webpack:///./src/components/tabs/index.ts","webpack:///./src/components/tooltip/index.ts","webpack:///./src/dom/events.ts","webpack:///./src/dom/instances.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/index.umd.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Flowbite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Flowbite\"] = factory();\n\telse\n\t\troot[\"Flowbite\"] = factory();\n})(self, function() {\nreturn ","// extracted by mini-css-extract-plugin\nexport {};","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export { default as applyStyles } from \"./applyStyles.js\";\nexport { default as arrow } from \"./arrow.js\";\nexport { default as computeStyles } from \"./computeStyles.js\";\nexport { default as eventListeners } from \"./eventListeners.js\";\nexport { default as flip } from \"./flip.js\";\nexport { default as hide } from \"./hide.js\";\nexport { default as offset } from \"./offset.js\";\nexport { default as popperOffsets } from \"./popperOffsets.js\";\nexport { default as preventOverflow } from \"./preventOverflow.js\";","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nfunction _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nfunction _callSuper(t, o, e) {\n return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));\n}\nfunction _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nfunction _get() {\n return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {\n var p = _superPropBase(e, t);\n if (p) {\n var n = Object.getOwnPropertyDescriptor(p, t);\n return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;\n }\n }, _get.apply(null, arguments);\n}\nfunction _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && _setPrototypeOf(t, e);\n}\nfunction _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function () {\n return !!t;\n })();\n}\nfunction _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return _assertThisInitialized(t);\n}\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nfunction _slicedToArray(r, e) {\n return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _superPropBase(t, o) {\n for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););\n return t;\n}\nfunction _toConsumableArray(r) {\n return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n}\n\nfunction hasProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction lastItemOf(arr) {\n return arr[arr.length - 1];\n}\n\n// push only the items not included in the array\nfunction pushUnique(arr) {\n for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n items[_key - 1] = arguments[_key];\n }\n items.forEach(function (item) {\n if (arr.includes(item)) {\n return;\n }\n arr.push(item);\n });\n return arr;\n}\nfunction stringToArray(str, separator) {\n // convert empty string to an empty array\n return str ? str.split(separator) : [];\n}\nfunction isInRange(testVal, min, max) {\n var minOK = min === undefined || testVal >= min;\n var maxOK = max === undefined || testVal <= max;\n return minOK && maxOK;\n}\nfunction limitToRange(val, min, max) {\n if (val < min) {\n return min;\n }\n if (val > max) {\n return max;\n }\n return val;\n}\nfunction createTagRepeat(tagName, repeat) {\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';\n var openTagSrc = Object.keys(attributes).reduce(function (src, attr) {\n var val = attributes[attr];\n if (typeof val === 'function') {\n val = val(index);\n }\n return \"\".concat(src, \" \").concat(attr, \"=\\\"\").concat(val, \"\\\"\");\n }, tagName);\n html += \"<\".concat(openTagSrc, \">\");\n var next = index + 1;\n return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html;\n}\n\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nfunction optimizeTemplateHTML(html) {\n return html.replace(/>\\s+/g, '>').replace(/\\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var baseDay = new Date(baseDate).getDay();\n return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n}\n\n// Get the ISO week of a date\nfunction getWeek(date) {\n // start of ISO week is Monday\n var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n // 1st week == the week where the 4th of January is in\n var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nfunction startOfYearPeriod(date, years) {\n /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n var year = new Date(date).getFullYear();\n return Math.floor(year / years) * years;\n}\n\n// pattern for format parts\nvar reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nvar reNonDateParts = /[\\s!-/:-@[-`{-~年月日]+/;\n// cache for persed formats\nvar knownFormats = {};\n// parse funtions for date parts\nvar parseFns = {\n y: function y(date, year) {\n return new Date(date).setFullYear(parseInt(year, 10));\n },\n m: function m(date, month, locale) {\n var newDate = new Date(date);\n var monthIndex = parseInt(month, 10) - 1;\n if (isNaN(monthIndex)) {\n if (!month) {\n return NaN;\n }\n var monthName = month.toLowerCase();\n var compareNames = function compareNames(name) {\n return name.toLowerCase().startsWith(monthName);\n };\n // compare with both short and full names because some locales have periods\n // in the short names (not equal to the first X letters of the full names)\n monthIndex = locale.monthsShort.findIndex(compareNames);\n if (monthIndex < 0) {\n monthIndex = locale.months.findIndex(compareNames);\n }\n if (monthIndex < 0) {\n return NaN;\n }\n }\n newDate.setMonth(monthIndex);\n return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime();\n },\n d: function d(date, day) {\n return new Date(date).setDate(parseInt(day, 10));\n }\n};\n// format functions for date parts\nvar formatFns = {\n d: function d(date) {\n return date.getDate();\n },\n dd: function dd(date) {\n return padZero(date.getDate(), 2);\n },\n D: function D(date, locale) {\n return locale.daysShort[date.getDay()];\n },\n DD: function DD(date, locale) {\n return locale.days[date.getDay()];\n },\n m: function m(date) {\n return date.getMonth() + 1;\n },\n mm: function mm(date) {\n return padZero(date.getMonth() + 1, 2);\n },\n M: function M(date, locale) {\n return locale.monthsShort[date.getMonth()];\n },\n MM: function MM(date, locale) {\n return locale.months[date.getMonth()];\n },\n y: function y(date) {\n return date.getFullYear();\n },\n yy: function yy(date) {\n return padZero(date.getFullYear(), 2).slice(-2);\n },\n yyyy: function yyyy(date) {\n return padZero(date.getFullYear(), 4);\n }\n};\n\n// get month index in normal range (0 - 11) from any number\nfunction normalizeMonth(monthIndex) {\n return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n}\nfunction padZero(num, length) {\n return num.toString().padStart(length, '0');\n}\nfunction parseFormatString(format) {\n if (typeof format !== 'string') {\n throw new Error(\"Invalid date format.\");\n }\n if (format in knownFormats) {\n return knownFormats[format];\n }\n\n // sprit the format string into parts and seprators\n var separators = format.split(reFormatTokens);\n var parts = format.match(new RegExp(reFormatTokens, 'g'));\n if (separators.length === 0 || !parts) {\n throw new Error(\"Invalid date format.\");\n }\n\n // collect format functions used in the format\n var partFormatters = parts.map(function (token) {\n return formatFns[token];\n });\n\n // collect parse function keys used in the format\n // iterate over parseFns' keys in order to keep the order of the keys.\n var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) {\n var token = parts.find(function (part) {\n return part[0] !== 'D' && part[0].toLowerCase() === key;\n });\n if (token) {\n keys.push(key);\n }\n return keys;\n }, []);\n return knownFormats[format] = {\n parser: function parser(dateStr, locale) {\n var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) {\n if (part.length > 0 && parts[index]) {\n var token = parts[index][0];\n if (token === 'M') {\n dtParts.m = part;\n } else if (token !== 'D') {\n dtParts[token] = part;\n }\n }\n return dtParts;\n }, {});\n\n // iterate over partParserkeys so that the parsing is made in the oder\n // of year, month and day to prevent the day parser from correcting last\n // day of month wrongly\n return partParserKeys.reduce(function (origDate, key) {\n var newDate = parseFns[key](origDate, dateParts[key], locale);\n // ingnore the part failed to parse\n return isNaN(newDate) ? origDate : newDate;\n }, today());\n },\n formatter: function formatter(date, locale) {\n var dateStr = partFormatters.reduce(function (str, fn, index) {\n return str += \"\".concat(separators[index]).concat(fn(date, locale));\n }, '');\n // separators' length is always parts' length + 1,\n return dateStr += lastItemOf(separators);\n }\n };\n}\nfunction parseDate(dateStr, format, locale) {\n if (dateStr instanceof Date || typeof dateStr === 'number') {\n var date = stripTime(dateStr);\n return isNaN(date) ? undefined : date;\n }\n if (!dateStr) {\n return undefined;\n }\n if (dateStr === 'today') {\n return today();\n }\n if (format && format.toValue) {\n var _date = format.toValue(dateStr, format, locale);\n return isNaN(_date) ? undefined : stripTime(_date);\n }\n return parseFormatString(format).parser(dateStr, locale);\n}\nfunction formatDate(date, format, locale) {\n if (isNaN(date) || !date && date !== 0) {\n return '';\n }\n var dateObj = typeof date === 'number' ? new Date(date) : date;\n if (format.toDisplay) {\n return format.toDisplay(dateObj, format, locale);\n }\n return parseFormatString(format).formatter(dateObj, locale);\n}\n\nvar listenerRegistry = new WeakMap();\nvar _EventTarget$prototyp = EventTarget.prototype,\n addEventListener = _EventTarget$prototyp.addEventListener,\n removeEventListener = _EventTarget$prototyp.removeEventListener;\n\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n// - each definition must be a flat array of event target and the arguments\n// used to call addEventListener() on the target\nfunction registerListeners(keyObj, listeners) {\n var registered = listenerRegistry.get(keyObj);\n if (!registered) {\n registered = [];\n listenerRegistry.set(keyObj, registered);\n }\n listeners.forEach(function (listener) {\n addEventListener.call.apply(addEventListener, _toConsumableArray(listener));\n registered.push(listener);\n });\n}\nfunction unregisterListeners(keyObj) {\n var listeners = listenerRegistry.get(keyObj);\n if (!listeners) {\n return;\n }\n listeners.forEach(function (listener) {\n removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener));\n });\n listenerRegistry[\"delete\"](keyObj);\n}\n\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n var getComposedPath = function getComposedPath(node) {\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n path.push(node);\n var parent;\n if (node.parentNode) {\n parent = node.parentNode;\n } else if (node.host) {\n // ShadowRoot\n parent = node.host;\n } else if (node.defaultView) {\n // Document\n parent = node.defaultView;\n }\n return parent ? getComposedPath(parent, path) : path;\n };\n Event.prototype.composedPath = function () {\n return getComposedPath(this.target);\n };\n}\nfunction findFromPath(path, criteria, currentTarget) {\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var el = path[index];\n if (criteria(el)) {\n return el;\n } else if (el === currentTarget || !el.parentElement) {\n // stop when reaching currentTarget or \n return;\n }\n return findFromPath(path, criteria, currentTarget, index + 1);\n}\n\n// Search for the actual target of a delegated event\nfunction findElementInEventPath(ev, selector) {\n var criteria = typeof selector === 'function' ? selector : function (el) {\n return el.matches(selector);\n };\n return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n\n// default locales\nvar locales = {\n en: {\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n today: \"Today\",\n clear: \"Clear\",\n titleFormat: \"MM y\"\n }\n};\n\n// config options updatable by setOptions() and their default values\nvar defaultOptions = {\n autohide: false,\n beforeShowDay: null,\n beforeShowDecade: null,\n beforeShowMonth: null,\n beforeShowYear: null,\n calendarWeeks: false,\n clearBtn: false,\n dateDelimiter: ',',\n datesDisabled: [],\n daysOfWeekDisabled: [],\n daysOfWeekHighlighted: [],\n defaultViewDate: undefined,\n // placeholder, defaults to today() by the program\n disableTouchKeyboard: false,\n format: 'mm/dd/yyyy',\n language: 'en',\n maxDate: null,\n maxNumberOfDates: 1,\n maxView: 3,\n minDate: null,\n nextArrow: '',\n orientation: 'auto',\n pickLevel: 0,\n prevArrow: '',\n showDaysOfWeek: true,\n showOnClick: true,\n showOnFocus: true,\n startView: 0,\n title: '',\n todayBtn: false,\n todayBtnMode: 0,\n todayHighlight: false,\n updateOnBlur: true,\n weekStart: 0\n};\n\nvar range = document.createRange();\nfunction parseHTML(html) {\n return range.createContextualFragment(html);\n}\nfunction hideElement(el) {\n if (el.style.display === 'none') {\n return;\n }\n // back up the existing display setting in data-style-display\n if (el.style.display) {\n el.dataset.styleDisplay = el.style.display;\n }\n el.style.display = 'none';\n}\nfunction showElement(el) {\n if (el.style.display !== 'none') {\n return;\n }\n if (el.dataset.styleDisplay) {\n // restore backed-up dispay property\n el.style.display = el.dataset.styleDisplay;\n delete el.dataset.styleDisplay;\n } else {\n el.style.display = '';\n }\n}\nfunction emptyChildNodes(el) {\n if (el.firstChild) {\n el.removeChild(el.firstChild);\n emptyChildNodes(el);\n }\n}\nfunction replaceChildNodes(el, newChildNodes) {\n emptyChildNodes(el);\n if (newChildNodes instanceof DocumentFragment) {\n el.appendChild(newChildNodes);\n } else if (typeof newChildNodes === 'string') {\n el.appendChild(parseHTML(newChildNodes));\n } else if (typeof newChildNodes.forEach === 'function') {\n newChildNodes.forEach(function (node) {\n el.appendChild(node);\n });\n }\n}\n\nvar defaultLang = defaultOptions.language,\n defaultFormat = defaultOptions.format,\n defaultWeekStart = defaultOptions.weekStart;\n\n// Reducer function to filter out invalid day-of-week from the input\nfunction sanitizeDOW(dow, day) {\n return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow;\n}\nfunction calcEndOfWeek(startOfWeek) {\n return (startOfWeek + 6) % 7;\n}\n\n// validate input date. if invalid, fallback to the original value\nfunction validateDate(value, format, locale, origValue) {\n var date = parseDate(value, format, locale);\n return date !== undefined ? date : origValue;\n}\n\n// Validate viewId. if invalid, fallback to the original value\nfunction validateViewId(value, origValue) {\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;\n var viewId = parseInt(value, 10);\n return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n\n// Create Datepicker configuration to set\nfunction processOptions(options, datepicker) {\n var inOpts = Object.assign({}, options);\n var config = {};\n var locales = datepicker.constructor.locales;\n var _ref = datepicker.config || {},\n format = _ref.format,\n language = _ref.language,\n locale = _ref.locale,\n maxDate = _ref.maxDate,\n maxView = _ref.maxView,\n minDate = _ref.minDate,\n pickLevel = _ref.pickLevel,\n startView = _ref.startView,\n weekStart = _ref.weekStart;\n if (inOpts.language) {\n var lang;\n if (inOpts.language !== language) {\n if (locales[inOpts.language]) {\n lang = inOpts.language;\n } else {\n // Check if langauge + region tag can fallback to the one without\n // region (e.g. fr-CA → fr)\n lang = inOpts.language.split('-')[0];\n if (locales[lang] === undefined) {\n lang = false;\n }\n }\n }\n delete inOpts.language;\n if (lang) {\n language = config.language = lang;\n\n // update locale as well when updating language\n var origLocale = locale || locales[defaultLang];\n // use default language's properties for the fallback\n locale = Object.assign({\n format: defaultFormat,\n weekStart: defaultWeekStart\n }, locales[defaultLang]);\n if (language !== defaultLang) {\n Object.assign(locale, locales[language]);\n }\n config.locale = locale;\n // if format and/or weekStart are the same as old locale's defaults,\n // update them to new locale's defaults\n if (format === origLocale.format) {\n format = config.format = locale.format;\n }\n if (weekStart === origLocale.weekStart) {\n weekStart = config.weekStart = locale.weekStart;\n config.weekEnd = calcEndOfWeek(locale.weekStart);\n }\n }\n }\n if (inOpts.format) {\n var hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n var hasToValue = typeof inOpts.format.toValue === 'function';\n var validFormatString = reFormatTokens.test(inOpts.format);\n if (hasToDisplay && hasToValue || validFormatString) {\n format = config.format = inOpts.format;\n }\n delete inOpts.format;\n }\n\n //*** dates ***//\n // while min and maxDate for \"no limit\" in the options are better to be null\n // (especially when updating), the ones in the config have to be undefined\n // because null is treated as 0 (= unix epoch) when comparing with time value\n var minDt = minDate;\n var maxDt = maxDate;\n if (inOpts.minDate !== undefined) {\n minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n : validateDate(inOpts.minDate, format, locale, minDt);\n delete inOpts.minDate;\n }\n if (inOpts.maxDate !== undefined) {\n maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt);\n delete inOpts.maxDate;\n }\n if (maxDt < minDt) {\n minDate = config.minDate = maxDt;\n maxDate = config.maxDate = minDt;\n } else {\n if (minDate !== minDt) {\n minDate = config.minDate = minDt;\n }\n if (maxDate !== maxDt) {\n maxDate = config.maxDate = maxDt;\n }\n }\n if (inOpts.datesDisabled) {\n config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) {\n var date = parseDate(dt, format, locale);\n return date !== undefined ? pushUnique(dates, date) : dates;\n }, []);\n delete inOpts.datesDisabled;\n }\n if (inOpts.defaultViewDate !== undefined) {\n var viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n if (viewDate !== undefined) {\n config.defaultViewDate = viewDate;\n }\n delete inOpts.defaultViewDate;\n }\n\n //*** days of week ***//\n if (inOpts.weekStart !== undefined) {\n var wkStart = Number(inOpts.weekStart) % 7;\n if (!isNaN(wkStart)) {\n weekStart = config.weekStart = wkStart;\n config.weekEnd = calcEndOfWeek(wkStart);\n }\n delete inOpts.weekStart;\n }\n if (inOpts.daysOfWeekDisabled) {\n config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekDisabled;\n }\n if (inOpts.daysOfWeekHighlighted) {\n config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekHighlighted;\n }\n\n //*** multi date ***//\n if (inOpts.maxNumberOfDates !== undefined) {\n var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n if (maxNumberOfDates >= 0) {\n config.maxNumberOfDates = maxNumberOfDates;\n config.multidate = maxNumberOfDates !== 1;\n }\n delete inOpts.maxNumberOfDates;\n }\n if (inOpts.dateDelimiter) {\n config.dateDelimiter = String(inOpts.dateDelimiter);\n delete inOpts.dateDelimiter;\n }\n\n //*** pick level & view ***//\n var newPickLevel = pickLevel;\n if (inOpts.pickLevel !== undefined) {\n newPickLevel = validateViewId(inOpts.pickLevel, 2);\n delete inOpts.pickLevel;\n }\n if (newPickLevel !== pickLevel) {\n pickLevel = config.pickLevel = newPickLevel;\n }\n var newMaxView = maxView;\n if (inOpts.maxView !== undefined) {\n newMaxView = validateViewId(inOpts.maxView, maxView);\n delete inOpts.maxView;\n }\n // ensure max view >= pick level\n newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n if (newMaxView !== maxView) {\n maxView = config.maxView = newMaxView;\n }\n var newStartView = startView;\n if (inOpts.startView !== undefined) {\n newStartView = validateViewId(inOpts.startView, newStartView);\n delete inOpts.startView;\n }\n // ensure pick level <= start view <= max view\n if (newStartView < pickLevel) {\n newStartView = pickLevel;\n } else if (newStartView > maxView) {\n newStartView = maxView;\n }\n if (newStartView !== startView) {\n config.startView = newStartView;\n }\n\n //*** template ***//\n if (inOpts.prevArrow) {\n var prevArrow = parseHTML(inOpts.prevArrow);\n if (prevArrow.childNodes.length > 0) {\n config.prevArrow = prevArrow.childNodes;\n }\n delete inOpts.prevArrow;\n }\n if (inOpts.nextArrow) {\n var nextArrow = parseHTML(inOpts.nextArrow);\n if (nextArrow.childNodes.length > 0) {\n config.nextArrow = nextArrow.childNodes;\n }\n delete inOpts.nextArrow;\n }\n\n //*** misc ***//\n if (inOpts.disableTouchKeyboard !== undefined) {\n config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n delete inOpts.disableTouchKeyboard;\n }\n if (inOpts.orientation) {\n var orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n config.orientation = {\n x: orientation.find(function (x) {\n return x === 'left' || x === 'right';\n }) || 'auto',\n y: orientation.find(function (y) {\n return y === 'top' || y === 'bottom';\n }) || 'auto'\n };\n delete inOpts.orientation;\n }\n if (inOpts.todayBtnMode !== undefined) {\n switch (inOpts.todayBtnMode) {\n case 0:\n case 1:\n config.todayBtnMode = inOpts.todayBtnMode;\n }\n delete inOpts.todayBtnMode;\n }\n\n //*** copy the rest ***//\n Object.keys(inOpts).forEach(function (key) {\n if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) {\n config[key] = inOpts[key];\n }\n });\n return config;\n}\n\nvar pickerTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n \\n
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \");\n\nvar daysTemplate = optimizeTemplateHTML(\"
    \\n
    \".concat(createTagRepeat('span', 7, {\n \"class\": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \").concat(createTagRepeat('span', 42, {\n \"class\": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'\n}), \"
    \\n
    \"));\n\nvar calendarWeeksTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \".concat(createTagRepeat('span', 6, {\n \"class\": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \"));\n\n// Base class of the view classes\nvar View = /*#__PURE__*/function () {\n function View(picker, config) {\n _classCallCheck(this, View);\n Object.assign(this, config, {\n picker: picker,\n element: parseHTML(\"
    \").firstChild,\n selected: []\n });\n this.init(this.picker.datepicker.config);\n }\n return _createClass(View, [{\n key: \"init\",\n value: function init(options) {\n if (options.pickLevel !== undefined) {\n this.isMinView = this.id === options.pickLevel;\n }\n this.setOptions(options);\n this.updateFocus();\n this.updateSelection();\n }\n\n // Execute beforeShow() callback and apply the result to the element\n // args:\n // - current - current value on the iteration on view rendering\n // - timeValue - time value of the date to pass to beforeShow()\n }, {\n key: \"performBeforeHook\",\n value: function performBeforeHook(el, current, timeValue) {\n var result = this.beforeShow(new Date(timeValue));\n switch (_typeof(result)) {\n case 'boolean':\n result = {\n enabled: result\n };\n break;\n case 'string':\n result = {\n classes: result\n };\n }\n if (result) {\n if (result.enabled === false) {\n el.classList.add('disabled');\n pushUnique(this.disabled, current);\n }\n if (result.classes) {\n var _el$classList;\n var extraClasses = result.classes.split(/\\s+/);\n (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses));\n if (extraClasses.includes('disabled')) {\n pushUnique(this.disabled, current);\n }\n }\n if (result.content) {\n replaceChildNodes(el, result.content);\n }\n }\n }\n }]);\n}();\n\nvar DaysView = /*#__PURE__*/function (_View) {\n function DaysView(picker) {\n _classCallCheck(this, DaysView);\n return _callSuper(this, DaysView, [picker, {\n id: 0,\n name: 'days',\n cellClass: 'day'\n }]);\n }\n _inherits(DaysView, _View);\n return _createClass(DaysView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n var inner = parseHTML(daysTemplate).firstChild;\n this.dow = inner.firstChild;\n this.grid = inner.lastChild;\n this.element.appendChild(inner);\n }\n _get(_getPrototypeOf(DaysView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var _this = this;\n var updateDOW;\n if (hasProperty(options, 'minDate')) {\n this.minDate = options.minDate;\n }\n if (hasProperty(options, 'maxDate')) {\n this.maxDate = options.maxDate;\n }\n if (options.datesDisabled) {\n this.datesDisabled = options.datesDisabled;\n }\n if (options.daysOfWeekDisabled) {\n this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n updateDOW = true;\n }\n if (options.daysOfWeekHighlighted) {\n this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n }\n if (options.todayHighlight !== undefined) {\n this.todayHighlight = options.todayHighlight;\n }\n if (options.weekStart !== undefined) {\n this.weekStart = options.weekStart;\n this.weekEnd = options.weekEnd;\n updateDOW = true;\n }\n if (options.locale) {\n var locale = this.locale = options.locale;\n this.dayNames = locale.daysMin;\n this.switchLabelFormat = locale.titleFormat;\n updateDOW = true;\n }\n if (options.beforeShowDay !== undefined) {\n this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined;\n }\n if (options.calendarWeeks !== undefined) {\n if (options.calendarWeeks && !this.calendarWeeks) {\n var weeksElem = parseHTML(calendarWeeksTemplate).firstChild;\n this.calendarWeeks = {\n element: weeksElem,\n dow: weeksElem.firstChild,\n weeks: weeksElem.lastChild\n };\n this.element.insertBefore(weeksElem, this.element.firstChild);\n } else if (this.calendarWeeks && !options.calendarWeeks) {\n this.element.removeChild(this.calendarWeeks.element);\n this.calendarWeeks = null;\n }\n }\n if (options.showDaysOfWeek !== undefined) {\n if (options.showDaysOfWeek) {\n showElement(this.dow);\n if (this.calendarWeeks) {\n showElement(this.calendarWeeks.dow);\n }\n } else {\n hideElement(this.dow);\n if (this.calendarWeeks) {\n hideElement(this.calendarWeeks.dow);\n }\n }\n }\n\n // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n if (updateDOW) {\n Array.from(this.dow.children).forEach(function (el, index) {\n var dow = (_this.weekStart + index) % 7;\n el.textContent = _this.dayNames[dow];\n el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n });\n }\n }\n\n // Apply update on the focused date to view's settings\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var viewYear = viewDate.getFullYear();\n var viewMonth = viewDate.getMonth();\n var firstOfMonth = dateValue(viewYear, viewMonth, 1);\n var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n this.first = firstOfMonth;\n this.last = dateValue(viewYear, viewMonth + 1, 0);\n this.start = start;\n this.focused = this.picker.viewDate;\n }\n\n // Apply update on the selected dates to view's settings\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates;\n if (rangepicker) {\n this.range = rangepicker.dates;\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // update today marker on ever render\n this.today = this.todayHighlight ? today() : undefined;\n // refresh disabled dates on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = _toConsumableArray(this.datesDisabled);\n var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale);\n this.picker.setViewSwitchLabel(switchLabel);\n this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n if (this.calendarWeeks) {\n // start of the UTC week (Monday) of the 1st of the month\n var startOfWeek = dayOfTheWeekOf(this.first, 1, 1);\n Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) {\n el.textContent = getWeek(addWeeks(startOfWeek, index));\n });\n }\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = addDays(_this2.start, index);\n var date = new Date(current);\n var day = date.getDay();\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n el.dataset.date = current;\n el.textContent = date.getDate();\n if (current < _this2.first) {\n classList.add('prev', 'text-gray-500', 'dark:text-white');\n } else if (current > _this2.last) {\n classList.add('next', 'text-gray-500', 'dark:text-white');\n }\n if (_this2.today === current) {\n classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n }\n if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n }\n if (_this2.daysOfWeekDisabled.includes(day)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n pushUnique(_this2.disabled, current);\n }\n if (_this2.daysOfWeekHighlighted.includes(day)) {\n classList.add('highlighted');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg', 'rounded-r-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg', 'rounded-l-lg');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, current);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused');\n el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.dataset.date);\n var classList = el.classList;\n classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg');\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / 86400000);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction computeMonthRange(range, thisYear) {\n if (!range || !range[0] || !range[1]) {\n return;\n }\n var _range = _slicedToArray(range, 2),\n _range$ = _slicedToArray(_range[0], 2),\n startY = _range$[0],\n startM = _range$[1],\n _range$2 = _slicedToArray(_range[1], 2),\n endY = _range$2[0],\n endM = _range$2[1];\n if (startY > thisYear || endY < thisYear) {\n return;\n }\n return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12];\n}\nvar MonthsView = /*#__PURE__*/function (_View) {\n function MonthsView(picker) {\n _classCallCheck(this, MonthsView);\n return _callSuper(this, MonthsView, [picker, {\n id: 1,\n name: 'months',\n cellClass: 'month'\n }]);\n }\n _inherits(MonthsView, _View);\n return _createClass(MonthsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.grid = this.element;\n this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {\n 'data-month': function dataMonth(ix) {\n return ix;\n }\n })));\n }\n _get(_getPrototypeOf(MonthsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options.locale) {\n this.monthNames = options.locale.monthsShort;\n }\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minMonth = this.minDate = undefined;\n } else {\n var minDateObj = new Date(options.minDate);\n this.minYear = minDateObj.getFullYear();\n this.minMonth = minDateObj.getMonth();\n this.minDate = minDateObj.setDate(1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxMonth = this.maxDate = undefined;\n } else {\n var maxDateObj = new Date(options.maxDate);\n this.maxYear = maxDateObj.getFullYear();\n this.maxMonth = maxDateObj.getMonth();\n this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n }\n }\n if (options.beforeShowMonth !== undefined) {\n this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n this.year = viewDate.getFullYear();\n this.focused = viewDate.getMonth();\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (selected, timeValue) {\n var date = new Date(timeValue);\n var year = date.getFullYear();\n var month = date.getMonth();\n if (selected[year] === undefined) {\n selected[year] = [month];\n } else {\n pushUnique(selected[year], month);\n }\n return selected;\n }, {});\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n var date = new Date(timeValue);\n return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n // refresh disabled months on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(this.year);\n this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n var selected = this.selected[this.year] || [];\n var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n var isMinYear = this.year === this.minYear;\n var isMaxYear = this.year === this.maxYear;\n var range = computeMonthRange(this.range, this.year);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var date = dateValue(_this.year, index, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this.cellClass);\n if (_this.isMinView) {\n el.dataset.date = date;\n }\n // reset text on every render to clear the custom content set\n // by beforeShow hook at previous render\n el.textContent = _this.monthNames[index];\n if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) {\n classList.add('disabled');\n }\n if (range) {\n var _range2 = _slicedToArray(range, 2),\n rangeStart = _range2[0],\n rangeEnd = _range2[1];\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this.focused) {\n classList.add('focused');\n }\n if (_this.beforeShow) {\n _this.performBeforeHook(el, index, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this2 = this;\n var selected = this.selected[this.year] || [];\n var _ref = computeMonthRange(this.range, this.year) || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused');\n el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n });\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this2.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[this.focused].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction toTitleCase(word) {\n return _toConsumableArray(word).reduce(function (str, ch, ix) {\n return str += ix ? ch : ch.toUpperCase();\n }, '');\n}\n\n// Class representing the years and decades view elements\nvar YearsView = /*#__PURE__*/function (_View) {\n function YearsView(picker, config) {\n _classCallCheck(this, YearsView);\n return _callSuper(this, YearsView, [picker, config]);\n }\n _inherits(YearsView, _View);\n return _createClass(YearsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.navStep = this.step * 10;\n this.beforeShowOption = \"beforeShow\".concat(toTitleCase(this.cellClass));\n this.grid = this.element;\n this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n }\n _get(_getPrototypeOf(YearsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minDate = undefined;\n } else {\n this.minYear = startOfYearPeriod(options.minDate, this.step);\n this.minDate = dateValue(this.minYear, 0, 1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxDate = undefined;\n } else {\n this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n this.maxDate = dateValue(this.maxYear, 11, 31);\n }\n }\n if (options[this.beforeShowOption] !== undefined) {\n var beforeShow = options[this.beforeShowOption];\n this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var first = startOfYearPeriod(viewDate, this.navStep);\n var last = first + 9 * this.step;\n this.first = first;\n this.last = last;\n this.start = first - this.step;\n this.focused = startOfYearPeriod(viewDate, this.step);\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this = this;\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (years, timeValue) {\n return pushUnique(years, startOfYearPeriod(timeValue, _this.step));\n }, []);\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n if (timeValue !== undefined) {\n return startOfYearPeriod(timeValue, _this.step);\n }\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // refresh disabled years on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(\"\".concat(this.first, \"-\").concat(this.last));\n this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = _this2.start + index * _this2.step;\n var date = dateValue(current, 0, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n if (_this2.isMinView) {\n el.dataset.date = date;\n }\n el.textContent = el.dataset.year = current;\n if (index === 0) {\n classList.add('prev');\n } else if (index === 11) {\n classList.add('next');\n }\n if (current < _this2.minYear || current > _this2.maxYear) {\n classList.add('disabled');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.textContent);\n var classList = el.classList;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / this.step);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction triggerDatepickerEvent(datepicker, type) {\n var detail = {\n date: datepicker.getDate(),\n viewDate: new Date(datepicker.picker.viewDate),\n viewId: datepicker.picker.currentView.id,\n datepicker: datepicker\n };\n datepicker.element.dispatchEvent(new CustomEvent(type, {\n detail: detail\n }));\n}\n\n// direction: -1 (to previous), 1 (to next)\nfunction goToPrevOrNext(datepicker, direction) {\n var _datepicker$config = datepicker.config,\n minDate = _datepicker$config.minDate,\n maxDate = _datepicker$config.maxDate;\n var _datepicker$picker = datepicker.picker,\n currentView = _datepicker$picker.currentView,\n viewDate = _datepicker$picker.viewDate;\n var newViewDate;\n switch (currentView.id) {\n case 0:\n newViewDate = addMonths(viewDate, direction);\n break;\n case 1:\n newViewDate = addYears(viewDate, direction);\n break;\n default:\n newViewDate = addYears(viewDate, direction * currentView.navStep);\n }\n newViewDate = limitToRange(newViewDate, minDate, maxDate);\n datepicker.picker.changeFocus(newViewDate).render();\n}\nfunction switchView(datepicker) {\n var viewId = datepicker.picker.currentView.id;\n if (viewId === datepicker.config.maxView) {\n return;\n }\n datepicker.picker.changeView(viewId + 1).render();\n}\nfunction unfocus(datepicker) {\n if (datepicker.config.updateOnBlur) {\n datepicker.update({\n autohide: true\n });\n } else {\n datepicker.refresh('input');\n datepicker.hide();\n }\n}\n\nfunction goToSelectedMonthOrYear(datepicker, selection) {\n var picker = datepicker.picker;\n var viewDate = new Date(picker.viewDate);\n var viewId = picker.currentView.id;\n var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear());\n picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\nfunction onClickTodayBtn(datepicker) {\n var picker = datepicker.picker;\n var currentDate = today();\n if (datepicker.config.todayBtnMode === 1) {\n if (datepicker.config.autohide) {\n datepicker.setDate(currentDate);\n return;\n }\n datepicker.setDate(currentDate, {\n render: false\n });\n picker.update();\n }\n if (picker.viewDate !== currentDate) {\n picker.changeFocus(currentDate);\n }\n picker.changeView(0).render();\n}\nfunction onClickClearBtn(datepicker) {\n datepicker.setDate({\n clear: true\n });\n}\nfunction onClickViewSwitch(datepicker) {\n switchView(datepicker);\n}\nfunction onClickPrevBtn(datepicker) {\n goToPrevOrNext(datepicker, -1);\n}\nfunction onClickNextBtn(datepicker) {\n goToPrevOrNext(datepicker, 1);\n}\n\n// For the picker's main block to delegete the events from `datepicker-cell`s\nfunction onClickView(datepicker, ev) {\n var target = findElementInEventPath(ev, '.datepicker-cell');\n if (!target || target.classList.contains('disabled')) {\n return;\n }\n var _datepicker$picker$cu = datepicker.picker.currentView,\n id = _datepicker$picker$cu.id,\n isMinView = _datepicker$picker$cu.isMinView;\n if (isMinView) {\n datepicker.setDate(Number(target.dataset.date));\n } else if (id === 1) {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n } else {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n }\n}\nfunction onClickPicker(datepicker) {\n if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.focus();\n }\n}\n\nfunction processPickerOptions(picker, options) {\n if (options.title !== undefined) {\n if (options.title) {\n picker.controls.title.textContent = options.title;\n showElement(picker.controls.title);\n } else {\n picker.controls.title.textContent = '';\n hideElement(picker.controls.title);\n }\n }\n if (options.prevArrow) {\n var prevBtn = picker.controls.prevBtn;\n emptyChildNodes(prevBtn);\n options.prevArrow.forEach(function (node) {\n prevBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.nextArrow) {\n var nextBtn = picker.controls.nextBtn;\n emptyChildNodes(nextBtn);\n options.nextArrow.forEach(function (node) {\n nextBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.locale) {\n picker.controls.todayBtn.textContent = options.locale.today;\n picker.controls.clearBtn.textContent = options.locale.clear;\n }\n if (options.todayBtn !== undefined) {\n if (options.todayBtn) {\n showElement(picker.controls.todayBtn);\n } else {\n hideElement(picker.controls.todayBtn);\n }\n }\n if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) {\n var _picker$datepicker$co = picker.datepicker.config,\n minDate = _picker$datepicker$co.minDate,\n maxDate = _picker$datepicker$co.maxDate;\n picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate);\n }\n if (options.clearBtn !== undefined) {\n if (options.clearBtn) {\n showElement(picker.controls.clearBtn);\n } else {\n hideElement(picker.controls.clearBtn);\n }\n }\n}\n\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction computeResetViewDate(datepicker) {\n var dates = datepicker.dates,\n config = datepicker.config;\n var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate;\n return limitToRange(viewDate, config.minDate, config.maxDate);\n}\n\n// Change current view's view date\nfunction setViewDate(picker, newDate) {\n var oldViewDate = new Date(picker.viewDate);\n var newViewDate = new Date(newDate);\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n year = _picker$currentView.year,\n first = _picker$currentView.first,\n last = _picker$currentView.last;\n var viewYear = newViewDate.getFullYear();\n picker.viewDate = newDate;\n if (viewYear !== oldViewDate.getFullYear()) {\n triggerDatepickerEvent(picker.datepicker, 'changeYear');\n }\n if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n }\n\n // return whether the new date is in different period on time from the one\n // displayed in the current view\n // when true, the view needs to be re-rendered on the next UI refresh.\n switch (id) {\n case 0:\n return newDate < first || newDate > last;\n case 1:\n return viewYear !== year;\n default:\n return viewYear < first || viewYear > last;\n }\n}\nfunction getTextDirection(el) {\n return window.getComputedStyle(el).direction;\n}\n\n// Class representing the picker UI\nvar Picker = /*#__PURE__*/function () {\n function Picker(datepicker) {\n _classCallCheck(this, Picker);\n this.datepicker = datepicker;\n var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n var element = this.element = parseHTML(template).firstChild;\n var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3),\n header = _element$firstChild$c[0],\n main = _element$firstChild$c[1],\n footer = _element$firstChild$c[2];\n var title = header.firstElementChild;\n var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3),\n prevBtn = _header$lastElementCh[0],\n viewSwitch = _header$lastElementCh[1],\n nextBtn = _header$lastElementCh[2];\n var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2),\n todayBtn = _footer$firstChild$ch[0],\n clearBtn = _footer$firstChild$ch[1];\n var controls = {\n title: title,\n prevBtn: prevBtn,\n viewSwitch: viewSwitch,\n nextBtn: nextBtn,\n todayBtn: todayBtn,\n clearBtn: clearBtn\n };\n this.main = main;\n this.controls = controls;\n var elementClass = datepicker.inline ? 'inline' : 'dropdown';\n element.classList.add(\"datepicker-\".concat(elementClass));\n elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null;\n processPickerOptions(this, datepicker.config);\n this.viewDate = computeResetViewDate(datepicker);\n\n // set up event listeners\n registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), {\n capture: true\n }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]);\n\n // set up views\n this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {\n id: 2,\n name: 'years',\n cellClass: 'year',\n step: 1\n }), new YearsView(this, {\n id: 3,\n name: 'decades',\n cellClass: 'decade',\n step: 10\n })];\n this.currentView = this.views[datepicker.config.startView];\n this.currentView.render();\n this.main.appendChild(this.currentView.element);\n datepicker.config.container.appendChild(this.element);\n }\n return _createClass(Picker, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n processPickerOptions(this, options);\n this.views.forEach(function (view) {\n view.init(options, false);\n });\n this.currentView.render();\n }\n }, {\n key: \"detach\",\n value: function detach() {\n this.datepicker.config.container.removeChild(this.element);\n }\n }, {\n key: \"show\",\n value: function show() {\n if (this.active) {\n return;\n }\n this.element.classList.add('active', 'block');\n this.element.classList.remove('hidden');\n this.active = true;\n var datepicker = this.datepicker;\n if (!datepicker.inline) {\n // ensure picker's direction matches input's\n var inputDirection = getTextDirection(datepicker.inputField);\n if (inputDirection !== getTextDirection(datepicker.config.container)) {\n this.element.dir = inputDirection;\n } else if (this.element.dir) {\n this.element.removeAttribute('dir');\n }\n this.place();\n if (datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.blur();\n }\n }\n triggerDatepickerEvent(datepicker, 'show');\n }\n }, {\n key: \"hide\",\n value: function hide() {\n if (!this.active) {\n return;\n }\n this.datepicker.exitEditMode();\n this.element.classList.remove('active', 'block');\n this.element.classList.add('active', 'block', 'hidden');\n this.active = false;\n triggerDatepickerEvent(this.datepicker, 'hide');\n }\n }, {\n key: \"place\",\n value: function place() {\n var _this$element = this.element,\n classList = _this$element.classList,\n style = _this$element.style;\n var _this$datepicker = this.datepicker,\n config = _this$datepicker.config,\n inputField = _this$datepicker.inputField;\n var container = config.container;\n var _this$element$getBoun = this.element.getBoundingClientRect(),\n calendarWidth = _this$element$getBoun.width,\n calendarHeight = _this$element$getBoun.height;\n var _container$getBoundin = container.getBoundingClientRect(),\n containerLeft = _container$getBoundin.left,\n containerTop = _container$getBoundin.top,\n containerWidth = _container$getBoundin.width;\n var _inputField$getBoundi = inputField.getBoundingClientRect(),\n inputLeft = _inputField$getBoundi.left,\n inputTop = _inputField$getBoundi.top,\n inputWidth = _inputField$getBoundi.width,\n inputHeight = _inputField$getBoundi.height;\n var _config$orientation = config.orientation,\n orientX = _config$orientation.x,\n orientY = _config$orientation.y;\n var scrollTop;\n var left;\n var top;\n if (container === document.body) {\n scrollTop = window.scrollY;\n left = inputLeft + window.scrollX;\n top = inputTop + scrollTop;\n } else {\n scrollTop = container.scrollTop;\n left = inputLeft - containerLeft;\n top = inputTop - containerTop + scrollTop;\n }\n if (orientX === 'auto') {\n if (left < 0) {\n // align to the left and move into visible area if input's left edge < window's\n orientX = 'left';\n left = 10;\n } else if (left + calendarWidth > containerWidth) {\n // align to the right if canlendar's right edge > container's\n orientX = 'right';\n } else {\n orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n }\n }\n if (orientX === 'right') {\n left -= calendarWidth - inputWidth;\n }\n if (orientY === 'auto') {\n orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n }\n if (orientY === 'top') {\n top -= calendarHeight;\n } else {\n top += inputHeight;\n }\n classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left');\n classList.add(\"datepicker-orient-\".concat(orientY), \"datepicker-orient-\".concat(orientX));\n style.top = top ? \"\".concat(top, \"px\") : top;\n style.left = left ? \"\".concat(left, \"px\") : left;\n }\n }, {\n key: \"setViewSwitchLabel\",\n value: function setViewSwitchLabel(labelText) {\n this.controls.viewSwitch.textContent = labelText;\n }\n }, {\n key: \"setPrevBtnDisabled\",\n value: function setPrevBtnDisabled(disabled) {\n this.controls.prevBtn.disabled = disabled;\n }\n }, {\n key: \"setNextBtnDisabled\",\n value: function setNextBtnDisabled(disabled) {\n this.controls.nextBtn.disabled = disabled;\n }\n }, {\n key: \"changeView\",\n value: function changeView(viewId) {\n var oldView = this.currentView;\n var newView = this.views[viewId];\n if (newView.id !== oldView.id) {\n this.currentView = newView;\n this._renderMethod = 'render';\n triggerDatepickerEvent(this.datepicker, 'changeView');\n this.main.replaceChild(newView.element, oldView.element);\n }\n return this;\n }\n\n // Change the focused date (view date)\n }, {\n key: \"changeFocus\",\n value: function changeFocus(newViewDate) {\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n this.views.forEach(function (view) {\n view.updateFocus();\n });\n return this;\n }\n\n // Apply the change of the selected dates\n }, {\n key: \"update\",\n value: function update() {\n var newViewDate = computeResetViewDate(this.datepicker);\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n this.views.forEach(function (view) {\n view.updateFocus();\n view.updateSelection();\n });\n return this;\n }\n\n // Refresh the picker UI\n }, {\n key: \"render\",\n value: function render() {\n var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var renderMethod = quickRender && this._renderMethod || 'render';\n delete this._renderMethod;\n this.currentView[renderMethod]();\n }\n }]);\n}();\n\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n// - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n// - args: time value; retun: true if unavailable\nfunction findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n if (!isInRange(date, min, max)) {\n return;\n }\n if (testFn(date)) {\n var newDate = addFn(date, increase);\n return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n }\n return date;\n}\n\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction moveByArrowKey(datepicker, ev, direction, vertical) {\n var picker = datepicker.picker;\n var currentView = picker.currentView;\n var step = currentView.step || 1;\n var viewDate = picker.viewDate;\n var addFn;\n var testFn;\n switch (currentView.id) {\n case 0:\n if (vertical) {\n viewDate = addDays(viewDate, direction * 7);\n } else if (ev.ctrlKey || ev.metaKey) {\n viewDate = addYears(viewDate, direction);\n } else {\n viewDate = addDays(viewDate, direction);\n }\n addFn = addDays;\n testFn = function testFn(date) {\n return currentView.disabled.includes(date);\n };\n break;\n case 1:\n viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n addFn = addMonths;\n testFn = function testFn(date) {\n var dt = new Date(date);\n var year = currentView.year,\n disabled = currentView.disabled;\n return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n };\n break;\n default:\n viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n addFn = addYears;\n testFn = function testFn(date) {\n return currentView.disabled.includes(startOfYearPeriod(date, step));\n };\n }\n viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate);\n if (viewDate !== undefined) {\n picker.changeFocus(viewDate).render();\n }\n}\nfunction onKeydown(datepicker, ev) {\n if (ev.key === 'Tab') {\n unfocus(datepicker);\n return;\n }\n var picker = datepicker.picker;\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n isMinView = _picker$currentView.isMinView;\n if (!picker.active) {\n switch (ev.key) {\n case 'ArrowDown':\n case 'Escape':\n picker.show();\n break;\n case 'Enter':\n datepicker.update();\n break;\n default:\n return;\n }\n } else if (datepicker.editMode) {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'Enter':\n datepicker.exitEditMode({\n update: true,\n autohide: datepicker.config.autohide\n });\n break;\n default:\n return;\n }\n } else {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'ArrowLeft':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, -1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, false);\n }\n break;\n case 'ArrowRight':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, 1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, 1, false);\n }\n break;\n case 'ArrowUp':\n if (ev.ctrlKey || ev.metaKey) {\n switchView(datepicker);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, true);\n }\n break;\n case 'ArrowDown':\n if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n return;\n }\n moveByArrowKey(datepicker, ev, 1, true);\n break;\n case 'Enter':\n if (isMinView) {\n datepicker.setDate(picker.viewDate);\n } else {\n picker.changeView(id - 1).render();\n }\n break;\n case 'Backspace':\n case 'Delete':\n datepicker.enterEditMode();\n return;\n default:\n if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n }\n return;\n }\n }\n ev.preventDefault();\n ev.stopPropagation();\n}\nfunction onFocus(datepicker) {\n if (datepicker.config.showOnFocus && !datepicker._showing) {\n datepicker.show();\n }\n}\n\n// for the prevention for entering edit mode while getting focus on click\nfunction onMousedown(datepicker, ev) {\n var el = ev.target;\n if (datepicker.picker.active || datepicker.config.showOnClick) {\n el._active = el === document.activeElement;\n el._clicking = setTimeout(function () {\n delete el._active;\n delete el._clicking;\n }, 2000);\n }\n}\nfunction onClickInput(datepicker, ev) {\n var el = ev.target;\n if (!el._clicking) {\n return;\n }\n clearTimeout(el._clicking);\n delete el._clicking;\n if (el._active) {\n datepicker.enterEditMode();\n }\n delete el._active;\n if (datepicker.config.showOnClick) {\n datepicker.show();\n }\n}\nfunction onPaste(datepicker, ev) {\n if (ev.clipboardData.types.includes('text/plain')) {\n datepicker.enterEditMode();\n }\n}\n\n// for the `document` to delegate the events from outside the picker/input field\nfunction onClickOutside(datepicker, ev) {\n var element = datepicker.element;\n if (element !== document.activeElement) {\n return;\n }\n var pickerElem = datepicker.picker.element;\n if (findElementInEventPath(ev, function (el) {\n return el === element || el === pickerElem;\n })) {\n return;\n }\n unfocus(datepicker);\n}\n\nfunction stringifyDates(dates, config) {\n return dates.map(function (dt) {\n return formatDate(dt, config.format, config.locale);\n }).join(config.dateDelimiter);\n}\n\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction processInputDates(datepicker, inputDates) {\n var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var config = datepicker.config,\n origDates = datepicker.dates,\n rangepicker = datepicker.rangepicker;\n if (inputDates.length === 0) {\n // empty input is considered valid unless origiDates is passed\n return clear ? [] : undefined;\n }\n var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n var newDates = inputDates.reduce(function (dates, dt) {\n var date = parseDate(dt, config.format, config.locale);\n if (date === undefined) {\n return dates;\n }\n if (config.pickLevel > 0) {\n // adjust to 1st of the month/Jan 1st of the year\n // or to the last day of the monh/Dec 31st of the year if the datepicker\n // is the range-end picker of a rangepicker\n var _dt = new Date(date);\n if (config.pickLevel === 1) {\n date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1);\n } else {\n date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1);\n }\n }\n if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) {\n dates.push(date);\n }\n return dates;\n }, []);\n if (newDates.length === 0) {\n return;\n }\n if (config.multidate && !clear) {\n // get the synmetric difference between origDates and newDates\n newDates = newDates.reduce(function (dates, date) {\n if (!origDates.includes(date)) {\n dates.push(date);\n }\n return dates;\n }, origDates.filter(function (date) {\n return !newDates.includes(date);\n }));\n }\n // do length check always because user can input multiple dates regardless of the mode\n return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates;\n}\n\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction refreshUI(datepicker) {\n var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var config = datepicker.config,\n picker = datepicker.picker,\n inputField = datepicker.inputField;\n if (mode & 2) {\n var newView = picker.active ? config.pickLevel : config.startView;\n picker.update().changeView(newView).render(quickRender);\n }\n if (mode & 1 && inputField) {\n inputField.value = stringifyDates(datepicker.dates, config);\n }\n}\nfunction _setDate(datepicker, inputDates, options) {\n var clear = options.clear,\n render = options.render,\n autohide = options.autohide;\n if (render === undefined) {\n render = true;\n }\n if (!render) {\n autohide = false;\n } else if (autohide === undefined) {\n autohide = datepicker.config.autohide;\n }\n var newDates = processInputDates(datepicker, inputDates, clear);\n if (!newDates) {\n return;\n }\n if (newDates.toString() !== datepicker.dates.toString()) {\n datepicker.dates = newDates;\n refreshUI(datepicker, render ? 3 : 1);\n triggerDatepickerEvent(datepicker, 'changeDate');\n } else {\n refreshUI(datepicker, 1);\n }\n if (autohide) {\n datepicker.hide();\n }\n}\n\n/**\n * Class representing a date picker\n */\nvar Datepicker = /*#__PURE__*/function () {\n /**\n * Create a date picker\n * @param {Element} element - element to bind a date picker\n * @param {Object} [options] - config options\n * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the\n * date picker belongs to. Use this only when creating date picker as a part\n * of date range picker\n */\n function Datepicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n _classCallCheck(this, Datepicker);\n element.datepicker = this;\n this.element = element;\n\n // set up config\n var config = this.config = Object.assign({\n buttonClass: options.buttonClass && String(options.buttonClass) || 'button',\n container: document.body,\n defaultViewDate: today(),\n maxDate: undefined,\n minDate: undefined\n }, processOptions(defaultOptions, this));\n this._options = options;\n Object.assign(config, processOptions(options, this));\n\n // configure by type\n var inline = this.inline = element.tagName !== 'INPUT';\n var inputField;\n var initialDates;\n if (inline) {\n config.container = element;\n initialDates = stringToArray(element.dataset.date, config.dateDelimiter);\n delete element.dataset.date;\n } else {\n var container = options.container ? document.querySelector(options.container) : null;\n if (container) {\n config.container = container;\n }\n inputField = this.inputField = element;\n inputField.classList.add('datepicker-input');\n initialDates = stringToArray(inputField.value, config.dateDelimiter);\n }\n if (rangepicker) {\n // check validiry\n var index = rangepicker.inputs.indexOf(inputField);\n var datepickers = rangepicker.datepickers;\n if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n throw Error('Invalid rangepicker object.');\n }\n // attach itaelf to the rangepicker here so that processInputDates() can\n // determine if this is the range-end picker of the rangepicker while\n // setting inital values when pickLevel > 0\n datepickers[index] = this;\n // add getter for rangepicker\n Object.defineProperty(this, 'rangepicker', {\n get: function get() {\n return rangepicker;\n }\n });\n }\n\n // set initial dates\n this.dates = [];\n // process initial value\n var inputDateValues = processInputDates(this, initialDates);\n if (inputDateValues && inputDateValues.length > 0) {\n this.dates = inputDateValues;\n }\n if (inputField) {\n inputField.value = stringifyDates(this.dates, config);\n }\n var picker = this.picker = new Picker(this);\n if (inline) {\n this.show();\n } else {\n // set up event listeners in other modes\n var onMousedownDocument = onClickOutside.bind(null, this);\n var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]];\n registerListeners(this, listeners);\n }\n }\n\n /**\n * Format Date object or time value in given format and language\n * @param {Date|Number} date - date or time value to format\n * @param {String|Object} format - format string or object that contains\n * toDisplay() custom formatter, whose signature is\n * - args:\n * - date: {Date} - Date instance of the date passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {String} formatted date\n * @param {String} [lang=en] - language code for the locale to use\n * @return {String} formatted date\n */\n return _createClass(Datepicker, [{\n key: \"active\",\n get:\n /**\n * @type {Boolean} - Whether the picker element is shown. `true` whne shown\n */\n function get() {\n return !!(this.picker && this.picker.active);\n }\n\n /**\n * @type {HTMLDivElement} - DOM object of picker element\n */\n }, {\n key: \"pickerElement\",\n get: function get() {\n return this.picker ? this.picker.element : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var picker = this.picker;\n var newOptions = processOptions(options, this);\n Object.assign(this._options, options);\n Object.assign(this.config, newOptions);\n picker.setOptions(newOptions);\n refreshUI(this, 3);\n }\n\n /**\n * Show the picker element\n */\n }, {\n key: \"show\",\n value: function show() {\n if (this.inputField) {\n if (this.inputField.disabled) {\n return;\n }\n if (this.inputField !== document.activeElement) {\n this._showing = true;\n this.inputField.focus();\n delete this._showing;\n }\n }\n this.picker.show();\n }\n\n /**\n * Hide the picker element\n * Not available on inline picker\n */\n }, {\n key: \"hide\",\n value: function hide() {\n if (this.inline) {\n return;\n }\n this.picker.hide();\n this.picker.update().changeView(this.config.startView).render();\n }\n\n /**\n * Destroy the Datepicker instance\n * @return {Detepicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hide();\n unregisterListeners(this);\n this.picker.detach();\n if (!this.inline) {\n this.inputField.classList.remove('datepicker-input');\n }\n delete this.element.datepicker;\n return this;\n }\n\n /**\n * Get the selected date(s)\n *\n * The method returns a Date object of selected date by default, and returns\n * an array of selected dates in multidate mode. If format string is passed,\n * it returns date string(s) formatted in given format.\n *\n * @param {String} [format] - Format string to stringify the date(s)\n * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\n * selected, empty array in multidate mode and untitled in sigledate mode\n */\n }, {\n key: \"getDate\",\n value: function getDate() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.config.locale);\n } : function (date) {\n return new Date(date);\n };\n if (this.config.multidate) {\n return this.dates.map(callback);\n }\n if (this.dates.length > 0) {\n return callback(this.dates[0]);\n }\n }\n\n /**\n * Set selected date(s)\n *\n * In multidate mode, you can pass multiple dates as a series of arguments\n * or an array. (Since each date is parsed individually, the type of the\n * dates doesn't have to be the same.)\n * The given dates are used to toggle the select status of each date. The\n * number of selected dates is kept from exceeding the length set to\n * maxNumberOfDates.\n *\n * With clear: true option, the method can be used to clear the selection\n * and to replace the selection instead of toggling in multidate mode.\n * If the option is passed with no date arguments or an empty dates array,\n * it works as \"clear\" (clear the selection then set nothing), and if the\n * option is passed with new dates to select, it works as \"replace\" (clear\n * the selection then set the given dates)\n *\n * When render: false option is used, the method omits re-rendering the\n * picker element. In this case, you need to call refresh() method later in\n * order for the picker element to reflect the changes. The input field is\n * refreshed always regardless of this option.\n *\n * When invalid (unparsable, repeated, disabled or out-of-range) dates are\n * passed, the method ignores them and applies only valid ones. In the case\n * that all the given dates are invalid, which is distinguished from passing\n * no dates, the method considers it as an error and leaves the selection\n * untouched.\n *\n * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\n * objects, time values or mix of those for new selection\n * @param {Object} [options] - function options\n * - clear: {boolean} - Whether to clear the existing selection\n * defualt: false\n * - render: {boolean} - Whether to re-render the picker element\n * default: true\n * - autohide: {boolean} - Whether to hide the picker element after re-render\n * Ignored when used with render: false\n * default: config.autohide\n */\n }, {\n key: \"setDate\",\n value: function setDate() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var dates = [].concat(args);\n var opts = {};\n var lastArg = lastItemOf(args);\n if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) {\n Object.assign(opts, dates.pop());\n }\n var inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Update the selected date(s) with input field's value\n * Not available on inline picker\n *\n * The input field will be refreshed with properly formatted date string.\n *\n * @param {Object} [options] - function options\n * - autohide: {boolean} - whether to hide the picker element after refresh\n * default: false\n */\n }, {\n key: \"update\",\n value: function update() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline) {\n return;\n }\n var opts = {\n clear: true,\n autohide: !!(options && options.autohide)\n };\n var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Refresh the picker element and the associated input field\n * @param {String} [target] - target item when refreshing one item only\n * 'picker' or 'input'\n * @param {Boolean} [forceRender] - whether to re-render the picker element\n * regardless of its state instead of optimized refresh\n */\n }, {\n key: \"refresh\",\n value: function refresh() {\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (target && typeof target !== 'string') {\n forceRender = target;\n target = undefined;\n }\n var mode;\n if (target === 'picker') {\n mode = 2;\n } else if (target === 'input') {\n mode = 1;\n } else {\n mode = 3;\n }\n refreshUI(this, mode, !forceRender);\n }\n\n /**\n * Enter edit mode\n * Not available on inline picker or when the picker element is hidden\n */\n }, {\n key: \"enterEditMode\",\n value: function enterEditMode() {\n if (this.inline || !this.picker.active || this.editMode) {\n return;\n }\n this.editMode = true;\n this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700');\n }\n\n /**\n * Exit from edit mode\n * Not available on inline picker\n * @param {Object} [options] - function options\n * - update: {boolean} - whether to call update() after exiting\n * If false, input field is revert to the existing selection\n * default: false\n */\n }, {\n key: \"exitEditMode\",\n value: function exitEditMode() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline || !this.editMode) {\n return;\n }\n var opts = Object.assign({\n update: false\n }, options);\n delete this.editMode;\n this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700');\n if (opts.update) {\n this.update(opts);\n }\n }\n }], [{\n key: \"formatDate\",\n value: function formatDate$1(date, format, lang) {\n return formatDate(date, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * Parse date string\n * @param {String|Date|Number} dateStr - date string, Date object or time\n * value to parse\n * @param {String|Object} format - format string or object that contains\n * toValue() custom parser, whose signature is\n * - args:\n * - dateStr: {String|Date|Number} - the dateStr passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {Date|Number} parsed date or its time value\n * @param {String} [lang=en] - language code for the locale to use\n * @return {Number} time value of parsed date\n */\n }, {\n key: \"parseDate\",\n value: function parseDate$1(dateStr, format, lang) {\n return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * @type {Object} - Installed locales in `[languageCode]: localeObject` format\n * en`:_English (US)_ is pre-installed.\n */\n }, {\n key: \"locales\",\n get: function get() {\n return locales;\n }\n }]);\n}();\n\n// filter out the config options inapproprite to pass to Datepicker\nfunction filterOptions(options) {\n var newOpts = Object.assign({}, options);\n delete newOpts.inputs;\n delete newOpts.allowOneSidedRange;\n delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n\n return newOpts;\n}\nfunction setupDatepicker(rangepicker, changeDateListener, el, options) {\n registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]);\n new Datepicker(el, options, rangepicker);\n}\nfunction onChangeDate(rangepicker, ev) {\n // to prevent both datepickers trigger the other side's update each other\n if (rangepicker._updating) {\n return;\n }\n rangepicker._updating = true;\n var target = ev.target;\n if (target.datepicker === undefined) {\n return;\n }\n var datepickers = rangepicker.datepickers;\n var setDateOptions = {\n render: false\n };\n var changedSide = rangepicker.inputs.indexOf(target);\n var otherSide = changedSide === 0 ? 1 : 0;\n var changedDate = datepickers[changedSide].dates[0];\n var otherDate = datepickers[otherSide].dates[0];\n if (changedDate !== undefined && otherDate !== undefined) {\n // if the start of the range > the end, swap them\n if (changedSide === 0 && changedDate > otherDate) {\n datepickers[0].setDate(otherDate, setDateOptions);\n datepickers[1].setDate(changedDate, setDateOptions);\n } else if (changedSide === 1 && changedDate < otherDate) {\n datepickers[0].setDate(changedDate, setDateOptions);\n datepickers[1].setDate(otherDate, setDateOptions);\n }\n } else if (!rangepicker.allowOneSidedRange) {\n // to prevent the range from becoming one-sided, copy changed side's\n // selection (no matter if it's empty) to the other side\n if (changedDate !== undefined || otherDate !== undefined) {\n setDateOptions.clear = true;\n datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n }\n }\n datepickers[0].picker.update().render();\n datepickers[1].picker.update().render();\n delete rangepicker._updating;\n}\n\n/**\n * Class representing a date range picker\n */\nvar DateRangePicker = /*#__PURE__*/function () {\n /**\n * Create a date range picker\n * @param {Element} element - element to bind a date range picker\n * @param {Object} [options] - config options\n */\n function DateRangePicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, DateRangePicker);\n var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input'));\n if (inputs.length < 2) {\n return;\n }\n element.rangepicker = this;\n this.element = element;\n this.inputs = inputs.slice(0, 2);\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var changeDateListener = onChangeDate.bind(null, this);\n var cleanOptions = filterOptions(options);\n // in order for initial date setup to work right when pcicLvel > 0,\n // let Datepicker constructor add the instance to the rangepicker\n var datepickers = [];\n Object.defineProperty(this, 'datepickers', {\n get: function get() {\n return datepickers;\n }\n });\n setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n Object.freeze(datepickers);\n // normalize the range if inital dates are given\n if (datepickers[0].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n } else if (datepickers[1].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n }\n }\n\n /**\n * @type {Array} - selected date of the linked date pickers\n */\n return _createClass(DateRangePicker, [{\n key: \"dates\",\n get: function get() {\n return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var cleanOptions = filterOptions(options);\n this.datepickers[0].setOptions(cleanOptions);\n this.datepickers[1].setOptions(cleanOptions);\n }\n\n /**\n * Destroy the DateRangePicker instance\n * @return {DateRangePicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.datepickers[0].destroy();\n this.datepickers[1].destroy();\n unregisterListeners(this);\n delete this.element.rangepicker;\n }\n\n /**\n * Get the start and end dates of the date range\n *\n * The method returns Date objects by default. If format string is passed,\n * it returns date strings formatted in given format.\n * The result array always contains 2 items (start date/end date) and\n * undefined is used for unselected side. (e.g. If none is selected,\n * the result will be [undefined, undefined]. If only the end date is set\n * when allowOneSidedRange config option is true, [undefined, endDate] will\n * be returned.)\n *\n * @param {String} [format] - Format string to stringify the dates\n * @return {Array} - Start and end dates\n */\n }, {\n key: \"getDates\",\n value: function getDates() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.datepickers[0].config.locale);\n } : function (date) {\n return new Date(date);\n };\n return this.dates.map(function (date) {\n return date === undefined ? date : callback(date);\n });\n }\n\n /**\n * Set the start and end dates of the date range\n *\n * The method calls datepicker.setDate() internally using each of the\n * arguments in start→end order.\n *\n * When a clear: true option object is passed instead of a date, the method\n * clears the date.\n *\n * If an invalid date, the same date as the current one or an option object\n * without clear: true is passed, the method considers that argument as an\n * \"ineffective\" argument because calling datepicker.setDate() with those\n * values makes no changes to the date selection.\n *\n * When the allowOneSidedRange config option is false, passing {clear: true}\n * to clear the range works only when it is done to the last effective\n * argument (in other words, passed to rangeEnd or to rangeStart along with\n * ineffective rangeEnd). This is because when the date range is changed,\n * it gets normalized based on the last change at the end of the changing\n * process.\n *\n * @param {Date|Number|String|Object} rangeStart - Start date of the range\n * or {clear: true} to clear the date\n * @param {Date|Number|String|Object} rangeEnd - End date of the range\n * or {clear: true} to clear the date\n */\n }, {\n key: \"setDates\",\n value: function setDates(rangeStart, rangeEnd) {\n var _this$datepickers = _slicedToArray(this.datepickers, 2),\n datepicker0 = _this$datepickers[0],\n datepicker1 = _this$datepickers[1];\n var origDates = this.dates;\n\n // If range normalization runs on every change, we can't set a new range\n // that starts after the end of the current range correctly because the\n // normalization process swaps start↔︎end right after setting the new start\n // date. To prevent this, the normalization process needs to run once after\n // both of the new dates are set.\n this._updating = true;\n datepicker0.setDate(rangeStart);\n datepicker1.setDate(rangeEnd);\n delete this._updating;\n if (datepicker1.dates[0] !== origDates[1]) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n } else if (datepicker0.dates[0] !== origDates[0]) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n }\n }\n }]);\n}();\n\nexports.DateRangePicker = DateRangePicker;\nexports.Datepicker = Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { AccordionInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Accordion implements AccordionInterface {\n _instanceId: string;\n _accordionEl: HTMLElement;\n _items: AccordionItem[];\n _options: AccordionOptions;\n _clickHandler: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n accordionEl: HTMLElement | null = null,\n items: AccordionItem[] = [],\n options: AccordionOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : accordionEl.id;\n this._accordionEl = accordionEl;\n this._items = items;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Accordion',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // show accordion item based on click\n this._items.forEach((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n const clickHandler = () => {\n this.toggle(item.id);\n };\n\n item.triggerEl.addEventListener('click', clickHandler);\n\n // Store the clickHandler in a property of the item for removal later\n item.clickHandler = clickHandler;\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._items.length && this._initialized) {\n this._items.forEach((item) => {\n item.triggerEl.removeEventListener('click', item.clickHandler);\n\n // Clean up by deleting the clickHandler property from the item\n delete item.clickHandler;\n });\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Accordion', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.add('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n\n updateOnOpen(callback: () => void) {\n this._options.onOpen = callback;\n }\n\n updateOnClose(callback: () => void) {\n this._options.onClose = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion($accordionEl as HTMLElement, items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CarouselInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Carousel implements CarouselInterface {\n _instanceId: string;\n _carouselEl: HTMLElement;\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n _initialized: boolean;\n\n constructor(\n carouselEl: HTMLElement | null = null,\n items: CarouselItem[] = [],\n options: CarouselOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : carouselEl.id;\n this._carouselEl = carouselEl;\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Carousel',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n /**\n * initialize carousel and items based on active one\n */\n init() {\n if (this._items.length && !this._initialized) {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this.getActiveItem()) {\n this.slideTo(this.getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Carousel', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this.getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this.getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // Handling the case when there is only one item\n if (this._items.length === 1) {\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n return;\n }\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-30');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-30'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-20');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n\n updateOnNext(callback: () => void) {\n this._options.onNext = callback;\n }\n\n updateOnPrev(callback: () => void) {\n this._options.onPrev = callback;\n }\n\n updateOnChange(callback: () => void) {\n this._options.onChange = callback;\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel($carouselEl as HTMLElement, items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CopyClipboardOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CopyClipboardInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CopyClipboardOptions = {\n htmlEntities: false,\n contentType: 'input',\n onCopy: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass CopyClipboard implements CopyClipboardInterface {\n _instanceId: string;\n _triggerEl: HTMLElement | null;\n _targetEl: HTMLInputElement | null;\n _options: CopyClipboardOptions;\n _initialized: boolean;\n _triggerElClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLInputElement | null = null,\n options: CopyClipboardOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'CopyClipboard',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && this._triggerEl && !this._initialized) {\n this._triggerElClickHandler = () => {\n this.copy();\n };\n\n // clicking on the trigger element should copy the value of the target element\n if (this._triggerEl) {\n this._triggerEl.addEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._targetEl && this._initialized) {\n if (this._triggerEl) {\n this._triggerEl.removeEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('CopyClipboard', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getTargetValue() {\n if (this._options.contentType === 'input') {\n return this._targetEl.value;\n }\n\n if (this._options.contentType === 'innerHTML') {\n return this._targetEl.innerHTML;\n }\n\n if (this._options.contentType === 'textContent') {\n return this._targetEl.textContent.replace(/\\s+/g, ' ').trim();\n }\n }\n\n copy() {\n let textToCopy = this.getTargetValue();\n\n // Check if HTMLEntities option is enabled\n if (this._options.htmlEntities) {\n // Encode the text using HTML entities\n textToCopy = this.decodeHTML(textToCopy);\n }\n\n // Create a temporary textarea element\n const tempTextArea = document.createElement('textarea');\n tempTextArea.value = textToCopy;\n document.body.appendChild(tempTextArea);\n\n // Select the text inside the textarea and copy it to the clipboard\n tempTextArea.select();\n document.execCommand('copy');\n\n // Remove the temporary textarea\n document.body.removeChild(tempTextArea);\n\n // Callback function\n this._options.onCopy(this);\n\n return textToCopy;\n }\n\n // Function to encode text into HTML entities\n decodeHTML(html: string) {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = html;\n return textarea.textContent;\n }\n\n updateOnCopyCallback(callback: () => void) {\n this._options.onCopy = callback;\n }\n}\n\nexport function initCopyClipboards() {\n document\n .querySelectorAll('[data-copy-to-clipboard-target]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-target'\n );\n const $targetEl = document.getElementById(targetId);\n const contentType = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-content-type'\n );\n const htmlEntities = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-html-entities'\n );\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'CopyClipboard',\n $targetEl.getAttribute('id')\n )\n ) {\n new CopyClipboard(\n $triggerEl as HTMLElement,\n $targetEl as HTMLInputElement,\n {\n htmlEntities:\n htmlEntities && htmlEntities === 'true'\n ? true\n : Default.htmlEntities,\n contentType: contentType\n ? contentType\n : Default.contentType,\n } as CopyClipboardOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-copy-to-clipboard-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.CopyClipboard = CopyClipboard;\n window.initClipboards = initCopyClipboards;\n}\n\nexport default CopyClipboard;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CollapseInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Collapse implements CollapseInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Collapse',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Collapse', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n\n updateOnCollapse(callback: () => void) {\n this._options.onCollapse = callback;\n }\n\n updateOnExpand(callback: () => void) {\n this._options.onExpand = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'Collapse',\n $targetEl.getAttribute('id')\n )\n ) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n // if instance exists already for the same target element then create a new one with a different trigger element\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement,\n {},\n {\n id:\n $targetEl.getAttribute('id') +\n '_' +\n instances._generateRandomId(),\n }\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DatepickerOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DatepickerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nimport {\n Datepicker as FlowbiteDatepicker,\n DateRangePicker as FlowbiteDateRangePicker,\n} from 'flowbite-datepicker';\n\nconst Default: DatepickerOptions = {\n defaultDatepickerId: null,\n autohide: false,\n format: 'mm/dd/yyyy',\n maxDate: null,\n minDate: null,\n orientation: 'bottom',\n buttons: false,\n autoSelectToday: 0,\n title: null,\n language: 'en',\n rangePicker: false,\n onShow: () => {},\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Datepicker implements DatepickerInterface {\n _instanceId: string;\n _datepickerEl: HTMLElement;\n _datepickerInstance: FlowbiteDatepicker | FlowbiteDateRangePicker | null;\n _options: DatepickerOptions;\n _initialized: boolean;\n\n constructor(\n datepickerEl: HTMLElement | null = null,\n options: DatepickerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : datepickerEl.id;\n this._datepickerEl = datepickerEl;\n this._datepickerInstance = null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Datepicker',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._datepickerEl && !this._initialized) {\n if (this._options.rangePicker) {\n this._datepickerInstance = new FlowbiteDateRangePicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n } else {\n this._datepickerInstance = new FlowbiteDatepicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n this._datepickerInstance.destroy();\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Datepicker', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getDatepickerInstance() {\n return this._datepickerInstance;\n }\n\n getDate() {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.getDates();\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.getDate();\n }\n }\n\n setDate(date: any) {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.setDates(date);\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.setDate(date);\n }\n }\n\n show() {\n this._datepickerInstance.show();\n this._options.onShow(this);\n }\n\n hide() {\n this._datepickerInstance.hide();\n this._options.onHide(this);\n }\n\n _getDatepickerOptions(options: DatepickerOptions) {\n const datepickerOptions = {} as any;\n\n if (options.buttons) {\n datepickerOptions.todayBtn = true;\n datepickerOptions.clearBtn = true;\n\n if (options.autoSelectToday) {\n datepickerOptions.todayBtnMode = 1;\n }\n }\n\n if (options.autohide) {\n datepickerOptions.autohide = true;\n }\n\n if (options.format) {\n datepickerOptions.format = options.format;\n }\n\n if (options.maxDate) {\n datepickerOptions.maxDate = options.maxDate;\n }\n\n if (options.minDate) {\n datepickerOptions.minDate = options.minDate;\n }\n\n if (options.orientation) {\n datepickerOptions.orientation = options.orientation;\n }\n\n if (options.title) {\n datepickerOptions.title = options.title;\n }\n\n if (options.language) {\n datepickerOptions.language = options.language;\n }\n\n return datepickerOptions;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDatepickers() {\n document\n .querySelectorAll(\n '[datepicker], [inline-datepicker], [date-rangepicker]'\n )\n .forEach(($datepickerEl) => {\n if ($datepickerEl) {\n const buttons =\n $datepickerEl.hasAttribute('datepicker-buttons');\n const autoselectToday = $datepickerEl.hasAttribute(\n 'datepicker-autoselect-today'\n );\n const autohide = $datepickerEl.hasAttribute(\n 'datepicker-autohide'\n );\n const format = $datepickerEl.getAttribute('datepicker-format');\n const maxDate = $datepickerEl.getAttribute(\n 'datepicker-max-date'\n );\n const minDate = $datepickerEl.getAttribute(\n 'datepicker-min-date'\n );\n const orientation = $datepickerEl.getAttribute(\n 'datepicker-orientation'\n );\n const title = $datepickerEl.getAttribute('datepicker-title');\n const language = $datepickerEl.getAttribute(\n 'datepicker-language'\n );\n const rangePicker =\n $datepickerEl.hasAttribute('date-rangepicker');\n new Datepicker(\n $datepickerEl as HTMLElement,\n {\n buttons: buttons ? buttons : Default.buttons,\n autoSelectToday: autoselectToday\n ? autoselectToday\n : Default.autoSelectToday,\n autohide: autohide ? autohide : Default.autohide,\n format: format ? format : Default.format,\n maxDate: maxDate ? maxDate : Default.maxDate,\n minDate: minDate ? minDate : Default.minDate,\n orientation: orientation\n ? orientation\n : Default.orientation,\n title: title ? title : Default.title,\n language: language ? language : Default.language,\n rangePicker: rangePicker\n ? rangePicker\n : Default.rangePicker,\n } as DatepickerOptions\n );\n } else {\n console.error(\n `The datepicker element does not exist. Please check the datepicker attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Datepicker = Datepicker;\n window.initDatepickers = initDatepickers;\n}\n\nexport default Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DialInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dial implements DialInterface {\n _instanceId: string;\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n _initialized: boolean;\n _showEventHandler: EventListenerOrEventListenerObject;\n _hideEventHandler: EventListenerOrEventListenerObject;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dial',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n this._showEventHandler = () => {\n this.show();\n };\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, this._showEventHandler);\n this._targetEl.addEventListener(ev, this._showEventHandler);\n });\n\n this._hideEventHandler = () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n };\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, this._hideEventHandler);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.removeEventListener(ev, this._showEventHandler);\n this._targetEl.removeEventListener(ev, this._showEventHandler);\n });\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.removeEventListener(ev, this._hideEventHandler);\n });\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dial', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DismissInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dismiss implements DismissInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dismiss',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._clickHandler = () => {\n this.hide();\n };\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dismiss', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerOptions, PlacementClasses } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { DrawerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Drawer implements DrawerInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n _eventListenerInstances: EventListenerInstance[] = [];\n _handleEscapeKey: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Drawer',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n // set initial accessibility attributes\n if (this._targetEl && !this._initialized) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n this._handleEscapeKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n };\n\n // add keyboard event listener to document\n document.addEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n\n // Remove the keyboard event listener\n document.removeEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Drawer', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (\n this._visible &&\n document.querySelector('[drawer-backdrop]') !== null\n ) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDrawers() {\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge ? (edge === 'true' ? true : false) : Default.edge,\n edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset,\n } as DrawerOptions);\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const toggleDrawer = () => {\n drawer.toggle();\n };\n $triggerEl.addEventListener('click', toggleDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const hideDrawer = () => {\n drawer.hide();\n };\n $triggerEl.addEventListener('click', hideDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const showDrawer = () => {\n drawer.show();\n };\n $triggerEl.addEventListener('click', showDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DropdownInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dropdown implements DropdownInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _initialized: boolean;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _hoverShowTriggerElHandler: EventListenerOrEventListenerObject;\n _hoverShowTargetElHandler: EventListenerOrEventListenerObject;\n _hoverHideHandler: EventListenerOrEventListenerObject;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetElement.id;\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dropdown',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._popperInstance = this._createPopperInstance();\n this._setupEventListeners();\n this._initialized = true;\n }\n }\n\n destroy() {\n const triggerEvents = this._getTriggerEvents();\n\n // Remove click event listeners for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._clickHandler);\n });\n }\n\n // Remove hover event listeners for trigger and target elements\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.removeEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hoverHideHandler);\n this._targetEl.removeEventListener(ev, this._hoverHideHandler);\n });\n }\n\n this._popperInstance.destroy();\n this._initialized = false;\n }\n\n removeInstance() {\n instances.removeInstance('Dropdown', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._clickHandler);\n });\n }\n\n this._hoverShowTriggerElHandler = (ev) => {\n if (ev.type === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n };\n this._hoverShowTargetElHandler = () => {\n this.show();\n };\n\n this._hoverHideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n };\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.addEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hoverHideHandler);\n this._targetEl.addEventListener(ev, this._hoverHideHandler);\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n this._targetEl.removeAttribute('aria-hidden');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n this._targetEl.setAttribute('aria-hidden', 'true');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCopyClipboards } from './clipboard';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initInputCounters } from './input-counter';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\nimport { initDatepickers } from './datepicker';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n initInputCounters();\n initCopyClipboards();\n initDatepickers();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { InputCounterOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { InputCounterInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: InputCounterOptions = {\n minValue: null,\n maxValue: null,\n onIncrement: () => {},\n onDecrement: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass InputCounter implements InputCounterInterface {\n _instanceId: string;\n _targetEl: HTMLInputElement | null;\n _incrementEl: HTMLElement | null;\n _decrementEl: HTMLElement | null;\n _options: InputCounterOptions;\n _initialized: boolean;\n _incrementClickHandler: EventListenerOrEventListenerObject;\n _decrementClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLInputElement | null = null,\n incrementEl: HTMLElement | null = null,\n decrementEl: HTMLElement | null = null,\n options: InputCounterOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._targetEl = targetEl;\n this._incrementEl = incrementEl;\n this._decrementEl = decrementEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'InputCounter',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._inputHandler = (event) => {\n {\n const target = event.target as HTMLInputElement;\n\n // check if the value is numeric\n if (!/^\\d*$/.test(target.value)) {\n // Regex to check if the value is numeric\n target.value = target.value.replace(/[^\\d]/g, ''); // Remove non-numeric characters\n }\n\n // check for max value\n if (\n this._options.maxValue !== null &&\n parseInt(target.value) > this._options.maxValue\n ) {\n target.value = this._options.maxValue.toString();\n }\n\n // check for min value\n if (\n this._options.minValue !== null &&\n parseInt(target.value) < this._options.minValue\n ) {\n target.value = this._options.minValue.toString();\n }\n }\n };\n\n this._incrementClickHandler = () => {\n this.increment();\n };\n\n this._decrementClickHandler = () => {\n this.decrement();\n };\n\n // Add event listener to restrict input to numeric values only\n this._targetEl.addEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.addEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n\n if (this._decrementEl) {\n this._decrementEl.addEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._targetEl && this._initialized) {\n this._targetEl.removeEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.removeEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n if (this._decrementEl) {\n this._decrementEl.removeEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('InputCounter', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getCurrentValue() {\n return parseInt(this._targetEl.value) || 0;\n }\n\n increment() {\n // don't increment if the value is already at the maximum value\n if (\n this._options.maxValue !== null &&\n this.getCurrentValue() >= this._options.maxValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() + 1).toString();\n this._options.onIncrement(this);\n }\n\n decrement() {\n // don't decrement if the value is already at the minimum value\n if (\n this._options.minValue !== null &&\n this.getCurrentValue() <= this._options.minValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() - 1).toString();\n this._options.onDecrement(this);\n }\n\n updateOnIncrement(callback: () => void) {\n this._options.onIncrement = callback;\n }\n\n updateOnDecrement(callback: () => void) {\n this._options.onDecrement = callback;\n }\n}\n\nexport function initInputCounters() {\n document.querySelectorAll('[data-input-counter]').forEach(($targetEl) => {\n const targetId = $targetEl.id;\n\n const $incrementEl = document.querySelector(\n '[data-input-counter-increment=\"' + targetId + '\"]'\n );\n\n const $decrementEl = document.querySelector(\n '[data-input-counter-decrement=\"' + targetId + '\"]'\n );\n\n const minValue = $targetEl.getAttribute('data-input-counter-min');\n const maxValue = $targetEl.getAttribute('data-input-counter-max');\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'InputCounter',\n $targetEl.getAttribute('id')\n )\n ) {\n new InputCounter(\n $targetEl as HTMLInputElement,\n $incrementEl ? ($incrementEl as HTMLElement) : null,\n $decrementEl ? ($decrementEl as HTMLElement) : null,\n {\n minValue: minValue ? parseInt(minValue) : null,\n maxValue: maxValue ? parseInt(maxValue) : null,\n } as InputCounterOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-input-counter attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.InputCounter = InputCounter;\n window.initInputCounters = initInputCounters;\n}\n\nexport default InputCounter;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalOptions } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { ModalInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Modal implements ModalInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _eventListenerInstances: EventListenerInstance[] = [];\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Modal',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Modal', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden && this._backdropEl) {\n this._backdropEl.remove();\n this._backdropEl = null;\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initModals() {\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n );\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // toggle modal visibility\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const toggleModal = () => {\n modal.toggle();\n };\n $triggerEl.addEventListener('click', toggleModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const showModal = () => {\n modal.show();\n };\n $triggerEl.addEventListener('click', showModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const hideModal = () => {\n modal.hide();\n };\n $triggerEl.addEventListener('click', hideModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { PopoverInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Popover implements PopoverInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Popover',\n this,\n instanceOptions.id ? instanceOptions.id : this._targetEl.id,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element and target element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n this._targetEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n this._targetEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Popover', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n this._targetEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n this._targetEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TabsInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tabs implements TabsInterface {\n _instanceId: string;\n _tabsEl: HTMLElement;\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n _initialized: boolean;\n\n constructor(\n tabsEl: HTMLElement | null = null,\n items: TabItem[] = [],\n options: TabsOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id;\n this._tabsEl = tabsEl;\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tabs',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this.setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', (event) => {\n event.preventDefault();\n this.show(tab.id);\n });\n });\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Tabs', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this.setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($parentEl) => {\n const tabItems: TabItem[] = [];\n const activeClasses = $parentEl.getAttribute(\n 'data-tabs-active-classes'\n );\n const inactiveClasses = $parentEl.getAttribute(\n 'data-tabs-inactive-classes'\n );\n let defaultTabId = null;\n $parentEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n\n new Tabs($parentEl as HTMLElement, tabItems, {\n defaultTabId: defaultTabId,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TooltipInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tooltip implements TooltipInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tooltip',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Tooltip', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n this.hide();\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","import { AccordionInterface } from '../components/accordion/interface';\nimport { CarouselInterface } from '../components/carousel/interface';\nimport { CollapseInterface } from '../components/collapse/interface';\nimport { DialInterface } from '../components/dial/interface';\nimport { DismissInterface } from '../components/dismiss/interface';\nimport { DrawerInterface } from '../components/drawer/interface';\nimport { DropdownInterface } from '../components/dropdown/interface';\nimport { ModalInterface } from '../components/modal/interface';\nimport { PopoverInterface } from '../components/popover/interface';\nimport { TabsInterface } from '../components/tabs/interface';\nimport { TooltipInterface } from '../components/tooltip/interface';\nimport { InputCounterInterface } from '../components/input-counter/interface';\nimport { CopyClipboardInterface } from '../components/clipboard/interface';\nimport { DatepickerInterface } from '../components/datepicker/interface';\n\nclass Instances {\n private _instances: {\n Accordion: { [id: string]: AccordionInterface };\n Carousel: { [id: string]: CarouselInterface };\n Collapse: { [id: string]: CollapseInterface };\n Dial: { [id: string]: DialInterface };\n Dismiss: { [id: string]: DismissInterface };\n Drawer: { [id: string]: DrawerInterface };\n Dropdown: { [id: string]: DropdownInterface };\n Modal: { [id: string]: ModalInterface };\n Popover: { [id: string]: PopoverInterface };\n Tabs: { [id: string]: TabsInterface };\n Tooltip: { [id: string]: TooltipInterface };\n InputCounter: { [id: string]: InputCounterInterface };\n CopyClipboard: { [id: string]: CopyClipboardInterface };\n Datepicker: { [id: string]: DatepickerInterface };\n };\n\n constructor() {\n this._instances = {\n Accordion: {},\n Carousel: {},\n Collapse: {},\n Dial: {},\n Dismiss: {},\n Drawer: {},\n Dropdown: {},\n Modal: {},\n Popover: {},\n Tabs: {},\n Tooltip: {},\n InputCounter: {},\n CopyClipboard: {},\n Datepicker: {},\n };\n }\n\n addInstance(\n component: keyof Instances['_instances'],\n instance: any,\n id?: string,\n override = false\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (this._instances[component][id] && !override) {\n console.warn(`Flowbite: Instance with ID ${id} already exists.`);\n return;\n }\n\n if (override && this._instances[component][id]) {\n this._instances[component][id].destroyAndRemoveInstance();\n }\n\n this._instances[component][id ? id : this._generateRandomId()] =\n instance;\n }\n\n getAllInstances() {\n return this._instances;\n }\n\n getInstances(component: keyof Instances['_instances']) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n return this._instances[component];\n }\n\n getInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return;\n }\n return this._instances[component][id] as any;\n }\n\n destroyAndRemoveInstance(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this.destroyInstanceObject(component, id);\n this.removeInstance(component, id);\n }\n\n removeInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n delete this._instances[component][id];\n }\n\n destroyInstanceObject(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this._instances[component][id].destroy();\n }\n\n instanceExists(component: keyof Instances['_instances'], id: string) {\n if (!this._instances[component]) {\n return false;\n }\n\n if (!this._instances[component][id]) {\n return false;\n }\n\n return true;\n }\n\n _generateRandomId() {\n return Math.random().toString(36).substr(2, 9);\n }\n\n private _componentAndInstanceCheck(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return false;\n }\n\n return true;\n }\n}\n\nconst instances = new Instances();\n\nexport default instances;\n\nif (typeof window !== 'undefined') {\n window.FlowbiteInstances = instances;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import './flowbite.css';\n\n// core components\nimport Accordion, { initAccordions } from './components/accordion';\nimport Carousel, { initCarousels } from './components/carousel';\nimport Collapse, { initCollapses } from './components/collapse';\nimport Dial, { initDials } from './components/dial';\nimport Dismiss, { initDismisses } from './components/dismiss';\nimport Drawer, { initDrawers } from './components/drawer';\nimport Dropdown, { initDropdowns } from './components/dropdown';\nimport Modal, { initModals } from './components/modal';\nimport Popover, { initPopovers } from './components/popover';\nimport Tabs, { initTabs } from './components/tabs';\nimport Tooltip, { initTooltips } from './components/tooltip';\nimport InputCounter, { initInputCounters } from './components/input-counter';\nimport CopyClipboard, { initCopyClipboards } from './components/clipboard';\nimport Datepicker, { initDatepickers } from './components/datepicker';\nimport './components/index';\nimport Events from './dom/events';\n\nconst events = new Events('load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n initCopyClipboards,\n initInputCounters,\n initDatepickers,\n]);\nevents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n InputCounter,\n CopyClipboard,\n Datepicker,\n Events,\n};\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.min.css b/node_modules/flowbite/dist/flowbite.min.css new file mode 100644 index 0000000..d3164fd --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.min.css @@ -0,0 +1 @@ +/*! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}.tooltip-arrow,.tooltip-arrow:before{background:inherit;height:8px;position:absolute;width:8px}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";transform:rotate(45deg);visibility:visible}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-color:#e5e7eb;border-style:solid}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-left-width:1px;border-top-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-right-width:1px;border-top-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{background:inherit;height:8px;position:absolute;width:8px}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:after,[data-popper-arrow]:before{content:"";transform:rotate(45deg);visibility:visible}[data-popper-arrow]:after{background:inherit;height:9px;position:absolute;width:9px}[role=tooltip]>[data-popper-arrow]:before{border-color:#e5e7eb;border-style:solid}.dark [role=tooltip]>[data-popper-arrow]:before{border-color:#4b5563;border-style:solid}[role=tooltip]>[data-popper-arrow]:after{border-color:#e5e7eb;border-style:solid}.dark [role=tooltip]>[data-popper-arrow]:after{border-color:#4b5563;border-style:solid}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after,[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after,[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after,[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-left-width:1px;border-top-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after,[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-right-width:1px;border-top-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:after,[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#1c64f2;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#1c64f2;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}input[type=time]::-webkit-calendar-picker-indicator{background:none}select:not([size]){background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3E%3C/svg%3E");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}:is([dir=rtl]) select:not([size]){background-position:left .75rem center;padding-left:0;padding-right:.75rem}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#1c64f2;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#1c64f2;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}.dark [type=checkbox]:checked,.dark [type=radio]:checked,[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:.55em .55em;border-color:transparent}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}.dark [type=radio]:checked,[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E");background-size:1em 1em}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M.5 6h14'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:.55em .55em;border-color:transparent;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{-webkit-margin-start:-1rem;-webkit-margin-end:1rem;background:#1f2937;border:0;color:#fff;cursor:pointer;font-size:.875rem;font-weight:500;margin-inline-end:1rem;margin-inline-start:-1rem;padding:.625rem 1rem .625rem 2rem}input[type=file]::file-selector-button:hover{background:#374151}:is([dir=rtl]) input[type=file]::file-selector-button{padding-left:1rem;padding-right:2rem}.dark input[type=file]::file-selector-button{background:#4b5563;color:#fff}.dark input[type=file]::file-selector-button:hover{background:#6b7280}input[type=range]::-webkit-slider-thumb{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:#1c64f2;border:0;border-radius:9999px;cursor:pointer;height:1.25rem;width:1.25rem}input[type=range]:disabled::-webkit-slider-thumb{background:#9ca3af}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6b7280}input[type=range]:focus::-webkit-slider-thumb{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1px;--tw-ring-color:rgb(164 202 254/var(--tw-ring-opacity));box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);outline:2px solid transparent;outline-offset:2px}input[type=range]::-moz-range-thumb{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:#1c64f2;border:0;border-radius:9999px;cursor:pointer;height:1.25rem;width:1.25rem}input[type=range]:disabled::-moz-range-thumb{background:#9ca3af}.dark input[type=range]:disabled::-moz-range-thumb{background:#6b7280}input[type=range]::-moz-range-progress{background:#3f83f8}input[type=range]::-ms-fill-lower{background:#3f83f8}input[type=range].range-sm::-webkit-slider-thumb{height:1rem;width:1rem}input[type=range].range-lg::-webkit-slider-thumb{height:1.5rem;width:1.5rem}input[type=range].range-sm::-moz-range-thumb{height:1rem;width:1rem}input[type=range].range-lg::-moz-range-thumb{height:1.5rem;width:1.5rem}.toggle-bg:after{background:#fff;border-color:#d1d5db;border-radius:9999px;border-width:1px;box-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);content:"";height:1.25rem;left:.125rem;position:absolute;top:.125rem;transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;width:1.25rem}input:checked+.toggle-bg:after{border-color:#fff;transform:translateX(100%);}input:checked+.toggle-bg{background:#1c64f2;border-color:#1c64f2}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(63,131,248,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(63,131,248,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.selectedCell{background-color:#f9fafb}.dark .selectedCell{background-color:#374151}.datatable-wrapper{width:100%}.datatable-wrapper .datatable-top{align-items:start;display:flex;flex-direction:column-reverse;gap:1rem;justify-content:space-between;margin-bottom:1rem}.datatable-wrapper .datatable-input,.datatable-wrapper .datatable-search .datatable-input{background-color:#f9fafb;border:1px solid #d1d5db;border-radius:.5rem;color:#111827;font-size:.875rem;min-width:16rem}.dark .datatable-wrapper .datatable-input,.dark .datatable-wrapper .datatable-search .datatable-input{background-color:#1f2937;border:1px solid #374151;color:#fff}.datatable-wrapper thead th .datatable-input{background-color:#fff;color:#111827;font-weight:400;min-width:0;padding-bottom:.35rem;padding-top:.35rem}.dark .datatable-wrapper thead th .datatable-input{background-color:#374151;border-color:#4b5563;color:#fff}.datatable-wrapper .datatable-top .datatable-dropdown{color:#6b7280;font-size:.875rem}.dark .datatable-wrapper .datatable-top .datatable-dropdown{color:#9ca3af}.datatable-wrapper .datatable-top .datatable-dropdown .datatable-selector{background-color:#f9fafb;border:1px solid #d1d5db;border-radius:.5rem;color:#111827;font-size:.875rem;margin-right:.25rem;min-width:4rem}.dark .datatable-wrapper .datatable-top .datatable-dropdown .datatable-selector{background-color:#1f2937;border:1px solid #374151;color:#fff}.datatable-wrapper .datatable-container thead tr.search-filtering-row th{padding-top:0}.datatable-wrapper .datatable-search .datatable-input:focus{border-color:#1c64f2}.datatable-wrapper .datatable-container{overflow-x:auto}.datatable-wrapper .datatable-table{color:#6b7280;font-size:.875rem;text-align:left;width:100%}.dark .datatable-wrapper .datatable-table{color:#9ca3af}.datatable-wrapper .datatable-table thead{background-color:#f9fafb;color:#6b7280;font-size:.75rem}.dark .datatable-wrapper .datatable-table thead{background-color:#1f2937;color:#9ca3af}.datatable-wrapper .datatable-table thead th{white-space:nowrap}.datatable-wrapper .datatable-table tbody td,.datatable-wrapper .datatable-table tbody th,.datatable-wrapper .datatable-table thead th{padding:.75rem 1.5rem;width:auto!important}.datatable-wrapper .datatable-table thead th,.datatable-wrapper .datatable-table thead th .datatable-sorter{text-transform:uppercase}.datatable-wrapper .datatable-table thead th .datatable-sorter:hover,.datatable-wrapper .datatable-table thead th.datatable-ascending .datatable-sorter,.datatable-wrapper .datatable-table thead th.datatable-descending .datatable-sorter{color:#111827}.dark .datatable-wrapper .datatable-table thead th .datatable-sorter:hover,.dark .datatable-wrapper .datatable-table thead th.datatable-ascending .datatable-sorter,.dark .datatable-wrapper .datatable-table thead th.datatable-descending .datatable-sorter{color:#fff}.datatable-wrapper .datatable-table tbody tr.selected{background-color:#f3f4f6}.dark .datatable-wrapper .datatable-table tbody tr.selected{background-color:#374151}.datatable-wrapper .datatable-table tbody tr{border-bottom:1px solid #e5e7eb}.dark .datatable-wrapper .datatable-table tbody tr{border-bottom:1px solid #374151}.datatable-wrapper .datatable-table .datatable-empty{text-align:center}.datatable-wrapper .datatable-bottom{align-items:start;display:flex;flex-direction:column;gap:1rem;justify-content:space-between;margin-top:1rem}.datatable-wrapper .datatable-bottom .datatable-info{color:#6b7280;font-size:.875rem}.dark .datatable-wrapper .datatable-bottom .datatable-info{color:#9ca3af}.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list{align-items:center;display:flex;font-size:.875rem;height:2rem}.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link{align-items:center;border-bottom:1px solid #d1d5db;border-right:1px solid #d1d5db;border-top:1px solid #d1d5db;color:#6b7280;display:flex;font-size:.875rem;font-weight:500;height:2rem;padding-left:.75rem;padding-right:.75rem}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link{border-color:#374151;color:#9ca3af}.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type,.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type{position:relative}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link,.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link,.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link,.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link{color:transparent}.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:after{content:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3E%3C/svg%3E");height:1.3rem;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:1.3rem}.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:hover:after{content:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23111827' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3E%3C/svg%3E")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:after{content:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%239CA3AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3E%3C/svg%3E")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:hover:after{content:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3E%3C/svg%3E")}.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:after{content:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3E%3C/svg%3E");height:1.3rem;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:1.3rem}.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:hover:after{content:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23111827' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3E%3C/svg%3E")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:after{content:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%239CA3AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3E%3C/svg%3E")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:hover:after{content:url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3E%3C/svg%3E")}.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link{border-bottom-left-radius:.5rem;border-left:1px solid #d1d5db;border-top-left-radius:.5rem}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link{border-left:1px solid #374151}.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link{border-bottom-right-radius:.5rem;border-left:0;border-top-right-radius:.5rem}.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link:hover{background-color:#f9fafb;color:#374151}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link:hover{background-color:#374151;color:#fff}@media (min-width:640px){.datatable-wrapper .datatable-top{align-items:center;flex-direction:row-reverse}.datatable-wrapper .datatable-bottom{align-items:center;flex-direction:row}}.apexcharts-canvas .apexcharts-tooltip{background-color:#fff;border:0!important;border-radius:.25rem;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);color:#6b7280}.dark .apexcharts-canvas .apexcharts-tooltip{background-color:#374151;border-color:transparent;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);color:#9ca3af}.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title{background-color:#f3f4f6;border-bottom-color:#e5e7eb;color:#6b7280;font-size:.875rem!important;font-weight:400;margin-bottom:.75rem;padding:.5rem .75rem}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title{background-color:#4b5563;border-color:#6b7280;color:#9ca3af}.apexcharts-canvas .apexcharts-xaxistooltip{background-color:#fff;border-color:transparent;border-radius:.25rem;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);color:#6b7280;padding:.5rem .75rem}.dark .apexcharts-canvas .apexcharts-xaxistooltip{background-color:#374151;color:#9ca3af}.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label{color:#6b7280;font-size:.875rem}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label{color:#9ca3af}.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value{color:#111827;font-size:.875rem}:is([dir=rtl]) .apexcharts-tooltip .apexcharts-tooltip-marker{margin-left:e;margin-right:0}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value{color:#fff}.apexcharts-canvas .apexcharts-xaxistooltip-text{font-size:.875rem!important;font-weight:400}.apexcharts-canvas .apexcharts-xaxistooltip:after,.apexcharts-canvas .apexcharts-xaxistooltip:before{border-bottom-color:#fff}.apexcharts-canvas .apexcharts-xaxistooltip:after{border-width:8px;margin-left:-8px}.apexcharts-canvas .apexcharts-xaxistooltip:before{border-width:10px;margin-left:-10px}.dark .apexcharts-canvas .apexcharts-xaxistooltip:after,.dark .apexcharts-canvas .apexcharts-xaxistooltip:before{border-bottom-color:#374151}.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-y-group{padding:0}.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active{background-color:#fff!important;color:#6b7280!important;padding-bottom:.75rem;padding-left:.75rem;padding-right:.75rem}.dark .apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active{background-color:#374151!important;color:#9ca3af!important}.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active:first-of-type{padding-top:.75rem}.apexcharts-canvas .apexcharts-legend{padding:0!important}.apexcharts-canvas .apexcharts-legend-text{color:#6b7280!important;font-size:.75rem;font-weight:500!important;padding-left:1.25rem}:is([dir=rtl]) .apexcharts-canvas .apexcharts-legend-text{padding-right:.5rem}.apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover{color:#111827!important}.dark .apexcharts-canvas .apexcharts-legend-text{color:#9ca3af!important}.dark .apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover{color:#fff!important}.apexcharts-canvas .apexcharts-legend-series{align-items:center;display:flex;margin-bottom:.25rem!important;margin-left:.5rem;margin-right:.5rem}.apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value{fill:#111827!important;font-size:1.875rem;font-weight:700}.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value{fill:#fff!important}.apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label{fill:#6b7280!important;font-size:1rem;font-weight:400}.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label{fill:#9ca3af!important}.apexcharts-canvas .apexcharts-datalabels .apexcharts-text.apexcharts-pie-label{filter:none!important;font-size:.75rem!important;font-weight:600!important;text-shadow:none!important}.apexcharts-gridline,.apexcharts-xcrosshairs,.apexcharts-ycrosshairs{stroke:#e5e7eb!important}.dark .apexcharts-gridline,.dark .apexcharts-xcrosshairs,.dark .apexcharts-ycrosshairs{stroke:#374151!important}.format{color:var(--tw-format-body);max-width:65ch}.format :where([class~=lead]):not(:where([class~=not-format] *)){color:var(--tw-format-lead);font-size:1.25em;line-height:1.6;margin-bottom:1.2em;margin-top:1.2em}.format :where(a):not(:where([class~=not-format] *)){color:var(--tw-format-links);font-weight:500;text-decoration:underline}.format :where(a):not(:where([class~=not-format] *)):hover{text-decoration:none}.format :where(strong):not(:where([class~=not-format] *)){color:var(--tw-format-bold);font-weight:700}.format :where(a strong):not(:where([class~=not-format] *)){color:inherit}.format :where(blockquote strong):not(:where([class~=not-format] *)){color:inherit}.format :where(thead th strong):not(:where([class~=not-format] *)){color:inherit}.format :where(ol):not(:where([class~=not-format] *)){list-style-type:decimal;margin-bottom:1.25em;margin-top:1.25em;padding-left:1.625em}.format :where(ol[type=A]):not(:where([class~=not-format] *)){list-style-type:upper-alpha}.format :where(ol[type=a]):not(:where([class~=not-format] *)){list-style-type:lower-alpha}.format :where(ol[type=A s]):not(:where([class~=not-format] *)){list-style-type:upper-alpha}.format :where(ol[type=a s]):not(:where([class~=not-format] *)){list-style-type:lower-alpha}.format :where(ol[type=I]):not(:where([class~=not-format] *)){list-style-type:upper-roman}.format :where(ol[type=i]):not(:where([class~=not-format] *)){list-style-type:lower-roman}.format :where(ol[type=I s]):not(:where([class~=not-format] *)){list-style-type:upper-roman}.format :where(ol[type=i s]):not(:where([class~=not-format] *)){list-style-type:lower-roman}.format :where(ol[type="1"]):not(:where([class~=not-format] *)){list-style-type:decimal}.format :where(ul):not(:where([class~=not-format] *)){list-style-type:disc;margin-bottom:1.25em;margin-top:1.25em;padding-left:1.625em}.format :where(ol>li):not(:where([class~=not-format] *))::marker{color:var(--tw-format-counters);font-weight:400}.format :where(ul>li):not(:where([class~=not-format] *))::marker{color:var(--tw-format-bullets)}.format :where(hr):not(:where([class~=not-format] *)){border-color:var(--tw-format-hr);border-top-width:1px;margin-bottom:3em;margin-top:3em}.format :where(blockquote):not(:where([class~=not-format] *)){color:var(--tw-format-quotes);font-size:1.1111111em;font-style:italic;font-weight:700;margin-bottom:1.6em;quotes:"\201C""\201D""\2018""\2019"}.format :where(blockquote):not(:where([class~=not-format] *)):before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='32' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.69 24v-9.855C18.69 6.54 23.663 1.385 30.666 0l1.326 2.868c-3.242 1.223-5.326 4.85-5.326 7.799H32V24H18.69ZM0 24v-9.855C0 6.54 4.997 1.384 12 0l1.328 2.868C10.084 4.091 8 7.718 8 10.667h5.31V24H0Z' fill='%239CA3AF'/%3E%3C/svg%3E");background-repeat:no-repeat;color:var(--tw-format-quotes);content:"";display:block;height:1.3333333em;margin-top:1.6em;width:1.7777778em}.format :where(blockquote p:first-of-type):not(:where([class~=not-format] *)):before{content:open-quote}.format :where(blockquote p:last-of-type):not(:where([class~=not-format] *)):after{content:close-quote}.format :where(h1):not(:where([class~=not-format] *)){color:var(--tw-format-headings);font-size:2.25em;font-weight:800;line-height:1.1111111;margin-bottom:.8888889em;margin-top:0}.format :where(h1 strong):not(:where([class~=not-format] *)){color:inherit;font-weight:900}.format :where(h2):not(:where([class~=not-format] *)){color:var(--tw-format-headings);font-size:1.5em;font-weight:700;line-height:1.3333333;margin-bottom:1em;margin-top:0}.format :where(h2 strong):not(:where([class~=not-format] *)){color:inherit;font-weight:800}.format :where(h3):not(:where([class~=not-format] *)){color:var(--tw-format-headings);font-size:1.25em;font-weight:700;line-height:1.6;margin-bottom:.6em;margin-top:0}.format :where(h3 strong):not(:where([class~=not-format] *)){color:inherit;font-weight:800}.format :where(h4):not(:where([class~=not-format] *)){color:var(--tw-format-headings);font-weight:600;line-height:1.5;margin-bottom:.5em;margin-top:0}.format :where(h4 strong):not(:where([class~=not-format] *)){color:inherit;font-weight:700}.format :where(img):not(:where([class~=not-format] *)){margin-bottom:2em;margin-top:2em}.format :where(figure>*):not(:where([class~=not-format] *)){margin-bottom:0;margin-top:0}.format :where(figcaption):not(:where([class~=not-format] *)){color:var(--tw-format-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.format :where(code):not(:where([class~=not-format] *)){background-color:var(--tw-format-code-bg);border-radius:.2222222em;color:var(--tw-format-code);font-size:.875em;font-weight:600;padding:.3333333em .5555556em}.format :where(a code):not(:where([class~=not-format] *)){color:inherit}.format :where(h1 code):not(:where([class~=not-format] *)){color:inherit}.format :where(h2 code):not(:where([class~=not-format] *)){color:inherit;font-size:.875em}.format :where(h3 code):not(:where([class~=not-format] *)){color:inherit;font-size:.9em}.format :where(h4 code):not(:where([class~=not-format] *)){color:inherit}.format :where(blockquote code):not(:where([class~=not-format] *)){color:inherit}.format :where(thead th code):not(:where([class~=not-format] *)){color:inherit}.format :where(pre):not(:where([class~=not-format] *)){background-color:var(--tw-format-pre-bg);border-radius:.375rem;color:var(--tw-format-pre-code);font-size:.875em;font-weight:400;line-height:1.7142857;margin-bottom:1.7142857em;margin-top:1.7142857em;overflow-x:auto;padding:.8571429em 1.1428571em}.format :where(pre code):not(:where([class~=not-format] *)){background-color:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;padding:0}.format :where(pre code):not(:where([class~=not-format] *)):before{content:none}.format :where(pre code):not(:where([class~=not-format] *)):after{content:none}.format :where(table):not(:where([class~=not-format] *)){font-size:.875em;line-height:1.7142857;margin-bottom:2em;margin-top:2em;table-layout:auto;text-align:left;width:100%}.format :where(thead):not(:where([class~=not-format] *)){background-color:var(--tw-format-th-bg);border-radius:.2777778em}.format :where(thead th):not(:where([class~=not-format] *)){background-color:var(--tw-format-th-bg);color:var(--tw-format-headings);font-weight:600;padding:.5555556em .5714286em .5714286em;vertical-align:bottom}.format :where(tbody th):not(:where([class~=not-format] *)){background-color:var(--tw-format-th-bg);color:var(--tw-format-headings);font-weight:600;padding:.5555556em;vertical-align:bottom}.format :where(tbody tr th p,tbody tr td p):not(:where([class~=not-format] *)){margin:0!important}.format :where(tbody tr th,tbody tr td):not(:where([class~=not-format] *)){padding:.6666667em!important}.format :where(tbody tr):not(:where([class~=not-format] *)){border-bottom-color:var(--tw-format-td-borders);border-bottom-width:1px}.format :where(tbody tr:last-child):not(:where([class~=not-format] *)){border-bottom-width:0}.format :where(tbody td):not(:where([class~=not-format] *)){vertical-align:baseline}.format :where(tfoot):not(:where([class~=not-format] *)){border-top-color:var(--tw-format-th-borders);border-top-width:1px}.format :where(tfoot td):not(:where([class~=not-format] *)){vertical-align:top}.format{--tw-format-body:#6b7280;--tw-format-headings:#111827;--tw-format-lead:#6b7280;--tw-format-links:#4b5563;--tw-format-bold:#111827;--tw-format-counters:#6b7280;--tw-format-bullets:#6b7280;--tw-format-hr:#e5e7eb;--tw-format-quotes:#111827;--tw-format-quote-borders:#e5e7eb;--tw-format-captions:#6b7280;--tw-format-code:#111827;--tw-format-code-bg:#f3f4f6;--tw-format-pre-code:#4b5563;--tw-format-pre-bg:#f3f4f6;--tw-format-th-borders:#e5e7eb;--tw-format-th-bg:#f9fafb;--tw-format-td-borders:#e5e7eb;--tw-format-invert-body:#9ca3af;--tw-format-invert-headings:#fff;--tw-format-invert-lead:#9ca3af;--tw-format-invert-links:#fff;--tw-format-invert-bold:#fff;--tw-format-invert-counters:#9ca3af;--tw-format-invert-bullets:#4b5563;--tw-format-invert-hr:#374151;--tw-format-invert-quotes:#f3f4f6;--tw-format-invert-quote-borders:#374151;--tw-format-invert-captions:#9ca3af;--tw-format-invert-code:#fff;--tw-format-invert-code-bg:#1f2937;--tw-format-invert-pre-code:#d1d5db;--tw-format-invert-pre-bg:#374151;--tw-format-invert-th-borders:#4b5563;--tw-format-invert-td-borders:#374151;--tw-format-invert-th-bg:#374151;font-size:1rem;line-height:1.75}.format :where(p):not(:where([class~=not-format] *)){margin-bottom:1.25em;margin-top:1.25em}.format :where(blockquote>p:first-child):not(:where([class~=not-format] *)){margin-top:0}.format :where(video):not(:where([class~=not-format] *)){margin-bottom:2em;margin-top:2em}.format :where(figure):not(:where([class~=not-format] *)){margin-bottom:2em;margin-top:2em}.format :where(li):not(:where([class~=not-format] *)){margin-bottom:.5em;margin-top:.5em}.format :where(ol>li):not(:where([class~=not-format] *)){padding-left:.375em}.format :where(ul>li):not(:where([class~=not-format] *)){padding-left:.375em}.format :where(.format>ul>li p):not(:where([class~=not-format] *)){margin-bottom:.75em;margin-top:.75em}.format :where(.format>ul>li>:first-child):not(:where([class~=not-format] *)){margin-top:1.25em}.format :where(.format>ul>li>:last-child):not(:where([class~=not-format] *)){margin-bottom:1.25em}.format :where(.format>ol>li>:first-child):not(:where([class~=not-format] *)){margin-top:1.25em}.format :where(.format>ol>li>:last-child):not(:where([class~=not-format] *)){margin-bottom:1.25em}.format :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-format] *)){margin-bottom:.75em;margin-top:.75em}.format :where(hr+*):not(:where([class~=not-format] *)){margin-top:0}.format :where(h2+*):not(:where([class~=not-format] *)){margin-top:0}.format :where(h3+*):not(:where([class~=not-format] *)){margin-top:0}.format :where(h4+*):not(:where([class~=not-format] *)){margin-top:0}.format :where(thead th:last-child):not(:where([class~=not-format] *)){padding-right:0}.format :where(tbody td,tfoot td):not(:where([class~=not-format] *)){padding:.5714286em}.format :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-format] *)){padding-right:0}.format :where(.format>:first-child):not(:where([class~=not-format] *)){margin-top:0}.format :where(.format>:last-child):not(:where([class~=not-format] *)){margin-bottom:0}.format-sm :where(.format>ul>li p):not(:where([class~=not-format] *)){margin-bottom:.5em;margin-top:.5em}.format-sm :where(.format>ul>li>:first-child):not(:where([class~=not-format] *)){margin-top:1em}.format-sm :where(.format>ul>li>:last-child):not(:where([class~=not-format] *)){margin-bottom:1em}.format-sm :where(.format>ol>li>:first-child):not(:where([class~=not-format] *)){margin-top:1em}.format-sm :where(.format>ol>li>:last-child):not(:where([class~=not-format] *)){margin-bottom:1em}.format-sm :where(.format>:first-child):not(:where([class~=not-format] *)){margin-top:0}.format-sm :where(.format>:last-child):not(:where([class~=not-format] *)){margin-bottom:0}.format-base :where(.format>ul>li p):not(:where([class~=not-format] *)){margin-bottom:.75em;margin-top:.75em}.format-base :where(.format>ul>li>:first-child):not(:where([class~=not-format] *)){margin-top:1.25em}.format-base :where(.format>ul>li>:last-child):not(:where([class~=not-format] *)){margin-bottom:1.25em}.format-base :where(.format>ol>li>:first-child):not(:where([class~=not-format] *)){margin-top:1.25em}.format-base :where(.format>ol>li>:last-child):not(:where([class~=not-format] *)){margin-bottom:1.25em}.format-base :where(.format>:first-child):not(:where([class~=not-format] *)){margin-top:0}.format-base :where(.format>:last-child):not(:where([class~=not-format] *)){margin-bottom:0}.format-lg :where(.format>ul>li p):not(:where([class~=not-format] *)){margin-bottom:.8888889em;margin-top:.8888889em}.format-lg :where(.format>ul>li>:first-child):not(:where([class~=not-format] *)){margin-top:1.3333333em}.format-lg :where(.format>ul>li>:last-child):not(:where([class~=not-format] *)){margin-bottom:1.3333333em}.format-lg :where(.format>ol>li>:first-child):not(:where([class~=not-format] *)){margin-top:1.3333333em}.format-lg :where(.format>ol>li>:last-child):not(:where([class~=not-format] *)){margin-bottom:1.3333333em}.format-lg :where(.format>:first-child):not(:where([class~=not-format] *)){margin-top:0}.format-lg :where(.format>:last-child):not(:where([class~=not-format] *)){margin-bottom:0}.format-red{--tw-format-links:#dc2626;--tw-format-invert-links:#ef4444}.format-blue{--tw-format-links:#2563eb;--tw-format-invert-links:#3b82f6}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{bottom:0;top:0}.-bottom-6{bottom:-1.5rem}.-end-2{inset-inline-end:-.5rem}.-end-\[16px\]{inset-inline-end:-16px}.-end-\[17px\]{inset-inline-end:-17px}.-left-1{left:-.25rem}.-start-1{inset-inline-start:-.25rem}.-start-1\.5{inset-inline-start:-.375rem}.-start-14{inset-inline-start:-3.5rem}.-start-3{inset-inline-start:-.75rem}.-start-3\.5{inset-inline-start:-.875rem}.-start-4{inset-inline-start:-1rem}.-start-\[17px\]{inset-inline-start:-17px}.-top-0{top:0}.-top-0\.5{top:-.125rem}.-top-2{top:-.5rem}.-top-\[140px\]{top:-140px}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-3{bottom:.75rem}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-6{bottom:1.5rem}.bottom-\[\*px\]{bottom:*px}.bottom-\[60px\]{bottom:60px}.end-0{inset-inline-end:0}.end-2{inset-inline-end:.5rem}.end-2\.5{inset-inline-end:.625rem}.end-24{inset-inline-end:6rem}.end-6{inset-inline-end:1.5rem}.left-0{left:0}.left-1\/2{left:50%}.left-5{left:1.25rem}.left-7{left:1.75rem}.left-8{left:2rem}.left-auto{left:auto}.right-0{right:0}.right-1\/2{right:50%}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-24{right:6rem}.right-5{right:1.25rem}.right-6{right:1.5rem}.right-auto{right:auto}.start-0{inset-inline-start:0}.start-1{inset-inline-start:.25rem}.start-1\/2{inset-inline-start:50%}.start-1\/3{inset-inline-start:33.333333%}.start-2{inset-inline-start:.5rem}.start-2\.5{inset-inline-start:.625rem}.start-2\/3{inset-inline-start:66.666667%}.start-6{inset-inline-start:1.5rem}.start-7{inset-inline-start:1.75rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-2\/4{top:50%}.top-28{top:7rem}.top-3{top:.75rem}.top-4{top:1rem}.top-5{top:1.25rem}.top-6{top:1.5rem}.top-\[124px\]{top:124px}.top-\[142px\]{top:142px}.top-\[178px\]{top:178px}.top-\[40px\]{top:40px}.top-\[72px\]{top:72px}.top-\[88px\]{top:88px}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-6{grid-column:span 6/span 6}.m-0{margin:0}.m-0\.5{margin:.125rem}.m-2{margin:.5rem}.m-2\.5{margin:.625rem}.m-4{margin:1rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-my-1{margin-bottom:-.25rem;margin-top:-.25rem}.-my-1\.5{margin-bottom:-.375rem;margin-top:-.375rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-bottom:2.5rem;margin-top:2.5rem}.my-12{margin-bottom:3rem;margin-top:3rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-2\.5{margin-bottom:.625rem;margin-top:.625rem}.my-3{margin-bottom:.75rem;margin-top:.75rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-5{margin-bottom:1.25rem;margin-top:1.25rem}.my-6{margin-bottom:1.5rem;margin-top:1.5rem}.my-7{margin-bottom:1.75rem;margin-top:1.75rem}.my-8{margin-bottom:2rem;margin-top:2rem}.-mb-5{margin-bottom:-1.25rem}.-mb-px{margin-bottom:-1px}.-me-0{-webkit-margin-end:0;margin-inline-end:0}.-me-0\.5{-webkit-margin-end:-.125rem;margin-inline-end:-.125rem}.-ml-1{margin-left:-.25rem}.-mr-1{margin-right:-.25rem}.-ms-1{-webkit-margin-start:-.25rem;margin-inline-start:-.25rem}.-mt-1{margin-top:-.25rem}.-mt-5{margin-top:-1.25rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-7{margin-bottom:1.75rem}.mb-8{margin-bottom:2rem}.mb-px{margin-bottom:1px}.me-1{-webkit-margin-end:.25rem;margin-inline-end:.25rem}.me-1\.5{-webkit-margin-end:.375rem;margin-inline-end:.375rem}.me-2{-webkit-margin-end:.5rem;margin-inline-end:.5rem}.me-2\.5{-webkit-margin-end:.625rem;margin-inline-end:.625rem}.me-3{-webkit-margin-end:.75rem;margin-inline-end:.75rem}.me-4{-webkit-margin-end:1rem;margin-inline-end:1rem}.me-5{-webkit-margin-end:1.25rem;margin-inline-end:1.25rem}.me-auto{-webkit-margin-end:auto;margin-inline-end:auto}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-2\.5{margin-left:.625rem}.ml-3{margin-left:.75rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-5{margin-right:1.25rem}.mr-8{margin-right:2rem}.mr-auto{margin-right:auto}.ms-0{-webkit-margin-start:0;margin-inline-start:0}.ms-0\.5{-webkit-margin-start:.125rem;margin-inline-start:.125rem}.ms-1{-webkit-margin-start:.25rem;margin-inline-start:.25rem}.ms-1\.5{-webkit-margin-start:.375rem;margin-inline-start:.375rem}.ms-2{-webkit-margin-start:.5rem;margin-inline-start:.5rem}.ms-2\.5{-webkit-margin-start:.625rem;margin-inline-start:.625rem}.ms-3{-webkit-margin-start:.75rem;margin-inline-start:.75rem}.ms-3\.5{-webkit-margin-start:.875rem;margin-inline-start:.875rem}.ms-4{-webkit-margin-start:1rem;margin-inline-start:1rem}.ms-5{-webkit-margin-start:1.25rem;margin-inline-start:1.25rem}.ms-6{-webkit-margin-start:1.5rem;margin-inline-start:1.5rem}.ms-8{-webkit-margin-start:2rem;margin-inline-start:2rem}.ms-auto{-webkit-margin-start:auto;margin-inline-start:auto}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.mt-\[2px\]{margin-top:2px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.flow-root{display:flow-root}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-36{height:9rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[1\.1rem\]{height:1.1rem}.h-\[140px\]{height:140px}.h-\[156px\]{height:156px}.h-\[172px\]{height:172px}.h-\[17px\]{height:17px}.h-\[18px\]{height:18px}.h-\[193px\]{height:193px}.h-\[213px\]{height:213px}.h-\[24px\]{height:24px}.h-\[32px\]{height:32px}.h-\[41px\]{height:41px}.h-\[426px\]{height:426px}.h-\[454px\]{height:454px}.h-\[46px\]{height:46px}.h-\[48px\]{height:48px}.h-\[52px\]{height:52px}.h-\[55px\]{height:55px}.h-\[56px\]{height:56px}.h-\[572px\]{height:572px}.h-\[5px\]{height:5px}.h-\[600px\]{height:600px}.h-\[63px\]{height:63px}.h-\[64px\]{height:64px}.h-\[78px\]{height:78px}.h-\[calc\(100\%-1rem\)\]{height:calc(100% - 1rem)}.h-\[calc\(100vh-5rem\)\]{height:calc(100vh - 5rem)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-72{max-height:18rem}.max-h-\[48px\]{max-height:48px}.max-h-full{max-height:100%}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/4{width:50%}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[1\.1rem\]{width:1.1rem}.w-\[145px\]{width:145px}.w-\[148px\]{width:148px}.w-\[16rem\]{width:16rem}.w-\[188px\]{width:188px}.w-\[208px\]{width:208px}.w-\[272px\]{width:272px}.w-\[300px\]{width:300px}.w-\[3px\]{width:3px}.w-\[48px\]{width:48px}.w-\[52px\]{width:52px}.w-\[56px\]{width:56px}.w-\[6px\]{width:6px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-auto{width:auto}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\[4rem\]{min-width:4rem}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-2xl{max-width:42rem}.max-w-2xs{max-width:16rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-8xl{max-width:90rem}.max-w-\[11rem\]{max-width:11rem}.max-w-\[128px\]{max-width:128px}.max-w-\[133px\]{max-width:133px}.max-w-\[13rem\]{max-width:13rem}.max-w-\[16rem\]{max-width:16rem}.max-w-\[18rem\]{max-width:18rem}.max-w-\[2\.5rem\]{max-width:2.5rem}.max-w-\[23rem\]{max-width:23rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[300px\]{max-width:300px}.max-w-\[301px\]{max-width:301px}.max-w-\[320px\]{max-width:320px}.max-w-\[326px\]{max-width:326px}.max-w-\[330px\]{max-width:330px}.max-w-\[341px\]{max-width:341px}.max-w-\[351px\]{max-width:351px}.max-w-\[360px\]{max-width:360px}.max-w-\[380px\]{max-width:380px}.max-w-\[400px\]{max-width:400px}.max-w-\[440px\]{max-width:440px}.max-w-\[450px\]{max-width:450px}.max-w-\[460px\]{max-width:460px}.max-w-\[480px\]{max-width:480px}.max-w-\[48px\]{max-width:48px}.max-w-\[500px\]{max-width:500px}.max-w-\[540px\]{max-width:540px}.max-w-\[640px\]{max-width:640px}.max-w-\[7rem\]{max-width:7rem}.max-w-\[8\.5rem\]{max-width:8.5rem}.max-w-\[83px\]{max-width:83px}.max-w-\[8rem\]{max-width:8rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-screen-md{max-width:768px}.max-w-screen-xl{max-width:1280px}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-\[0\]{transform-origin:0}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x:-100%}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-1\/2,.-translate-y-3{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-4{--tw-translate-y:-1rem}.-translate-y-4,.-translate-y-6{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-6{--tw-translate-y:-1.5rem}.-translate-y-full{--tw-translate-y:-100%}.-translate-y-full,.translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px}.translate-x-1\/2{--tw-translate-x:50%}.translate-x-1\/2,.translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%}.translate-y-1\/2{--tw-translate-y:50%}.translate-y-1\/2,.translate-y-1\/4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/4{--tw-translate-y:25%}.translate-y-full{--tw-translate-y:100%}.rotate-180,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.rotate-45{--tw-rotate:45deg}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-75{--tw-scale-x:.75;--tw-scale-y:.75}.scale-75,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-12{gap:3rem}.gap-16{gap:4rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-16{-moz-column-gap:4rem;column-gap:4rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-3{row-gap:.75rem}.-space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-.75rem*var(--tw-space-x-reverse))}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1rem*var(--tw-space-x-reverse))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1px*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1px*var(--tw-space-x-reverse))}.space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(0px*(1 - var(--tw-space-x-reverse)));margin-right:calc(0px*var(--tw-space-x-reverse))}.space-x-0\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.125rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.125rem*var(--tw-space-x-reverse))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.375rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.375rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.625rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.625rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.25rem*var(--tw-space-x-reverse))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.125rem*var(--tw-space-y-reverse));margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.625rem*var(--tw-space-y-reverse));margin-top:calc(.625rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.25rem*var(--tw-space-y-reverse));margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.divide-x-2>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(2px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(2px*var(--tw-divide-x-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(209 213 219/var(--tw-divide-opacity))}.divide-gray-500>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(107 114 128/var(--tw-divide-opacity))}.place-self-center{place-self:center}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[2\.5rem\]{border-radius:2.5rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-b-\[1rem\]{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}.rounded-b-\[2\.5rem\]{border-bottom-left-radius:2.5rem;border-bottom-right-radius:2.5rem}.rounded-b-lg{border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-b-xl{border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-e{border-end-end-radius:.25rem;border-start-end-radius:.25rem}.rounded-e-full{border-end-end-radius:9999px;border-start-end-radius:9999px}.rounded-e-lg{border-end-end-radius:.5rem;border-start-end-radius:.5rem}.rounded-e-md{border-end-end-radius:.375rem;border-start-end-radius:.375rem}.rounded-e-xl{border-end-end-radius:.75rem;border-start-end-radius:.75rem}.rounded-l-lg{border-bottom-left-radius:.5rem;border-top-left-radius:.5rem}.rounded-r-lg{border-bottom-right-radius:.5rem;border-top-right-radius:.5rem}.rounded-s{border-end-start-radius:.25rem;border-start-start-radius:.25rem}.rounded-s-full{border-end-start-radius:9999px;border-start-start-radius:9999px}.rounded-s-lg{border-end-start-radius:.5rem;border-start-start-radius:.5rem}.rounded-s-md{border-end-start-radius:.375rem;border-start-start-radius:.375rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-\[2\.5rem\]{border-top-left-radius:2.5rem;border-top-right-radius:2.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.rounded-t-sm{border-top-left-radius:.125rem;border-top-right-radius:.125rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-es-xl{border-end-start-radius:.75rem}.rounded-se-lg{border-start-end-radius:.5rem}.rounded-ss-lg{border-start-start-radius:.5rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-\[10px\]{border-width:10px}.border-\[14px\]{border-width:14px}.border-\[16px\]{border-width:16px}.border-\[8px\]{border-width:8px}.border-x{border-left-width:1px;border-right-width:1px}.border-x-0{border-left-width:0;border-right-width:0}.border-y{border-top-width:1px}.border-b,.border-y{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-e{border-inline-end-width:1px}.border-e-0{border-inline-end-width:0}.border-e-2{border-inline-end-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-s-0{border-inline-start-width:0}.border-s-2{border-inline-start-width:2px}.border-s-4{border-inline-start-width:4px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.\!border-blue-700{--tw-border-opacity:1!important;border-color:rgb(26 86 219/var(--tw-border-opacity))!important}.border-blue-100{--tw-border-opacity:1;border-color:rgb(225 239 254/var(--tw-border-opacity))}.border-blue-300{--tw-border-opacity:1;border-color:rgb(164 202 254/var(--tw-border-opacity))}.border-blue-400{--tw-border-opacity:1;border-color:rgb(118 169 250/var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity:1;border-color:rgb(28 100 242/var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity:1;border-color:rgb(26 86 219/var(--tw-border-opacity))}.border-blue-800{--tw-border-opacity:1;border-color:rgb(30 66 159/var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.border-gray-900{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity))}.border-green-300{--tw-border-opacity:1;border-color:rgb(132 225 188/var(--tw-border-opacity))}.border-green-400{--tw-border-opacity:1;border-color:rgb(49 196 141/var(--tw-border-opacity))}.border-green-500{--tw-border-opacity:1;border-color:rgb(14 159 110/var(--tw-border-opacity))}.border-green-600{--tw-border-opacity:1;border-color:rgb(5 122 85/var(--tw-border-opacity))}.border-green-700{--tw-border-opacity:1;border-color:rgb(4 108 78/var(--tw-border-opacity))}.border-green-800{--tw-border-opacity:1;border-color:rgb(3 84 63/var(--tw-border-opacity))}.border-indigo-400{--tw-border-opacity:1;border-color:rgb(141 162 251/var(--tw-border-opacity))}.border-pink-400{--tw-border-opacity:1;border-color:rgb(241 126 184/var(--tw-border-opacity))}.border-purple-400{--tw-border-opacity:1;border-color:rgb(172 148 250/var(--tw-border-opacity))}.border-purple-600{--tw-border-opacity:1;border-color:rgb(126 58 242/var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity:1;border-color:rgb(108 43 217/var(--tw-border-opacity))}.border-red-300{--tw-border-opacity:1;border-color:rgb(248 180 180/var(--tw-border-opacity))}.border-red-400{--tw-border-opacity:1;border-color:rgb(249 128 128/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgb(240 82 82/var(--tw-border-opacity))}.border-red-600{--tw-border-opacity:1;border-color:rgb(224 36 36/var(--tw-border-opacity))}.border-red-700{--tw-border-opacity:1;border-color:rgb(200 30 30/var(--tw-border-opacity))}.border-red-800{--tw-border-opacity:1;border-color:rgb(155 28 28/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.border-yellow-300{--tw-border-opacity:1;border-color:rgb(250 202 21/var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity:1;border-color:rgb(227 160 8/var(--tw-border-opacity))}.border-yellow-800{--tw-border-opacity:1;border-color:rgb(114 59 19/var(--tw-border-opacity))}.border-e-gray-50{--tw-border-opacity:1;border-inline-end-color:rgb(249 250 251/var(--tw-border-opacity))}.border-s-gray-100{--tw-border-opacity:1;border-inline-start-color:rgb(243 244 246/var(--tw-border-opacity))}.border-s-gray-50{--tw-border-opacity:1;border-inline-start-color:rgb(249 250 251/var(--tw-border-opacity))}.\!bg-gray-200{--tw-bg-opacity:1!important;background-color:rgb(229 231 235/var(--tw-bg-opacity))!important}.\!bg-gray-50{--tw-bg-opacity:1!important;background-color:rgb(249 250 251/var(--tw-bg-opacity))!important}.bg-\[\#050708\]{--tw-bg-opacity:1;background-color:rgb(5 7 8/var(--tw-bg-opacity))}.bg-\[\#1da1f2\]{--tw-bg-opacity:1;background-color:rgb(29 161 242/var(--tw-bg-opacity))}.bg-\[\#24292F\]{--tw-bg-opacity:1;background-color:rgb(36 41 47/var(--tw-bg-opacity))}.bg-\[\#2557D6\]{--tw-bg-opacity:1;background-color:rgb(37 87 214/var(--tw-bg-opacity))}.bg-\[\#3b5998\]{--tw-bg-opacity:1;background-color:rgb(59 89 152/var(--tw-bg-opacity))}.bg-\[\#4285F4\]{--tw-bg-opacity:1;background-color:rgb(66 133 244/var(--tw-bg-opacity))}.bg-\[\#F7BE38\]{--tw-bg-opacity:1;background-color:rgb(247 190 56/var(--tw-bg-opacity))}.bg-\[\#FF9119\]{--tw-bg-opacity:1;background-color:rgb(255 145 25/var(--tw-bg-opacity))}.bg-\[\#hex\]{background-color:#hex}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(225 239 254/var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(195 221 253/var(--tw-bg-opacity))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(164 202 254/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(118 169 250/var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(235 245 255/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(63 131 248/var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(28 100 242/var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity:1;background-color:rgb(26 86 219/var(--tw-bg-opacity))}.bg-blue-800{--tw-bg-opacity:1;background-color:rgb(30 66 159/var(--tw-bg-opacity))}.bg-blue-900{--tw-bg-opacity:1;background-color:rgb(35 56 118/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.bg-gray-900\/50{background-color:rgba(17,24,39,.5)}.bg-gray-900\/90{background-color:rgba(17,24,39,.9)}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(222 247 236/var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity:1;background-color:rgb(188 240 218/var(--tw-bg-opacity))}.bg-green-300{--tw-bg-opacity:1;background-color:rgb(132 225 188/var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(49 196 141/var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(243 250 247/var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(14 159 110/var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(5 122 85/var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity:1;background-color:rgb(4 108 78/var(--tw-bg-opacity))}.bg-green-800{--tw-bg-opacity:1;background-color:rgb(3 84 63/var(--tw-bg-opacity))}.bg-green-900{--tw-bg-opacity:1;background-color:rgb(1 71 55/var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(229 237 255/var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(205 219 254/var(--tw-bg-opacity))}.bg-indigo-300{--tw-bg-opacity:1;background-color:rgb(180 198 252/var(--tw-bg-opacity))}.bg-indigo-400{--tw-bg-opacity:1;background-color:rgb(141 162 251/var(--tw-bg-opacity))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(240 245 255/var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(104 117 245/var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(88 80 236/var(--tw-bg-opacity))}.bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(81 69 205/var(--tw-bg-opacity))}.bg-indigo-800{--tw-bg-opacity:1;background-color:rgb(66 56 157/var(--tw-bg-opacity))}.bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(54 47 120/var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(254 236 220/var(--tw-bg-opacity))}.bg-orange-300{--tw-bg-opacity:1;background-color:rgb(253 186 140/var(--tw-bg-opacity))}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 248 241/var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(255 90 31/var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 232 243/var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity:1;background-color:rgb(250 209 232/var(--tw-bg-opacity))}.bg-pink-300{--tw-bg-opacity:1;background-color:rgb(248 180 217/var(--tw-bg-opacity))}.bg-pink-400{--tw-bg-opacity:1;background-color:rgb(241 126 184/var(--tw-bg-opacity))}.bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity))}.bg-pink-500{--tw-bg-opacity:1;background-color:rgb(231 70 148/var(--tw-bg-opacity))}.bg-pink-600{--tw-bg-opacity:1;background-color:rgb(214 31 105/var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity:1;background-color:rgb(191 18 93/var(--tw-bg-opacity))}.bg-pink-800{--tw-bg-opacity:1;background-color:rgb(153 21 75/var(--tw-bg-opacity))}.bg-pink-900{--tw-bg-opacity:1;background-color:rgb(117 26 61/var(--tw-bg-opacity))}.bg-purple-100{--tw-bg-opacity:1;background-color:rgb(237 235 254/var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity:1;background-color:rgb(220 215 254/var(--tw-bg-opacity))}.bg-purple-300{--tw-bg-opacity:1;background-color:rgb(202 191 253/var(--tw-bg-opacity))}.bg-purple-400{--tw-bg-opacity:1;background-color:rgb(172 148 250/var(--tw-bg-opacity))}.bg-purple-50{--tw-bg-opacity:1;background-color:rgb(246 245 255/var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(144 97 249/var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity:1;background-color:rgb(126 58 242/var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity:1;background-color:rgb(108 43 217/var(--tw-bg-opacity))}.bg-purple-800{--tw-bg-opacity:1;background-color:rgb(85 33 181/var(--tw-bg-opacity))}.bg-purple-900{--tw-bg-opacity:1;background-color:rgb(74 29 150/var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(253 232 232/var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity:1;background-color:rgb(251 213 213/var(--tw-bg-opacity))}.bg-red-300{--tw-bg-opacity:1;background-color:rgb(248 180 180/var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity:1;background-color:rgb(249 128 128/var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(253 242 242/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(240 82 82/var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(224 36 36/var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity:1;background-color:rgb(200 30 30/var(--tw-bg-opacity))}.bg-red-800{--tw-bg-opacity:1;background-color:rgb(155 28 28/var(--tw-bg-opacity))}.bg-red-900{--tw-bg-opacity:1;background-color:rgb(119 29 29/var(--tw-bg-opacity))}.bg-teal-100{--tw-bg-opacity:1;background-color:rgb(213 245 246/var(--tw-bg-opacity))}.bg-teal-50{--tw-bg-opacity:1;background-color:rgb(237 250 250/var(--tw-bg-opacity))}.bg-teal-500{--tw-bg-opacity:1;background-color:rgb(6 148 162/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-white\/30{background-color:hsla(0,0%,100%,.3)}.bg-white\/50{background-color:hsla(0,0%,100%,.5)}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(253 246 178/var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(252 233 106/var(--tw-bg-opacity))}.bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(250 202 21/var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(227 160 8/var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(253 253 234/var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(194 120 3/var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity:1;background-color:rgb(159 88 10/var(--tw-bg-opacity))}.bg-yellow-700{--tw-bg-opacity:1;background-color:rgb(142 75 16/var(--tw-bg-opacity))}.bg-yellow-800{--tw-bg-opacity:1;background-color:rgb(114 59 19/var(--tw-bg-opacity))}.bg-yellow-900{--tw-bg-opacity:1;background-color:rgb(99 49 18/var(--tw-bg-opacity))}.bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/conference\.jpg\'\)\]{background-image:url(https://flowbite.s3.amazonaws.com/docs/jumbotron/conference.jpg)}.bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/hero-pattern\.svg\'\)\]{background-image:url(https://flowbite.s3.amazonaws.com/docs/jumbotron/hero-pattern.svg)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:#ebf5ff var(--tw-gradient-from-position);--tw-gradient-to:rgba(235,245,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from:#3f83f8 var(--tw-gradient-from-position);--tw-gradient-to:rgba(63,131,248,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-400{--tw-gradient-from:#22d3ee var(--tw-gradient-from-position);--tw-gradient-to:rgba(34,211,238,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from:#06b6d4 var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-green-400{--tw-gradient-from:#31c48d var(--tw-gradient-from-position);--tw-gradient-to:rgba(49,196,141,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-lime-200{--tw-gradient-from:#d9f99d var(--tw-gradient-from-position);--tw-gradient-to:hsla(81,88%,80%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-pink-400{--tw-gradient-from:#f17eb8 var(--tw-gradient-from-position);--tw-gradient-to:rgba(241,126,184,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from:#e74694 var(--tw-gradient-from-position);--tw-gradient-to:rgba(231,70,148,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from:#9061f9 var(--tw-gradient-from-position);--tw-gradient-to:rgba(144,97,249,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from:#7e3af2 var(--tw-gradient-from-position);--tw-gradient-to:rgba(126,58,242,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-200{--tw-gradient-from:#fbd5d5 var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,83%,91%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-400{--tw-gradient-from:#f98080 var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,91%,74%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-sky-400{--tw-gradient-from:#38bdf8 var(--tw-gradient-from-position);--tw-gradient-to:rgba(56,189,248,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from:#afecef var(--tw-gradient-from-position);--tw-gradient-to:rgba(175,236,239,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from:#7edce2 var(--tw-gradient-from-position);--tw-gradient-to:rgba(126,220,226,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-teal-400{--tw-gradient-from:#16bdca var(--tw-gradient-from-position);--tw-gradient-to:rgba(22,189,202,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to:rgba(28,100,242,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#1c64f2 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-cyan-500{--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#06b6d4 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-green-500{--tw-gradient-to:rgba(14,159,110,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#0e9f6e var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-lime-400{--tw-gradient-to:rgba(163,230,53,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#a3e635 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-pink-500{--tw-gradient-to:rgba(231,70,148,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#e74694 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to:rgba(126,58,242,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#7e3af2 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-red-300{--tw-gradient-to:hsla(0,83%,84%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#f8b4b4 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-red-500{--tw-gradient-to:rgba(240,82,82,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#f05252 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-teal-500{--tw-gradient-to:rgba(6,148,162,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#0694a2 var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-blue-500{--tw-gradient-to:#3f83f8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to:#1c64f2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to:#1a56db var(--tw-gradient-to-position)}.to-cyan-600{--tw-gradient-to:#0891b2 var(--tw-gradient-to-position)}.to-emerald-600{--tw-gradient-to:#059669 var(--tw-gradient-to-position)}.to-green-600{--tw-gradient-to:#057a55 var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to:#d9f99d var(--tw-gradient-to-position)}.to-lime-300{--tw-gradient-to:#bef264 var(--tw-gradient-to-position)}.to-lime-500{--tw-gradient-to:#84cc16 var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to:#ff8a4c var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to:#e74694 var(--tw-gradient-to-position)}.to-pink-600{--tw-gradient-to:#d61f69 var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to:#6c2bd9 var(--tw-gradient-to-position)}.to-red-600{--tw-gradient-to:#e02424 var(--tw-gradient-to-position)}.to-teal-600{--tw-gradient-to:#047481 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to:#fce96a var(--tw-gradient-to-position)}.bg-cover{background-size:cover}.bg-local{background-attachment:local}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-center{background-position:50%}.bg-no-repeat{background-repeat:no-repeat}.fill-blue-600{fill:#1c64f2}.fill-gray-500{fill:#6b7280}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-0{padding:0!important}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-px{padding:1px}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-16{padding-left:4rem;padding-right:4rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-bottom:0;padding-top:0}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-12{padding-bottom:3rem;padding-top:3rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.py-24{padding-bottom:6rem;padding-top:6rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-3\.5{padding-bottom:.875rem;padding-top:.875rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-48{padding-bottom:12rem;padding-top:12rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.py-px{padding-bottom:1px;padding-top:1px}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-10{padding-bottom:2.5rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-2\.5{padding-bottom:.625rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-48{padding-bottom:12rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pb-96{padding-bottom:24rem}.pe-0{-webkit-padding-end:0;padding-inline-end:0}.pe-1{-webkit-padding-end:.25rem;padding-inline-end:.25rem}.pe-10{-webkit-padding-end:2.5rem;padding-inline-end:2.5rem}.pe-3{-webkit-padding-end:.75rem;padding-inline-end:.75rem}.pe-3\.5{-webkit-padding-end:.875rem;padding-inline-end:.875rem}.pe-4{-webkit-padding-end:1rem;padding-inline-end:1rem}.pe-5{-webkit-padding-end:1.25rem;padding-inline-end:1.25rem}.pl-10{padding-left:2.5rem}.pl-11{padding-left:2.75rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-3\.5{padding-left:.875rem}.pl-5{padding-left:1.25rem}.pl-8{padding-left:2rem}.pr-4{padding-right:1rem}.pr-5{padding-right:1.25rem}.ps-0{-webkit-padding-start:0;padding-inline-start:0}.ps-1{-webkit-padding-start:.25rem;padding-inline-start:.25rem}.ps-1\.5{-webkit-padding-start:.375rem;padding-inline-start:.375rem}.ps-10{-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}.ps-2{-webkit-padding-start:.5rem;padding-inline-start:.5rem}.ps-2\.5{-webkit-padding-start:.625rem;padding-inline-start:.625rem}.ps-3{-webkit-padding-start:.75rem;padding-inline-start:.75rem}.ps-3\.5{-webkit-padding-start:.875rem;padding-inline-start:.875rem}.ps-4{-webkit-padding-start:1rem;padding-inline-start:1rem}.ps-5{-webkit-padding-start:1.25rem;padding-inline-start:1.25rem}.ps-6{-webkit-padding-start:1.5rem;padding-inline-start:1.5rem}.pt-0{padding-top:0}.pt-10{padding-top:2.5rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-20{padding-top:5rem}.pt-24{padding-top:6rem}.pt-3{padding-top:.75rem}.pt-32{padding-top:8rem}.pt-36{padding-top:9rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-52{padding-top:13rem}.pt-6{padding-top:1.5rem}.pt-60{padding-top:15rem}.pt-64{padding-top:16rem}.pt-8{padding-top:2rem}.pt-80{padding-top:20rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-2xs{font-size:.625rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-7xl{font-size:4.5rem;line-height:1}.text-8xl{font-size:6rem;line-height:1}.text-9xl{font-size:8rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-extralight{font-weight:200}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.not-italic{font-style:normal}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-loose{line-height:2}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-normal{letter-spacing:0}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.\!text-blue-700{--tw-text-opacity:1!important;color:rgb(26 86 219/var(--tw-text-opacity))!important}.text-\[\#1434CB\]{--tw-text-opacity:1;color:rgb(20 52 203/var(--tw-text-opacity))}.text-\[\#626890\]{--tw-text-opacity:1;color:rgb(98 104 144/var(--tw-text-opacity))}.text-\[\#ff2d20\]{--tw-text-opacity:1;color:rgb(255 45 32/var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity:1;color:rgb(225 239 254/var(--tw-text-opacity))}.text-blue-400{--tw-text-opacity:1;color:rgb(118 169 250/var(--tw-text-opacity))}.text-blue-50{--tw-text-opacity:1;color:rgb(235 245 255/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.text-blue-600\/100{color:#1c64f2}.text-blue-600\/25{color:rgba(28,100,242,.25)}.text-blue-600\/50{color:rgba(28,100,242,.5)}.text-blue-600\/75{color:rgba(28,100,242,.75)}.text-blue-700{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 66 159/var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity:1;color:rgb(35 56 118/var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-400{--tw-text-opacity:1;color:rgb(49 196 141/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(14 159 110/var(--tw-text-opacity))}.text-green-600{--tw-text-opacity:1;color:rgb(5 122 85/var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgb(4 108 78/var(--tw-text-opacity))}.text-green-800{--tw-text-opacity:1;color:rgb(3 84 63/var(--tw-text-opacity))}.text-green-900{--tw-text-opacity:1;color:rgb(1 71 55/var(--tw-text-opacity))}.text-indigo-400{--tw-text-opacity:1;color:rgb(141 162 251/var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity:1;color:rgb(81 69 205/var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity:1;color:rgb(66 56 157/var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity:1;color:rgb(255 90 31/var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity:1;color:rgb(208 56 1/var(--tw-text-opacity))}.text-orange-800{--tw-text-opacity:1;color:rgb(138 44 13/var(--tw-text-opacity))}.text-pink-400{--tw-text-opacity:1;color:rgb(241 126 184/var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity:1;color:rgb(153 21 75/var(--tw-text-opacity))}.text-purple-400{--tw-text-opacity:1;color:rgb(172 148 250/var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity:1;color:rgb(126 58 242/var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity:1;color:rgb(108 43 217/var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity:1;color:rgb(85 33 181/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgb(249 128 128/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(240 82 82/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(224 36 36/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(200 30 30/var(--tw-text-opacity))}.text-red-800{--tw-text-opacity:1;color:rgb(155 28 28/var(--tw-text-opacity))}.text-red-900{--tw-text-opacity:1;color:rgb(119 29 29/var(--tw-text-opacity))}.text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity:1;color:rgb(4 116 129/var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity:1;color:rgb(250 202 21/var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity:1;color:rgb(227 160 8/var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity:1;color:rgb(194 120 3/var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity:1;color:rgb(142 75 16/var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity:1;color:rgb(114 59 19/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-blue-400{text-decoration-color:#76a9fa}.decoration-blue-500{text-decoration-color:#3f83f8}.decoration-gray-500{text-decoration-color:#6b7280}.decoration-green-500{text-decoration-color:#0e9f6e}.decoration-indigo-500{text-decoration-color:#6875f5}.decoration-red-500{text-decoration-color:#f05252}.decoration-sky-500{text-decoration-color:#0ea5e9}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.decoration-8{text-decoration-thickness:8px}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-green-700::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(4 108 78/var(--tw-placeholder-opacity))}.placeholder-green-700::placeholder{--tw-placeholder-opacity:1;color:rgb(4 108 78/var(--tw-placeholder-opacity))}.placeholder-red-700::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(200 30 30/var(--tw-placeholder-opacity))}.placeholder-red-700::placeholder{--tw-placeholder-opacity:1;color:rgb(200 30 30/var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.bg-blend-multiply{background-blend-mode:multiply}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color:rgba(63,131,248,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color:rgba(6,182,212,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color:rgba(14,159,110,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color:rgba(132,204,22,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color:rgba(231,70,148,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color:rgba(144,97,249,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color:rgba(240,82,82,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color:rgba(6,148,162,.5);--tw-shadow:var(--tw-shadow-colored)}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-0,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2,.ring-4{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-8{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity))}.ring-opacity-0{--tw-ring-opacity:0}.blur{--tw-blur:blur(8px)}.blur,.blur-sm{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-sm{--tw-blur:blur(4px)}.grayscale{--tw-grayscale:grayscale(100%)}.grayscale,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}:is(.dark .dark\:format-invert){--tw-format-body:var(--tw-format-invert-body);--tw-format-headings:var(--tw-format-invert-headings);--tw-format-lead:var(--tw-format-invert-lead);--tw-format-links:var(--tw-format-invert-links);--tw-format-bold:var(--tw-format-invert-bold);--tw-format-counters:var(--tw-format-invert-counters);--tw-format-bullets:var(--tw-format-invert-bullets);--tw-format-hr:var(--tw-format-invert-hr);--tw-format-quotes:var(--tw-format-invert-quotes);--tw-format-quote-borders:var(--tw-format-invert-quote-borders);--tw-format-captions:var(--tw-format-invert-captions);--tw-format-code:var(--tw-format-invert-code);--tw-format-code-bg:var(--tw-format-invert-code-bg);--tw-format-pre-code:var(--tw-format-invert-pre-code);--tw-format-pre-bg:var(--tw-format-invert-pre-bg);--tw-format-th-borders:var(--tw-format-invert-th-borders);--tw-format-td-borders:var(--tw-format-invert-td-borders);--tw-format-th-bg:var(--tw-format-invert-th-bg)}@media (min-width:1024px){.lg\:format-lg{font-size:1.125rem;line-height:1.7777778}.lg\:format-lg :where(p):not(:where([class~=not-format] *)){margin-bottom:1.3333333em;margin-top:1.3333333em}.lg\:format-lg :where([class~=lead]):not(:where([class~=not-format] *)){font-size:1.2222222em;line-height:1.4545455;margin-bottom:1.0909091em;margin-top:1.0909091em}.lg\:format-lg :where(blockquote):not(:where([class~=not-format] *)):before{margin-top:1.6666667em}.lg\:format-lg :where(blockquote>p:first-child):not(:where([class~=not-format] *)){margin-top:.5em}.lg\:format-lg :where(h1):not(:where([class~=not-format] *)){font-size:2.6666667em;line-height:1;margin-bottom:.8333333em;margin-top:0}.lg\:format-lg :where(h2):not(:where([class~=not-format] *)){font-size:2em;line-height:1.3333333;margin-bottom:.6666667em;margin-top:0}.lg\:format-lg :where(h3):not(:where([class~=not-format] *)){font-size:1.3333333em;line-height:1.5;margin-bottom:.6666667em;margin-top:0}.lg\:format-lg :where(h4):not(:where([class~=not-format] *)){line-height:1.5555556;margin-bottom:.4444444em;margin-top:0}.lg\:format-lg :where(img):not(:where([class~=not-format] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.lg\:format-lg :where(video):not(:where([class~=not-format] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.lg\:format-lg :where(figure):not(:where([class~=not-format] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.lg\:format-lg :where(figure>*):not(:where([class~=not-format] *)){margin-bottom:0;margin-top:0}.lg\:format-lg :where(figcaption):not(:where([class~=not-format] *)){font-size:.8888889em;line-height:1.5;margin-top:1em}.lg\:format-lg :where(code):not(:where([class~=not-format] *)){font-size:.8888889em}.lg\:format-lg :where(h2 code):not(:where([class~=not-format] *)){font-size:.8666667em}.lg\:format-lg :where(h3 code):not(:where([class~=not-format] *)){font-size:.875em}.lg\:format-lg :where(pre):not(:where([class~=not-format] *)){border-radius:.375rem;font-size:.8888889em;line-height:1.75;margin-bottom:2em;margin-top:2em;padding:1em 1.5em}.lg\:format-lg :where(ol):not(:where([class~=not-format] *)){margin-bottom:1.3333333em;margin-top:1.3333333em;padding-left:1.5555556em}.lg\:format-lg :where(ul):not(:where([class~=not-format] *)){margin-bottom:1.3333333em;margin-top:1.3333333em;padding-left:1.5555556em}.lg\:format-lg :where(li):not(:where([class~=not-format] *)){margin-bottom:.6666667em;margin-top:.6666667em}.lg\:format-lg :where(ol>li):not(:where([class~=not-format] *)){padding-left:.4444444em}.lg\:format-lg :where(ul>li):not(:where([class~=not-format] *)){padding-left:.4444444em}.lg\:format-lg :where(.format>ul>li p):not(:where([class~=not-format] *)){margin-bottom:.8888889em;margin-top:.8888889em}.lg\:format-lg :where(.format>ul>li>:first-child):not(:where([class~=not-format] *)){margin-top:1.3333333em}.lg\:format-lg :where(.format>ul>li>:last-child):not(:where([class~=not-format] *)){margin-bottom:1.3333333em}.lg\:format-lg :where(.format>ol>li>:first-child):not(:where([class~=not-format] *)){margin-top:1.3333333em}.lg\:format-lg :where(.format>ol>li>:last-child):not(:where([class~=not-format] *)){margin-bottom:1.3333333em}.lg\:format-lg :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-format] *)){margin-bottom:.8888889em;margin-top:.8888889em}.lg\:format-lg :where(hr):not(:where([class~=not-format] *)){margin-bottom:3.1111111em;margin-top:3.1111111em}.lg\:format-lg :where(hr+*):not(:where([class~=not-format] *)){margin-top:0}.lg\:format-lg :where(h2+*):not(:where([class~=not-format] *)){margin-top:0}.lg\:format-lg :where(h3+*):not(:where([class~=not-format] *)){margin-top:0}.lg\:format-lg :where(h4+*):not(:where([class~=not-format] *)){margin-top:0}.lg\:format-lg :where(table):not(:where([class~=not-format] *)){font-size:.8888889em;line-height:1.5}.lg\:format-lg :where(thead th):not(:where([class~=not-format] *)){padding-bottom:.75em;padding-left:.75em;padding-right:.75em}.lg\:format-lg :where(thead th:last-child):not(:where([class~=not-format] *)){padding-right:0}.lg\:format-lg :where(tbody td,tfoot td):not(:where([class~=not-format] *)){padding:.75em}.lg\:format-lg :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-format] *)){padding-right:0}.lg\:format-lg :where(.format>:first-child):not(:where([class~=not-format] *)){margin-top:0}.lg\:format-lg :where(.format>:last-child):not(:where([class~=not-format] *)){margin-bottom:0}}.first-letter\:float-start:first-letter{float:inline-start}.first-letter\:me-3:first-letter{-webkit-margin-end:.75rem;margin-inline-end:.75rem}.first-letter\:text-7xl:first-letter{font-size:4.5rem;line-height:1}.first-letter\:font-bold:first-letter{font-weight:700}.first-letter\:text-gray-900:first-letter{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.first-line\:uppercase:first-line{text-transform:uppercase}.first-line\:tracking-widest:first-line{letter-spacing:.1em}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-\[2px\]:after{content:var(--tw-content);inset-inline-start:2px}.after\:start-\[4px\]:after{content:var(--tw-content);inset-inline-start:4px}.after\:top-0:after{content:var(--tw-content);top:0}.after\:top-0\.5:after{content:var(--tw-content);top:.125rem}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:mx-2:after{content:var(--tw-content);margin-left:.5rem;margin-right:.5rem}.after\:mx-6:after{content:var(--tw-content);margin-left:1.5rem;margin-right:1.5rem}.after\:inline-block:after{content:var(--tw-content);display:inline-block}.after\:hidden:after{content:var(--tw-content);display:none}.after\:h-1:after{content:var(--tw-content);height:.25rem}.after\:h-4:after{content:var(--tw-content);height:1rem}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:h-6:after{content:var(--tw-content);height:1.5rem}.after\:w-4:after{content:var(--tw-content);width:1rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:w-6:after{content:var(--tw-content);width:1.5rem}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:rounded-full:after{border-radius:9999px;content:var(--tw-content)}.after\:border:after{border-width:1px;content:var(--tw-content)}.after\:border-4:after{border-width:4px;content:var(--tw-content)}.after\:border-b:after{border-bottom-width:1px;content:var(--tw-content)}.after\:border-blue-100:after{--tw-border-opacity:1;border-color:rgb(225 239 254/var(--tw-border-opacity));content:var(--tw-content)}.after\:border-gray-100:after{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity));content:var(--tw-content)}.after\:border-gray-200:after{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity));content:var(--tw-content)}.after\:border-gray-300:after{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity));content:var(--tw-content)}.after\:bg-white:after{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));content:var(--tw-content)}.after\:text-gray-200:after{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity));content:var(--tw-content)}.after\:transition-all:after{content:var(--tw-content);transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.after\:content-\[\'\/\'\]:after{--tw-content:"/";content:var(--tw-content)}.odd\:bg-white:nth-child(odd){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.even\:bg-gray-50:nth-child(2n){--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.focus-within\:z-10:focus-within{z-index:10}.hover\:border-blue-700:hover{--tw-border-opacity:1;border-color:rgb(26 86 219/var(--tw-border-opacity))}.hover\:border-blue-800:hover{--tw-border-opacity:1;border-color:rgb(30 66 159/var(--tw-border-opacity))}.hover\:border-gray-200:hover{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.hover\:bg-\[\#050708\]\/80:hover{background-color:rgba(5,7,8,.8)}.hover\:bg-\[\#050708\]\/90:hover{background-color:rgba(5,7,8,.9)}.hover\:bg-\[\#1da1f2\]\/90:hover{background-color:rgba(29,161,242,.9)}.hover\:bg-\[\#24292F\]\/90:hover{background-color:rgba(36,41,47,.9)}.hover\:bg-\[\#2557D6\]\/90:hover{background-color:rgba(37,87,214,.9)}.hover\:bg-\[\#3b5998\]\/90:hover{background-color:rgba(59,89,152,.9)}.hover\:bg-\[\#4285F4\]\/90:hover{background-color:rgba(66,133,244,.9)}.hover\:bg-\[\#F7BE38\]\/90:hover{background-color:rgba(247,190,56,.9)}.hover\:bg-\[\#FF9119\]\/80:hover{background-color:rgba(255,145,25,.8)}.hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(225 239 254/var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity:1;background-color:rgb(195 221 253/var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity:1;background-color:rgb(63 131 248/var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(26 86 219/var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity:1;background-color:rgb(30 66 159/var(--tw-bg-opacity))}.hover\:bg-blue-900:hover{--tw-bg-opacity:1;background-color:rgb(35 56 118/var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.hover\:bg-gray-900\/50:hover{background-color:rgba(17,24,39,.5)}.hover\:bg-green-200:hover{--tw-bg-opacity:1;background-color:rgb(188 240 218/var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity:1;background-color:rgb(3 84 63/var(--tw-bg-opacity))}.hover\:bg-green-900:hover{--tw-bg-opacity:1;background-color:rgb(1 71 55/var(--tw-bg-opacity))}.hover\:bg-indigo-200:hover{--tw-bg-opacity:1;background-color:rgb(205 219 254/var(--tw-bg-opacity))}.hover\:bg-pink-200:hover{--tw-bg-opacity:1;background-color:rgb(250 209 232/var(--tw-bg-opacity))}.hover\:bg-purple-200:hover{--tw-bg-opacity:1;background-color:rgb(220 215 254/var(--tw-bg-opacity))}.hover\:bg-purple-800:hover{--tw-bg-opacity:1;background-color:rgb(85 33 181/var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity:1;background-color:rgb(251 213 213/var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity:1;background-color:rgb(155 28 28/var(--tw-bg-opacity))}.hover\:bg-red-900:hover{--tw-bg-opacity:1;background-color:rgb(119 29 29/var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.hover\:bg-white\/50:hover{background-color:hsla(0,0%,100%,.5)}.hover\:bg-yellow-200:hover{--tw-bg-opacity:1;background-color:rgb(252 233 106/var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity:1;background-color:rgb(194 120 3/var(--tw-bg-opacity))}.hover\:bg-yellow-900:hover{--tw-bg-opacity:1;background-color:rgb(99 49 18/var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:from-teal-200:hover{--tw-gradient-from:#afecef var(--tw-gradient-from-position);--tw-gradient-to:rgba(175,236,239,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to:#d9f99d var(--tw-gradient-to-position)}.hover\:\!text-blue-700:hover{--tw-text-opacity:1!important;color:rgb(26 86 219/var(--tw-text-opacity))!important}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 66 159/var(--tw-text-opacity))}.hover\:text-blue-900:hover{--tw-text-opacity:1;color:rgb(35 56 118/var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.hover\:text-green-900:hover{--tw-text-opacity:1;color:rgb(1 71 55/var(--tw-text-opacity))}.hover\:text-indigo-900:hover{--tw-text-opacity:1;color:rgb(54 47 120/var(--tw-text-opacity))}.hover\:text-pink-900:hover{--tw-text-opacity:1;color:rgb(117 26 61/var(--tw-text-opacity))}.hover\:text-purple-600:hover{--tw-text-opacity:1;color:rgb(126 58 242/var(--tw-text-opacity))}.hover\:text-purple-900:hover{--tw-text-opacity:1;color:rgb(74 29 150/var(--tw-text-opacity))}.hover\:text-red-900:hover{--tw-text-opacity:1;color:rgb(119 29 29/var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:text-yellow-900:hover{--tw-text-opacity:1;color:rgb(99 49 18/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:bg-blend-soft-light:hover{background-blend-mode:soft-light}.hover\:shadow:hover{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:blur-none:hover{--tw-blur:blur(0)}.hover\:blur-none:hover,.hover\:grayscale-0:hover{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\:grayscale-0:hover{--tw-grayscale:grayscale(0)}.focus\:z-10:focus{z-index:10}.focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(63 131 248/var(--tw-border-opacity))}.focus\:border-blue-600:focus{--tw-border-opacity:1;border-color:rgb(28 100 242/var(--tw-border-opacity))}.focus\:border-gray-200:focus{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.focus\:border-green-500:focus{--tw-border-opacity:1;border-color:rgb(14 159 110/var(--tw-border-opacity))}.focus\:border-green-600:focus{--tw-border-opacity:1;border-color:rgb(5 122 85/var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity:1;border-color:rgb(240 82 82/var(--tw-border-opacity))}.focus\:border-red-600:focus{--tw-border-opacity:1;border-color:rgb(224 36 36/var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.focus\:bg-gray-900:focus{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.focus\:text-blue-700:focus{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.focus\:text-white:focus{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-4:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-\[\#050708\]\/50:focus{--tw-ring-color:rgba(5,7,8,.5)}.focus\:ring-\[\#1da1f2\]\/50:focus{--tw-ring-color:rgba(29,161,242,.5)}.focus\:ring-\[\#24292F\]\/50:focus{--tw-ring-color:rgba(36,41,47,.5)}.focus\:ring-\[\#2557D6\]\/50:focus{--tw-ring-color:rgba(37,87,214,.5)}.focus\:ring-\[\#3b5998\]\/50:focus{--tw-ring-color:rgba(59,89,152,.5)}.focus\:ring-\[\#4285F4\]\/50:focus{--tw-ring-color:rgba(66,133,244,.5)}.focus\:ring-\[\#F7BE38\]\/50:focus{--tw-ring-color:rgba(247,190,56,.5)}.focus\:ring-\[\#FF9119\]\/50:focus{--tw-ring-color:rgba(255,145,25,.5)}.focus\:ring-blue-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(195 221 253/var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(164 202 254/var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(118 169 250/var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(63 131 248/var(--tw-ring-opacity))}.focus\:ring-blue-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(28 100 242/var(--tw-ring-opacity))}.focus\:ring-blue-700:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(26 86 219/var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(165 243 252/var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(103 232 249/var(--tw-ring-opacity))}.focus\:ring-gray-100:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(243 244 246/var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity))}.focus\:ring-gray-50:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(249 250 251/var(--tw-ring-opacity))}.focus\:ring-gray-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity))}.focus\:ring-gray-700:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(188 240 218/var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(132 225 188/var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(49 196 141/var(--tw-ring-opacity))}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(14 159 110/var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(217 249 157/var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(190 242 100/var(--tw-ring-opacity))}.focus\:ring-orange-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(255 90 31/var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(250 209 232/var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(248 180 217/var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(220 215 254/var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(202 191 253/var(--tw-ring-opacity))}.focus\:ring-purple-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(144 97 249/var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(253 232 232/var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(248 180 180/var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(249 128 128/var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(240 82 82/var(--tw-ring-opacity))}.focus\:ring-teal-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(126 220 226/var(--tw-ring-opacity))}.focus\:ring-teal-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(6 148 162/var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(250 202 21/var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(227 160 8/var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(194 120 3/var(--tw-ring-opacity))}.group:hover .group-hover\:rotate-45{--tw-rotate:45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.group:hover .group-hover\:bg-white\/50{background-color:hsla(0,0%,100%,.5)}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity:0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from:#06b6d4 var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from:#31c48d var(--tw-gradient-from-position);--tw-gradient-to:rgba(49,196,141,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from:#e74694 var(--tw-gradient-from-position);--tw-gradient-to:rgba(231,70,148,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from:#9061f9 var(--tw-gradient-from-position);--tw-gradient-to:rgba(144,97,249,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from:#7e3af2 var(--tw-gradient-from-position);--tw-gradient-to:rgba(126,58,242,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from:#fbd5d5 var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,83%,91%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from:#7edce2 var(--tw-gradient-from-position);--tw-gradient-to:rgba(126,220,226,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-to:hsla(0,83%,84%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#f8b4b4 var(--tw-gradient-via-position),var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to:#3f83f8 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-blue-600{--tw-gradient-to:#1c64f2 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-lime-300{--tw-gradient-to:#bef264 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-orange-400{--tw-gradient-to:#ff8a4c var(--tw-gradient-to-position)}.group:hover .group-hover\:to-pink-500{--tw-gradient-to:#e74694 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-yellow-200{--tw-gradient-to:#fce96a var(--tw-gradient-to-position)}.group:hover .group-hover\:text-blue-600{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.group:hover .group-hover\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.group:hover .group-hover\:text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity))}.peer:checked~.peer-checked\:border-blue-600{--tw-border-opacity:1;border-color:rgb(28 100 242/var(--tw-border-opacity))}.peer:checked~.peer-checked\:border-blue-700{--tw-border-opacity:1;border-color:rgb(26 86 219/var(--tw-border-opacity))}.peer:checked~.peer-checked\:bg-blue-50{--tw-bg-opacity:1;background-color:rgb(235 245 255/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-blue-600{--tw-bg-opacity:1;background-color:rgb(28 100 242/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-green-600{--tw-bg-opacity:1;background-color:rgb(5 122 85/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-orange-500{--tw-bg-opacity:1;background-color:rgb(255 90 31/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-purple-600{--tw-bg-opacity:1;background-color:rgb(126 58 242/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-red-600{--tw-bg-opacity:1;background-color:rgb(224 36 36/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-teal-600{--tw-bg-opacity:1;background-color:rgb(4 116 129/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(227 160 8/var(--tw-bg-opacity))}.peer:checked~.peer-checked\:text-blue-600{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.peer:checked~.peer-checked\:text-blue-700{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.peer:checked~.peer-checked\:text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.peer:checked~.peer-checked\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.peer:checked~.peer-checked\:after\:translate-x-full:after{--tw-translate-x:100%;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:after\:border-white:after{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity));content:var(--tw-content)}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:start-6{inset-inline-start:1.5rem}.peer:placeholder-shown~.peer-placeholder-shown\:start-6{inset-inline-start:1.5rem}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:top-1\/2{top:50%}.peer:placeholder-shown~.peer-placeholder-shown\:top-1\/2{top:50%}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:placeholder-shown~.peer-placeholder-shown\:-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:translate-y-0{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:placeholder-shown~.peer-placeholder-shown\:translate-y-0{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:-moz-placeholder-shown~.peer-placeholder-shown\:scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:placeholder-shown~.peer-placeholder-shown\:scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:start-0{inset-inline-start:0}.peer:focus~.peer-focus\:top-1{top:.25rem}.peer:focus~.peer-focus\:top-2{top:.5rem}.peer:focus~.peer-focus\:-translate-y-3{--tw-translate-y:-0.75rem}.peer:focus~.peer-focus\:-translate-y-3,.peer:focus~.peer-focus\:-translate-y-4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:-translate-y-4{--tw-translate-y:-1rem}.peer:focus~.peer-focus\:-translate-y-6{--tw-translate-y:-1.5rem}.peer:focus~.peer-focus\:-translate-y-6,.peer:focus~.peer-focus\:scale-75{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:scale-75{--tw-scale-x:.75;--tw-scale-y:.75}.peer:focus~.peer-focus\:px-2{padding-left:.5rem;padding-right:.5rem}.peer:focus~.peer-focus\:font-medium{font-weight:500}.peer:focus~.peer-focus\:text-blue-600{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.peer:focus~.peer-focus\:ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.peer:focus~.peer-focus\:ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(164 202 254/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-green-300{--tw-ring-opacity:1;--tw-ring-color:rgb(132 225 188/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-orange-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 186 140/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-purple-300{--tw-ring-opacity:1;--tw-ring-color:rgb(202 191 253/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-red-300{--tw-ring-opacity:1;--tw-ring-color:rgb(248 180 180/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-teal-300{--tw-ring-opacity:1;--tw-ring-color:rgb(126 220 226/var(--tw-ring-opacity))}.peer:focus~.peer-focus\:ring-yellow-300{--tw-ring-opacity:1;--tw-ring-color:rgb(250 202 21/var(--tw-ring-opacity))}:is(.dark .dark\:block){display:block}:is(.dark .dark\:inline-block){display:inline-block}:is(.dark .dark\:hidden){display:none}:is(.dark .dark\:divide-gray-600)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(75 85 99/var(--tw-divide-opacity))}:is(.dark .dark\:divide-gray-700)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(55 65 81/var(--tw-divide-opacity))}:is(.dark .dark\:\!border-blue-500){--tw-border-opacity:1!important;border-color:rgb(63 131 248/var(--tw-border-opacity))!important}:is(.dark .dark\:border-blue-400){--tw-border-opacity:1;border-color:rgb(118 169 250/var(--tw-border-opacity))}:is(.dark .dark\:border-blue-500){--tw-border-opacity:1;border-color:rgb(63 131 248/var(--tw-border-opacity))}:is(.dark .dark\:border-blue-600){--tw-border-opacity:1;border-color:rgb(28 100 242/var(--tw-border-opacity))}:is(.dark .dark\:border-blue-800){--tw-border-opacity:1;border-color:rgb(30 66 159/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-400){--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-500){--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-600){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-700){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-800){--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-900){--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity))}:is(.dark .dark\:border-green-500){--tw-border-opacity:1;border-color:rgb(14 159 110/var(--tw-border-opacity))}:is(.dark .dark\:border-green-600){--tw-border-opacity:1;border-color:rgb(5 122 85/var(--tw-border-opacity))}:is(.dark .dark\:border-green-800){--tw-border-opacity:1;border-color:rgb(3 84 63/var(--tw-border-opacity))}:is(.dark .dark\:border-purple-400){--tw-border-opacity:1;border-color:rgb(172 148 250/var(--tw-border-opacity))}:is(.dark .dark\:border-purple-500){--tw-border-opacity:1;border-color:rgb(144 97 249/var(--tw-border-opacity))}:is(.dark .dark\:border-red-500){--tw-border-opacity:1;border-color:rgb(240 82 82/var(--tw-border-opacity))}:is(.dark .dark\:border-red-600){--tw-border-opacity:1;border-color:rgb(224 36 36/var(--tw-border-opacity))}:is(.dark .dark\:border-red-800){--tw-border-opacity:1;border-color:rgb(155 28 28/var(--tw-border-opacity))}:is(.dark .dark\:border-transparent){border-color:transparent}:is(.dark .dark\:border-white){--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}:is(.dark .dark\:border-yellow-300){--tw-border-opacity:1;border-color:rgb(250 202 21/var(--tw-border-opacity))}:is(.dark .dark\:border-yellow-800){--tw-border-opacity:1;border-color:rgb(114 59 19/var(--tw-border-opacity))}:is(.dark .dark\:border-e-gray-700){--tw-border-opacity:1;border-inline-end-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\:border-s-gray-700){--tw-border-opacity:1;border-inline-start-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\:\!bg-gray-700){--tw-bg-opacity:1!important;background-color:rgb(55 65 81/var(--tw-bg-opacity))!important}:is(.dark .dark\:bg-blue-200){--tw-bg-opacity:1;background-color:rgb(195 221 253/var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-400){--tw-bg-opacity:1;background-color:rgb(118 169 250/var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-500){--tw-bg-opacity:1;background-color:rgb(63 131 248/var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-600){--tw-bg-opacity:1;background-color:rgb(28 100 242/var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-800){--tw-bg-opacity:1;background-color:rgb(30 66 159/var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-900){--tw-bg-opacity:1;background-color:rgb(35 56 118/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-300){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-400){--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-500){--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-600){--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-700){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800\/30){background-color:rgba(31,41,55,.3)}:is(.dark .dark\:bg-gray-800\/50){background-color:rgba(31,41,55,.5)}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-900\/60){background-color:rgba(17,24,39,.6)}:is(.dark .dark\:bg-gray-900\/80){background-color:rgba(17,24,39,.8)}:is(.dark .dark\:bg-green-500){--tw-bg-opacity:1;background-color:rgb(14 159 110/var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-600){--tw-bg-opacity:1;background-color:rgb(5 122 85/var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-800){--tw-bg-opacity:1;background-color:rgb(3 84 63/var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-900){--tw-bg-opacity:1;background-color:rgb(1 71 55/var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-500){--tw-bg-opacity:1;background-color:rgb(104 117 245/var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-900){--tw-bg-opacity:1;background-color:rgb(54 47 120/var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-200){--tw-bg-opacity:1;background-color:rgb(252 217 189/var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-400){--tw-bg-opacity:1;background-color:rgb(255 138 76/var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-700){--tw-bg-opacity:1;background-color:rgb(180 52 3/var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-900){--tw-bg-opacity:1;background-color:rgb(117 26 61/var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-500){--tw-bg-opacity:1;background-color:rgb(144 97 249/var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-600){--tw-bg-opacity:1;background-color:rgb(126 58 242/var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-900){--tw-bg-opacity:1;background-color:rgb(74 29 150/var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-500){--tw-bg-opacity:1;background-color:rgb(240 82 82/var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-600){--tw-bg-opacity:1;background-color:rgb(224 36 36/var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-800){--tw-bg-opacity:1;background-color:rgb(155 28 28/var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-900){--tw-bg-opacity:1;background-color:rgb(119 29 29/var(--tw-bg-opacity))}:is(.dark .dark\:bg-white){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}:is(.dark .dark\:bg-yellow-300){--tw-bg-opacity:1;background-color:rgb(250 202 21/var(--tw-bg-opacity))}:is(.dark .dark\:bg-yellow-900){--tw-bg-opacity:1;background-color:rgb(99 49 18/var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[url\(\'https\:\/\/flowbite\.s3\.amazonaws\.com\/docs\/jumbotron\/hero-pattern-dark\.svg\'\)\]){background-image:url(https://flowbite.s3.amazonaws.com/docs/jumbotron/hero-pattern-dark.svg)}:is(.dark .dark\:from-blue-900){--tw-gradient-from:#233876 var(--tw-gradient-from-position);--tw-gradient-to:rgba(35,56,118,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}:is(.dark .dark\:fill-gray-300){fill:#d1d5db}:is(.dark .dark\:fill-gray-400){fill:#9ca3af}:is(.dark .dark\:fill-gray-500){fill:#6b7280}:is(.dark .dark\:fill-white){fill:#fff}:is(.dark .dark\:\!text-blue-500){--tw-text-opacity:1!important;color:rgb(63 131 248/var(--tw-text-opacity))!important}:is(.dark .dark\:text-blue-100){--tw-text-opacity:1;color:rgb(225 239 254/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-200){--tw-text-opacity:1;color:rgb(195 221 253/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-300){--tw-text-opacity:1;color:rgb(164 202 254/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-400){--tw-text-opacity:1;color:rgb(118 169 250/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-500){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-500\/100){color:#3f83f8}:is(.dark .dark\:text-blue-500\/25){color:rgba(63,131,248,.25)}:is(.dark .dark\:text-blue-500\/50){color:rgba(63,131,248,.5)}:is(.dark .dark\:text-blue-500\/75){color:rgba(63,131,248,.75)}:is(.dark .dark\:text-blue-600){--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}:is(.dark .dark\:text-blue-800){--tw-text-opacity:1;color:rgb(30 66 159/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-100){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-200){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-500){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-600){--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-700){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-800){--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-900){--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}:is(.dark .dark\:text-green-200){--tw-text-opacity:1;color:rgb(188 240 218/var(--tw-text-opacity))}:is(.dark .dark\:text-green-300){--tw-text-opacity:1;color:rgb(132 225 188/var(--tw-text-opacity))}:is(.dark .dark\:text-green-400){--tw-text-opacity:1;color:rgb(49 196 141/var(--tw-text-opacity))}:is(.dark .dark\:text-green-500){--tw-text-opacity:1;color:rgb(14 159 110/var(--tw-text-opacity))}:is(.dark .dark\:text-green-600){--tw-text-opacity:1;color:rgb(5 122 85/var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-300){--tw-text-opacity:1;color:rgb(180 198 252/var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-400){--tw-text-opacity:1;color:rgb(141 162 251/var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-500){--tw-text-opacity:1;color:rgb(104 117 245/var(--tw-text-opacity))}:is(.dark .dark\:text-orange-200){--tw-text-opacity:1;color:rgb(252 217 189/var(--tw-text-opacity))}:is(.dark .dark\:text-orange-300){--tw-text-opacity:1;color:rgb(253 186 140/var(--tw-text-opacity))}:is(.dark .dark\:text-orange-900){--tw-text-opacity:1;color:rgb(119 29 29/var(--tw-text-opacity))}:is(.dark .dark\:text-pink-300){--tw-text-opacity:1;color:rgb(248 180 217/var(--tw-text-opacity))}:is(.dark .dark\:text-pink-400){--tw-text-opacity:1;color:rgb(241 126 184/var(--tw-text-opacity))}:is(.dark .dark\:text-purple-300){--tw-text-opacity:1;color:rgb(202 191 253/var(--tw-text-opacity))}:is(.dark .dark\:text-purple-400){--tw-text-opacity:1;color:rgb(172 148 250/var(--tw-text-opacity))}:is(.dark .dark\:text-purple-500){--tw-text-opacity:1;color:rgb(144 97 249/var(--tw-text-opacity))}:is(.dark .dark\:text-red-200){--tw-text-opacity:1;color:rgb(251 213 213/var(--tw-text-opacity))}:is(.dark .dark\:text-red-300){--tw-text-opacity:1;color:rgb(248 180 180/var(--tw-text-opacity))}:is(.dark .dark\:text-red-400){--tw-text-opacity:1;color:rgb(249 128 128/var(--tw-text-opacity))}:is(.dark .dark\:text-red-500){--tw-text-opacity:1;color:rgb(240 82 82/var(--tw-text-opacity))}:is(.dark .dark\:text-teal-300){--tw-text-opacity:1;color:rgb(126 220 226/var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-300){--tw-text-opacity:1;color:rgb(250 202 21/var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-500){--tw-text-opacity:1;color:rgb(194 120 3/var(--tw-text-opacity))}:is(.dark .dark\:decoration-blue-600){text-decoration-color:#1c64f2}:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-gray-400)::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-green-500)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(14 159 110/var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-green-500)::placeholder{--tw-placeholder-opacity:1;color:rgb(14 159 110/var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-red-500)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(240 82 82/var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-red-500)::placeholder{--tw-placeholder-opacity:1;color:rgb(240 82 82/var(--tw-placeholder-opacity))}:is(.dark .dark\:shadow-lg){--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-sm-light){--tw-shadow:0 2px 5px 0px hsla(0,0%,100%,.08);--tw-shadow-colored:0 2px 5px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-blue-800\/80){--tw-shadow-color:rgba(30,66,159,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-cyan-800\/80){--tw-shadow-color:rgba(21,94,117,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-gray-800){--tw-shadow-color:#1f2937;--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-green-800\/80){--tw-shadow-color:rgba(3,84,63,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-lime-800\/80){--tw-shadow-color:rgba(63,98,18,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-pink-800\/80){--tw-shadow-color:rgba(153,21,75,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-purple-800\/80){--tw-shadow-color:rgba(85,33,181,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-red-800\/80){--tw-shadow-color:rgba(155,28,28,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:shadow-teal-800\/80){--tw-shadow-color:rgba(5,80,92,.8);--tw-shadow:var(--tw-shadow-colored)}:is(.dark .dark\:ring-gray-500){--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity))}:is(.dark .dark\:ring-gray-700){--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity))}:is(.dark .dark\:ring-gray-900){--tw-ring-opacity:1;--tw-ring-color:rgb(17 24 39/var(--tw-ring-opacity))}:is(.dark .dark\:ring-offset-gray-700){--tw-ring-offset-color:#374151}:is(.dark .dark\:ring-offset-gray-800){--tw-ring-offset-color:#1f2937}:is(.dark .dark\:first-letter\:text-gray-100):first-letter{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}:is(.dark .dark\:after\:border-blue-800):after{--tw-border-opacity:1;border-color:rgb(30 66 159/var(--tw-border-opacity));content:var(--tw-content)}:is(.dark .dark\:after\:border-gray-700):after{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity));content:var(--tw-content)}:is(.dark .dark\:after\:text-gray-500):after{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity));content:var(--tw-content)}:is(.dark .odd\:dark\:bg-gray-900):nth-child(odd){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}:is(.dark .even\:dark\:bg-gray-800):nth-child(2n){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:border-blue-600:hover){--tw-border-opacity:1;border-color:rgb(28 100 242/var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-blue-700:hover){--tw-border-opacity:1;border-color:rgb(26 86 219/var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-gray-500:hover){--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-gray-600:hover){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-gray-700:hover){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\:hover\:bg-\[\#050708\]\/30:hover){background-color:rgba(5,7,8,.3)}:is(.dark .dark\:hover\:bg-\[\#050708\]\/40:hover){background-color:rgba(5,7,8,.4)}:is(.dark .dark\:hover\:bg-\[\#FF9119\]\/80:hover){background-color:rgba(255,145,25,.8)}:is(.dark .dark\:hover\:bg-blue-500:hover){--tw-bg-opacity:1;background-color:rgb(63 131 248/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-600:hover){--tw-bg-opacity:1;background-color:rgb(28 100 242/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-700:hover){--tw-bg-opacity:1;background-color:rgb(26 86 219/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-800:hover){--tw-bg-opacity:1;background-color:rgb(30 66 159/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-200:hover){--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-500:hover){--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-600:hover){--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-700:hover){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-800:hover){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-600:hover){--tw-bg-opacity:1;background-color:rgb(5 122 85/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-700:hover){--tw-bg-opacity:1;background-color:rgb(4 108 78/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-800:hover){--tw-bg-opacity:1;background-color:rgb(3 84 63/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-indigo-800:hover){--tw-bg-opacity:1;background-color:rgb(66 56 157/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-800:hover){--tw-bg-opacity:1;background-color:rgb(153 21 75/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-500:hover){--tw-bg-opacity:1;background-color:rgb(144 97 249/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-700:hover){--tw-bg-opacity:1;background-color:rgb(108 43 217/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-800:hover){--tw-bg-opacity:1;background-color:rgb(85 33 181/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-600:hover){--tw-bg-opacity:1;background-color:rgb(224 36 36/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-700:hover){--tw-bg-opacity:1;background-color:rgb(200 30 30/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-800:hover){--tw-bg-opacity:1;background-color:rgb(155 28 28/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-300:hover){--tw-bg-opacity:1;background-color:rgb(250 202 21/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-400:hover){--tw-bg-opacity:1;background-color:rgb(227 160 8/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-800:hover){--tw-bg-opacity:1;background-color:rgb(114 59 19/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:\!text-blue-500:hover){--tw-text-opacity:1!important;color:rgb(63 131 248/var(--tw-text-opacity))!important}:is(.dark .dark\:hover\:text-blue-300:hover){--tw-text-opacity:1;color:rgb(164 202 254/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-blue-400:hover){--tw-text-opacity:1;color:rgb(118 169 250/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-blue-500:hover){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-blue-600:hover){--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-blue-700:hover){--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-100:hover){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-300:hover){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-400:hover){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-800:hover){--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-900:hover){--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-green-300:hover){--tw-text-opacity:1;color:rgb(132 225 188/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-indigo-300:hover){--tw-text-opacity:1;color:rgb(180 198 252/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-pink-300:hover){--tw-text-opacity:1;color:rgb(248 180 217/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-purple-300:hover){--tw-text-opacity:1;color:rgb(202 191 253/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-purple-500:hover){--tw-text-opacity:1;color:rgb(144 97 249/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-red-300:hover){--tw-text-opacity:1;color:rgb(248 180 180/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-white:hover){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-yellow-300:hover){--tw-text-opacity:1;color:rgb(250 202 21/var(--tw-text-opacity))}:is(.dark .dark\:hover\:bg-blend-darken:hover){background-blend-mode:darken}:is(.dark .dark\:focus\:border-blue-500:focus){--tw-border-opacity:1;border-color:rgb(63 131 248/var(--tw-border-opacity))}:is(.dark .dark\:focus\:border-green-500:focus){--tw-border-opacity:1;border-color:rgb(14 159 110/var(--tw-border-opacity))}:is(.dark .dark\:focus\:border-red-500:focus){--tw-border-opacity:1;border-color:rgb(240 82 82/var(--tw-border-opacity))}:is(.dark .dark\:focus\:bg-blue-600:focus){--tw-bg-opacity:1;background-color:rgb(28 100 242/var(--tw-bg-opacity))}:is(.dark .dark\:focus\:bg-gray-700:focus){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}:is(.dark .dark\:focus\:text-white:focus){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .dark\:focus\:ring-\[\#050708\]\/50:focus){--tw-ring-color:rgba(5,7,8,.5)}:is(.dark .dark\:focus\:ring-\[\#1da1f2\]\/55:focus){--tw-ring-color:rgba(29,161,242,.55)}:is(.dark .dark\:focus\:ring-\[\#2557D6\]\/50:focus){--tw-ring-color:rgba(37,87,214,.5)}:is(.dark .dark\:focus\:ring-\[\#3b5998\]\/55:focus){--tw-ring-color:rgba(59,89,152,.55)}:is(.dark .dark\:focus\:ring-\[\#4285F4\]\/55:focus){--tw-ring-color:rgba(66,133,244,.55)}:is(.dark .dark\:focus\:ring-\[\#F7BE38\]\/50:focus){--tw-ring-color:rgba(247,190,56,.5)}:is(.dark .dark\:focus\:ring-\[\#FF9119\]\/40:focus){--tw-ring-color:rgba(255,145,25,.4)}:is(.dark .dark\:focus\:ring-blue-500:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(63 131 248/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(28 100 242/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(30 66 159/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-900:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(35 56 118/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-cyan-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(21 94 117/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-400:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-500:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-700:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-green-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(5 122 85/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-green-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(3 84 63/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-lime-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(63 98 18/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-orange-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(208 56 1/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(153 21 75/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(126 58 242/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(85 33 181/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-900:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(74 29 150/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-400:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(249 128 128/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(224 36 36/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(155 28 28/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-900:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(119 29 29/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(4 116 129/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-700:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(3 102 114/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(5 80 92/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-600:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(159 88 10/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(114 59 19/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-900:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(99 49 18/var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-offset-gray-700:focus){--tw-ring-offset-color:#374151}:is(.dark .dark\:focus\:ring-offset-gray-800:focus){--tw-ring-offset-color:#1f2937}:is(.dark .group:hover .dark\:group-hover\:bg-gray-700){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}:is(.dark .group:hover .dark\:group-hover\:bg-gray-800\/60){background-color:rgba(31,41,55,.6)}:is(.dark .group:hover .dark\:group-hover\:text-blue-500){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .group:hover .dark\:group-hover\:text-gray-300){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}:is(.dark .group:hover .dark\:group-hover\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .group:focus .dark\:group-focus\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .group:focus .dark\:group-focus\:ring-gray-800\/70){--tw-ring-color:rgba(31,41,55,.7)}:is(.dark .peer:checked~.dark\:peer-checked\:border-blue-500){--tw-border-opacity:1;border-color:rgb(63 131 248/var(--tw-border-opacity))}:is(.dark .peer:checked~.dark\:peer-checked\:bg-blue-500){--tw-bg-opacity:1;background-color:rgb(63 131 248/var(--tw-bg-opacity))}:is(.dark .peer:checked~.dark\:peer-checked\:bg-blue-900){--tw-bg-opacity:1;background-color:rgb(35 56 118/var(--tw-bg-opacity))}:is(.dark .peer:checked~.dark\:peer-checked\:text-blue-500){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .peer:checked~.dark\:peer-checked\:text-gray-300){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.peer:focus~:is(.dark .peer-focus\:dark\:text-blue-500){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-blue-800){--tw-ring-opacity:1;--tw-ring-color:rgb(30 66 159/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-green-800){--tw-ring-opacity:1;--tw-ring-color:rgb(3 84 63/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-orange-800){--tw-ring-opacity:1;--tw-ring-color:rgb(138 44 13/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-purple-800){--tw-ring-opacity:1;--tw-ring-color:rgb(85 33 181/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-red-800){--tw-ring-opacity:1;--tw-ring-color:rgb(155 28 28/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-teal-800){--tw-ring-opacity:1;--tw-ring-color:rgb(5 80 92/var(--tw-ring-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-yellow-800){--tw-ring-opacity:1;--tw-ring-color:rgb(114 59 19/var(--tw-ring-opacity))}@media (min-width:640px){.sm\:order-last{order:9999}.sm\:col-span-1{grid-column:span 1/span 1}.sm\:col-span-3{grid-column:span 3/span 3}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:mb-0{margin-bottom:0}.sm\:mb-4{margin-bottom:1rem}.sm\:mb-5{margin-bottom:1.25rem}.sm\:ml-3{margin-left:.75rem}.sm\:ml-64{margin-left:16rem}.sm\:ms-2{-webkit-margin-start:.5rem;margin-inline-start:.5rem}.sm\:ms-4{-webkit-margin-start:1rem;margin-inline-start:1rem}.sm\:ms-7{-webkit-margin-start:1.75rem;margin-inline-start:1.75rem}.sm\:ms-auto{-webkit-margin-start:auto;margin-inline-start:auto}.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:inline-flex{display:inline-flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:h-4{height:1rem}.sm\:h-64{height:16rem}.sm\:h-7{height:1.75rem}.sm\:h-9{height:2.25rem}.sm\:h-96{height:24rem}.sm\:w-4{width:1rem}.sm\:w-96{width:24rem}.sm\:w-auto{width:auto}.sm\:max-w-\[15rem\]{max-width:15rem}.sm\:translate-x-0{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-6{gap:1.5rem}.sm\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.sm\:space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.25rem*var(--tw-space-x-reverse))}.sm\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.sm\:divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.sm\:rounded-lg{border-radius:.5rem}.sm\:border-b-0{border-bottom-width:0}.sm\:border-r{border-right-width:1px}.sm\:border-s{border-inline-start-width:1px}.sm\:p-4{padding:1rem}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-16{padding-left:4rem;padding-right:4rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\:py-16{padding-bottom:4rem;padding-top:4rem}.sm\:py-4{padding-top:1rem}.sm\:pb-4,.sm\:py-4{padding-bottom:1rem}.sm\:pe-4{-webkit-padding-end:1rem;padding-inline-end:1rem}.sm\:pe-8{-webkit-padding-end:2rem;padding-inline-end:2rem}.sm\:ps-2{-webkit-padding-start:.5rem;padding-inline-start:.5rem}.sm\:ps-4{-webkit-padding-start:1rem;padding-inline-start:1rem}.sm\:ps-5{-webkit-padding-start:1.25rem;padding-inline-start:1.25rem}.sm\:pt-4{padding-top:1rem}.sm\:text-center{text-align:center}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}.sm\:ring-8{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.sm\:after\:inline-block:after{content:var(--tw-content);display:inline-block}.sm\:after\:hidden:after{content:var(--tw-content);display:none}.sm\:after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}}@media (min-width:768px){.md\:absolute{position:absolute}.md\:relative{position:relative}.md\:inset-0{inset:0}.md\:end-auto{inset-inline-end:auto}.md\:top-auto{top:auto}.md\:order-1{order:1}.md\:order-2{order:2}.md\:m-0{margin:0}.md\:mx-2{margin-left:.5rem;margin-right:.5rem}.md\:my-0{margin-bottom:0;margin-top:0}.md\:my-10{margin-bottom:2.5rem;margin-top:2.5rem}.md\:my-12{margin-bottom:3rem;margin-top:3rem}.md\:mb-0{margin-bottom:0}.md\:mb-12{margin-bottom:3rem}.md\:mb-5{margin-bottom:1.25rem}.md\:me-0{-webkit-margin-end:0;margin-inline-end:0}.md\:me-24{-webkit-margin-end:6rem;margin-inline-end:6rem}.md\:me-4{-webkit-margin-end:1rem;margin-inline-end:1rem}.md\:me-6{-webkit-margin-end:1.5rem;margin-inline-end:1.5rem}.md\:ml-2{margin-left:.5rem}.md\:mr-0{margin-right:0}.md\:ms-1{-webkit-margin-start:.25rem;margin-inline-start:.25rem}.md\:ms-2{-webkit-margin-start:.5rem;margin-inline-start:.5rem}.md\:mt-0{margin-top:0}.md\:mt-6{margin-top:1.5rem}.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:inline-flex{display:inline-flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:h-96{height:24rem}.md\:h-\[21px\]{height:21px}.md\:h-\[262px\]{height:262px}.md\:h-\[278px\]{height:278px}.md\:h-\[294px\]{height:294px}.md\:h-\[40px\]{height:40px}.md\:h-\[42px\]{height:42px}.md\:h-\[654px\]{height:654px}.md\:h-\[682px\]{height:682px}.md\:h-\[8px\]{height:8px}.md\:h-\[95px\]{height:95px}.md\:h-auto{height:auto}.md\:w-32{width:8rem}.md\:w-48{width:12rem}.md\:w-64{width:16rem}.md\:w-\[185px\]{width:185px}.md\:w-\[96px\]{width:96px}.md\:w-auto{width:auto}.md\:w-full{width:100%}.md\:max-w-\[142px\]{max-width:142px}.md\:max-w-\[512px\]{max-width:512px}.md\:max-w-\[597px\]{max-width:597px}.md\:max-w-screen-md{max-width:768px}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:gap-12{gap:3rem}.md\:gap-6{gap:1.5rem}.md\:gap-8{gap:2rem}.md\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(0px*(1 - var(--tw-space-x-reverse)));margin-right:calc(0px*var(--tw-space-x-reverse))}.md\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-s-lg{border-end-start-radius:.5rem;border-start-start-radius:.5rem}.md\:rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.md\:rounded-es-lg{border-end-start-radius:.5rem}.md\:rounded-se-lg{border-start-end-radius:.5rem}.md\:rounded-ss-lg{border-start-start-radius:.5rem}.md\:border-0{border-width:0}.md\:border-b-0{border-bottom-width:0}.md\:border-e{border-inline-end-width:1px}.md\:bg-transparent{background-color:transparent}.md\:bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.md\:p-0{padding:0}.md\:p-12{padding:3rem}.md\:p-5{padding:1.25rem}.md\:p-6{padding:1.5rem}.md\:p-8{padding:2rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-5{padding-left:1.25rem;padding-right:1.25rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-2{padding-bottom:.5rem;padding-top:.5rem}.md\:py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.md\:py-8{padding-bottom:2rem;padding-top:2rem}.md\:pb-0{padding-bottom:0}.md\:pb-4{padding-bottom:1rem}.md\:pb-5{padding-bottom:1.25rem}.md\:pe-4{-webkit-padding-end:1rem;padding-inline-end:1rem}.md\:pt-0{padding-top:0}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.md\:text-green-700{--tw-text-opacity:1;color:rgb(4 108 78/var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(28 100 242/var(--tw-text-opacity))}.md\:hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.md\:hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(4 108 78/var(--tw-text-opacity))}:is(.dark .md\:dark\:bg-gray-900){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}:is(.dark .md\:dark\:bg-transparent){background-color:transparent}:is(.dark .md\:dark\:text-blue-500){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .md\:dark\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .md\:dark\:hover\:bg-transparent:hover){background-color:transparent}:is(.dark .md\:dark\:hover\:text-blue-500:hover){--tw-text-opacity:1;color:rgb(63 131 248/var(--tw-text-opacity))}:is(.dark .md\:dark\:hover\:text-white:hover){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}}@media (min-width:1024px){.lg\:static{position:static}.lg\:sticky{position:sticky}.lg\:top-28{top:7rem}.lg\:order-1{order:1}.lg\:order-2{order:2}.lg\:col-span-5{grid-column:span 5/span 5}.lg\:col-span-7{grid-column:span 7/span 7}.lg\:my-12{margin-bottom:3rem;margin-top:3rem}.lg\:my-8{margin-bottom:2rem;margin-top:2rem}.lg\:mb-0{margin-bottom:0}.lg\:mb-16{margin-bottom:4rem}.lg\:mb-8{margin-bottom:2rem}.lg\:mr-0{margin-right:0}.lg\:mt-0{margin-top:0}.lg\:mt-10{margin-top:2.5rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:h-12{height:3rem}.lg\:h-4{height:1rem}.lg\:h-5{height:1.25rem}.lg\:h-6{height:1.5rem}.lg\:h-\[calc\(100vh-3rem\)\]{height:calc(100vh - 3rem)}.lg\:h-auto{height:auto}.lg\:max-h-full{max-height:100%}.lg\:w-12{width:3rem}.lg\:w-4{width:1rem}.lg\:w-48{width:12rem}.lg\:w-5{width:1.25rem}.lg\:w-6{width:1.5rem}.lg\:w-96{width:24rem}.lg\:w-auto{width:auto}.lg\:max-w-7xl{max-width:80rem}.lg\:max-w-screen-lg{max-width:1024px}.lg\:max-w-xl{max-width:36rem}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:gap-16{gap:4rem}.lg\:gap-8{gap:2rem}.lg\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.lg\:self-center{align-self:center}.lg\:overflow-visible{overflow:visible}.lg\:overflow-y-visible{overflow-y:visible}.lg\:border-0{border-width:0}.lg\:bg-transparent{background-color:transparent}.lg\:p-0{padding:0}.lg\:p-8{padding:2rem}.lg\:px-12{padding-left:3rem;padding-right:3rem}.lg\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\:px-36{padding-left:9rem;padding-right:9rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-48{padding-left:12rem;padding-right:12rem}.lg\:px-5{padding-left:1.25rem;padding-right:1.25rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-0{padding-bottom:0;padding-top:0}.lg\:py-16{padding-bottom:4rem;padding-top:4rem}.lg\:py-2{padding-bottom:.5rem;padding-top:.5rem}.lg\:py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.lg\:py-4{padding-bottom:1rem;padding-top:1rem}.lg\:py-56{padding-bottom:14rem;padding-top:14rem}.lg\:py-8{padding-bottom:2rem;padding-top:2rem}.lg\:pb-16{padding-bottom:4rem}.lg\:pb-20{padding-bottom:5rem}.lg\:pl-0{padding-left:0}.lg\:pl-3{padding-left:.75rem}.lg\:pt-0{padding-top:0}.lg\:pt-2{padding-top:.5rem}.lg\:pt-8{padding-top:2rem}.lg\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\:text-6xl{font-size:3.75rem;line-height:1}.lg\:text-sm{font-size:.875rem;line-height:1.25rem}.lg\:text-xl{font-size:1.25rem;line-height:1.75rem}.lg\:text-xs{font-size:.75rem;line-height:1rem}.lg\:text-blue-700{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}.lg\:hover\:bg-transparent:hover{background-color:transparent}.lg\:hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(26 86 219/var(--tw-text-opacity))}:is(.dark .lg\:dark\:hover\:bg-transparent:hover){background-color:transparent}:is(.dark .lg\:dark\:hover\:text-white:hover){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}}@media (min-width:1280px){.xl\:ml-20{margin-left:5rem}.xl\:block{display:block}.xl\:inline-flex{display:inline-flex}.xl\:hidden{display:none}.xl\:h-80{height:20rem}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:gap-0{gap:0}.xl\:gap-16{gap:4rem}.xl\:gap-24{gap:6rem}.xl\:px-2{padding-left:.5rem;padding-right:.5rem}.xl\:px-48{padding-left:12rem;padding-right:12rem}.xl\:pb-24{padding-bottom:6rem}.xl\:pt-24{padding-top:6rem}.xl\:text-6xl{font-size:3.75rem;line-height:1}.xl\:text-sm{font-size:.875rem;line-height:1.25rem}.xl\:after\:mx-10:after{content:var(--tw-content);margin-left:2.5rem;margin-right:2.5rem}}@media (min-width:1536px){.\32xl\:block{display:block}.\32xl\:h-96{height:24rem}.\32xl\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.\32xl\:gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.\32xl\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(0px*(1 - var(--tw-space-x-reverse)));margin-right:calc(0px*var(--tw-space-x-reverse))}}.rtl\:inset-x-0:where([dir=rtl],[dir=rtl] *){left:0;right:0}.rtl\:right-0:where([dir=rtl],[dir=rtl] *){right:0}.rtl\:ml-0:where([dir=rtl],[dir=rtl] *){margin-left:0}.rtl\:ml-2:where([dir=rtl],[dir=rtl] *){margin-left:.5rem}.rtl\:translate-x-1\/2:where([dir=rtl],[dir=rtl] *){--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:-rotate-90:where([dir=rtl],[dir=rtl] *){--tw-rotate:-90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:rotate-180:where([dir=rtl],[dir=rtl] *){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:rotate-\[270deg\]:where([dir=rtl],[dir=rtl] *){--tw-rotate:270deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:justify-end:where([dir=rtl],[dir=rtl] *){justify-content:flex-end}.rtl\:gap-8:where([dir=rtl],[dir=rtl] *){gap:2rem}.rtl\:space-x-reverse:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.rtl\:divide-x-reverse:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:1}.rtl\:text-left:where([dir=rtl],[dir=rtl] *){text-align:left}.rtl\:text-right:where([dir=rtl],[dir=rtl] *){text-align:right}.peer:checked~.rtl\:peer-checked\:after\:-translate-x-full:where([dir=rtl],[dir=rtl] *):after{--tw-translate-x:-100%;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.rtl\:peer-checked\:after\:translate-x-\[-100\%\]:where([dir=rtl],[dir=rtl] *):after{--tw-translate-x:-100%;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.rtl\:peer-focus\:left-auto:where([dir=rtl],[dir=rtl] *){left:auto}.peer:focus~.rtl\:peer-focus\:translate-x-1\/4:where([dir=rtl],[dir=rtl] *){--tw-translate-x:25%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:640px){.sm\:rtl\:divide-x-reverse:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:1}}@media (min-width:768px){.md\:rtl\:space-x-reverse:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}}.\[\&\>div\>div\]\:bg-gray-50>div>div{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.\[\&\>div\>div\]\:shadow-none>div>div{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\[\&\>div\]\:mx-auto>div{margin-left:auto;margin-right:auto}.\[\&_div\>button\]\:bg-gray-50 div>button{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.min.js b/node_modules/flowbite/dist/flowbite.min.js new file mode 100644 index 0000000..f2663ac --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.min.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Flowbite",[],e):"object"==typeof exports?exports.Flowbite=e():t.Flowbite=e()}(self,(function(){return function(){"use strict";var t={647:function(t,e,i){i.r(e)},853:function(t,e,i){i.r(e),i.d(e,{afterMain:function(){return k},afterRead:function(){return b},afterWrite:function(){return D},applyStyles:function(){return T},arrow:function(){return Q},auto:function(){return s},basePlacements:function(){return d},beforeMain:function(){return _},beforeRead:function(){return y},beforeWrite:function(){return E},bottom:function(){return r},clippingParents:function(){return u},computeStyles:function(){return it},createPopper:function(){return Tt},createPopperBase:function(){return St},createPopperLite:function(){return Mt},detectOverflow:function(){return mt},end:function(){return l},eventListeners:function(){return rt},flip:function(){return bt},hide:function(){return kt},left:function(){return a},main:function(){return w},modifierPhases:function(){return O},offset:function(){return Et},placements:function(){return v},popper:function(){return p},popperGenerator:function(){return Ct},popperOffsets:function(){return xt},preventOverflow:function(){return Dt},read:function(){return m},reference:function(){return f},right:function(){return o},start:function(){return c},top:function(){return n},variationPlacements:function(){return g},viewport:function(){return h},write:function(){return x}});var n="top",r="bottom",o="right",a="left",s="auto",d=[n,r,o,a],c="start",l="end",u="clippingParents",h="viewport",p="popper",f="reference",g=d.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+l])}),[]),v=[].concat(d,[s]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+l])}),[]),y="beforeRead",m="read",b="afterRead",_="beforeMain",w="main",k="afterMain",E="beforeWrite",x="write",D="afterWrite",O=[y,m,b,_,w,k,E,x,D];function L(t){return t?(t.nodeName||"").toLowerCase():null}function I(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function A(t){return t instanceof I(t).Element||t instanceof Element}function C(t){return t instanceof I(t).HTMLElement||t instanceof HTMLElement}function S(t){return"undefined"!=typeof ShadowRoot&&(t instanceof I(t).ShadowRoot||t instanceof ShadowRoot)}var T={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];C(r)&&L(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});C(n)&&L(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function M(t){return t.split("-")[0]}var H=Math.max,P=Math.min,j=Math.round;function V(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function B(){return!/^((?!chrome|android).)*safari/i.test(V())}function z(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),r=1,o=1;e&&C(t)&&(r=t.offsetWidth>0&&j(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&j(n.height)/t.offsetHeight||1);var a=(A(t)?I(t):window).visualViewport,s=!B()&&i,d=(n.left+(s&&a?a.offsetLeft:0))/r,c=(n.top+(s&&a?a.offsetTop:0))/o,l=n.width/r,u=n.height/o;return{width:l,height:u,top:c,right:d+l,bottom:c+u,left:d,x:d,y:c}}function F(t){var e=z(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function N(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&S(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function W(t){return I(t).getComputedStyle(t)}function q(t){return["table","td","th"].indexOf(L(t))>=0}function R(t){return((A(t)?t.ownerDocument:t.document)||window.document).documentElement}function Y(t){return"html"===L(t)?t:t.assignedSlot||t.parentNode||(S(t)?t.host:null)||R(t)}function K(t){return C(t)&&"fixed"!==W(t).position?t.offsetParent:null}function U(t){for(var e=I(t),i=K(t);i&&q(i)&&"static"===W(i).position;)i=K(i);return i&&("html"===L(i)||"body"===L(i)&&"static"===W(i).position)?e:i||function(t){var e=/firefox/i.test(V());if(/Trident/i.test(V())&&C(t)&&"fixed"===W(t).position)return null;var i=Y(t);for(S(i)&&(i=i.host);C(i)&&["html","body"].indexOf(L(i))<0;){var n=W(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function J(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function X(t,e,i){return H(t,P(e,i))}function $(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function G(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,s=t.name,c=t.options,l=i.elements.arrow,u=i.modifiersData.popperOffsets,h=M(i.placement),p=J(h),f=[a,o].indexOf(h)>=0?"height":"width";if(l&&u){var g=function(t,e){return $("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:G(t,d))}(c.padding,i),v=F(l),y="y"===p?n:a,m="y"===p?r:o,b=i.rects.reference[f]+i.rects.reference[p]-u[p]-i.rects.popper[f],_=u[p]-i.rects.reference[p],w=U(l),k=w?"y"===p?w.clientHeight||0:w.clientWidth||0:0,E=b/2-_/2,x=g[y],D=k-v[f]-g[m],O=k/2-v[f]/2+E,L=X(x,O,D),I=p;i.modifiersData[s]=((e={})[I]=L,e.centerOffset=L-O,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&N(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,i=t.popper,s=t.popperRect,d=t.placement,c=t.variation,u=t.offsets,h=t.position,p=t.gpuAcceleration,f=t.adaptive,g=t.roundOffsets,v=t.isFixed,y=u.x,m=void 0===y?0:y,b=u.y,_=void 0===b?0:b,w="function"==typeof g?g({x:m,y:_}):{x:m,y:_};m=w.x,_=w.y;var k=u.hasOwnProperty("x"),E=u.hasOwnProperty("y"),x=a,D=n,O=window;if(f){var L=U(i),A="clientHeight",C="clientWidth";if(L===I(i)&&"static"!==W(L=R(i)).position&&"absolute"===h&&(A="scrollHeight",C="scrollWidth"),d===n||(d===a||d===o)&&c===l)D=r,_-=(v&&L===O&&O.visualViewport?O.visualViewport.height:L[A])-s.height,_*=p?1:-1;if(d===a||(d===n||d===r)&&c===l)x=o,m-=(v&&L===O&&O.visualViewport?O.visualViewport.width:L[C])-s.width,m*=p?1:-1}var S,T=Object.assign({position:h},f&&tt),M=!0===g?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:j(e*n)/n||0,y:j(i*n)/n||0}}({x:m,y:_}):{x:m,y:_};return m=M.x,_=M.y,p?Object.assign({},T,((S={})[D]=E?"0":"",S[x]=k?"0":"",S.transform=(O.devicePixelRatio||1)<=1?"translate("+m+"px, "+_+"px)":"translate3d("+m+"px, "+_+"px, 0)",S)):Object.assign({},T,((e={})[D]=E?_+"px":"",e[x]=k?m+"px":"",e.transform="",e))}var it={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,a=void 0===o||o,s=i.roundOffsets,d=void 0===s||s,c={placement:M(e.placement),variation:Z(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:d})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},nt={passive:!0};var rt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,o=void 0===r||r,a=n.resize,s=void 0===a||a,d=I(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,nt)})),s&&d.addEventListener("resize",i.update,nt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,nt)})),s&&d.removeEventListener("resize",i.update,nt)}},data:{}},ot={left:"right",right:"left",bottom:"top",top:"bottom"};function at(t){return t.replace(/left|right|bottom|top/g,(function(t){return ot[t]}))}var st={start:"end",end:"start"};function dt(t){return t.replace(/start|end/g,(function(t){return st[t]}))}function ct(t){var e=I(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lt(t){return z(R(t)).left+ct(t).scrollLeft}function ut(t){var e=W(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function ht(t){return["html","body","#document"].indexOf(L(t))>=0?t.ownerDocument.body:C(t)&&ut(t)?t:ht(Y(t))}function pt(t,e){var i;void 0===e&&(e=[]);var n=ht(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=I(n),a=r?[o].concat(o.visualViewport||[],ut(n)?n:[]):n,s=e.concat(a);return r?s:s.concat(pt(Y(a)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gt(t,e,i){return e===h?ft(function(t,e){var i=I(t),n=R(t),r=i.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,d=0;if(r){o=r.width,a=r.height;var c=B();(c||!c&&"fixed"===e)&&(s=r.offsetLeft,d=r.offsetTop)}return{width:o,height:a,x:s+lt(t),y:d}}(t,i)):A(e)?function(t,e){var i=z(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ft(function(t){var e,i=R(t),n=ct(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=H(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=H(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-n.scrollLeft+lt(t),d=-n.scrollTop;return"rtl"===W(r||i).direction&&(s+=H(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:d}}(R(t)))}function vt(t,e,i,n){var r="clippingParents"===e?function(t){var e=pt(Y(t)),i=["absolute","fixed"].indexOf(W(t).position)>=0&&C(t)?U(t):t;return A(i)?e.filter((function(t){return A(t)&&N(t,i)&&"body"!==L(t)})):[]}(t):[].concat(e),o=[].concat(r,[i]),a=o[0],s=o.reduce((function(e,i){var r=gt(t,i,n);return e.top=H(r.top,e.top),e.right=P(r.right,e.right),e.bottom=P(r.bottom,e.bottom),e.left=H(r.left,e.left),e}),gt(t,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function yt(t){var e,i=t.reference,s=t.element,d=t.placement,u=d?M(d):null,h=d?Z(d):null,p=i.x+i.width/2-s.width/2,f=i.y+i.height/2-s.height/2;switch(u){case n:e={x:p,y:i.y-s.height};break;case r:e={x:p,y:i.y+i.height};break;case o:e={x:i.x+i.width,y:f};break;case a:e={x:i.x-s.width,y:f};break;default:e={x:i.x,y:i.y}}var g=u?J(u):null;if(null!=g){var v="y"===g?"height":"width";switch(h){case c:e[g]=e[g]-(i[v]/2-s[v]/2);break;case l:e[g]=e[g]+(i[v]/2-s[v]/2)}}return e}function mt(t,e){void 0===e&&(e={});var i=e,a=i.placement,s=void 0===a?t.placement:a,c=i.strategy,l=void 0===c?t.strategy:c,g=i.boundary,v=void 0===g?u:g,y=i.rootBoundary,m=void 0===y?h:y,b=i.elementContext,_=void 0===b?p:b,w=i.altBoundary,k=void 0!==w&&w,E=i.padding,x=void 0===E?0:E,D=$("number"!=typeof x?x:G(x,d)),O=_===p?f:p,L=t.rects.popper,I=t.elements[k?O:_],C=vt(A(I)?I:I.contextElement||R(t.elements.popper),v,m,l),S=z(t.elements.reference),T=yt({reference:S,element:L,strategy:"absolute",placement:s}),M=ft(Object.assign({},L,T)),H=_===p?M:S,P={top:C.top-H.top+D.top,bottom:H.bottom-C.bottom+D.bottom,left:C.left-H.left+D.left,right:H.right-C.right+D.right},j=t.modifiersData.offset;if(_===p&&j){var V=j[s];Object.keys(P).forEach((function(t){var e=[o,r].indexOf(t)>=0?1:-1,i=[n,r].indexOf(t)>=0?"y":"x";P[t]+=V[i]*e}))}return P}var bt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,l=t.name;if(!e.modifiersData[l]._skip){for(var u=i.mainAxis,h=void 0===u||u,p=i.altAxis,f=void 0===p||p,y=i.fallbackPlacements,m=i.padding,b=i.boundary,_=i.rootBoundary,w=i.altBoundary,k=i.flipVariations,E=void 0===k||k,x=i.allowedAutoPlacements,D=e.options.placement,O=M(D),L=y||(O===D||!E?[at(D)]:function(t){if(M(t)===s)return[];var e=at(t);return[dt(t),e,dt(e)]}(D)),I=[D].concat(L).reduce((function(t,i){return t.concat(M(i)===s?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,a=i.padding,s=i.flipVariations,c=i.allowedAutoPlacements,l=void 0===c?v:c,u=Z(n),h=u?s?g:g.filter((function(t){return Z(t)===u})):d,p=h.filter((function(t){return l.indexOf(t)>=0}));0===p.length&&(p=h);var f=p.reduce((function(e,i){return e[i]=mt(t,{placement:i,boundary:r,rootBoundary:o,padding:a})[M(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:b,rootBoundary:_,padding:m,flipVariations:E,allowedAutoPlacements:x}):i)}),[]),A=e.rects.reference,C=e.rects.popper,S=new Map,T=!0,H=I[0],P=0;P=0,F=z?"width":"height",N=mt(e,{placement:j,boundary:b,rootBoundary:_,altBoundary:w,padding:m}),W=z?B?o:a:B?r:n;A[F]>C[F]&&(W=at(W));var q=at(W),R=[];if(h&&R.push(N[V]<=0),f&&R.push(N[W]<=0,N[q]<=0),R.every((function(t){return t}))){H=j,T=!1;break}S.set(j,R)}if(T)for(var Y=function(t){var e=I.find((function(e){var i=S.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return H=e,"break"},K=E?3:1;K>0;K--){if("break"===Y(K))break}e.placement!==H&&(e.modifiersData[l]._skip=!0,e.placement=H,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function _t(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function wt(t){return[n,o,r,a].some((function(e){return t[e]>=0}))}var kt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,a=mt(e,{elementContext:"reference"}),s=mt(e,{altBoundary:!0}),d=_t(a,n),c=_t(s,r,o),l=wt(d),u=wt(c);e.modifiersData[i]={referenceClippingOffsets:d,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":u})}};var Et={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,r=t.name,s=i.offset,d=void 0===s?[0,0]:s,c=v.reduce((function(t,i){return t[i]=function(t,e,i){var r=M(t),s=[a,n].indexOf(r)>=0?-1:1,d="function"==typeof i?i(Object.assign({},e,{placement:t})):i,c=d[0],l=d[1];return c=c||0,l=(l||0)*s,[a,o].indexOf(r)>=0?{x:l,y:c}:{x:c,y:l}}(i,e.rects,d),t}),{}),l=c[e.placement],u=l.x,h=l.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=h),e.modifiersData[r]=c}};var xt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=yt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var Dt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,s=t.name,d=i.mainAxis,l=void 0===d||d,u=i.altAxis,h=void 0!==u&&u,p=i.boundary,f=i.rootBoundary,g=i.altBoundary,v=i.padding,y=i.tether,m=void 0===y||y,b=i.tetherOffset,_=void 0===b?0:b,w=mt(e,{boundary:p,rootBoundary:f,padding:v,altBoundary:g}),k=M(e.placement),E=Z(e.placement),x=!E,D=J(k),O="x"===D?"y":"x",L=e.modifiersData.popperOffsets,I=e.rects.reference,A=e.rects.popper,C="function"==typeof _?_(Object.assign({},e.rects,{placement:e.placement})):_,S="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(L){if(l){var V,B="y"===D?n:a,z="y"===D?r:o,N="y"===D?"height":"width",W=L[D],q=W+w[B],R=W-w[z],Y=m?-A[N]/2:0,K=E===c?I[N]:A[N],$=E===c?-A[N]:-I[N],G=e.elements.arrow,Q=m&&G?F(G):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[B],it=tt[z],nt=X(0,I[N],Q[N]),rt=x?I[N]/2-Y-nt-et-S.mainAxis:K-nt-et-S.mainAxis,ot=x?-I[N]/2+Y+nt+it+S.mainAxis:$+nt+it+S.mainAxis,at=e.elements.arrow&&U(e.elements.arrow),st=at?"y"===D?at.clientTop||0:at.clientLeft||0:0,dt=null!=(V=null==T?void 0:T[D])?V:0,ct=W+ot-dt,lt=X(m?P(q,W+rt-dt-st):q,W,m?H(R,ct):R);L[D]=lt,j[D]=lt-W}if(h){var ut,ht="x"===D?n:a,pt="x"===D?r:o,ft=L[O],gt="y"===O?"height":"width",vt=ft+w[ht],yt=ft-w[pt],bt=-1!==[n,a].indexOf(k),_t=null!=(ut=null==T?void 0:T[O])?ut:0,wt=bt?vt:ft-I[gt]-A[gt]-_t+S.altAxis,kt=bt?ft+I[gt]+A[gt]-_t-S.altAxis:yt,Et=m&&bt?function(t,e,i){var n=X(t,e,i);return n>i?i:n}(wt,ft,kt):X(m?wt:vt,ft,m?kt:yt);L[O]=Et,j[O]=Et-ft}e.modifiersData[s]=j}},requiresIfExists:["offset"]};function Ot(t,e,i){void 0===i&&(i=!1);var n,r,o=C(e),a=C(e)&&function(t){var e=t.getBoundingClientRect(),i=j(e.width)/t.offsetWidth||1,n=j(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),s=R(e),d=z(t,a,i),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!i)&&(("body"!==L(e)||ut(s))&&(c=(n=e)!==I(n)&&C(n)?{scrollLeft:(r=n).scrollLeft,scrollTop:r.scrollTop}:ct(n)),C(e)?((l=z(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=lt(s))),{x:d.left+c.scrollLeft-l.x,y:d.top+c.scrollTop-l.y,width:d.width,height:d.height}}function Lt(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var It={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var t=arguments.length,e=new Array(t),i=0;it.length)&&(e=t.length);for(var i=0,n=Array(e);i1?e-1:0),n=1;n=e)&&(void 0===i||t<=i)}function E(t,e,i){return ti?i:t}function x(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=Object.keys(i).reduce((function(t,e){var r=i[e];return"function"==typeof r&&(r=r(n)),"".concat(t," ").concat(e,'="').concat(r,'"')}),t);r+="<".concat(o,">");var a=n+1;return a\s+/g,">").replace(/\s+2&&void 0!==arguments[2]?arguments[2]:0,n=new Date(t).getDay();return A(t,T(e,i)-T(n,i))}function H(t,e){var i=new Date(t).getFullYear();return Math.floor(i/e)*e}Object.defineProperty(e,"__esModule",{value:!0});var P=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,j=/[\s!-/:-@[-`{-~年月日]+/,V={},B={y:function(t,e){return new Date(t).setFullYear(parseInt(e,10))},m:function(t,e,i){var n=new Date(t),r=parseInt(e,10)-1;if(isNaN(r)){if(!e)return NaN;var o=e.toLowerCase(),a=function(t){return t.toLowerCase().startsWith(o)};if((r=i.monthsShort.findIndex(a))<0&&(r=i.months.findIndex(a)),r<0)return NaN}return n.setMonth(r),n.getMonth()!==F(r)?n.setDate(0):n.getTime()},d:function(t,e){return new Date(t).setDate(parseInt(e,10))}},z={d:function(t){return t.getDate()},dd:function(t){return N(t.getDate(),2)},D:function(t,e){return e.daysShort[t.getDay()]},DD:function(t,e){return e.days[t.getDay()]},m:function(t){return t.getMonth()+1},mm:function(t){return N(t.getMonth()+1,2)},M:function(t,e){return e.monthsShort[t.getMonth()]},MM:function(t,e){return e.months[t.getMonth()]},y:function(t){return t.getFullYear()},yy:function(t){return N(t.getFullYear(),2).slice(-2)},yyyy:function(t){return N(t.getFullYear(),4)}};function F(t){return t>-1?t%12:F(t+12)}function N(t,e){return t.toString().padStart(e,"0")}function W(t){if("string"!=typeof t)throw new Error("Invalid date format.");if(t in V)return V[t];var e=t.split(P),i=t.match(new RegExp(P,"g"));if(0===e.length||!i)throw new Error("Invalid date format.");var n=i.map((function(t){return z[t]})),r=Object.keys(B).reduce((function(t,e){return i.find((function(t){return"D"!==t[0]&&t[0].toLowerCase()===e}))&&t.push(e),t}),[]);return V[t]={parser:function(t,e){var n=t.split(j).reduce((function(t,e,n){if(e.length>0&&i[n]){var r=i[n][0];"M"===r?t.m=e:"D"!==r&&(t[r]=e)}return t}),{});return r.reduce((function(t,i){var r=B[i](t,n[i],e);return isNaN(r)?t:r}),L())},formatter:function(t,i){return n.reduce((function(n,r,o){return n+"".concat(e[o]).concat(r(t,i))}),"")+b(e)}}}function q(t,e,i){if(t instanceof Date||"number"==typeof t){var n=O(t);return isNaN(n)?void 0:n}if(t){if("today"===t)return L();if(e&&e.toValue){var r=e.toValue(t,e,i);return isNaN(r)?void 0:O(r)}return W(e).parser(t,i)}}function R(t,e,i){if(isNaN(t)||!t&&0!==t)return"";var n="number"==typeof t?new Date(t):t;return e.toDisplay?e.toDisplay(n,e,i):W(e).formatter(n,i)}var Y=new WeakMap,K=EventTarget.prototype,U=K.addEventListener,J=K.removeEventListener;function X(t,e){var i=Y.get(t);i||(i=[],Y.set(t,i)),e.forEach((function(t){U.call.apply(U,f(t)),i.push(t)}))}function $(t){var e=Y.get(t);e&&(e.forEach((function(t){J.call.apply(J,f(t))})),Y.delete(t))}if(!Event.prototype.composedPath){var G=function t(e){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.push(e),e.parentNode?i=e.parentNode:e.host?i=e.host:e.defaultView&&(i=e.defaultView),i?t(i,n):n};Event.prototype.composedPath=function(){return G(this.target)}}function Q(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=t[n];return e(r)?r:r!==i&&r.parentElement?Q(t,e,i,n+1):void 0}function Z(t,e){var i="function"==typeof e?e:function(t){return t.matches(e)};return Q(t.composedPath(),i,t.currentTarget)}var tt={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}},et={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:'',orientation:"auto",pickLevel:0,prevArrow:'',showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},it=document.createRange();function nt(t){return it.createContextualFragment(t)}function rt(t){"none"!==t.style.display&&(t.style.display&&(t.dataset.styleDisplay=t.style.display),t.style.display="none")}function ot(t){"none"===t.style.display&&(t.dataset.styleDisplay?(t.style.display=t.dataset.styleDisplay,delete t.dataset.styleDisplay):t.style.display="")}function at(t){t.firstChild&&(t.removeChild(t.firstChild),at(t))}var st=et.language,dt=et.format,ct=et.weekStart;function lt(t,e){return t.length<6&&e>=0&&e<7?_(t,e):t}function ut(t){return(t+6)%7}function ht(t,e,i,n){var r=q(t,e,i);return void 0!==r?r:n}function pt(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=parseInt(t,10);return n>=0&&n<=i?n:e}function ft(t,e){var i,n=Object.assign({},t),r={},o=e.constructor.locales,a=e.config||{},s=a.format,d=a.language,c=a.locale,l=a.maxDate,u=a.maxView,h=a.minDate,p=a.pickLevel,f=a.startView,g=a.weekStart;if(n.language&&(n.language!==d&&(o[n.language]?i=n.language:void 0===o[i=n.language.split("-")[0]]&&(i=!1)),delete n.language,i)){d=r.language=i;var v=c||o[st];c=Object.assign({format:dt,weekStart:ct},o[st]),d!==st&&Object.assign(c,o[d]),r.locale=c,s===v.format&&(s=r.format=c.format),g===v.weekStart&&(g=r.weekStart=c.weekStart,r.weekEnd=ut(c.weekStart))}if(n.format){var y="function"==typeof n.format.toDisplay,b="function"==typeof n.format.toValue,w=P.test(n.format);(y&&b||w)&&(s=r.format=n.format),delete n.format}var k=h,E=l;if(void 0!==n.minDate&&(k=null===n.minDate?I(0,0,1):ht(n.minDate,s,c,k),delete n.minDate),void 0!==n.maxDate&&(E=null===n.maxDate?void 0:ht(n.maxDate,s,c,E),delete n.maxDate),E=0&&(r.maxNumberOfDates=O,r.multidate=1!==O),delete n.maxNumberOfDates}n.dateDelimiter&&(r.dateDelimiter=String(n.dateDelimiter),delete n.dateDelimiter);var L=p;void 0!==n.pickLevel&&(L=pt(n.pickLevel,2),delete n.pickLevel),L!==p&&(p=r.pickLevel=L);var A=u;void 0!==n.maxView&&(A=pt(n.maxView,u),delete n.maxView),(A=p>A?p:A)!==u&&(u=r.maxView=A);var C=f;if(void 0!==n.startView&&(C=pt(n.startView,C),delete n.startView),Cu&&(C=u),C!==f&&(r.startView=C),n.prevArrow){var S=nt(n.prevArrow);S.childNodes.length>0&&(r.prevArrow=S.childNodes),delete n.prevArrow}if(n.nextArrow){var T=nt(n.nextArrow);T.childNodes.length>0&&(r.nextArrow=T.childNodes),delete n.nextArrow}if(void 0!==n.disableTouchKeyboard&&(r.disableTouchKeyboard="ontouchstart"in document&&!!n.disableTouchKeyboard,delete n.disableTouchKeyboard),n.orientation){var M=n.orientation.toLowerCase().split(/\s+/g);r.orientation={x:M.find((function(t){return"left"===t||"right"===t}))||"auto",y:M.find((function(t){return"top"===t||"bottom"===t}))||"auto"},delete n.orientation}if(void 0!==n.todayBtnMode){switch(n.todayBtnMode){case 0:case 1:r.todayBtnMode=n.todayBtnMode}delete n.todayBtnMode}return Object.keys(n).forEach((function(t){void 0!==n[t]&&m(et,t)&&(r[t]=n[t])})),r}var gt=D(''),vt=D('
    \n
    '.concat(x("span",7,{class:"dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"}),'
    \n
    ').concat(x("span",42,{class:"block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"}),"
    \n
    ")),yt=D('
    \n
    \n
    '.concat(x("span",6,{class:"week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"}),"
    \n
    ")),mt=function(){return a((function t(e,i){r(this,t),Object.assign(this,i,{picker:e,element:nt('
    ').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}),[{key:"init",value:function(t){void 0!==t.pickLevel&&(this.isMinView=this.id===t.pickLevel),this.setOptions(t),this.updateFocus(),this.updateSelection()}},{key:"performBeforeHook",value:function(t,e,i){var n=this.beforeShow(new Date(i));switch(v(n)){case"boolean":n={enabled:n};break;case"string":n={classes:n}}if(n){if(!1===n.enabled&&(t.classList.add("disabled"),_(this.disabled,e)),n.classes){var r,o=n.classes.split(/\s+/);(r=t.classList).add.apply(r,f(o)),o.includes("disabled")&&_(this.disabled,e)}n.content&&function(t,e){at(t),e instanceof DocumentFragment?t.appendChild(e):"string"==typeof e?t.appendChild(nt(e)):"function"==typeof e.forEach&&e.forEach((function(e){t.appendChild(e)}))}(t,n.content)}}}])}(),bt=function(t){function e(t){return r(this,e),n(this,e,[t,{id:0,name:"days",cellClass:"day"}])}return c(e,t),a(e,[{key:"init",value:function(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(i){var n=nt(vt).firstChild;this.dow=n.firstChild,this.grid=n.lastChild,this.element.appendChild(n)}s(d(e.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function(t){var e,i=this;if(m(t,"minDate")&&(this.minDate=t.minDate),m(t,"maxDate")&&(this.maxDate=t.maxDate),t.datesDisabled&&(this.datesDisabled=t.datesDisabled),t.daysOfWeekDisabled&&(this.daysOfWeekDisabled=t.daysOfWeekDisabled,e=!0),t.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=t.daysOfWeekHighlighted),void 0!==t.todayHighlight&&(this.todayHighlight=t.todayHighlight),void 0!==t.weekStart&&(this.weekStart=t.weekStart,this.weekEnd=t.weekEnd,e=!0),t.locale){var n=this.locale=t.locale;this.dayNames=n.daysMin,this.switchLabelFormat=n.titleFormat,e=!0}if(void 0!==t.beforeShowDay&&(this.beforeShow="function"==typeof t.beforeShowDay?t.beforeShowDay:void 0),void 0!==t.calendarWeeks)if(t.calendarWeeks&&!this.calendarWeeks){var r=nt(yt).firstChild;this.calendarWeeks={element:r,dow:r.firstChild,weeks:r.lastChild},this.element.insertBefore(r,this.element.firstChild)}else this.calendarWeeks&&!t.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==t.showDaysOfWeek&&(t.showDaysOfWeek?(ot(this.dow),this.calendarWeeks&&ot(this.calendarWeeks.dow)):(rt(this.dow),this.calendarWeeks&&rt(this.calendarWeeks.dow))),e&&Array.from(this.dow.children).forEach((function(t,e){var n=(i.weekStart+e)%7;t.textContent=i.dayNames[n],t.className=i.daysOfWeekDisabled.includes(n)?"dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed":"dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"}))}},{key:"updateFocus",value:function(){var t=new Date(this.picker.viewDate),e=t.getFullYear(),i=t.getMonth(),n=I(e,i,1),r=M(n,this.weekStart,this.weekStart);this.first=n,this.last=I(e,i+1,0),this.start=r,this.focused=this.picker.viewDate}},{key:"updateSelection",value:function(){var t=this.picker.datepicker,e=t.dates,i=t.rangepicker;this.selected=e,i&&(this.range=i.dates)}},{key:"render",value:function(){var t=this;this.today=this.todayHighlight?L():void 0,this.disabled=f(this.datesDisabled);var e=R(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(e),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){var i=M(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((function(t,e){t.textContent=function(t){var e=M(t,4,1),i=M(new Date(e).setMonth(0,4),4,1);return Math.round((e-i)/6048e5)+1}(A(i,7*e))}))}Array.from(this.grid.children).forEach((function(e,i){var n=e.classList,r=A(t.start,i),o=new Date(r),a=o.getDay();if(e.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(t.cellClass),e.dataset.date=r,e.textContent=o.getDate(),rt.last&&n.add("next","text-gray-500","dark:text-white"),t.today===r&&n.add("today","bg-gray-100","dark:bg-gray-600"),(rt.maxDate||t.disabled.includes(r))&&(n.add("disabled","cursor-not-allowed","text-gray-400","dark:text-gray-500"),n.remove("hover:bg-gray-100","dark:hover:bg-gray-600","text-gray-900","dark:text-white","cursor-pointer")),t.daysOfWeekDisabled.includes(a)&&(n.add("disabled","cursor-not-allowed","text-gray-400","dark:text-gray-500"),n.remove("hover:bg-gray-100","dark:hover:bg-gray-600","text-gray-900","dark:text-white","cursor-pointer"),_(t.disabled,r)),t.daysOfWeekHighlighted.includes(a)&&n.add("highlighted"),t.range){var s=h(t.range,2),d=s[0],c=s[1];r>d&&ri&&re||s1&&void 0!==arguments[1])||arguments[1];i&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(nt(x("span",12,{"data-month":function(t){return t}})))),s(d(e.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function(t){if(t.locale&&(this.monthNames=t.locale.monthsShort),m(t,"minDate"))if(void 0===t.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{var e=new Date(t.minDate);this.minYear=e.getFullYear(),this.minMonth=e.getMonth(),this.minDate=e.setDate(1)}if(m(t,"maxDate"))if(void 0===t.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{var i=new Date(t.maxDate);this.maxYear=i.getFullYear(),this.maxMonth=i.getMonth(),this.maxDate=I(this.maxYear,this.maxMonth+1,0)}void 0!==t.beforeShowMonth&&(this.beforeShow="function"==typeof t.beforeShowMonth?t.beforeShowMonth:void 0)}},{key:"updateFocus",value:function(){var t=new Date(this.picker.viewDate);this.year=t.getFullYear(),this.focused=t.getMonth()}},{key:"updateSelection",value:function(){var t=this.picker.datepicker,e=t.dates,i=t.rangepicker;this.selected=e.reduce((function(t,e){var i=new Date(e),n=i.getFullYear(),r=i.getMonth();return void 0===t[n]?t[n]=[r]:_(t[n],r),t}),{}),i&&i.dates&&(this.range=i.dates.map((function(t){var e=new Date(t);return isNaN(e)?void 0:[e.getFullYear(),e.getMonth()]})))}},{key:"render",value:function(){var t=this;this.disabled=[],this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);var e=this.selected[this.year]||[],i=this.yearthis.maxYear,n=this.year===this.minYear,r=this.year===this.maxYear,o=_t(this.range,this.year);Array.from(this.grid.children).forEach((function(a,s){var d=a.classList,c=I(t.year,s,1);if(a.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(t.cellClass),t.isMinView&&(a.dataset.date=c),a.textContent=t.monthNames[s],(i||n&&st.maxMonth)&&d.add("disabled"),o){var l=h(o,2),u=l[0],p=l[1];s>u&&sn&&o1&&void 0!==arguments[1])||arguments[1];i&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow".concat(kt(this.cellClass)),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(nt(x("span",12)))),s(d(e.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function(t){if(m(t,"minDate")&&(void 0===t.minDate?this.minYear=this.minDate=void 0:(this.minYear=H(t.minDate,this.step),this.minDate=I(this.minYear,0,1))),m(t,"maxDate")&&(void 0===t.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=H(t.maxDate,this.step),this.maxDate=I(this.maxYear,11,31))),void 0!==t[this.beforeShowOption]){var e=t[this.beforeShowOption];this.beforeShow="function"==typeof e?e:void 0}}},{key:"updateFocus",value:function(){var t=new Date(this.picker.viewDate),e=H(t,this.navStep),i=e+9*this.step;this.first=e,this.last=i,this.start=e-this.step,this.focused=H(t,this.step)}},{key:"updateSelection",value:function(){var t=this,e=this.picker.datepicker,i=e.dates,n=e.rangepicker;this.selected=i.reduce((function(e,i){return _(e,H(i,t.step))}),[]),n&&n.dates&&(this.range=n.dates.map((function(e){if(void 0!==e)return H(e,t.step)})))}},{key:"render",value:function(){var t=this;this.disabled=[],this.picker.setViewSwitchLabel("".concat(this.first,"-").concat(this.last)),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((function(e,i){var n=e.classList,r=t.start+i*t.step,o=I(r,0,1);if(e.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(t.cellClass),t.isMinView&&(e.dataset.date=o),e.textContent=e.dataset.year=r,0===i?n.add("prev"):11===i&&n.add("next"),(rt.maxYear)&&n.add("disabled"),t.range){var a=h(t.range,2),s=a[0],d=a[1];r>s&&ri&&r0?b(e):i.defaultViewDate,i.minDate,i.maxDate)}function Bt(t,e){var i=new Date(t.viewDate),n=new Date(e),r=t.currentView,o=r.id,a=r.year,s=r.first,d=r.last,c=n.getFullYear();switch(t.viewDate=e,c!==i.getFullYear()&&xt(t.datepicker,"changeYear"),n.getMonth()!==i.getMonth()&&xt(t.datepicker,"changeMonth"),o){case 0:return ed;case 1:return c!==a;default:return cd}}function zt(t){return window.getComputedStyle(t).direction}var Ft=function(){return a((function t(e){r(this,t),this.datepicker=e;var i=gt.replace(/%buttonClass%/g,e.config.buttonClass),n=this.element=nt(i).firstChild,o=h(n.firstChild.children,3),a=o[0],s=o[1],d=o[2],c=a.firstElementChild,l=h(a.lastElementChild.children,3),u=l[0],p=l[1],f=l[2],g=h(d.firstChild.children,2),v={title:c,prevBtn:u,viewSwitch:p,nextBtn:f,todayBtn:g[0],clearBtn:g[1]};this.main=s,this.controls=v;var y=e.inline?"inline":"dropdown";n.classList.add("datepicker-".concat(y)),"dropdown"===y&&n.classList.add("dropdown","absolute","top-0","left-0","z-50","pt-2"),jt(this,e.config),this.viewDate=Vt(e),X(e,[[n,"click",Pt.bind(null,e),{capture:!0}],[s,"click",Ht.bind(null,e)],[v.viewSwitch,"click",St.bind(null,e)],[v.prevBtn,"click",Tt.bind(null,e)],[v.nextBtn,"click",Mt.bind(null,e)],[v.todayBtn,"click",At.bind(null,e)],[v.clearBtn,"click",Ct.bind(null,e)]]),this.views=[new bt(this),new wt(this),new Et(this,{id:2,name:"years",cellClass:"year",step:1}),new Et(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[e.config.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),e.config.container.appendChild(this.element)}),[{key:"setOptions",value:function(t){jt(this,t),this.views.forEach((function(e){e.init(t,!1)})),this.currentView.render()}},{key:"detach",value:function(){this.datepicker.config.container.removeChild(this.element)}},{key:"show",value:function(){if(!this.active){this.element.classList.add("active","block"),this.element.classList.remove("hidden"),this.active=!0;var t=this.datepicker;if(!t.inline){var e=zt(t.inputField);e!==zt(t.config.container)?this.element.dir=e:this.element.dir&&this.element.removeAttribute("dir"),this.place(),t.config.disableTouchKeyboard&&t.inputField.blur()}xt(t,"show")}}},{key:"hide",value:function(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active","block"),this.element.classList.add("active","block","hidden"),this.active=!1,xt(this.datepicker,"hide"))}},{key:"place",value:function(){var t,e,i,n=this.element,r=n.classList,o=n.style,a=this.datepicker,s=a.config,d=a.inputField,c=s.container,l=this.element.getBoundingClientRect(),u=l.width,h=l.height,p=c.getBoundingClientRect(),f=p.left,g=p.top,v=p.width,y=d.getBoundingClientRect(),m=y.left,b=y.top,_=y.width,w=y.height,k=s.orientation,E=k.x,x=k.y;c===document.body?(t=window.scrollY,e=m+window.scrollX,i=b+t):(e=m-f,i=b-g+(t=c.scrollTop)),"auto"===E&&(e<0?(E="left",e=10):E=e+u>v||"rtl"===zt(d)?"right":"left"),"right"===E&&(e-=u-_),"auto"===x&&(x=i-h0&&void 0!==arguments[0])||arguments[0],e=t&&this._renderMethod||"render";delete this._renderMethod,this.currentView[e]()}}])}();function Nt(t,e,i,n,r,o){if(k(t,r,o))return n(t)?Nt(e(t,i),e,i,n,r,o):t}function Wt(t,e,i,n){var r,o,a=t.picker,s=a.currentView,d=s.step||1,c=a.viewDate;switch(s.id){case 0:c=n?A(c,7*i):e.ctrlKey||e.metaKey?S(c,i):A(c,i),r=A,o=function(t){return s.disabled.includes(t)};break;case 1:c=C(c,n?4*i:i),r=C,o=function(t){var e=new Date(t),i=s.year,n=s.disabled;return e.getFullYear()===i&&n.includes(e.getMonth())};break;default:c=S(c,i*(n?4:1)*d),r=S,o=function(t){return s.disabled.includes(H(t,d))}}void 0!==(c=Nt(c,r,i<0?-d:d,o,s.minDate,s.maxDate))&&a.changeFocus(c).render()}function qt(t,e){if("Tab"!==e.key){var i=t.picker,n=i.currentView,r=n.id,o=n.isMinView;if(i.active)if(t.editMode)switch(e.key){case"Escape":i.hide();break;case"Enter":t.exitEditMode({update:!0,autohide:t.config.autohide});break;default:return}else switch(e.key){case"Escape":i.hide();break;case"ArrowLeft":if(e.ctrlKey||e.metaKey)Dt(t,-1);else{if(e.shiftKey)return void t.enterEditMode();Wt(t,e,-1,!1)}break;case"ArrowRight":if(e.ctrlKey||e.metaKey)Dt(t,1);else{if(e.shiftKey)return void t.enterEditMode();Wt(t,e,1,!1)}break;case"ArrowUp":if(e.ctrlKey||e.metaKey)Ot(t);else{if(e.shiftKey)return void t.enterEditMode();Wt(t,e,-1,!0)}break;case"ArrowDown":if(e.shiftKey&&!e.ctrlKey&&!e.metaKey)return void t.enterEditMode();Wt(t,e,1,!0);break;case"Enter":o?t.setDate(i.viewDate):i.changeView(r-1).render();break;case"Backspace":case"Delete":return void t.enterEditMode();default:return void(1!==e.key.length||e.ctrlKey||e.metaKey||t.enterEditMode())}else switch(e.key){case"ArrowDown":case"Escape":i.show();break;case"Enter":t.update();break;default:return}e.preventDefault(),e.stopPropagation()}else Lt(t)}function Rt(t){t.config.showOnFocus&&!t._showing&&t.show()}function Yt(t,e){var i=e.target;(t.picker.active||t.config.showOnClick)&&(i._active=i===document.activeElement,i._clicking=setTimeout((function(){delete i._active,delete i._clicking}),2e3))}function Kt(t,e){var i=e.target;i._clicking&&(clearTimeout(i._clicking),delete i._clicking,i._active&&t.enterEditMode(),delete i._active,t.config.showOnClick&&t.show())}function Ut(t,e){e.clipboardData.types.includes("text/plain")&&t.enterEditMode()}function Jt(t,e){var i=t.element;if(i===document.activeElement){var n=t.picker.element;Z(e,(function(t){return t===i||t===n}))||Lt(t)}}function Xt(t,e){return t.map((function(t){return R(t,e.format,e.locale)})).join(e.dateDelimiter)}function $t(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.config,r=t.dates,o=t.rangepicker;if(0===e.length)return i?[]:void 0;var a=o&&t===o.datepickers[1],s=e.reduce((function(t,e){var i=q(e,n.format,n.locale);if(void 0===i)return t;if(n.pickLevel>0){var r=new Date(i);i=1===n.pickLevel?a?r.setMonth(r.getMonth()+1,0):r.setDate(1):a?r.setFullYear(r.getFullYear()+1,0,0):r.setMonth(0,1)}return!k(i,n.minDate,n.maxDate)||t.includes(i)||n.datesDisabled.includes(i)||n.daysOfWeekDisabled.includes(new Date(i).getDay())||t.push(i),t}),[]);return 0!==s.length?(n.multidate&&!i&&(s=s.reduce((function(t,e){return r.includes(e)||t.push(e),t}),r.filter((function(t){return!s.includes(t)})))),n.maxNumberOfDates&&s.length>n.maxNumberOfDates?s.slice(-1*n.maxNumberOfDates):s):void 0}function Gt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.config,r=t.picker,o=t.inputField;if(2&e){var a=r.active?n.pickLevel:n.startView;r.update().changeView(a).render(i)}1&e&&o&&(o.value=Xt(t.dates,n))}function Qt(t,e,i){var n=i.clear,r=i.render,o=i.autohide;void 0===r&&(r=!0),r?void 0===o&&(o=t.config.autohide):o=!1;var a=$t(t,e,n);a&&(a.toString()!==t.dates.toString()?(t.dates=a,Gt(t,r?3:1),xt(t,"changeDate")):Gt(t,1),o&&t.hide())}var Zt=function(){return a((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;r(this,t),e.datepicker=this,this.element=e;var o=this.config=Object.assign({buttonClass:i.buttonClass&&String(i.buttonClass)||"button",container:document.body,defaultViewDate:L(),maxDate:void 0,minDate:void 0},ft(et,this));this._options=i,Object.assign(o,ft(i,this));var a,s,d=this.inline="INPUT"!==e.tagName;if(d)o.container=e,s=w(e.dataset.date,o.dateDelimiter),delete e.dataset.date;else{var c=i.container?document.querySelector(i.container):null;c&&(o.container=c),(a=this.inputField=e).classList.add("datepicker-input"),s=w(a.value,o.dateDelimiter)}if(n){var l=n.inputs.indexOf(a),u=n.datepickers;if(l<0||l>1||!Array.isArray(u))throw Error("Invalid rangepicker object.");u[l]=this,Object.defineProperty(this,"rangepicker",{get:function(){return n}})}this.dates=[];var h=$t(this,s);h&&h.length>0&&(this.dates=h),a&&(a.value=Xt(this.dates,o));var p=this.picker=new Ft(this);if(d)this.show();else{var f=Jt.bind(null,this),g=[[a,"keydown",qt.bind(null,this)],[a,"focus",Rt.bind(null,this)],[a,"mousedown",Yt.bind(null,this)],[a,"click",Kt.bind(null,this)],[a,"paste",Ut.bind(null,this)],[document,"mousedown",f],[document,"touchstart",f],[window,"resize",p.place.bind(p)]];X(this,g)}}),[{key:"active",get:function(){return!(!this.picker||!this.picker.active)}},{key:"pickerElement",get:function(){return this.picker?this.picker.element:void 0}},{key:"setOptions",value:function(t){var e=this.picker,i=ft(t,this);Object.assign(this._options,t),Object.assign(this.config,i),e.setOptions(i),Gt(this,3)}},{key:"show",value:function(){if(this.inputField){if(this.inputField.disabled)return;this.inputField!==document.activeElement&&(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}},{key:"hide",value:function(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}},{key:"destroy",value:function(){return this.hide(),$(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}},{key:"getDate",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,i=e?function(i){return R(i,e,t.config.locale)}:function(t){return new Date(t)};return this.config.multidate?this.dates.map(i):this.dates.length>0?i(this.dates[0]):void 0}},{key:"setDate",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline){var e={clear:!0,autohide:!(!t||!t.autohide)},i=w(this.inputField.value,this.config.dateDelimiter);Qt(this,i,e)}}},{key:"refresh",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&"string"!=typeof t&&(e=t,t=void 0),Gt(this,"picker"===t?2:"input"===t?1:3,!e)}},{key:"enterEditMode",value:function(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit","border-blue-700","!border-primary-700"))}},{key:"exitEditMode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline&&this.editMode){var e=Object.assign({update:!1},t);delete this.editMode,this.inputField.classList.remove("in-edit","border-blue-700","!border-primary-700"),e.update&&this.update(e)}}}],[{key:"formatDate",value:function(t,e,i){return R(t,e,i&&tt[i]||tt.en)}},{key:"parseDate",value:function(t,e,i){return q(t,e,i&&tt[i]||tt.en)}},{key:"locales",get:function(){return tt}}])}();function te(t){var e=Object.assign({},t);return delete e.inputs,delete e.allowOneSidedRange,delete e.maxNumberOfDates,e}function ee(t,e,i,n){X(t,[[i,"changeDate",e]]),new Zt(i,n,t)}function ie(t,e){if(!t._updating){t._updating=!0;var i=e.target;if(void 0!==i.datepicker){var n=t.datepickers,r={render:!1},o=t.inputs.indexOf(i),a=0===o?1:0,s=n[o].dates[0],d=n[a].dates[0];void 0!==s&&void 0!==d?0===o&&s>d?(n[0].setDate(d,r),n[1].setDate(s,r)):1===o&&s1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var n=Array.isArray(i.inputs)?i.inputs:Array.from(e.querySelectorAll("input"));if(!(n.length<2)){e.rangepicker=this,this.element=e,this.inputs=n.slice(0,2),this.allowOneSidedRange=!!i.allowOneSidedRange;var o=ie.bind(null,this),a=te(i),s=[];Object.defineProperty(this,"datepickers",{get:function(){return s}}),ee(this,o,this.inputs[0],a),ee(this,o,this.inputs[1],a),Object.freeze(s),s[0].dates.length>0?ie(this,{target:this.inputs[0]}):s[1].dates.length>0&&ie(this,{target:this.inputs[1]})}}),[{key:"dates",get:function(){return 2===this.datepickers.length?[this.datepickers[0].dates[0],this.datepickers[1].dates[0]]:void 0}},{key:"setOptions",value:function(t){this.allowOneSidedRange=!!t.allowOneSidedRange;var e=te(t);this.datepickers[0].setOptions(e),this.datepickers[1].setOptions(e)}},{key:"destroy",value:function(){this.datepickers[0].destroy(),this.datepickers[1].destroy(),$(this),delete this.element.rangepicker}},{key:"getDates",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,i=e?function(i){return R(i,e,t.datepickers[0].config.locale)}:function(t){return new Date(t)};return this.dates.map((function(t){return void 0===t?t:i(t)}))}},{key:"setDates",value:function(t,e){var i=h(this.datepickers,2),n=i[0],r=i[1],o=this.dates;this._updating=!0,n.setDate(t),r.setDate(e),delete this._updating,r.dates[0]!==o[1]?ie(this,{target:this.inputs[1]}):n.dates[0]!==o[0]&&ie(this,{target:this.inputs[0]})}}])}();e.DateRangePicker=ne,e.Datepicker=Zt},902:function(t,e,i){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;it._options.maxValue&&(i.value=t._options.maxValue.toString()),null!==t._options.minValue&&parseInt(i.value)=this._options.maxValue||(this._targetEl.value=(this.getCurrentValue()+1).toString(),this._options.onIncrement(this))},t.prototype.decrement=function(){null!==this._options.minValue&&this.getCurrentValue()<=this._options.minValue||(this._targetEl.value=(this.getCurrentValue()-1).toString(),this._options.onDecrement(this))},t.prototype.updateOnIncrement=function(t){this._options.onIncrement=t},t.prototype.updateOnDecrement=function(t){this._options.onDecrement=t},t}();function d(){document.querySelectorAll("[data-input-counter]").forEach((function(t){var e=t.id,i=document.querySelector('[data-input-counter-increment="'+e+'"]'),n=document.querySelector('[data-input-counter-decrement="'+e+'"]'),o=t.getAttribute("data-input-counter-min"),a=t.getAttribute("data-input-counter-max");t?r.default.instanceExists("InputCounter",t.getAttribute("id"))||new s(t,i||null,n||null,{minValue:o?parseInt(o):null,maxValue:a?parseInt(a):null}):console.error('The target element with id "'.concat(e,'" does not exist. Please check the data-input-counter attribute.'))}))}e.initInputCounters=d,"undefined"!=typeof window&&(window.InputCounter=s,window.initInputCounters=d),e.default=s},16:function(t,e,i){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nfunction _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nfunction _callSuper(t, o, e) {\n return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));\n}\nfunction _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nfunction _get() {\n return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {\n var p = _superPropBase(e, t);\n if (p) {\n var n = Object.getOwnPropertyDescriptor(p, t);\n return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;\n }\n }, _get.apply(null, arguments);\n}\nfunction _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && _setPrototypeOf(t, e);\n}\nfunction _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function () {\n return !!t;\n })();\n}\nfunction _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return _assertThisInitialized(t);\n}\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nfunction _slicedToArray(r, e) {\n return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _superPropBase(t, o) {\n for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););\n return t;\n}\nfunction _toConsumableArray(r) {\n return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n}\n\nfunction hasProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction lastItemOf(arr) {\n return arr[arr.length - 1];\n}\n\n// push only the items not included in the array\nfunction pushUnique(arr) {\n for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n items[_key - 1] = arguments[_key];\n }\n items.forEach(function (item) {\n if (arr.includes(item)) {\n return;\n }\n arr.push(item);\n });\n return arr;\n}\nfunction stringToArray(str, separator) {\n // convert empty string to an empty array\n return str ? str.split(separator) : [];\n}\nfunction isInRange(testVal, min, max) {\n var minOK = min === undefined || testVal >= min;\n var maxOK = max === undefined || testVal <= max;\n return minOK && maxOK;\n}\nfunction limitToRange(val, min, max) {\n if (val < min) {\n return min;\n }\n if (val > max) {\n return max;\n }\n return val;\n}\nfunction createTagRepeat(tagName, repeat) {\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';\n var openTagSrc = Object.keys(attributes).reduce(function (src, attr) {\n var val = attributes[attr];\n if (typeof val === 'function') {\n val = val(index);\n }\n return \"\".concat(src, \" \").concat(attr, \"=\\\"\").concat(val, \"\\\"\");\n }, tagName);\n html += \"<\".concat(openTagSrc, \">\");\n var next = index + 1;\n return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html;\n}\n\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nfunction optimizeTemplateHTML(html) {\n return html.replace(/>\\s+/g, '>').replace(/\\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var baseDay = new Date(baseDate).getDay();\n return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n}\n\n// Get the ISO week of a date\nfunction getWeek(date) {\n // start of ISO week is Monday\n var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n // 1st week == the week where the 4th of January is in\n var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nfunction startOfYearPeriod(date, years) {\n /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n var year = new Date(date).getFullYear();\n return Math.floor(year / years) * years;\n}\n\n// pattern for format parts\nvar reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nvar reNonDateParts = /[\\s!-/:-@[-`{-~年月日]+/;\n// cache for persed formats\nvar knownFormats = {};\n// parse funtions for date parts\nvar parseFns = {\n y: function y(date, year) {\n return new Date(date).setFullYear(parseInt(year, 10));\n },\n m: function m(date, month, locale) {\n var newDate = new Date(date);\n var monthIndex = parseInt(month, 10) - 1;\n if (isNaN(monthIndex)) {\n if (!month) {\n return NaN;\n }\n var monthName = month.toLowerCase();\n var compareNames = function compareNames(name) {\n return name.toLowerCase().startsWith(monthName);\n };\n // compare with both short and full names because some locales have periods\n // in the short names (not equal to the first X letters of the full names)\n monthIndex = locale.monthsShort.findIndex(compareNames);\n if (monthIndex < 0) {\n monthIndex = locale.months.findIndex(compareNames);\n }\n if (monthIndex < 0) {\n return NaN;\n }\n }\n newDate.setMonth(monthIndex);\n return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime();\n },\n d: function d(date, day) {\n return new Date(date).setDate(parseInt(day, 10));\n }\n};\n// format functions for date parts\nvar formatFns = {\n d: function d(date) {\n return date.getDate();\n },\n dd: function dd(date) {\n return padZero(date.getDate(), 2);\n },\n D: function D(date, locale) {\n return locale.daysShort[date.getDay()];\n },\n DD: function DD(date, locale) {\n return locale.days[date.getDay()];\n },\n m: function m(date) {\n return date.getMonth() + 1;\n },\n mm: function mm(date) {\n return padZero(date.getMonth() + 1, 2);\n },\n M: function M(date, locale) {\n return locale.monthsShort[date.getMonth()];\n },\n MM: function MM(date, locale) {\n return locale.months[date.getMonth()];\n },\n y: function y(date) {\n return date.getFullYear();\n },\n yy: function yy(date) {\n return padZero(date.getFullYear(), 2).slice(-2);\n },\n yyyy: function yyyy(date) {\n return padZero(date.getFullYear(), 4);\n }\n};\n\n// get month index in normal range (0 - 11) from any number\nfunction normalizeMonth(monthIndex) {\n return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n}\nfunction padZero(num, length) {\n return num.toString().padStart(length, '0');\n}\nfunction parseFormatString(format) {\n if (typeof format !== 'string') {\n throw new Error(\"Invalid date format.\");\n }\n if (format in knownFormats) {\n return knownFormats[format];\n }\n\n // sprit the format string into parts and seprators\n var separators = format.split(reFormatTokens);\n var parts = format.match(new RegExp(reFormatTokens, 'g'));\n if (separators.length === 0 || !parts) {\n throw new Error(\"Invalid date format.\");\n }\n\n // collect format functions used in the format\n var partFormatters = parts.map(function (token) {\n return formatFns[token];\n });\n\n // collect parse function keys used in the format\n // iterate over parseFns' keys in order to keep the order of the keys.\n var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) {\n var token = parts.find(function (part) {\n return part[0] !== 'D' && part[0].toLowerCase() === key;\n });\n if (token) {\n keys.push(key);\n }\n return keys;\n }, []);\n return knownFormats[format] = {\n parser: function parser(dateStr, locale) {\n var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) {\n if (part.length > 0 && parts[index]) {\n var token = parts[index][0];\n if (token === 'M') {\n dtParts.m = part;\n } else if (token !== 'D') {\n dtParts[token] = part;\n }\n }\n return dtParts;\n }, {});\n\n // iterate over partParserkeys so that the parsing is made in the oder\n // of year, month and day to prevent the day parser from correcting last\n // day of month wrongly\n return partParserKeys.reduce(function (origDate, key) {\n var newDate = parseFns[key](origDate, dateParts[key], locale);\n // ingnore the part failed to parse\n return isNaN(newDate) ? origDate : newDate;\n }, today());\n },\n formatter: function formatter(date, locale) {\n var dateStr = partFormatters.reduce(function (str, fn, index) {\n return str += \"\".concat(separators[index]).concat(fn(date, locale));\n }, '');\n // separators' length is always parts' length + 1,\n return dateStr += lastItemOf(separators);\n }\n };\n}\nfunction parseDate(dateStr, format, locale) {\n if (dateStr instanceof Date || typeof dateStr === 'number') {\n var date = stripTime(dateStr);\n return isNaN(date) ? undefined : date;\n }\n if (!dateStr) {\n return undefined;\n }\n if (dateStr === 'today') {\n return today();\n }\n if (format && format.toValue) {\n var _date = format.toValue(dateStr, format, locale);\n return isNaN(_date) ? undefined : stripTime(_date);\n }\n return parseFormatString(format).parser(dateStr, locale);\n}\nfunction formatDate(date, format, locale) {\n if (isNaN(date) || !date && date !== 0) {\n return '';\n }\n var dateObj = typeof date === 'number' ? new Date(date) : date;\n if (format.toDisplay) {\n return format.toDisplay(dateObj, format, locale);\n }\n return parseFormatString(format).formatter(dateObj, locale);\n}\n\nvar listenerRegistry = new WeakMap();\nvar _EventTarget$prototyp = EventTarget.prototype,\n addEventListener = _EventTarget$prototyp.addEventListener,\n removeEventListener = _EventTarget$prototyp.removeEventListener;\n\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n// - each definition must be a flat array of event target and the arguments\n// used to call addEventListener() on the target\nfunction registerListeners(keyObj, listeners) {\n var registered = listenerRegistry.get(keyObj);\n if (!registered) {\n registered = [];\n listenerRegistry.set(keyObj, registered);\n }\n listeners.forEach(function (listener) {\n addEventListener.call.apply(addEventListener, _toConsumableArray(listener));\n registered.push(listener);\n });\n}\nfunction unregisterListeners(keyObj) {\n var listeners = listenerRegistry.get(keyObj);\n if (!listeners) {\n return;\n }\n listeners.forEach(function (listener) {\n removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener));\n });\n listenerRegistry[\"delete\"](keyObj);\n}\n\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n var getComposedPath = function getComposedPath(node) {\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n path.push(node);\n var parent;\n if (node.parentNode) {\n parent = node.parentNode;\n } else if (node.host) {\n // ShadowRoot\n parent = node.host;\n } else if (node.defaultView) {\n // Document\n parent = node.defaultView;\n }\n return parent ? getComposedPath(parent, path) : path;\n };\n Event.prototype.composedPath = function () {\n return getComposedPath(this.target);\n };\n}\nfunction findFromPath(path, criteria, currentTarget) {\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var el = path[index];\n if (criteria(el)) {\n return el;\n } else if (el === currentTarget || !el.parentElement) {\n // stop when reaching currentTarget or \n return;\n }\n return findFromPath(path, criteria, currentTarget, index + 1);\n}\n\n// Search for the actual target of a delegated event\nfunction findElementInEventPath(ev, selector) {\n var criteria = typeof selector === 'function' ? selector : function (el) {\n return el.matches(selector);\n };\n return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n\n// default locales\nvar locales = {\n en: {\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n today: \"Today\",\n clear: \"Clear\",\n titleFormat: \"MM y\"\n }\n};\n\n// config options updatable by setOptions() and their default values\nvar defaultOptions = {\n autohide: false,\n beforeShowDay: null,\n beforeShowDecade: null,\n beforeShowMonth: null,\n beforeShowYear: null,\n calendarWeeks: false,\n clearBtn: false,\n dateDelimiter: ',',\n datesDisabled: [],\n daysOfWeekDisabled: [],\n daysOfWeekHighlighted: [],\n defaultViewDate: undefined,\n // placeholder, defaults to today() by the program\n disableTouchKeyboard: false,\n format: 'mm/dd/yyyy',\n language: 'en',\n maxDate: null,\n maxNumberOfDates: 1,\n maxView: 3,\n minDate: null,\n nextArrow: '',\n orientation: 'auto',\n pickLevel: 0,\n prevArrow: '',\n showDaysOfWeek: true,\n showOnClick: true,\n showOnFocus: true,\n startView: 0,\n title: '',\n todayBtn: false,\n todayBtnMode: 0,\n todayHighlight: false,\n updateOnBlur: true,\n weekStart: 0\n};\n\nvar range = document.createRange();\nfunction parseHTML(html) {\n return range.createContextualFragment(html);\n}\nfunction hideElement(el) {\n if (el.style.display === 'none') {\n return;\n }\n // back up the existing display setting in data-style-display\n if (el.style.display) {\n el.dataset.styleDisplay = el.style.display;\n }\n el.style.display = 'none';\n}\nfunction showElement(el) {\n if (el.style.display !== 'none') {\n return;\n }\n if (el.dataset.styleDisplay) {\n // restore backed-up dispay property\n el.style.display = el.dataset.styleDisplay;\n delete el.dataset.styleDisplay;\n } else {\n el.style.display = '';\n }\n}\nfunction emptyChildNodes(el) {\n if (el.firstChild) {\n el.removeChild(el.firstChild);\n emptyChildNodes(el);\n }\n}\nfunction replaceChildNodes(el, newChildNodes) {\n emptyChildNodes(el);\n if (newChildNodes instanceof DocumentFragment) {\n el.appendChild(newChildNodes);\n } else if (typeof newChildNodes === 'string') {\n el.appendChild(parseHTML(newChildNodes));\n } else if (typeof newChildNodes.forEach === 'function') {\n newChildNodes.forEach(function (node) {\n el.appendChild(node);\n });\n }\n}\n\nvar defaultLang = defaultOptions.language,\n defaultFormat = defaultOptions.format,\n defaultWeekStart = defaultOptions.weekStart;\n\n// Reducer function to filter out invalid day-of-week from the input\nfunction sanitizeDOW(dow, day) {\n return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow;\n}\nfunction calcEndOfWeek(startOfWeek) {\n return (startOfWeek + 6) % 7;\n}\n\n// validate input date. if invalid, fallback to the original value\nfunction validateDate(value, format, locale, origValue) {\n var date = parseDate(value, format, locale);\n return date !== undefined ? date : origValue;\n}\n\n// Validate viewId. if invalid, fallback to the original value\nfunction validateViewId(value, origValue) {\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;\n var viewId = parseInt(value, 10);\n return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n\n// Create Datepicker configuration to set\nfunction processOptions(options, datepicker) {\n var inOpts = Object.assign({}, options);\n var config = {};\n var locales = datepicker.constructor.locales;\n var _ref = datepicker.config || {},\n format = _ref.format,\n language = _ref.language,\n locale = _ref.locale,\n maxDate = _ref.maxDate,\n maxView = _ref.maxView,\n minDate = _ref.minDate,\n pickLevel = _ref.pickLevel,\n startView = _ref.startView,\n weekStart = _ref.weekStart;\n if (inOpts.language) {\n var lang;\n if (inOpts.language !== language) {\n if (locales[inOpts.language]) {\n lang = inOpts.language;\n } else {\n // Check if langauge + region tag can fallback to the one without\n // region (e.g. fr-CA → fr)\n lang = inOpts.language.split('-')[0];\n if (locales[lang] === undefined) {\n lang = false;\n }\n }\n }\n delete inOpts.language;\n if (lang) {\n language = config.language = lang;\n\n // update locale as well when updating language\n var origLocale = locale || locales[defaultLang];\n // use default language's properties for the fallback\n locale = Object.assign({\n format: defaultFormat,\n weekStart: defaultWeekStart\n }, locales[defaultLang]);\n if (language !== defaultLang) {\n Object.assign(locale, locales[language]);\n }\n config.locale = locale;\n // if format and/or weekStart are the same as old locale's defaults,\n // update them to new locale's defaults\n if (format === origLocale.format) {\n format = config.format = locale.format;\n }\n if (weekStart === origLocale.weekStart) {\n weekStart = config.weekStart = locale.weekStart;\n config.weekEnd = calcEndOfWeek(locale.weekStart);\n }\n }\n }\n if (inOpts.format) {\n var hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n var hasToValue = typeof inOpts.format.toValue === 'function';\n var validFormatString = reFormatTokens.test(inOpts.format);\n if (hasToDisplay && hasToValue || validFormatString) {\n format = config.format = inOpts.format;\n }\n delete inOpts.format;\n }\n\n //*** dates ***//\n // while min and maxDate for \"no limit\" in the options are better to be null\n // (especially when updating), the ones in the config have to be undefined\n // because null is treated as 0 (= unix epoch) when comparing with time value\n var minDt = minDate;\n var maxDt = maxDate;\n if (inOpts.minDate !== undefined) {\n minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n : validateDate(inOpts.minDate, format, locale, minDt);\n delete inOpts.minDate;\n }\n if (inOpts.maxDate !== undefined) {\n maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt);\n delete inOpts.maxDate;\n }\n if (maxDt < minDt) {\n minDate = config.minDate = maxDt;\n maxDate = config.maxDate = minDt;\n } else {\n if (minDate !== minDt) {\n minDate = config.minDate = minDt;\n }\n if (maxDate !== maxDt) {\n maxDate = config.maxDate = maxDt;\n }\n }\n if (inOpts.datesDisabled) {\n config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) {\n var date = parseDate(dt, format, locale);\n return date !== undefined ? pushUnique(dates, date) : dates;\n }, []);\n delete inOpts.datesDisabled;\n }\n if (inOpts.defaultViewDate !== undefined) {\n var viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n if (viewDate !== undefined) {\n config.defaultViewDate = viewDate;\n }\n delete inOpts.defaultViewDate;\n }\n\n //*** days of week ***//\n if (inOpts.weekStart !== undefined) {\n var wkStart = Number(inOpts.weekStart) % 7;\n if (!isNaN(wkStart)) {\n weekStart = config.weekStart = wkStart;\n config.weekEnd = calcEndOfWeek(wkStart);\n }\n delete inOpts.weekStart;\n }\n if (inOpts.daysOfWeekDisabled) {\n config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekDisabled;\n }\n if (inOpts.daysOfWeekHighlighted) {\n config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekHighlighted;\n }\n\n //*** multi date ***//\n if (inOpts.maxNumberOfDates !== undefined) {\n var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n if (maxNumberOfDates >= 0) {\n config.maxNumberOfDates = maxNumberOfDates;\n config.multidate = maxNumberOfDates !== 1;\n }\n delete inOpts.maxNumberOfDates;\n }\n if (inOpts.dateDelimiter) {\n config.dateDelimiter = String(inOpts.dateDelimiter);\n delete inOpts.dateDelimiter;\n }\n\n //*** pick level & view ***//\n var newPickLevel = pickLevel;\n if (inOpts.pickLevel !== undefined) {\n newPickLevel = validateViewId(inOpts.pickLevel, 2);\n delete inOpts.pickLevel;\n }\n if (newPickLevel !== pickLevel) {\n pickLevel = config.pickLevel = newPickLevel;\n }\n var newMaxView = maxView;\n if (inOpts.maxView !== undefined) {\n newMaxView = validateViewId(inOpts.maxView, maxView);\n delete inOpts.maxView;\n }\n // ensure max view >= pick level\n newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n if (newMaxView !== maxView) {\n maxView = config.maxView = newMaxView;\n }\n var newStartView = startView;\n if (inOpts.startView !== undefined) {\n newStartView = validateViewId(inOpts.startView, newStartView);\n delete inOpts.startView;\n }\n // ensure pick level <= start view <= max view\n if (newStartView < pickLevel) {\n newStartView = pickLevel;\n } else if (newStartView > maxView) {\n newStartView = maxView;\n }\n if (newStartView !== startView) {\n config.startView = newStartView;\n }\n\n //*** template ***//\n if (inOpts.prevArrow) {\n var prevArrow = parseHTML(inOpts.prevArrow);\n if (prevArrow.childNodes.length > 0) {\n config.prevArrow = prevArrow.childNodes;\n }\n delete inOpts.prevArrow;\n }\n if (inOpts.nextArrow) {\n var nextArrow = parseHTML(inOpts.nextArrow);\n if (nextArrow.childNodes.length > 0) {\n config.nextArrow = nextArrow.childNodes;\n }\n delete inOpts.nextArrow;\n }\n\n //*** misc ***//\n if (inOpts.disableTouchKeyboard !== undefined) {\n config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n delete inOpts.disableTouchKeyboard;\n }\n if (inOpts.orientation) {\n var orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n config.orientation = {\n x: orientation.find(function (x) {\n return x === 'left' || x === 'right';\n }) || 'auto',\n y: orientation.find(function (y) {\n return y === 'top' || y === 'bottom';\n }) || 'auto'\n };\n delete inOpts.orientation;\n }\n if (inOpts.todayBtnMode !== undefined) {\n switch (inOpts.todayBtnMode) {\n case 0:\n case 1:\n config.todayBtnMode = inOpts.todayBtnMode;\n }\n delete inOpts.todayBtnMode;\n }\n\n //*** copy the rest ***//\n Object.keys(inOpts).forEach(function (key) {\n if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) {\n config[key] = inOpts[key];\n }\n });\n return config;\n}\n\nvar pickerTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n \\n
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \");\n\nvar daysTemplate = optimizeTemplateHTML(\"
    \\n
    \".concat(createTagRepeat('span', 7, {\n \"class\": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \").concat(createTagRepeat('span', 42, {\n \"class\": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'\n}), \"
    \\n
    \"));\n\nvar calendarWeeksTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \".concat(createTagRepeat('span', 6, {\n \"class\": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \"));\n\n// Base class of the view classes\nvar View = /*#__PURE__*/function () {\n function View(picker, config) {\n _classCallCheck(this, View);\n Object.assign(this, config, {\n picker: picker,\n element: parseHTML(\"
    \").firstChild,\n selected: []\n });\n this.init(this.picker.datepicker.config);\n }\n return _createClass(View, [{\n key: \"init\",\n value: function init(options) {\n if (options.pickLevel !== undefined) {\n this.isMinView = this.id === options.pickLevel;\n }\n this.setOptions(options);\n this.updateFocus();\n this.updateSelection();\n }\n\n // Execute beforeShow() callback and apply the result to the element\n // args:\n // - current - current value on the iteration on view rendering\n // - timeValue - time value of the date to pass to beforeShow()\n }, {\n key: \"performBeforeHook\",\n value: function performBeforeHook(el, current, timeValue) {\n var result = this.beforeShow(new Date(timeValue));\n switch (_typeof(result)) {\n case 'boolean':\n result = {\n enabled: result\n };\n break;\n case 'string':\n result = {\n classes: result\n };\n }\n if (result) {\n if (result.enabled === false) {\n el.classList.add('disabled');\n pushUnique(this.disabled, current);\n }\n if (result.classes) {\n var _el$classList;\n var extraClasses = result.classes.split(/\\s+/);\n (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses));\n if (extraClasses.includes('disabled')) {\n pushUnique(this.disabled, current);\n }\n }\n if (result.content) {\n replaceChildNodes(el, result.content);\n }\n }\n }\n }]);\n}();\n\nvar DaysView = /*#__PURE__*/function (_View) {\n function DaysView(picker) {\n _classCallCheck(this, DaysView);\n return _callSuper(this, DaysView, [picker, {\n id: 0,\n name: 'days',\n cellClass: 'day'\n }]);\n }\n _inherits(DaysView, _View);\n return _createClass(DaysView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n var inner = parseHTML(daysTemplate).firstChild;\n this.dow = inner.firstChild;\n this.grid = inner.lastChild;\n this.element.appendChild(inner);\n }\n _get(_getPrototypeOf(DaysView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var _this = this;\n var updateDOW;\n if (hasProperty(options, 'minDate')) {\n this.minDate = options.minDate;\n }\n if (hasProperty(options, 'maxDate')) {\n this.maxDate = options.maxDate;\n }\n if (options.datesDisabled) {\n this.datesDisabled = options.datesDisabled;\n }\n if (options.daysOfWeekDisabled) {\n this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n updateDOW = true;\n }\n if (options.daysOfWeekHighlighted) {\n this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n }\n if (options.todayHighlight !== undefined) {\n this.todayHighlight = options.todayHighlight;\n }\n if (options.weekStart !== undefined) {\n this.weekStart = options.weekStart;\n this.weekEnd = options.weekEnd;\n updateDOW = true;\n }\n if (options.locale) {\n var locale = this.locale = options.locale;\n this.dayNames = locale.daysMin;\n this.switchLabelFormat = locale.titleFormat;\n updateDOW = true;\n }\n if (options.beforeShowDay !== undefined) {\n this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined;\n }\n if (options.calendarWeeks !== undefined) {\n if (options.calendarWeeks && !this.calendarWeeks) {\n var weeksElem = parseHTML(calendarWeeksTemplate).firstChild;\n this.calendarWeeks = {\n element: weeksElem,\n dow: weeksElem.firstChild,\n weeks: weeksElem.lastChild\n };\n this.element.insertBefore(weeksElem, this.element.firstChild);\n } else if (this.calendarWeeks && !options.calendarWeeks) {\n this.element.removeChild(this.calendarWeeks.element);\n this.calendarWeeks = null;\n }\n }\n if (options.showDaysOfWeek !== undefined) {\n if (options.showDaysOfWeek) {\n showElement(this.dow);\n if (this.calendarWeeks) {\n showElement(this.calendarWeeks.dow);\n }\n } else {\n hideElement(this.dow);\n if (this.calendarWeeks) {\n hideElement(this.calendarWeeks.dow);\n }\n }\n }\n\n // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n if (updateDOW) {\n Array.from(this.dow.children).forEach(function (el, index) {\n var dow = (_this.weekStart + index) % 7;\n el.textContent = _this.dayNames[dow];\n el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n });\n }\n }\n\n // Apply update on the focused date to view's settings\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var viewYear = viewDate.getFullYear();\n var viewMonth = viewDate.getMonth();\n var firstOfMonth = dateValue(viewYear, viewMonth, 1);\n var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n this.first = firstOfMonth;\n this.last = dateValue(viewYear, viewMonth + 1, 0);\n this.start = start;\n this.focused = this.picker.viewDate;\n }\n\n // Apply update on the selected dates to view's settings\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates;\n if (rangepicker) {\n this.range = rangepicker.dates;\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // update today marker on ever render\n this.today = this.todayHighlight ? today() : undefined;\n // refresh disabled dates on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = _toConsumableArray(this.datesDisabled);\n var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale);\n this.picker.setViewSwitchLabel(switchLabel);\n this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n if (this.calendarWeeks) {\n // start of the UTC week (Monday) of the 1st of the month\n var startOfWeek = dayOfTheWeekOf(this.first, 1, 1);\n Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) {\n el.textContent = getWeek(addWeeks(startOfWeek, index));\n });\n }\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = addDays(_this2.start, index);\n var date = new Date(current);\n var day = date.getDay();\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n el.dataset.date = current;\n el.textContent = date.getDate();\n if (current < _this2.first) {\n classList.add('prev', 'text-gray-500', 'dark:text-white');\n } else if (current > _this2.last) {\n classList.add('next', 'text-gray-500', 'dark:text-white');\n }\n if (_this2.today === current) {\n classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n }\n if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n }\n if (_this2.daysOfWeekDisabled.includes(day)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n pushUnique(_this2.disabled, current);\n }\n if (_this2.daysOfWeekHighlighted.includes(day)) {\n classList.add('highlighted');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg', 'rounded-r-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg', 'rounded-l-lg');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, current);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused');\n el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.dataset.date);\n var classList = el.classList;\n classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg');\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / 86400000);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction computeMonthRange(range, thisYear) {\n if (!range || !range[0] || !range[1]) {\n return;\n }\n var _range = _slicedToArray(range, 2),\n _range$ = _slicedToArray(_range[0], 2),\n startY = _range$[0],\n startM = _range$[1],\n _range$2 = _slicedToArray(_range[1], 2),\n endY = _range$2[0],\n endM = _range$2[1];\n if (startY > thisYear || endY < thisYear) {\n return;\n }\n return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12];\n}\nvar MonthsView = /*#__PURE__*/function (_View) {\n function MonthsView(picker) {\n _classCallCheck(this, MonthsView);\n return _callSuper(this, MonthsView, [picker, {\n id: 1,\n name: 'months',\n cellClass: 'month'\n }]);\n }\n _inherits(MonthsView, _View);\n return _createClass(MonthsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.grid = this.element;\n this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {\n 'data-month': function dataMonth(ix) {\n return ix;\n }\n })));\n }\n _get(_getPrototypeOf(MonthsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options.locale) {\n this.monthNames = options.locale.monthsShort;\n }\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minMonth = this.minDate = undefined;\n } else {\n var minDateObj = new Date(options.minDate);\n this.minYear = minDateObj.getFullYear();\n this.minMonth = minDateObj.getMonth();\n this.minDate = minDateObj.setDate(1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxMonth = this.maxDate = undefined;\n } else {\n var maxDateObj = new Date(options.maxDate);\n this.maxYear = maxDateObj.getFullYear();\n this.maxMonth = maxDateObj.getMonth();\n this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n }\n }\n if (options.beforeShowMonth !== undefined) {\n this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n this.year = viewDate.getFullYear();\n this.focused = viewDate.getMonth();\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (selected, timeValue) {\n var date = new Date(timeValue);\n var year = date.getFullYear();\n var month = date.getMonth();\n if (selected[year] === undefined) {\n selected[year] = [month];\n } else {\n pushUnique(selected[year], month);\n }\n return selected;\n }, {});\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n var date = new Date(timeValue);\n return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n // refresh disabled months on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(this.year);\n this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n var selected = this.selected[this.year] || [];\n var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n var isMinYear = this.year === this.minYear;\n var isMaxYear = this.year === this.maxYear;\n var range = computeMonthRange(this.range, this.year);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var date = dateValue(_this.year, index, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this.cellClass);\n if (_this.isMinView) {\n el.dataset.date = date;\n }\n // reset text on every render to clear the custom content set\n // by beforeShow hook at previous render\n el.textContent = _this.monthNames[index];\n if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) {\n classList.add('disabled');\n }\n if (range) {\n var _range2 = _slicedToArray(range, 2),\n rangeStart = _range2[0],\n rangeEnd = _range2[1];\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this.focused) {\n classList.add('focused');\n }\n if (_this.beforeShow) {\n _this.performBeforeHook(el, index, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this2 = this;\n var selected = this.selected[this.year] || [];\n var _ref = computeMonthRange(this.range, this.year) || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused');\n el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n });\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this2.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[this.focused].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction toTitleCase(word) {\n return _toConsumableArray(word).reduce(function (str, ch, ix) {\n return str += ix ? ch : ch.toUpperCase();\n }, '');\n}\n\n// Class representing the years and decades view elements\nvar YearsView = /*#__PURE__*/function (_View) {\n function YearsView(picker, config) {\n _classCallCheck(this, YearsView);\n return _callSuper(this, YearsView, [picker, config]);\n }\n _inherits(YearsView, _View);\n return _createClass(YearsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.navStep = this.step * 10;\n this.beforeShowOption = \"beforeShow\".concat(toTitleCase(this.cellClass));\n this.grid = this.element;\n this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n }\n _get(_getPrototypeOf(YearsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minDate = undefined;\n } else {\n this.minYear = startOfYearPeriod(options.minDate, this.step);\n this.minDate = dateValue(this.minYear, 0, 1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxDate = undefined;\n } else {\n this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n this.maxDate = dateValue(this.maxYear, 11, 31);\n }\n }\n if (options[this.beforeShowOption] !== undefined) {\n var beforeShow = options[this.beforeShowOption];\n this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var first = startOfYearPeriod(viewDate, this.navStep);\n var last = first + 9 * this.step;\n this.first = first;\n this.last = last;\n this.start = first - this.step;\n this.focused = startOfYearPeriod(viewDate, this.step);\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this = this;\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (years, timeValue) {\n return pushUnique(years, startOfYearPeriod(timeValue, _this.step));\n }, []);\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n if (timeValue !== undefined) {\n return startOfYearPeriod(timeValue, _this.step);\n }\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // refresh disabled years on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(\"\".concat(this.first, \"-\").concat(this.last));\n this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = _this2.start + index * _this2.step;\n var date = dateValue(current, 0, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n if (_this2.isMinView) {\n el.dataset.date = date;\n }\n el.textContent = el.dataset.year = current;\n if (index === 0) {\n classList.add('prev');\n } else if (index === 11) {\n classList.add('next');\n }\n if (current < _this2.minYear || current > _this2.maxYear) {\n classList.add('disabled');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.textContent);\n var classList = el.classList;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / this.step);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction triggerDatepickerEvent(datepicker, type) {\n var detail = {\n date: datepicker.getDate(),\n viewDate: new Date(datepicker.picker.viewDate),\n viewId: datepicker.picker.currentView.id,\n datepicker: datepicker\n };\n datepicker.element.dispatchEvent(new CustomEvent(type, {\n detail: detail\n }));\n}\n\n// direction: -1 (to previous), 1 (to next)\nfunction goToPrevOrNext(datepicker, direction) {\n var _datepicker$config = datepicker.config,\n minDate = _datepicker$config.minDate,\n maxDate = _datepicker$config.maxDate;\n var _datepicker$picker = datepicker.picker,\n currentView = _datepicker$picker.currentView,\n viewDate = _datepicker$picker.viewDate;\n var newViewDate;\n switch (currentView.id) {\n case 0:\n newViewDate = addMonths(viewDate, direction);\n break;\n case 1:\n newViewDate = addYears(viewDate, direction);\n break;\n default:\n newViewDate = addYears(viewDate, direction * currentView.navStep);\n }\n newViewDate = limitToRange(newViewDate, minDate, maxDate);\n datepicker.picker.changeFocus(newViewDate).render();\n}\nfunction switchView(datepicker) {\n var viewId = datepicker.picker.currentView.id;\n if (viewId === datepicker.config.maxView) {\n return;\n }\n datepicker.picker.changeView(viewId + 1).render();\n}\nfunction unfocus(datepicker) {\n if (datepicker.config.updateOnBlur) {\n datepicker.update({\n autohide: true\n });\n } else {\n datepicker.refresh('input');\n datepicker.hide();\n }\n}\n\nfunction goToSelectedMonthOrYear(datepicker, selection) {\n var picker = datepicker.picker;\n var viewDate = new Date(picker.viewDate);\n var viewId = picker.currentView.id;\n var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear());\n picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\nfunction onClickTodayBtn(datepicker) {\n var picker = datepicker.picker;\n var currentDate = today();\n if (datepicker.config.todayBtnMode === 1) {\n if (datepicker.config.autohide) {\n datepicker.setDate(currentDate);\n return;\n }\n datepicker.setDate(currentDate, {\n render: false\n });\n picker.update();\n }\n if (picker.viewDate !== currentDate) {\n picker.changeFocus(currentDate);\n }\n picker.changeView(0).render();\n}\nfunction onClickClearBtn(datepicker) {\n datepicker.setDate({\n clear: true\n });\n}\nfunction onClickViewSwitch(datepicker) {\n switchView(datepicker);\n}\nfunction onClickPrevBtn(datepicker) {\n goToPrevOrNext(datepicker, -1);\n}\nfunction onClickNextBtn(datepicker) {\n goToPrevOrNext(datepicker, 1);\n}\n\n// For the picker's main block to delegete the events from `datepicker-cell`s\nfunction onClickView(datepicker, ev) {\n var target = findElementInEventPath(ev, '.datepicker-cell');\n if (!target || target.classList.contains('disabled')) {\n return;\n }\n var _datepicker$picker$cu = datepicker.picker.currentView,\n id = _datepicker$picker$cu.id,\n isMinView = _datepicker$picker$cu.isMinView;\n if (isMinView) {\n datepicker.setDate(Number(target.dataset.date));\n } else if (id === 1) {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n } else {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n }\n}\nfunction onClickPicker(datepicker) {\n if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.focus();\n }\n}\n\nfunction processPickerOptions(picker, options) {\n if (options.title !== undefined) {\n if (options.title) {\n picker.controls.title.textContent = options.title;\n showElement(picker.controls.title);\n } else {\n picker.controls.title.textContent = '';\n hideElement(picker.controls.title);\n }\n }\n if (options.prevArrow) {\n var prevBtn = picker.controls.prevBtn;\n emptyChildNodes(prevBtn);\n options.prevArrow.forEach(function (node) {\n prevBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.nextArrow) {\n var nextBtn = picker.controls.nextBtn;\n emptyChildNodes(nextBtn);\n options.nextArrow.forEach(function (node) {\n nextBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.locale) {\n picker.controls.todayBtn.textContent = options.locale.today;\n picker.controls.clearBtn.textContent = options.locale.clear;\n }\n if (options.todayBtn !== undefined) {\n if (options.todayBtn) {\n showElement(picker.controls.todayBtn);\n } else {\n hideElement(picker.controls.todayBtn);\n }\n }\n if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) {\n var _picker$datepicker$co = picker.datepicker.config,\n minDate = _picker$datepicker$co.minDate,\n maxDate = _picker$datepicker$co.maxDate;\n picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate);\n }\n if (options.clearBtn !== undefined) {\n if (options.clearBtn) {\n showElement(picker.controls.clearBtn);\n } else {\n hideElement(picker.controls.clearBtn);\n }\n }\n}\n\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction computeResetViewDate(datepicker) {\n var dates = datepicker.dates,\n config = datepicker.config;\n var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate;\n return limitToRange(viewDate, config.minDate, config.maxDate);\n}\n\n// Change current view's view date\nfunction setViewDate(picker, newDate) {\n var oldViewDate = new Date(picker.viewDate);\n var newViewDate = new Date(newDate);\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n year = _picker$currentView.year,\n first = _picker$currentView.first,\n last = _picker$currentView.last;\n var viewYear = newViewDate.getFullYear();\n picker.viewDate = newDate;\n if (viewYear !== oldViewDate.getFullYear()) {\n triggerDatepickerEvent(picker.datepicker, 'changeYear');\n }\n if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n }\n\n // return whether the new date is in different period on time from the one\n // displayed in the current view\n // when true, the view needs to be re-rendered on the next UI refresh.\n switch (id) {\n case 0:\n return newDate < first || newDate > last;\n case 1:\n return viewYear !== year;\n default:\n return viewYear < first || viewYear > last;\n }\n}\nfunction getTextDirection(el) {\n return window.getComputedStyle(el).direction;\n}\n\n// Class representing the picker UI\nvar Picker = /*#__PURE__*/function () {\n function Picker(datepicker) {\n _classCallCheck(this, Picker);\n this.datepicker = datepicker;\n var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n var element = this.element = parseHTML(template).firstChild;\n var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3),\n header = _element$firstChild$c[0],\n main = _element$firstChild$c[1],\n footer = _element$firstChild$c[2];\n var title = header.firstElementChild;\n var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3),\n prevBtn = _header$lastElementCh[0],\n viewSwitch = _header$lastElementCh[1],\n nextBtn = _header$lastElementCh[2];\n var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2),\n todayBtn = _footer$firstChild$ch[0],\n clearBtn = _footer$firstChild$ch[1];\n var controls = {\n title: title,\n prevBtn: prevBtn,\n viewSwitch: viewSwitch,\n nextBtn: nextBtn,\n todayBtn: todayBtn,\n clearBtn: clearBtn\n };\n this.main = main;\n this.controls = controls;\n var elementClass = datepicker.inline ? 'inline' : 'dropdown';\n element.classList.add(\"datepicker-\".concat(elementClass));\n elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null;\n processPickerOptions(this, datepicker.config);\n this.viewDate = computeResetViewDate(datepicker);\n\n // set up event listeners\n registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), {\n capture: true\n }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]);\n\n // set up views\n this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {\n id: 2,\n name: 'years',\n cellClass: 'year',\n step: 1\n }), new YearsView(this, {\n id: 3,\n name: 'decades',\n cellClass: 'decade',\n step: 10\n })];\n this.currentView = this.views[datepicker.config.startView];\n this.currentView.render();\n this.main.appendChild(this.currentView.element);\n datepicker.config.container.appendChild(this.element);\n }\n return _createClass(Picker, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n processPickerOptions(this, options);\n this.views.forEach(function (view) {\n view.init(options, false);\n });\n this.currentView.render();\n }\n }, {\n key: \"detach\",\n value: function detach() {\n this.datepicker.config.container.removeChild(this.element);\n }\n }, {\n key: \"show\",\n value: function show() {\n if (this.active) {\n return;\n }\n this.element.classList.add('active', 'block');\n this.element.classList.remove('hidden');\n this.active = true;\n var datepicker = this.datepicker;\n if (!datepicker.inline) {\n // ensure picker's direction matches input's\n var inputDirection = getTextDirection(datepicker.inputField);\n if (inputDirection !== getTextDirection(datepicker.config.container)) {\n this.element.dir = inputDirection;\n } else if (this.element.dir) {\n this.element.removeAttribute('dir');\n }\n this.place();\n if (datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.blur();\n }\n }\n triggerDatepickerEvent(datepicker, 'show');\n }\n }, {\n key: \"hide\",\n value: function hide() {\n if (!this.active) {\n return;\n }\n this.datepicker.exitEditMode();\n this.element.classList.remove('active', 'block');\n this.element.classList.add('active', 'block', 'hidden');\n this.active = false;\n triggerDatepickerEvent(this.datepicker, 'hide');\n }\n }, {\n key: \"place\",\n value: function place() {\n var _this$element = this.element,\n classList = _this$element.classList,\n style = _this$element.style;\n var _this$datepicker = this.datepicker,\n config = _this$datepicker.config,\n inputField = _this$datepicker.inputField;\n var container = config.container;\n var _this$element$getBoun = this.element.getBoundingClientRect(),\n calendarWidth = _this$element$getBoun.width,\n calendarHeight = _this$element$getBoun.height;\n var _container$getBoundin = container.getBoundingClientRect(),\n containerLeft = _container$getBoundin.left,\n containerTop = _container$getBoundin.top,\n containerWidth = _container$getBoundin.width;\n var _inputField$getBoundi = inputField.getBoundingClientRect(),\n inputLeft = _inputField$getBoundi.left,\n inputTop = _inputField$getBoundi.top,\n inputWidth = _inputField$getBoundi.width,\n inputHeight = _inputField$getBoundi.height;\n var _config$orientation = config.orientation,\n orientX = _config$orientation.x,\n orientY = _config$orientation.y;\n var scrollTop;\n var left;\n var top;\n if (container === document.body) {\n scrollTop = window.scrollY;\n left = inputLeft + window.scrollX;\n top = inputTop + scrollTop;\n } else {\n scrollTop = container.scrollTop;\n left = inputLeft - containerLeft;\n top = inputTop - containerTop + scrollTop;\n }\n if (orientX === 'auto') {\n if (left < 0) {\n // align to the left and move into visible area if input's left edge < window's\n orientX = 'left';\n left = 10;\n } else if (left + calendarWidth > containerWidth) {\n // align to the right if canlendar's right edge > container's\n orientX = 'right';\n } else {\n orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n }\n }\n if (orientX === 'right') {\n left -= calendarWidth - inputWidth;\n }\n if (orientY === 'auto') {\n orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n }\n if (orientY === 'top') {\n top -= calendarHeight;\n } else {\n top += inputHeight;\n }\n classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left');\n classList.add(\"datepicker-orient-\".concat(orientY), \"datepicker-orient-\".concat(orientX));\n style.top = top ? \"\".concat(top, \"px\") : top;\n style.left = left ? \"\".concat(left, \"px\") : left;\n }\n }, {\n key: \"setViewSwitchLabel\",\n value: function setViewSwitchLabel(labelText) {\n this.controls.viewSwitch.textContent = labelText;\n }\n }, {\n key: \"setPrevBtnDisabled\",\n value: function setPrevBtnDisabled(disabled) {\n this.controls.prevBtn.disabled = disabled;\n }\n }, {\n key: \"setNextBtnDisabled\",\n value: function setNextBtnDisabled(disabled) {\n this.controls.nextBtn.disabled = disabled;\n }\n }, {\n key: \"changeView\",\n value: function changeView(viewId) {\n var oldView = this.currentView;\n var newView = this.views[viewId];\n if (newView.id !== oldView.id) {\n this.currentView = newView;\n this._renderMethod = 'render';\n triggerDatepickerEvent(this.datepicker, 'changeView');\n this.main.replaceChild(newView.element, oldView.element);\n }\n return this;\n }\n\n // Change the focused date (view date)\n }, {\n key: \"changeFocus\",\n value: function changeFocus(newViewDate) {\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n this.views.forEach(function (view) {\n view.updateFocus();\n });\n return this;\n }\n\n // Apply the change of the selected dates\n }, {\n key: \"update\",\n value: function update() {\n var newViewDate = computeResetViewDate(this.datepicker);\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n this.views.forEach(function (view) {\n view.updateFocus();\n view.updateSelection();\n });\n return this;\n }\n\n // Refresh the picker UI\n }, {\n key: \"render\",\n value: function render() {\n var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var renderMethod = quickRender && this._renderMethod || 'render';\n delete this._renderMethod;\n this.currentView[renderMethod]();\n }\n }]);\n}();\n\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n// - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n// - args: time value; retun: true if unavailable\nfunction findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n if (!isInRange(date, min, max)) {\n return;\n }\n if (testFn(date)) {\n var newDate = addFn(date, increase);\n return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n }\n return date;\n}\n\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction moveByArrowKey(datepicker, ev, direction, vertical) {\n var picker = datepicker.picker;\n var currentView = picker.currentView;\n var step = currentView.step || 1;\n var viewDate = picker.viewDate;\n var addFn;\n var testFn;\n switch (currentView.id) {\n case 0:\n if (vertical) {\n viewDate = addDays(viewDate, direction * 7);\n } else if (ev.ctrlKey || ev.metaKey) {\n viewDate = addYears(viewDate, direction);\n } else {\n viewDate = addDays(viewDate, direction);\n }\n addFn = addDays;\n testFn = function testFn(date) {\n return currentView.disabled.includes(date);\n };\n break;\n case 1:\n viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n addFn = addMonths;\n testFn = function testFn(date) {\n var dt = new Date(date);\n var year = currentView.year,\n disabled = currentView.disabled;\n return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n };\n break;\n default:\n viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n addFn = addYears;\n testFn = function testFn(date) {\n return currentView.disabled.includes(startOfYearPeriod(date, step));\n };\n }\n viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate);\n if (viewDate !== undefined) {\n picker.changeFocus(viewDate).render();\n }\n}\nfunction onKeydown(datepicker, ev) {\n if (ev.key === 'Tab') {\n unfocus(datepicker);\n return;\n }\n var picker = datepicker.picker;\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n isMinView = _picker$currentView.isMinView;\n if (!picker.active) {\n switch (ev.key) {\n case 'ArrowDown':\n case 'Escape':\n picker.show();\n break;\n case 'Enter':\n datepicker.update();\n break;\n default:\n return;\n }\n } else if (datepicker.editMode) {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'Enter':\n datepicker.exitEditMode({\n update: true,\n autohide: datepicker.config.autohide\n });\n break;\n default:\n return;\n }\n } else {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'ArrowLeft':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, -1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, false);\n }\n break;\n case 'ArrowRight':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, 1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, 1, false);\n }\n break;\n case 'ArrowUp':\n if (ev.ctrlKey || ev.metaKey) {\n switchView(datepicker);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, true);\n }\n break;\n case 'ArrowDown':\n if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n return;\n }\n moveByArrowKey(datepicker, ev, 1, true);\n break;\n case 'Enter':\n if (isMinView) {\n datepicker.setDate(picker.viewDate);\n } else {\n picker.changeView(id - 1).render();\n }\n break;\n case 'Backspace':\n case 'Delete':\n datepicker.enterEditMode();\n return;\n default:\n if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n }\n return;\n }\n }\n ev.preventDefault();\n ev.stopPropagation();\n}\nfunction onFocus(datepicker) {\n if (datepicker.config.showOnFocus && !datepicker._showing) {\n datepicker.show();\n }\n}\n\n// for the prevention for entering edit mode while getting focus on click\nfunction onMousedown(datepicker, ev) {\n var el = ev.target;\n if (datepicker.picker.active || datepicker.config.showOnClick) {\n el._active = el === document.activeElement;\n el._clicking = setTimeout(function () {\n delete el._active;\n delete el._clicking;\n }, 2000);\n }\n}\nfunction onClickInput(datepicker, ev) {\n var el = ev.target;\n if (!el._clicking) {\n return;\n }\n clearTimeout(el._clicking);\n delete el._clicking;\n if (el._active) {\n datepicker.enterEditMode();\n }\n delete el._active;\n if (datepicker.config.showOnClick) {\n datepicker.show();\n }\n}\nfunction onPaste(datepicker, ev) {\n if (ev.clipboardData.types.includes('text/plain')) {\n datepicker.enterEditMode();\n }\n}\n\n// for the `document` to delegate the events from outside the picker/input field\nfunction onClickOutside(datepicker, ev) {\n var element = datepicker.element;\n if (element !== document.activeElement) {\n return;\n }\n var pickerElem = datepicker.picker.element;\n if (findElementInEventPath(ev, function (el) {\n return el === element || el === pickerElem;\n })) {\n return;\n }\n unfocus(datepicker);\n}\n\nfunction stringifyDates(dates, config) {\n return dates.map(function (dt) {\n return formatDate(dt, config.format, config.locale);\n }).join(config.dateDelimiter);\n}\n\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction processInputDates(datepicker, inputDates) {\n var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var config = datepicker.config,\n origDates = datepicker.dates,\n rangepicker = datepicker.rangepicker;\n if (inputDates.length === 0) {\n // empty input is considered valid unless origiDates is passed\n return clear ? [] : undefined;\n }\n var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n var newDates = inputDates.reduce(function (dates, dt) {\n var date = parseDate(dt, config.format, config.locale);\n if (date === undefined) {\n return dates;\n }\n if (config.pickLevel > 0) {\n // adjust to 1st of the month/Jan 1st of the year\n // or to the last day of the monh/Dec 31st of the year if the datepicker\n // is the range-end picker of a rangepicker\n var _dt = new Date(date);\n if (config.pickLevel === 1) {\n date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1);\n } else {\n date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1);\n }\n }\n if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) {\n dates.push(date);\n }\n return dates;\n }, []);\n if (newDates.length === 0) {\n return;\n }\n if (config.multidate && !clear) {\n // get the synmetric difference between origDates and newDates\n newDates = newDates.reduce(function (dates, date) {\n if (!origDates.includes(date)) {\n dates.push(date);\n }\n return dates;\n }, origDates.filter(function (date) {\n return !newDates.includes(date);\n }));\n }\n // do length check always because user can input multiple dates regardless of the mode\n return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates;\n}\n\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction refreshUI(datepicker) {\n var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var config = datepicker.config,\n picker = datepicker.picker,\n inputField = datepicker.inputField;\n if (mode & 2) {\n var newView = picker.active ? config.pickLevel : config.startView;\n picker.update().changeView(newView).render(quickRender);\n }\n if (mode & 1 && inputField) {\n inputField.value = stringifyDates(datepicker.dates, config);\n }\n}\nfunction _setDate(datepicker, inputDates, options) {\n var clear = options.clear,\n render = options.render,\n autohide = options.autohide;\n if (render === undefined) {\n render = true;\n }\n if (!render) {\n autohide = false;\n } else if (autohide === undefined) {\n autohide = datepicker.config.autohide;\n }\n var newDates = processInputDates(datepicker, inputDates, clear);\n if (!newDates) {\n return;\n }\n if (newDates.toString() !== datepicker.dates.toString()) {\n datepicker.dates = newDates;\n refreshUI(datepicker, render ? 3 : 1);\n triggerDatepickerEvent(datepicker, 'changeDate');\n } else {\n refreshUI(datepicker, 1);\n }\n if (autohide) {\n datepicker.hide();\n }\n}\n\n/**\n * Class representing a date picker\n */\nvar Datepicker = /*#__PURE__*/function () {\n /**\n * Create a date picker\n * @param {Element} element - element to bind a date picker\n * @param {Object} [options] - config options\n * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the\n * date picker belongs to. Use this only when creating date picker as a part\n * of date range picker\n */\n function Datepicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n _classCallCheck(this, Datepicker);\n element.datepicker = this;\n this.element = element;\n\n // set up config\n var config = this.config = Object.assign({\n buttonClass: options.buttonClass && String(options.buttonClass) || 'button',\n container: document.body,\n defaultViewDate: today(),\n maxDate: undefined,\n minDate: undefined\n }, processOptions(defaultOptions, this));\n this._options = options;\n Object.assign(config, processOptions(options, this));\n\n // configure by type\n var inline = this.inline = element.tagName !== 'INPUT';\n var inputField;\n var initialDates;\n if (inline) {\n config.container = element;\n initialDates = stringToArray(element.dataset.date, config.dateDelimiter);\n delete element.dataset.date;\n } else {\n var container = options.container ? document.querySelector(options.container) : null;\n if (container) {\n config.container = container;\n }\n inputField = this.inputField = element;\n inputField.classList.add('datepicker-input');\n initialDates = stringToArray(inputField.value, config.dateDelimiter);\n }\n if (rangepicker) {\n // check validiry\n var index = rangepicker.inputs.indexOf(inputField);\n var datepickers = rangepicker.datepickers;\n if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n throw Error('Invalid rangepicker object.');\n }\n // attach itaelf to the rangepicker here so that processInputDates() can\n // determine if this is the range-end picker of the rangepicker while\n // setting inital values when pickLevel > 0\n datepickers[index] = this;\n // add getter for rangepicker\n Object.defineProperty(this, 'rangepicker', {\n get: function get() {\n return rangepicker;\n }\n });\n }\n\n // set initial dates\n this.dates = [];\n // process initial value\n var inputDateValues = processInputDates(this, initialDates);\n if (inputDateValues && inputDateValues.length > 0) {\n this.dates = inputDateValues;\n }\n if (inputField) {\n inputField.value = stringifyDates(this.dates, config);\n }\n var picker = this.picker = new Picker(this);\n if (inline) {\n this.show();\n } else {\n // set up event listeners in other modes\n var onMousedownDocument = onClickOutside.bind(null, this);\n var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]];\n registerListeners(this, listeners);\n }\n }\n\n /**\n * Format Date object or time value in given format and language\n * @param {Date|Number} date - date or time value to format\n * @param {String|Object} format - format string or object that contains\n * toDisplay() custom formatter, whose signature is\n * - args:\n * - date: {Date} - Date instance of the date passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {String} formatted date\n * @param {String} [lang=en] - language code for the locale to use\n * @return {String} formatted date\n */\n return _createClass(Datepicker, [{\n key: \"active\",\n get:\n /**\n * @type {Boolean} - Whether the picker element is shown. `true` whne shown\n */\n function get() {\n return !!(this.picker && this.picker.active);\n }\n\n /**\n * @type {HTMLDivElement} - DOM object of picker element\n */\n }, {\n key: \"pickerElement\",\n get: function get() {\n return this.picker ? this.picker.element : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var picker = this.picker;\n var newOptions = processOptions(options, this);\n Object.assign(this._options, options);\n Object.assign(this.config, newOptions);\n picker.setOptions(newOptions);\n refreshUI(this, 3);\n }\n\n /**\n * Show the picker element\n */\n }, {\n key: \"show\",\n value: function show() {\n if (this.inputField) {\n if (this.inputField.disabled) {\n return;\n }\n if (this.inputField !== document.activeElement) {\n this._showing = true;\n this.inputField.focus();\n delete this._showing;\n }\n }\n this.picker.show();\n }\n\n /**\n * Hide the picker element\n * Not available on inline picker\n */\n }, {\n key: \"hide\",\n value: function hide() {\n if (this.inline) {\n return;\n }\n this.picker.hide();\n this.picker.update().changeView(this.config.startView).render();\n }\n\n /**\n * Destroy the Datepicker instance\n * @return {Detepicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hide();\n unregisterListeners(this);\n this.picker.detach();\n if (!this.inline) {\n this.inputField.classList.remove('datepicker-input');\n }\n delete this.element.datepicker;\n return this;\n }\n\n /**\n * Get the selected date(s)\n *\n * The method returns a Date object of selected date by default, and returns\n * an array of selected dates in multidate mode. If format string is passed,\n * it returns date string(s) formatted in given format.\n *\n * @param {String} [format] - Format string to stringify the date(s)\n * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\n * selected, empty array in multidate mode and untitled in sigledate mode\n */\n }, {\n key: \"getDate\",\n value: function getDate() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.config.locale);\n } : function (date) {\n return new Date(date);\n };\n if (this.config.multidate) {\n return this.dates.map(callback);\n }\n if (this.dates.length > 0) {\n return callback(this.dates[0]);\n }\n }\n\n /**\n * Set selected date(s)\n *\n * In multidate mode, you can pass multiple dates as a series of arguments\n * or an array. (Since each date is parsed individually, the type of the\n * dates doesn't have to be the same.)\n * The given dates are used to toggle the select status of each date. The\n * number of selected dates is kept from exceeding the length set to\n * maxNumberOfDates.\n *\n * With clear: true option, the method can be used to clear the selection\n * and to replace the selection instead of toggling in multidate mode.\n * If the option is passed with no date arguments or an empty dates array,\n * it works as \"clear\" (clear the selection then set nothing), and if the\n * option is passed with new dates to select, it works as \"replace\" (clear\n * the selection then set the given dates)\n *\n * When render: false option is used, the method omits re-rendering the\n * picker element. In this case, you need to call refresh() method later in\n * order for the picker element to reflect the changes. The input field is\n * refreshed always regardless of this option.\n *\n * When invalid (unparsable, repeated, disabled or out-of-range) dates are\n * passed, the method ignores them and applies only valid ones. In the case\n * that all the given dates are invalid, which is distinguished from passing\n * no dates, the method considers it as an error and leaves the selection\n * untouched.\n *\n * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\n * objects, time values or mix of those for new selection\n * @param {Object} [options] - function options\n * - clear: {boolean} - Whether to clear the existing selection\n * defualt: false\n * - render: {boolean} - Whether to re-render the picker element\n * default: true\n * - autohide: {boolean} - Whether to hide the picker element after re-render\n * Ignored when used with render: false\n * default: config.autohide\n */\n }, {\n key: \"setDate\",\n value: function setDate() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var dates = [].concat(args);\n var opts = {};\n var lastArg = lastItemOf(args);\n if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) {\n Object.assign(opts, dates.pop());\n }\n var inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Update the selected date(s) with input field's value\n * Not available on inline picker\n *\n * The input field will be refreshed with properly formatted date string.\n *\n * @param {Object} [options] - function options\n * - autohide: {boolean} - whether to hide the picker element after refresh\n * default: false\n */\n }, {\n key: \"update\",\n value: function update() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline) {\n return;\n }\n var opts = {\n clear: true,\n autohide: !!(options && options.autohide)\n };\n var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Refresh the picker element and the associated input field\n * @param {String} [target] - target item when refreshing one item only\n * 'picker' or 'input'\n * @param {Boolean} [forceRender] - whether to re-render the picker element\n * regardless of its state instead of optimized refresh\n */\n }, {\n key: \"refresh\",\n value: function refresh() {\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (target && typeof target !== 'string') {\n forceRender = target;\n target = undefined;\n }\n var mode;\n if (target === 'picker') {\n mode = 2;\n } else if (target === 'input') {\n mode = 1;\n } else {\n mode = 3;\n }\n refreshUI(this, mode, !forceRender);\n }\n\n /**\n * Enter edit mode\n * Not available on inline picker or when the picker element is hidden\n */\n }, {\n key: \"enterEditMode\",\n value: function enterEditMode() {\n if (this.inline || !this.picker.active || this.editMode) {\n return;\n }\n this.editMode = true;\n this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700');\n }\n\n /**\n * Exit from edit mode\n * Not available on inline picker\n * @param {Object} [options] - function options\n * - update: {boolean} - whether to call update() after exiting\n * If false, input field is revert to the existing selection\n * default: false\n */\n }, {\n key: \"exitEditMode\",\n value: function exitEditMode() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline || !this.editMode) {\n return;\n }\n var opts = Object.assign({\n update: false\n }, options);\n delete this.editMode;\n this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700');\n if (opts.update) {\n this.update(opts);\n }\n }\n }], [{\n key: \"formatDate\",\n value: function formatDate$1(date, format, lang) {\n return formatDate(date, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * Parse date string\n * @param {String|Date|Number} dateStr - date string, Date object or time\n * value to parse\n * @param {String|Object} format - format string or object that contains\n * toValue() custom parser, whose signature is\n * - args:\n * - dateStr: {String|Date|Number} - the dateStr passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {Date|Number} parsed date or its time value\n * @param {String} [lang=en] - language code for the locale to use\n * @return {Number} time value of parsed date\n */\n }, {\n key: \"parseDate\",\n value: function parseDate$1(dateStr, format, lang) {\n return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * @type {Object} - Installed locales in `[languageCode]: localeObject` format\n * en`:_English (US)_ is pre-installed.\n */\n }, {\n key: \"locales\",\n get: function get() {\n return locales;\n }\n }]);\n}();\n\n// filter out the config options inapproprite to pass to Datepicker\nfunction filterOptions(options) {\n var newOpts = Object.assign({}, options);\n delete newOpts.inputs;\n delete newOpts.allowOneSidedRange;\n delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n\n return newOpts;\n}\nfunction setupDatepicker(rangepicker, changeDateListener, el, options) {\n registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]);\n new Datepicker(el, options, rangepicker);\n}\nfunction onChangeDate(rangepicker, ev) {\n // to prevent both datepickers trigger the other side's update each other\n if (rangepicker._updating) {\n return;\n }\n rangepicker._updating = true;\n var target = ev.target;\n if (target.datepicker === undefined) {\n return;\n }\n var datepickers = rangepicker.datepickers;\n var setDateOptions = {\n render: false\n };\n var changedSide = rangepicker.inputs.indexOf(target);\n var otherSide = changedSide === 0 ? 1 : 0;\n var changedDate = datepickers[changedSide].dates[0];\n var otherDate = datepickers[otherSide].dates[0];\n if (changedDate !== undefined && otherDate !== undefined) {\n // if the start of the range > the end, swap them\n if (changedSide === 0 && changedDate > otherDate) {\n datepickers[0].setDate(otherDate, setDateOptions);\n datepickers[1].setDate(changedDate, setDateOptions);\n } else if (changedSide === 1 && changedDate < otherDate) {\n datepickers[0].setDate(changedDate, setDateOptions);\n datepickers[1].setDate(otherDate, setDateOptions);\n }\n } else if (!rangepicker.allowOneSidedRange) {\n // to prevent the range from becoming one-sided, copy changed side's\n // selection (no matter if it's empty) to the other side\n if (changedDate !== undefined || otherDate !== undefined) {\n setDateOptions.clear = true;\n datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n }\n }\n datepickers[0].picker.update().render();\n datepickers[1].picker.update().render();\n delete rangepicker._updating;\n}\n\n/**\n * Class representing a date range picker\n */\nvar DateRangePicker = /*#__PURE__*/function () {\n /**\n * Create a date range picker\n * @param {Element} element - element to bind a date range picker\n * @param {Object} [options] - config options\n */\n function DateRangePicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, DateRangePicker);\n var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input'));\n if (inputs.length < 2) {\n return;\n }\n element.rangepicker = this;\n this.element = element;\n this.inputs = inputs.slice(0, 2);\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var changeDateListener = onChangeDate.bind(null, this);\n var cleanOptions = filterOptions(options);\n // in order for initial date setup to work right when pcicLvel > 0,\n // let Datepicker constructor add the instance to the rangepicker\n var datepickers = [];\n Object.defineProperty(this, 'datepickers', {\n get: function get() {\n return datepickers;\n }\n });\n setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n Object.freeze(datepickers);\n // normalize the range if inital dates are given\n if (datepickers[0].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n } else if (datepickers[1].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n }\n }\n\n /**\n * @type {Array} - selected date of the linked date pickers\n */\n return _createClass(DateRangePicker, [{\n key: \"dates\",\n get: function get() {\n return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var cleanOptions = filterOptions(options);\n this.datepickers[0].setOptions(cleanOptions);\n this.datepickers[1].setOptions(cleanOptions);\n }\n\n /**\n * Destroy the DateRangePicker instance\n * @return {DateRangePicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.datepickers[0].destroy();\n this.datepickers[1].destroy();\n unregisterListeners(this);\n delete this.element.rangepicker;\n }\n\n /**\n * Get the start and end dates of the date range\n *\n * The method returns Date objects by default. If format string is passed,\n * it returns date strings formatted in given format.\n * The result array always contains 2 items (start date/end date) and\n * undefined is used for unselected side. (e.g. If none is selected,\n * the result will be [undefined, undefined]. If only the end date is set\n * when allowOneSidedRange config option is true, [undefined, endDate] will\n * be returned.)\n *\n * @param {String} [format] - Format string to stringify the dates\n * @return {Array} - Start and end dates\n */\n }, {\n key: \"getDates\",\n value: function getDates() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.datepickers[0].config.locale);\n } : function (date) {\n return new Date(date);\n };\n return this.dates.map(function (date) {\n return date === undefined ? date : callback(date);\n });\n }\n\n /**\n * Set the start and end dates of the date range\n *\n * The method calls datepicker.setDate() internally using each of the\n * arguments in start→end order.\n *\n * When a clear: true option object is passed instead of a date, the method\n * clears the date.\n *\n * If an invalid date, the same date as the current one or an option object\n * without clear: true is passed, the method considers that argument as an\n * \"ineffective\" argument because calling datepicker.setDate() with those\n * values makes no changes to the date selection.\n *\n * When the allowOneSidedRange config option is false, passing {clear: true}\n * to clear the range works only when it is done to the last effective\n * argument (in other words, passed to rangeEnd or to rangeStart along with\n * ineffective rangeEnd). This is because when the date range is changed,\n * it gets normalized based on the last change at the end of the changing\n * process.\n *\n * @param {Date|Number|String|Object} rangeStart - Start date of the range\n * or {clear: true} to clear the date\n * @param {Date|Number|String|Object} rangeEnd - End date of the range\n * or {clear: true} to clear the date\n */\n }, {\n key: \"setDates\",\n value: function setDates(rangeStart, rangeEnd) {\n var _this$datepickers = _slicedToArray(this.datepickers, 2),\n datepicker0 = _this$datepickers[0],\n datepicker1 = _this$datepickers[1];\n var origDates = this.dates;\n\n // If range normalization runs on every change, we can't set a new range\n // that starts after the end of the current range correctly because the\n // normalization process swaps start↔︎end right after setting the new start\n // date. To prevent this, the normalization process needs to run once after\n // both of the new dates are set.\n this._updating = true;\n datepicker0.setDate(rangeStart);\n datepicker1.setDate(rangeEnd);\n delete this._updating;\n if (datepicker1.dates[0] !== origDates[1]) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n } else if (datepicker0.dates[0] !== origDates[0]) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n }\n }\n }]);\n}();\n\nexports.DateRangePicker = DateRangePicker;\nexports.Datepicker = Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { AccordionInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Accordion implements AccordionInterface {\n _instanceId: string;\n _accordionEl: HTMLElement;\n _items: AccordionItem[];\n _options: AccordionOptions;\n _clickHandler: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n accordionEl: HTMLElement | null = null,\n items: AccordionItem[] = [],\n options: AccordionOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : accordionEl.id;\n this._accordionEl = accordionEl;\n this._items = items;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Accordion',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // show accordion item based on click\n this._items.forEach((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n const clickHandler = () => {\n this.toggle(item.id);\n };\n\n item.triggerEl.addEventListener('click', clickHandler);\n\n // Store the clickHandler in a property of the item for removal later\n item.clickHandler = clickHandler;\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._items.length && this._initialized) {\n this._items.forEach((item) => {\n item.triggerEl.removeEventListener('click', item.clickHandler);\n\n // Clean up by deleting the clickHandler property from the item\n delete item.clickHandler;\n });\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Accordion', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.add('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n\n updateOnOpen(callback: () => void) {\n this._options.onOpen = callback;\n }\n\n updateOnClose(callback: () => void) {\n this._options.onClose = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion($accordionEl as HTMLElement, items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CarouselInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Carousel implements CarouselInterface {\n _instanceId: string;\n _carouselEl: HTMLElement;\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n _initialized: boolean;\n\n constructor(\n carouselEl: HTMLElement | null = null,\n items: CarouselItem[] = [],\n options: CarouselOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : carouselEl.id;\n this._carouselEl = carouselEl;\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Carousel',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n /**\n * initialize carousel and items based on active one\n */\n init() {\n if (this._items.length && !this._initialized) {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this.getActiveItem()) {\n this.slideTo(this.getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Carousel', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this.getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this.getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // Handling the case when there is only one item\n if (this._items.length === 1) {\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n return;\n }\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-30');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-30'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-20');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n\n updateOnNext(callback: () => void) {\n this._options.onNext = callback;\n }\n\n updateOnPrev(callback: () => void) {\n this._options.onPrev = callback;\n }\n\n updateOnChange(callback: () => void) {\n this._options.onChange = callback;\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel($carouselEl as HTMLElement, items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CopyClipboardOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CopyClipboardInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CopyClipboardOptions = {\n htmlEntities: false,\n contentType: 'input',\n onCopy: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass CopyClipboard implements CopyClipboardInterface {\n _instanceId: string;\n _triggerEl: HTMLElement | null;\n _targetEl: HTMLInputElement | null;\n _options: CopyClipboardOptions;\n _initialized: boolean;\n _triggerElClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLInputElement | null = null,\n options: CopyClipboardOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'CopyClipboard',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && this._triggerEl && !this._initialized) {\n this._triggerElClickHandler = () => {\n this.copy();\n };\n\n // clicking on the trigger element should copy the value of the target element\n if (this._triggerEl) {\n this._triggerEl.addEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._targetEl && this._initialized) {\n if (this._triggerEl) {\n this._triggerEl.removeEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('CopyClipboard', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getTargetValue() {\n if (this._options.contentType === 'input') {\n return this._targetEl.value;\n }\n\n if (this._options.contentType === 'innerHTML') {\n return this._targetEl.innerHTML;\n }\n\n if (this._options.contentType === 'textContent') {\n return this._targetEl.textContent.replace(/\\s+/g, ' ').trim();\n }\n }\n\n copy() {\n let textToCopy = this.getTargetValue();\n\n // Check if HTMLEntities option is enabled\n if (this._options.htmlEntities) {\n // Encode the text using HTML entities\n textToCopy = this.decodeHTML(textToCopy);\n }\n\n // Create a temporary textarea element\n const tempTextArea = document.createElement('textarea');\n tempTextArea.value = textToCopy;\n document.body.appendChild(tempTextArea);\n\n // Select the text inside the textarea and copy it to the clipboard\n tempTextArea.select();\n document.execCommand('copy');\n\n // Remove the temporary textarea\n document.body.removeChild(tempTextArea);\n\n // Callback function\n this._options.onCopy(this);\n\n return textToCopy;\n }\n\n // Function to encode text into HTML entities\n decodeHTML(html: string) {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = html;\n return textarea.textContent;\n }\n\n updateOnCopyCallback(callback: () => void) {\n this._options.onCopy = callback;\n }\n}\n\nexport function initCopyClipboards() {\n document\n .querySelectorAll('[data-copy-to-clipboard-target]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-target'\n );\n const $targetEl = document.getElementById(targetId);\n const contentType = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-content-type'\n );\n const htmlEntities = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-html-entities'\n );\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'CopyClipboard',\n $targetEl.getAttribute('id')\n )\n ) {\n new CopyClipboard(\n $triggerEl as HTMLElement,\n $targetEl as HTMLInputElement,\n {\n htmlEntities:\n htmlEntities && htmlEntities === 'true'\n ? true\n : Default.htmlEntities,\n contentType: contentType\n ? contentType\n : Default.contentType,\n } as CopyClipboardOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-copy-to-clipboard-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.CopyClipboard = CopyClipboard;\n window.initClipboards = initCopyClipboards;\n}\n\nexport default CopyClipboard;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CollapseInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Collapse implements CollapseInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Collapse',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Collapse', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n\n updateOnCollapse(callback: () => void) {\n this._options.onCollapse = callback;\n }\n\n updateOnExpand(callback: () => void) {\n this._options.onExpand = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'Collapse',\n $targetEl.getAttribute('id')\n )\n ) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n // if instance exists already for the same target element then create a new one with a different trigger element\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement,\n {},\n {\n id:\n $targetEl.getAttribute('id') +\n '_' +\n instances._generateRandomId(),\n }\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DatepickerOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DatepickerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nimport {\n Datepicker as FlowbiteDatepicker,\n DateRangePicker as FlowbiteDateRangePicker,\n} from 'flowbite-datepicker';\n\nconst Default: DatepickerOptions = {\n defaultDatepickerId: null,\n autohide: false,\n format: 'mm/dd/yyyy',\n maxDate: null,\n minDate: null,\n orientation: 'bottom',\n buttons: false,\n autoSelectToday: 0,\n title: null,\n language: 'en',\n rangePicker: false,\n onShow: () => {},\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Datepicker implements DatepickerInterface {\n _instanceId: string;\n _datepickerEl: HTMLElement;\n _datepickerInstance: FlowbiteDatepicker | FlowbiteDateRangePicker | null;\n _options: DatepickerOptions;\n _initialized: boolean;\n\n constructor(\n datepickerEl: HTMLElement | null = null,\n options: DatepickerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : datepickerEl.id;\n this._datepickerEl = datepickerEl;\n this._datepickerInstance = null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Datepicker',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._datepickerEl && !this._initialized) {\n if (this._options.rangePicker) {\n this._datepickerInstance = new FlowbiteDateRangePicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n } else {\n this._datepickerInstance = new FlowbiteDatepicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n this._datepickerInstance.destroy();\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Datepicker', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getDatepickerInstance() {\n return this._datepickerInstance;\n }\n\n getDate() {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.getDates();\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.getDate();\n }\n }\n\n setDate(date: any) {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.setDates(date);\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.setDate(date);\n }\n }\n\n show() {\n this._datepickerInstance.show();\n this._options.onShow(this);\n }\n\n hide() {\n this._datepickerInstance.hide();\n this._options.onHide(this);\n }\n\n _getDatepickerOptions(options: DatepickerOptions) {\n const datepickerOptions = {} as any;\n\n if (options.buttons) {\n datepickerOptions.todayBtn = true;\n datepickerOptions.clearBtn = true;\n\n if (options.autoSelectToday) {\n datepickerOptions.todayBtnMode = 1;\n }\n }\n\n if (options.autohide) {\n datepickerOptions.autohide = true;\n }\n\n if (options.format) {\n datepickerOptions.format = options.format;\n }\n\n if (options.maxDate) {\n datepickerOptions.maxDate = options.maxDate;\n }\n\n if (options.minDate) {\n datepickerOptions.minDate = options.minDate;\n }\n\n if (options.orientation) {\n datepickerOptions.orientation = options.orientation;\n }\n\n if (options.title) {\n datepickerOptions.title = options.title;\n }\n\n if (options.language) {\n datepickerOptions.language = options.language;\n }\n\n return datepickerOptions;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDatepickers() {\n document\n .querySelectorAll(\n '[datepicker], [inline-datepicker], [date-rangepicker]'\n )\n .forEach(($datepickerEl) => {\n if ($datepickerEl) {\n const buttons =\n $datepickerEl.hasAttribute('datepicker-buttons');\n const autoselectToday = $datepickerEl.hasAttribute(\n 'datepicker-autoselect-today'\n );\n const autohide = $datepickerEl.hasAttribute(\n 'datepicker-autohide'\n );\n const format = $datepickerEl.getAttribute('datepicker-format');\n const maxDate = $datepickerEl.getAttribute(\n 'datepicker-max-date'\n );\n const minDate = $datepickerEl.getAttribute(\n 'datepicker-min-date'\n );\n const orientation = $datepickerEl.getAttribute(\n 'datepicker-orientation'\n );\n const title = $datepickerEl.getAttribute('datepicker-title');\n const language = $datepickerEl.getAttribute(\n 'datepicker-language'\n );\n const rangePicker =\n $datepickerEl.hasAttribute('date-rangepicker');\n new Datepicker(\n $datepickerEl as HTMLElement,\n {\n buttons: buttons ? buttons : Default.buttons,\n autoSelectToday: autoselectToday\n ? autoselectToday\n : Default.autoSelectToday,\n autohide: autohide ? autohide : Default.autohide,\n format: format ? format : Default.format,\n maxDate: maxDate ? maxDate : Default.maxDate,\n minDate: minDate ? minDate : Default.minDate,\n orientation: orientation\n ? orientation\n : Default.orientation,\n title: title ? title : Default.title,\n language: language ? language : Default.language,\n rangePicker: rangePicker\n ? rangePicker\n : Default.rangePicker,\n } as DatepickerOptions\n );\n } else {\n console.error(\n `The datepicker element does not exist. Please check the datepicker attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Datepicker = Datepicker;\n window.initDatepickers = initDatepickers;\n}\n\nexport default Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DialInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dial implements DialInterface {\n _instanceId: string;\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n _initialized: boolean;\n _showEventHandler: EventListenerOrEventListenerObject;\n _hideEventHandler: EventListenerOrEventListenerObject;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dial',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n this._showEventHandler = () => {\n this.show();\n };\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, this._showEventHandler);\n this._targetEl.addEventListener(ev, this._showEventHandler);\n });\n\n this._hideEventHandler = () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n };\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, this._hideEventHandler);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.removeEventListener(ev, this._showEventHandler);\n this._targetEl.removeEventListener(ev, this._showEventHandler);\n });\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.removeEventListener(ev, this._hideEventHandler);\n });\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dial', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DismissInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dismiss implements DismissInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dismiss',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._clickHandler = () => {\n this.hide();\n };\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dismiss', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerOptions, PlacementClasses } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { DrawerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Drawer implements DrawerInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n _eventListenerInstances: EventListenerInstance[] = [];\n _handleEscapeKey: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Drawer',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n // set initial accessibility attributes\n if (this._targetEl && !this._initialized) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n this._handleEscapeKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n };\n\n // add keyboard event listener to document\n document.addEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n\n // Remove the keyboard event listener\n document.removeEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Drawer', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (\n this._visible &&\n document.querySelector('[drawer-backdrop]') !== null\n ) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDrawers() {\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge ? (edge === 'true' ? true : false) : Default.edge,\n edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset,\n } as DrawerOptions);\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const toggleDrawer = () => {\n drawer.toggle();\n };\n $triggerEl.addEventListener('click', toggleDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const hideDrawer = () => {\n drawer.hide();\n };\n $triggerEl.addEventListener('click', hideDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const showDrawer = () => {\n drawer.show();\n };\n $triggerEl.addEventListener('click', showDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DropdownInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dropdown implements DropdownInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _initialized: boolean;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _hoverShowTriggerElHandler: EventListenerOrEventListenerObject;\n _hoverShowTargetElHandler: EventListenerOrEventListenerObject;\n _hoverHideHandler: EventListenerOrEventListenerObject;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetElement.id;\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dropdown',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._popperInstance = this._createPopperInstance();\n this._setupEventListeners();\n this._initialized = true;\n }\n }\n\n destroy() {\n const triggerEvents = this._getTriggerEvents();\n\n // Remove click event listeners for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._clickHandler);\n });\n }\n\n // Remove hover event listeners for trigger and target elements\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.removeEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hoverHideHandler);\n this._targetEl.removeEventListener(ev, this._hoverHideHandler);\n });\n }\n\n this._popperInstance.destroy();\n this._initialized = false;\n }\n\n removeInstance() {\n instances.removeInstance('Dropdown', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._clickHandler);\n });\n }\n\n this._hoverShowTriggerElHandler = (ev) => {\n if (ev.type === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n };\n this._hoverShowTargetElHandler = () => {\n this.show();\n };\n\n this._hoverHideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n };\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.addEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hoverHideHandler);\n this._targetEl.addEventListener(ev, this._hoverHideHandler);\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n this._targetEl.removeAttribute('aria-hidden');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n this._targetEl.setAttribute('aria-hidden', 'true');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCopyClipboards } from './clipboard';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initInputCounters } from './input-counter';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\nimport { initDatepickers } from './datepicker';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n initInputCounters();\n initCopyClipboards();\n initDatepickers();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { InputCounterOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { InputCounterInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: InputCounterOptions = {\n minValue: null,\n maxValue: null,\n onIncrement: () => {},\n onDecrement: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass InputCounter implements InputCounterInterface {\n _instanceId: string;\n _targetEl: HTMLInputElement | null;\n _incrementEl: HTMLElement | null;\n _decrementEl: HTMLElement | null;\n _options: InputCounterOptions;\n _initialized: boolean;\n _incrementClickHandler: EventListenerOrEventListenerObject;\n _decrementClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLInputElement | null = null,\n incrementEl: HTMLElement | null = null,\n decrementEl: HTMLElement | null = null,\n options: InputCounterOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._targetEl = targetEl;\n this._incrementEl = incrementEl;\n this._decrementEl = decrementEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'InputCounter',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._inputHandler = (event) => {\n {\n const target = event.target as HTMLInputElement;\n\n // check if the value is numeric\n if (!/^\\d*$/.test(target.value)) {\n // Regex to check if the value is numeric\n target.value = target.value.replace(/[^\\d]/g, ''); // Remove non-numeric characters\n }\n\n // check for max value\n if (\n this._options.maxValue !== null &&\n parseInt(target.value) > this._options.maxValue\n ) {\n target.value = this._options.maxValue.toString();\n }\n\n // check for min value\n if (\n this._options.minValue !== null &&\n parseInt(target.value) < this._options.minValue\n ) {\n target.value = this._options.minValue.toString();\n }\n }\n };\n\n this._incrementClickHandler = () => {\n this.increment();\n };\n\n this._decrementClickHandler = () => {\n this.decrement();\n };\n\n // Add event listener to restrict input to numeric values only\n this._targetEl.addEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.addEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n\n if (this._decrementEl) {\n this._decrementEl.addEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._targetEl && this._initialized) {\n this._targetEl.removeEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.removeEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n if (this._decrementEl) {\n this._decrementEl.removeEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('InputCounter', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getCurrentValue() {\n return parseInt(this._targetEl.value) || 0;\n }\n\n increment() {\n // don't increment if the value is already at the maximum value\n if (\n this._options.maxValue !== null &&\n this.getCurrentValue() >= this._options.maxValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() + 1).toString();\n this._options.onIncrement(this);\n }\n\n decrement() {\n // don't decrement if the value is already at the minimum value\n if (\n this._options.minValue !== null &&\n this.getCurrentValue() <= this._options.minValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() - 1).toString();\n this._options.onDecrement(this);\n }\n\n updateOnIncrement(callback: () => void) {\n this._options.onIncrement = callback;\n }\n\n updateOnDecrement(callback: () => void) {\n this._options.onDecrement = callback;\n }\n}\n\nexport function initInputCounters() {\n document.querySelectorAll('[data-input-counter]').forEach(($targetEl) => {\n const targetId = $targetEl.id;\n\n const $incrementEl = document.querySelector(\n '[data-input-counter-increment=\"' + targetId + '\"]'\n );\n\n const $decrementEl = document.querySelector(\n '[data-input-counter-decrement=\"' + targetId + '\"]'\n );\n\n const minValue = $targetEl.getAttribute('data-input-counter-min');\n const maxValue = $targetEl.getAttribute('data-input-counter-max');\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'InputCounter',\n $targetEl.getAttribute('id')\n )\n ) {\n new InputCounter(\n $targetEl as HTMLInputElement,\n $incrementEl ? ($incrementEl as HTMLElement) : null,\n $decrementEl ? ($decrementEl as HTMLElement) : null,\n {\n minValue: minValue ? parseInt(minValue) : null,\n maxValue: maxValue ? parseInt(maxValue) : null,\n } as InputCounterOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-input-counter attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.InputCounter = InputCounter;\n window.initInputCounters = initInputCounters;\n}\n\nexport default InputCounter;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalOptions } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { ModalInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Modal implements ModalInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _eventListenerInstances: EventListenerInstance[] = [];\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Modal',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Modal', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden && this._backdropEl) {\n this._backdropEl.remove();\n this._backdropEl = null;\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initModals() {\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n );\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // toggle modal visibility\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const toggleModal = () => {\n modal.toggle();\n };\n $triggerEl.addEventListener('click', toggleModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const showModal = () => {\n modal.show();\n };\n $triggerEl.addEventListener('click', showModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const hideModal = () => {\n modal.hide();\n };\n $triggerEl.addEventListener('click', hideModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { PopoverInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Popover implements PopoverInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Popover',\n this,\n instanceOptions.id ? instanceOptions.id : this._targetEl.id,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element and target element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n this._targetEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n this._targetEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Popover', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n this._targetEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n this._targetEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TabsInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tabs implements TabsInterface {\n _instanceId: string;\n _tabsEl: HTMLElement;\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n _initialized: boolean;\n\n constructor(\n tabsEl: HTMLElement | null = null,\n items: TabItem[] = [],\n options: TabsOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id;\n this._tabsEl = tabsEl;\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tabs',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this.setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', (event) => {\n event.preventDefault();\n this.show(tab.id);\n });\n });\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Tabs', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this.setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($parentEl) => {\n const tabItems: TabItem[] = [];\n const activeClasses = $parentEl.getAttribute(\n 'data-tabs-active-classes'\n );\n const inactiveClasses = $parentEl.getAttribute(\n 'data-tabs-inactive-classes'\n );\n let defaultTabId = null;\n $parentEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n\n new Tabs($parentEl as HTMLElement, tabItems, {\n defaultTabId: defaultTabId,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TooltipInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tooltip implements TooltipInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tooltip',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Tooltip', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n this.hide();\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","import { AccordionInterface } from '../components/accordion/interface';\nimport { CarouselInterface } from '../components/carousel/interface';\nimport { CollapseInterface } from '../components/collapse/interface';\nimport { DialInterface } from '../components/dial/interface';\nimport { DismissInterface } from '../components/dismiss/interface';\nimport { DrawerInterface } from '../components/drawer/interface';\nimport { DropdownInterface } from '../components/dropdown/interface';\nimport { ModalInterface } from '../components/modal/interface';\nimport { PopoverInterface } from '../components/popover/interface';\nimport { TabsInterface } from '../components/tabs/interface';\nimport { TooltipInterface } from '../components/tooltip/interface';\nimport { InputCounterInterface } from '../components/input-counter/interface';\nimport { CopyClipboardInterface } from '../components/clipboard/interface';\nimport { DatepickerInterface } from '../components/datepicker/interface';\n\nclass Instances {\n private _instances: {\n Accordion: { [id: string]: AccordionInterface };\n Carousel: { [id: string]: CarouselInterface };\n Collapse: { [id: string]: CollapseInterface };\n Dial: { [id: string]: DialInterface };\n Dismiss: { [id: string]: DismissInterface };\n Drawer: { [id: string]: DrawerInterface };\n Dropdown: { [id: string]: DropdownInterface };\n Modal: { [id: string]: ModalInterface };\n Popover: { [id: string]: PopoverInterface };\n Tabs: { [id: string]: TabsInterface };\n Tooltip: { [id: string]: TooltipInterface };\n InputCounter: { [id: string]: InputCounterInterface };\n CopyClipboard: { [id: string]: CopyClipboardInterface };\n Datepicker: { [id: string]: DatepickerInterface };\n };\n\n constructor() {\n this._instances = {\n Accordion: {},\n Carousel: {},\n Collapse: {},\n Dial: {},\n Dismiss: {},\n Drawer: {},\n Dropdown: {},\n Modal: {},\n Popover: {},\n Tabs: {},\n Tooltip: {},\n InputCounter: {},\n CopyClipboard: {},\n Datepicker: {},\n };\n }\n\n addInstance(\n component: keyof Instances['_instances'],\n instance: any,\n id?: string,\n override = false\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (this._instances[component][id] && !override) {\n console.warn(`Flowbite: Instance with ID ${id} already exists.`);\n return;\n }\n\n if (override && this._instances[component][id]) {\n this._instances[component][id].destroyAndRemoveInstance();\n }\n\n this._instances[component][id ? id : this._generateRandomId()] =\n instance;\n }\n\n getAllInstances() {\n return this._instances;\n }\n\n getInstances(component: keyof Instances['_instances']) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n return this._instances[component];\n }\n\n getInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return;\n }\n return this._instances[component][id] as any;\n }\n\n destroyAndRemoveInstance(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this.destroyInstanceObject(component, id);\n this.removeInstance(component, id);\n }\n\n removeInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n delete this._instances[component][id];\n }\n\n destroyInstanceObject(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this._instances[component][id].destroy();\n }\n\n instanceExists(component: keyof Instances['_instances'], id: string) {\n if (!this._instances[component]) {\n return false;\n }\n\n if (!this._instances[component][id]) {\n return false;\n }\n\n return true;\n }\n\n _generateRandomId() {\n return Math.random().toString(36).substr(2, 9);\n }\n\n private _componentAndInstanceCheck(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return false;\n }\n\n return true;\n }\n}\n\nconst instances = new Instances();\n\nexport default instances;\n\nif (typeof window !== 'undefined') {\n window.FlowbiteInstances = instances;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import './flowbite.css';\n\n// core components\nimport Accordion, { initAccordions } from './components/accordion';\nimport Carousel, { initCarousels } from './components/carousel';\nimport Collapse, { initCollapses } from './components/collapse';\nimport Dial, { initDials } from './components/dial';\nimport Dismiss, { initDismisses } from './components/dismiss';\nimport Drawer, { initDrawers } from './components/drawer';\nimport Dropdown, { initDropdowns } from './components/dropdown';\nimport Modal, { initModals } from './components/modal';\nimport Popover, { initPopovers } from './components/popover';\nimport Tabs, { initTabs } from './components/tabs';\nimport Tooltip, { initTooltips } from './components/tooltip';\nimport InputCounter, { initInputCounters } from './components/input-counter';\nimport CopyClipboard, { initCopyClipboards } from './components/clipboard';\nimport Datepicker, { initDatepickers } from './components/datepicker';\nimport './components/index';\nimport Events from './dom/events';\n\nconst events = new Events('load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n initCopyClipboards,\n initInputCounters,\n initDatepickers,\n]);\nevents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n InputCounter,\n CopyClipboard,\n Datepicker,\n Events,\n};\n"],"names":["root","factory","exports","module","define","amd","self","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","variationPlacements","reduce","acc","placement","concat","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","element","nodeName","toLowerCase","getWindow","node","window","toString","ownerDocument","defaultView","isElement","Element","isHTMLElement","HTMLElement","isShadowRoot","ShadowRoot","name","enabled","phase","fn","_ref","state","Object","keys","elements","forEach","style","styles","attributes","assign","value","removeAttribute","setAttribute","effect","_ref2","initialStyles","position","options","strategy","top","margin","arrow","hasOwnProperty","property","attribute","requires","getBasePlacement","split","Math","max","min","round","getUAString","uaData","navigator","userAgentData","brands","map","item","brand","version","join","userAgent","isLayoutViewport","test","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","width","offsetHeight","height","visualViewport","addVisualOffsets","x","offsetLeft","y","offsetTop","getLayoutRect","abs","contains","parent","child","rootNode","getRootNode","next","isSameNode","parentNode","host","getComputedStyle","isTableElement","indexOf","getDocumentElement","document","documentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getOffsetParent","isFirefox","currentNode","css","transform","perspective","contain","willChange","filter","getContainingBlock","getMainAxisFromPlacement","within","mergePaddingObject","paddingObject","expandToHashMap","hashMap","key","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","len","padding","rects","toPaddingObject","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","offset","axisProp","centerOffset","_options$element","querySelector","requiresIfExists","getVariation","unsetSides","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","win","heightProp","widthProp","_Object$assign","commonStyles","_ref4","dpr","devicePixelRatio","roundOffsetsByDPR","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","data","passive","instance","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","addEventListener","update","removeEventListener","hash","getOppositePlacement","replace","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","body","listScrollParents","list","_element$ownerDocumen","isBody","target","updatedList","rectToClientRect","rect","getClientRectFromMixedType","clippingParent","html","layoutViewport","getViewportRect","clientTop","clientLeft","getInnerBoundingClientRect","winScroll","scrollWidth","scrollHeight","direction","getDocumentRect","getClippingRect","boundary","rootBoundary","mainClippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","length","overflows","sort","a","b","computeAutoPlacement","referenceRect","checksMap","Map","makeFallbackChecks","firstFittingPlacement","i","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","push","every","check","set","_loop","_i","fittingPlacement","find","get","slice","reset","getSideOffsets","preventedOffsets","isAnySideFullyClipped","some","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","_options$offset","invertDistance","skidding","distance","distanceAndSkiddingToXY","_data$state$placement","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","v","withinMaxClamp","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","isElementScaled","order","modifiers","visited","Set","result","modifier","add","dep","has","depModifier","DEFAULT_OPTIONS","areValidElements","arguments","args","Array","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","pending","orderedModifiers","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","orderModifiers","merged","current","existing","mergeByName","m","_ref3$options","cleanupFn","noopFn","forceUpdate","_state$elements","index","_state$orderedModifie","_state$orderedModifie2","Promise","resolve","then","undefined","destroy","onFirstUpdate","createPopper","eventListeners","_arrayLikeToArray","r","e","n","_callSuper","t","o","_getPrototypeOf","TypeError","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","constructor","apply","_classCallCheck","_defineProperties","enumerable","configurable","writable","defineProperty","_toPropertyKey","_createClass","prototype","_get","bind","p","_superPropBase","getOwnPropertyDescriptor","call","setPrototypeOf","getPrototypeOf","__proto__","_inherits","create","_setPrototypeOf","Boolean","valueOf","_slicedToArray","isArray","_arrayWithHoles","l","Symbol","iterator","u","f","done","return","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_toConsumableArray","_arrayWithoutHoles","from","_iterableToArray","_nonIterableSpread","toPrimitive","String","Number","_toPrimitive","_typeof","hasProperty","obj","prop","lastItemOf","arr","pushUnique","items","includes","stringToArray","str","separator","isInRange","testVal","limitToRange","val","createTagRepeat","tagName","repeat","openTagSrc","src","attr","optimizeTemplateHTML","stripTime","timeValue","Date","setHours","today","dateValue","newDate","setFullYear","addDays","date","amount","setDate","getDate","addMonths","monthsToSet","getMonth","expectedMonth","time","setMonth","addYears","getFullYear","dayDiff","day","dayOfTheWeekOf","baseDate","dayOfWeek","weekStart","baseDay","getDay","startOfYearPeriod","years","year","floor","reFormatTokens","reNonDateParts","knownFormats","parseFns","parseInt","month","locale","monthIndex","isNaN","NaN","monthName","compareNames","startsWith","monthsShort","findIndex","months","normalizeMonth","getTime","d","formatFns","dd","padZero","D","daysShort","DD","days","mm","M","MM","yy","yyyy","num","padStart","parseFormatString","format","Error","separators","parts","match","RegExp","partFormatters","token","partParserKeys","part","parser","dateStr","dateParts","dtParts","origDate","formatter","parseDate","toValue","_date","formatDate","dateObj","toDisplay","listenerRegistry","WeakMap","_EventTarget$prototyp","EventTarget","registerListeners","keyObj","listeners","registered","listener","unregisterListeners","Event","composedPath","getComposedPath","path","this","findFromPath","criteria","currentTarget","el","parentElement","findElementInEventPath","ev","selector","matches","locales","en","daysMin","clear","titleFormat","autohide","beforeShowDay","beforeShowDecade","beforeShowMonth","beforeShowYear","calendarWeeks","clearBtn","dateDelimiter","datesDisabled","daysOfWeekDisabled","daysOfWeekHighlighted","defaultViewDate","disableTouchKeyboard","language","maxDate","maxNumberOfDates","maxView","minDate","nextArrow","orientation","pickLevel","prevArrow","showDaysOfWeek","showOnClick","showOnFocus","startView","title","todayBtn","todayBtnMode","todayHighlight","updateOnBlur","range","createRange","parseHTML","createContextualFragment","hideElement","display","dataset","styleDisplay","showElement","emptyChildNodes","firstChild","removeChild","defaultLang","defaultFormat","defaultWeekStart","sanitizeDOW","dow","calcEndOfWeek","startOfWeek","validateDate","origValue","validateViewId","viewId","processOptions","datepicker","lang","inOpts","config","origLocale","weekEnd","hasToDisplay","hasToValue","validFormatString","minDt","maxDt","dates","dt","viewDate","wkStart","multidate","newPickLevel","newMaxView","newStartView","childNodes","pickerTemplate","daysTemplate","calendarWeeksTemplate","View","picker","selected","init","isMinView","id","updateFocus","updateSelection","beforeShow","classes","classList","disabled","_el$classList","extraClasses","content","newChildNodes","DocumentFragment","appendChild","replaceChildNodes","DaysView","_View","cellClass","onConstruction","inner","grid","lastChild","updateDOW","_this","dayNames","switchLabelFormat","weeksElem","weeks","insertBefore","children","textContent","className","viewYear","viewMonth","firstOfMonth","first","last","focused","_this$picker$datepick","rangepicker","_this2","switchLabel","setViewSwitchLabel","setPrevBtnDisabled","setNextBtnDisabled","thuOfTheWeek","firstThu","getWeek","remove","_this2$range","rangeStart","rangeEnd","performBeforeHook","_this3","querySelectorAll","computeMonthRange","thisYear","_range","_range$","startY","startM","_range$2","endY","endM","MonthsView","ix","monthNames","minYear","minMonth","minDateObj","maxYear","maxMonth","maxDateObj","yrOutOfRange","isMinYear","isMaxYear","_range2","toTitleCase","word","ch","toUpperCase","YearsView","navStep","step","beforeShowOption","triggerDatepickerEvent","type","detail","currentView","dispatchEvent","CustomEvent","goToPrevOrNext","newViewDate","_datepicker$config","_datepicker$picker","changeFocus","render","switchView","changeView","unfocus","refresh","hide","goToSelectedMonthOrYear","selection","onClickTodayBtn","currentDate","onClickClearBtn","onClickViewSwitch","onClickPrevBtn","onClickNextBtn","onClickView","_datepicker$picker$cu","onClickPicker","inline","inputField","focus","processPickerOptions","controls","prevBtn","cloneNode","nextBtn","_picker$datepicker$co","computeResetViewDate","setViewDate","oldViewDate","_picker$currentView","getTextDirection","Picker","template","buttonClass","_element$firstChild$c","header","footer","firstElementChild","_header$lastElementCh","lastElementChild","viewSwitch","_footer$firstChild$ch","elementClass","capture","views","container","view","active","inputDirection","dir","place","blur","exitEditMode","_this$element","_this$datepicker","_this$element$getBoun","calendarWidth","calendarHeight","_container$getBoundin","containerLeft","containerTop","containerWidth","_inputField$getBoundi","inputLeft","inputTop","inputWidth","inputHeight","_config$orientation","orientX","orientY","scrollY","scrollX","labelText","oldView","newView","_renderMethod","replaceChild","quickRender","renderMethod","findNextAvailableOne","addFn","increase","testFn","moveByArrowKey","vertical","ctrlKey","metaKey","onKeydown","editMode","shiftKey","enterEditMode","show","preventDefault","stopPropagation","onFocus","_showing","onMousedown","_active","activeElement","_clicking","setTimeout","onClickInput","clearTimeout","onPaste","clipboardData","types","onClickOutside","pickerElem","stringifyDates","processInputDates","inputDates","origDates","datepickers","newDates","_dt","refreshUI","mode","_setDate","Datepicker","initialDates","inputs","inputDateValues","onMousedownDocument","newOptions","detach","callback","opts","lastArg","pop","forceRender","filterOptions","newOpts","allowOneSidedRange","setupDatepicker","changeDateListener","onChangeDate","_updating","setDateOptions","changedSide","otherSide","changedDate","otherDate","DateRangePicker","cleanOptions","freeze","_this$datepickers","datepicker0","datepicker1","Default","alwaysOpen","activeClasses","inactiveClasses","onOpen","onClose","onToggle","DefaultInstanceOptions","override","accordionEl","instanceOptions","_instanceId","_accordionEl","_items","_initialized","addInstance","open","clickHandler","toggle","triggerEl","removeInstance","destroyAndRemoveInstance","getItem","targetEl","iconEl","close","updateOnOpen","updateOnClose","updateOnToggle","initAccordions","$accordionEl","getAttribute","$triggerEl","closest","Accordion","defaultPosition","indicators","interval","onNext","onPrev","onChange","carouselEl","_carouselEl","_activeItem","_indicators","_intervalDuration","_intervalInstance","getActiveItem","slideTo","indicator","nextItem","rotationItems","middle","_rotate","_setActiveItem","pause","cycle","activeItem","prev","prevItem","setInterval","clearInterval","updateOnNext","updateOnPrev","updateOnChange","initCarousels","$carouselEl","slide","$carouselItemEl","$indicatorEl","carousel","Carousel","carouselNextEl","carouselPrevEl","htmlEntities","contentType","onCopy","_triggerEl","_targetEl","_triggerElClickHandler","copy","getTargetValue","innerHTML","trim","textToCopy","decodeHTML","tempTextArea","createElement","select","execCommand","textarea","updateOnCopyCallback","initCopyClipboards","targetId","$targetEl","getElementById","instanceExists","CopyClipboard","console","error","initClipboards","onCollapse","onExpand","_visible","hasAttribute","_clickHandler","collapse","expand","updateOnCollapse","updateOnExpand","initCollapses","Collapse","_generateRandomId","defaultDatepickerId","buttons","autoSelectToday","rangePicker","onShow","onHide","datepickerEl","_datepickerEl","_datepickerInstance","_getDatepickerOptions","getDatepickerInstance","getDates","setDates","datepickerOptions","updateOnShow","updateOnHide","initDatepickers","$datepickerEl","autoselectToday","triggerType","parentEl","_parentEl","triggerEventTypes","_getTriggerEventTypes","_showEventHandler","showEvents","_hideEventHandler","hideEvents","isHidden","isVisible","initDials","$parentEl","dialId","$dialEl","Dial","transition","duration","timing","initDismisses","$dismissEl","Dismiss","bodyScrolling","backdrop","edge","edgeOffset","backdropClasses","_eventListenerInstances","_getPlacementClasses","base","c","_handleEscapeKey","event","removeAllEventListenerInstances","_destroyBackdropEl","inactive","_createBackdrop","backdropEl","append","addEventListenerInstance","handler","eventListenerInstance","getAllEventListenerInstances","initDrawers","drawerId","$drawerEl","Drawer","getInstance","toggleDrawer","hideDrawer","showDrawer","offsetSkidding","offsetDistance","delay","ignoreClickOutsideClass","targetElement","triggerElement","_popperInstance","_createPopperInstance","_setupEventListeners","triggerEvents","_getTriggerEvents","_hoverShowTriggerElHandler","_hoverShowTargetElHandler","_hoverHideHandler","_setupClickOutsideListener","_clickOutsideEventListener","_handleClickOutside","_removeClickOutsideListener","clickedEl","isIgnored","initDropdowns","dropdownId","$dropdownEl","Dropdown","initFlowbite","initModals","initTabs","initTooltips","initPopovers","initInputCounters","minValue","maxValue","onIncrement","onDecrement","incrementEl","decrementEl","_incrementEl","_decrementEl","_inputHandler","_incrementClickHandler","increment","_decrementClickHandler","decrement","getCurrentValue","updateOnIncrement","updateOnDecrement","$incrementEl","$decrementEl","InputCounter","closable","_isHidden","_backdropEl","_setupModalCloseEventListeners","_handleOutsideClick","_keydownEventListener","_removeModalCloseEventListeners","modalId","$modalEl","Modal","toggleModal","showModal","hideModal","_showHandler","_hideHandler","_removeKeydownListener","_setupKeydownListener","popoverID","$popoverEl","Popover","defaultTabId","tabsEl","_tabsEl","_activeTab","getTab","setActiveTab","tab","getActiveTab","forceShow","tabItems","isActive","Tabs","tooltipId","$tooltipEl","Tooltip","eventType","eventFunctions","_eventType","_eventFunctions","eventFunction","Events","instances","_instances","component","warn","getAllInstances","getInstances","_componentAndInstanceCheck","destroyInstanceObject","random","substr","FlowbiteInstances","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","toStringTag"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.phoenix.js b/node_modules/flowbite/dist/flowbite.phoenix.js new file mode 100644 index 0000000..dba9d42 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.phoenix.js @@ -0,0 +1,8549 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("Flowbite", [], factory); + else if(typeof exports === 'object') + exports["Flowbite"] = factory(); + else + root["Flowbite"] = factory(); +})(self, function() { +return /******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 853: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "afterMain": function() { return /* reexport */ afterMain; }, + "afterRead": function() { return /* reexport */ afterRead; }, + "afterWrite": function() { return /* reexport */ afterWrite; }, + "applyStyles": function() { return /* reexport */ modifiers_applyStyles; }, + "arrow": function() { return /* reexport */ modifiers_arrow; }, + "auto": function() { return /* reexport */ auto; }, + "basePlacements": function() { return /* reexport */ basePlacements; }, + "beforeMain": function() { return /* reexport */ beforeMain; }, + "beforeRead": function() { return /* reexport */ beforeRead; }, + "beforeWrite": function() { return /* reexport */ beforeWrite; }, + "bottom": function() { return /* reexport */ bottom; }, + "clippingParents": function() { return /* reexport */ clippingParents; }, + "computeStyles": function() { return /* reexport */ modifiers_computeStyles; }, + "createPopper": function() { return /* reexport */ popper_createPopper; }, + "createPopperBase": function() { return /* reexport */ createPopper; }, + "createPopperLite": function() { return /* reexport */ popper_lite_createPopper; }, + "detectOverflow": function() { return /* reexport */ detectOverflow; }, + "end": function() { return /* reexport */ end; }, + "eventListeners": function() { return /* reexport */ eventListeners; }, + "flip": function() { return /* reexport */ modifiers_flip; }, + "hide": function() { return /* reexport */ modifiers_hide; }, + "left": function() { return /* reexport */ left; }, + "main": function() { return /* reexport */ main; }, + "modifierPhases": function() { return /* reexport */ modifierPhases; }, + "offset": function() { return /* reexport */ modifiers_offset; }, + "placements": function() { return /* reexport */ enums_placements; }, + "popper": function() { return /* reexport */ popper; }, + "popperGenerator": function() { return /* reexport */ popperGenerator; }, + "popperOffsets": function() { return /* reexport */ modifiers_popperOffsets; }, + "preventOverflow": function() { return /* reexport */ modifiers_preventOverflow; }, + "read": function() { return /* reexport */ read; }, + "reference": function() { return /* reexport */ reference; }, + "right": function() { return /* reexport */ right; }, + "start": function() { return /* reexport */ start; }, + "top": function() { return /* reexport */ enums_top; }, + "variationPlacements": function() { return /* reexport */ variationPlacements; }, + "viewport": function() { return /* reexport */ viewport; }, + "write": function() { return /* reexport */ write; } +}); + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/enums.js +var enums_top = 'top'; +var bottom = 'bottom'; +var right = 'right'; +var left = 'left'; +var auto = 'auto'; +var basePlacements = [enums_top, bottom, right, left]; +var start = 'start'; +var end = 'end'; +var clippingParents = 'clippingParents'; +var viewport = 'viewport'; +var popper = 'popper'; +var reference = 'reference'; +var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); +}, []); +var enums_placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); +}, []); // modifiers that need to read the DOM + +var beforeRead = 'beforeRead'; +var read = 'read'; +var afterRead = 'afterRead'; // pure-logic modifiers + +var beforeMain = 'beforeMain'; +var main = 'main'; +var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state) + +var beforeWrite = 'beforeWrite'; +var write = 'write'; +var afterWrite = 'afterWrite'; +var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +function getNodeName(element) { + return element ? (element.nodeName || '').toLowerCase() : null; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindow.js +function getWindow(node) { + if (node == null) { + return window; + } + + if (node.toString() !== '[object Window]') { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + + return node; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js + + +function isElement(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; +} + +function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; +} + +function isShadowRoot(node) { + // IE 11 has no ShadowRoot + if (typeof ShadowRoot === 'undefined') { + return false; + } + + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; +} + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/applyStyles.js + + // This modifier takes the styles prepared by the `computeStyles` modifier +// and applies them to the HTMLElements such as popper and arrow + +function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function (name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } // Flow doesn't support to extend this property, but it's the most + // effective way to apply styles to an HTMLElement + // $FlowFixMe[cannot-write] + + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (name) { + var value = attributes[name]; + + if (value === false) { + element.removeAttribute(name); + } else { + element.setAttribute(name, value === true ? '' : value); + } + }); + }); +} + +function effect(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: '0', + top: '0', + margin: '0' + }, + arrow: { + position: 'absolute' + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + + return function () { + Object.keys(state.elements).forEach(function (name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them + + var style = styleProperties.reduce(function (style, property) { + style[property] = ''; + return style; + }, {}); // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (attribute) { + element.removeAttribute(attribute); + }); + }); + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_applyStyles = ({ + name: 'applyStyles', + enabled: true, + phase: 'write', + fn: applyStyles, + effect: effect, + requires: ['computeStyles'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getBasePlacement.js + +function getBasePlacement(placement) { + return placement.split('-')[0]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/math.js +var math_max = Math.max; +var math_min = Math.min; +var round = Math.round; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/userAgent.js +function getUAString() { + var uaData = navigator.userAgentData; + + if (uaData != null && uaData.brands) { + return uaData.brands.map(function (item) { + return item.brand + "/" + item.version; + }).join(' '); + } + + return navigator.userAgent; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js + +function isLayoutViewport() { + return !/^((?!chrome|android).)*safari/i.test(getUAString()); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js + + + + +function getBoundingClientRect(element, includeScale, isFixedStrategy) { + if (includeScale === void 0) { + includeScale = false; + } + + if (isFixedStrategy === void 0) { + isFixedStrategy = false; + } + + var clientRect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + + if (includeScale && isHTMLElement(element)) { + scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1; + scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1; + } + + var _ref = isElement(element) ? getWindow(element) : window, + visualViewport = _ref.visualViewport; + + var addVisualOffsets = !isLayoutViewport() && isFixedStrategy; + var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX; + var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY; + var width = clientRect.width / scaleX; + var height = clientRect.height / scaleY; + return { + width: width, + height: height, + top: y, + right: x + width, + bottom: y + height, + left: x, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js + // Returns the layout rect of an element relative to its offsetParent. Layout +// means it doesn't take into account transforms. + +function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed. + // Fixes https://github.com/popperjs/popper-core/issues/1223 + + var width = element.offsetWidth; + var height = element.offsetHeight; + + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + + return { + x: element.offsetLeft, + y: element.offsetTop, + width: width, + height: height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/contains.js + +function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method + + if (parent.contains(child)) { + return true; + } // then fallback to custom implementation with Shadow DOM support + else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + + do { + if (next && parent.isSameNode(next)) { + return true; + } // $FlowFixMe[prop-missing]: need a better way to handle this... + + + next = next.parentNode || next.host; + } while (next); + } // Give up, the result is false + + + return false; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js + +function getComputedStyle(element) { + return getWindow(element).getComputedStyle(element); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js + +function isTableElement(element) { + return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js + +function getDocumentElement(element) { + // $FlowFixMe[incompatible-return]: assume body is always available + return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing] + element.document) || window.document).documentElement; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js + + + +function getParentNode(element) { + if (getNodeName(element) === 'html') { + return element; + } + + return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || ( // DOM Element detected + isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) // fallback + + ); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js + + + + + + + + +function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle(element).position === 'fixed') { + return null; + } + + return element.offsetParent; +} // `.offsetParent` reports `null` for fixed elements, while absolute elements +// return the containing block + + +function getContainingBlock(element) { + var isFirefox = /firefox/i.test(getUAString()); + var isIE = /Trident/i.test(getUAString()); + + if (isIE && isHTMLElement(element)) { + // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport + var elementCss = getComputedStyle(element); + + if (elementCss.position === 'fixed') { + return null; + } + } + + var currentNode = getParentNode(element); + + if (isShadowRoot(currentNode)) { + currentNode = currentNode.host; + } + + while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that + // create a containing block. + // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block + + if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + + return null; +} // Gets the closest ancestor positioned element. Handles some edge cases, +// such as table ancestors and cross browser bugs. + + +function getOffsetParent(element) { + var window = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + + while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') { + offsetParent = getTrueOffsetParent(offsetParent); + } + + if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) { + return window; + } + + return offsetParent || getContainingBlock(element) || window; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +function getMainAxisFromPlacement(placement) { + return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/within.js + +function within(min, value, max) { + return math_max(min, math_min(value, max)); +} +function withinMaxClamp(min, value, max) { + var v = within(min, value, max); + return v > max ? max : v; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js + +function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/expandToHashMap.js +function expandToHashMap(value, keys) { + return keys.reduce(function (hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/arrow.js + + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var toPaddingObject = function toPaddingObject(padding, state) { + padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); +}; + +function arrow(_ref) { + var _state$modifiersData$; + + var state = _ref.state, + name = _ref.name, + options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? 'height' : 'width'; + + if (!arrowElement || !popperOffsets) { + return; + } + + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === 'y' ? enums_top : left; + var maxProp = axis === 'y' ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len]; + var startDiff = popperOffsets[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is + // outside of the popper bounds + + var min = paddingObject[minProp]; + var max = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset = within(min, center, max); // Prevents breaking syntax highlighting... + + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$); +} + +function arrow_effect(_ref2) { + var state = _ref2.state, + options = _ref2.options; + var _options$element = options.element, + arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element; + + if (arrowElement == null) { + return; + } // CSS selector + + + if (typeof arrowElement === 'string') { + arrowElement = state.elements.popper.querySelector(arrowElement); + + if (!arrowElement) { + return; + } + } + + if (false) {} + + if (!contains(state.elements.popper, arrowElement)) { + if (false) {} + + return; + } + + state.elements.arrow = arrowElement; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_arrow = ({ + name: 'arrow', + enabled: true, + phase: 'main', + fn: arrow, + effect: arrow_effect, + requires: ['popperOffsets'], + requiresIfExists: ['preventOverflow'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getVariation.js +function getVariation(placement) { + return placement.split('-')[1]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/computeStyles.js + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var unsetSides = { + top: 'auto', + right: 'auto', + bottom: 'auto', + left: 'auto' +}; // Round the offsets to the nearest suitable subpixel based on the DPR. +// Zooming can change the DPR, but it seems to report a value that will +// cleanly divide the values into the appropriate subpixels. + +function roundOffsetsByDPR(_ref) { + var x = _ref.x, + y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; +} + +function mapToStyles(_ref2) { + var _Object$assign2; + + var popper = _ref2.popper, + popperRect = _ref2.popperRect, + placement = _ref2.placement, + variation = _ref2.variation, + offsets = _ref2.offsets, + position = _ref2.position, + gpuAcceleration = _ref2.gpuAcceleration, + adaptive = _ref2.adaptive, + roundOffsets = _ref2.roundOffsets, + isFixed = _ref2.isFixed; + var _offsets$x = offsets.x, + x = _offsets$x === void 0 ? 0 : _offsets$x, + _offsets$y = offsets.y, + y = _offsets$y === void 0 ? 0 : _offsets$y; + + var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref3.x; + y = _ref3.y; + var hasX = offsets.hasOwnProperty('x'); + var hasY = offsets.hasOwnProperty('y'); + var sideX = left; + var sideY = enums_top; + var win = window; + + if (adaptive) { + var offsetParent = getOffsetParent(popper); + var heightProp = 'clientHeight'; + var widthProp = 'clientWidth'; + + if (offsetParent === getWindow(popper)) { + offsetParent = getDocumentElement(popper); + + if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') { + heightProp = 'scrollHeight'; + widthProp = 'scrollWidth'; + } + } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it + + + offsetParent = offsetParent; + + if (placement === enums_top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] + offsetParent[heightProp]; + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + + if (placement === left || (placement === enums_top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] + offsetParent[widthProp]; + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + + var commonStyles = Object.assign({ + position: position + }, adaptive && unsetSides); + + var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref4.x; + y = _ref4.y; + + if (gpuAcceleration) { + var _Object$assign; + + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); +} + +function computeStyles(_ref5) { + var state = _ref5.state, + options = _ref5.options; + var _options$gpuAccelerat = options.gpuAcceleration, + gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, + _options$adaptive = options.adaptive, + adaptive = _options$adaptive === void 0 ? true : _options$adaptive, + _options$roundOffsets = options.roundOffsets, + roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + + if (false) { var transitionProperty; } + + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration: gpuAcceleration, + isFixed: state.options.strategy === 'fixed' + }; + + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive: adaptive, + roundOffsets: roundOffsets + }))); + } + + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: 'absolute', + adaptive: false, + roundOffsets: roundOffsets + }))); + } + + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-placement': state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_computeStyles = ({ + name: 'computeStyles', + enabled: true, + phase: 'beforeWrite', + fn: computeStyles, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/eventListeners.js + // eslint-disable-next-line import/no-unused-modules + +var passive = { + passive: true +}; + +function eventListeners_effect(_ref) { + var state = _ref.state, + instance = _ref.instance, + options = _ref.options; + var _options$scroll = options.scroll, + scroll = _options$scroll === void 0 ? true : _options$scroll, + _options$resize = options.resize, + resize = _options$resize === void 0 ? true : _options$resize; + var window = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.addEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.addEventListener('resize', instance.update, passive); + } + + return function () { + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.removeEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.removeEventListener('resize', instance.update, passive); + } + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var eventListeners = ({ + name: 'eventListeners', + enabled: true, + phase: 'write', + fn: function fn() {}, + effect: eventListeners_effect, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +var hash = { + left: 'right', + right: 'left', + bottom: 'top', + top: 'bottom' +}; +function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function (matched) { + return hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +var getOppositeVariationPlacement_hash = { + start: 'end', + end: 'start' +}; +function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function (matched) { + return getOppositeVariationPlacement_hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js + +function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft: scrollLeft, + scrollTop: scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js + + + +function getWindowScrollBarX(element) { + // If has a CSS width greater than the viewport, then this will be + // incorrect for RTL. + // Popper 1 is broken in this case and never had a bug report so let's assume + // it's not an issue. I don't think anyone ever specifies width on + // anyway. + // Browsers where the left scrollbar doesn't cause an issue report `0` for + // this (e.g. Edge 2019, IE11, Safari) + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js + + + + +function getViewportRect(element, strategy) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + var layoutViewport = isLayoutViewport(); + + if (layoutViewport || !layoutViewport && strategy === 'fixed') { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + + return { + width: width, + height: height, + x: x + getWindowScrollBarX(element), + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js + + + + + // Gets the entire size of the scrollable document area, even extending outside +// of the `` and `` rect bounds if horizontally scrollable + +function getDocumentRect(element) { + var _element$ownerDocumen; + + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = math_max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = math_max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + + if (getComputedStyle(body || html).direction === 'rtl') { + x += math_max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + + return { + width: width, + height: height, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js + +function isScrollParent(element) { + // Firefox wants us to check `-x` and `-y` variations as well + var _getComputedStyle = getComputedStyle(element), + overflow = _getComputedStyle.overflow, + overflowX = _getComputedStyle.overflowX, + overflowY = _getComputedStyle.overflowY; + + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js + + + + +function getScrollParent(node) { + if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) { + // $FlowFixMe[incompatible-return]: assume body is always available + return node.ownerDocument.body; + } + + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + + return getScrollParent(getParentNode(node)); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js + + + + +/* +given a DOM element, return the list of all scroll parents, up the list of ancesors +until we get to the top window object. This list is what we attach scroll listeners +to, because if any of these parent elements scroll, we'll need to re-calculate the +reference element's position. +*/ + +function listScrollParents(element, list) { + var _element$ownerDocumen; + + if (list === void 0) { + list = []; + } + + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js +function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js + + + + + + + + + + + + + + + +function getInnerBoundingClientRect(element, strategy) { + var rect = getBoundingClientRect(element, false, strategy === 'fixed'); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; +} + +function getClientRectFromMixedType(element, clippingParent, strategy) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element))); +} // A "clipping parent" is an overflowable container with the characteristic of +// clipping (or hiding) overflowing elements with a position different from +// `initial` + + +function getClippingParents(element) { + var clippingParents = listScrollParents(getParentNode(element)); + var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + + if (!isElement(clipperElement)) { + return []; + } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414 + + + return clippingParents.filter(function (clippingParent) { + return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; + }); +} // Gets the maximum area that the element is visible in due to any number of +// clipping parents + + +function getClippingRect(element, boundary, rootBoundary, strategy) { + var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary); + var clippingParents = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents[0]; + var clippingRect = clippingParents.reduce(function (accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent, strategy); + accRect.top = math_max(rect.top, accRect.top); + accRect.right = math_min(rect.right, accRect.right); + accRect.bottom = math_min(rect.bottom, accRect.bottom); + accRect.left = math_max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent, strategy)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeOffsets.js + + + + +function computeOffsets(_ref) { + var reference = _ref.reference, + element = _ref.element, + placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference.x + reference.width / 2 - element.width / 2; + var commonY = reference.y + reference.height / 2 - element.height / 2; + var offsets; + + switch (basePlacement) { + case enums_top: + offsets = { + x: commonX, + y: reference.y - element.height + }; + break; + + case bottom: + offsets = { + x: commonX, + y: reference.y + reference.height + }; + break; + + case right: + offsets = { + x: reference.x + reference.width, + y: commonY + }; + break; + + case left: + offsets = { + x: reference.x - element.width, + y: commonY + }; + break; + + default: + offsets = { + x: reference.x, + y: reference.y + }; + } + + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + + if (mainAxis != null) { + var len = mainAxis === 'y' ? 'height' : 'width'; + + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2); + break; + + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2); + break; + + default: + } + } + + return offsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/detectOverflow.js + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + _options$placement = _options.placement, + placement = _options$placement === void 0 ? state.placement : _options$placement, + _options$strategy = _options.strategy, + strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, + _options$boundary = _options.boundary, + boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, + _options$rootBoundary = _options.rootBoundary, + rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, + _options$elementConte = _options.elementContext, + elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, + _options$altBoundary = _options.altBoundary, + altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, + _options$padding = _options.padding, + padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: 'absolute', + placement: placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect + // 0 or negative = within the clipping rect + + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element + + if (elementContext === popper && offsetData) { + var offset = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function (key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [enums_top, bottom].indexOf(key) >= 0 ? 'y' : 'x'; + overflowOffsets[key] += offset[axis] * multiply; + }); + } + + return overflowOffsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js + + + + +function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + placement = _options.placement, + boundary = _options.boundary, + rootBoundary = _options.rootBoundary, + padding = _options.padding, + flipVariations = _options.flipVariations, + _options$allowedAutoP = _options.allowedAutoPlacements, + allowedAutoPlacements = _options$allowedAutoP === void 0 ? enums_placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) { + return getVariation(placement) === variation; + }) : basePlacements; + var allowedPlacements = placements.filter(function (placement) { + return allowedAutoPlacements.indexOf(placement) >= 0; + }); + + if (allowedPlacements.length === 0) { + allowedPlacements = placements; + + if (false) {} + } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions... + + + var overflows = allowedPlacements.reduce(function (acc, placement) { + acc[placement] = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding + })[getBasePlacement(placement)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function (a, b) { + return overflows[a] - overflows[b]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/flip.js + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; +} + +function flip(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + + if (state.modifiersData[name]._skip) { + return; + } + + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, + specifiedFallbackPlacements = options.fallbackPlacements, + padding = options.padding, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + _options$flipVariatio = options.flipVariations, + flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, + allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) { + return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + flipVariations: flipVariations, + allowedAutoPlacements: allowedAutoPlacements + }) : placement); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements[0]; + + for (var i = 0; i < placements.length; i++) { + var placement = placements[i]; + + var _basePlacement = getBasePlacement(placement); + + var isStartVariation = getVariation(placement) === start; + var isVertical = [enums_top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? 'width' : 'height'; + var overflow = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + altBoundary: altBoundary, + padding: padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : enums_top; + + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + + if (checks.every(function (check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + + checksMap.set(placement, checks); + } + + if (makeFallbackChecks) { + // `2` may be desired in some cases – research later + var numberOfChecks = flipVariations ? 3 : 1; + + var _loop = function _loop(_i) { + var fittingPlacement = placements.find(function (placement) { + var checks = checksMap.get(placement); + + if (checks) { + return checks.slice(0, _i).every(function (check) { + return check; + }); + } + }); + + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + + if (_ret === "break") break; + } + } + + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_flip = ({ + name: 'flip', + enabled: true, + phase: 'main', + fn: flip, + requiresIfExists: ['offset'], + data: { + _skip: false + } +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/hide.js + + + +function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; +} + +function isAnySideFullyClipped(overflow) { + return [enums_top, right, bottom, left].some(function (side) { + return overflow[side] >= 0; + }); +} + +function hide(_ref) { + var state = _ref.state, + name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: 'reference' + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets: referenceClippingOffsets, + popperEscapeOffsets: popperEscapeOffsets, + isReferenceHidden: isReferenceHidden, + hasPopperEscaped: hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-reference-hidden': isReferenceHidden, + 'data-popper-escaped': hasPopperEscaped + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_hide = ({ + name: 'hide', + enabled: true, + phase: 'main', + requiresIfExists: ['preventOverflow'], + fn: hide +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/offset.js + + // eslint-disable-next-line import/no-unused-modules + +function distanceAndSkiddingToXY(placement, rects, offset) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, enums_top].indexOf(basePlacement) >= 0 ? -1 : 1; + + var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { + placement: placement + })) : offset, + skidding = _ref[0], + distance = _ref[1]; + + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; +} + +function offset(_ref2) { + var state = _ref2.state, + options = _ref2.options, + name = _ref2.name; + var _options$offset = options.offset, + offset = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = enums_placements.reduce(function (acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset); + return acc; + }, {}); + var _data$state$placement = data[state.placement], + x = _data$state$placement.x, + y = _data$state$placement.y; + + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_offset = ({ + name: 'offset', + enabled: true, + phase: 'main', + requires: ['popperOffsets'], + fn: offset +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js + + +function popperOffsets(_ref) { + var state = _ref.state, + name = _ref.name; + // Offsets are the actual position the popper needs to have to be + // properly positioned near its reference element + // This is the most basic placement, and will be adjusted by + // the modifiers in the next step + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: 'absolute', + placement: state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_popperOffsets = ({ + name: 'popperOffsets', + enabled: true, + phase: 'read', + fn: popperOffsets, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getAltAxis.js +function getAltAxis(axis) { + return axis === 'x' ? 'y' : 'x'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js + + + + + + + + + + + + +function preventOverflow(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + padding = options.padding, + _options$tether = options.tether, + tether = _options$tether === void 0 ? true : _options$tether, + _options$tetherOffset = options.tetherOffset, + tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + altBoundary: altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + + if (!popperOffsets) { + return; + } + + if (checkMainAxis) { + var _offsetModifierState$; + + var mainSide = mainAxis === 'y' ? enums_top : left; + var altSide = mainAxis === 'y' ? bottom : right; + var len = mainAxis === 'y' ? 'height' : 'width'; + var offset = popperOffsets[mainAxis]; + var min = offset + overflow[mainSide]; + var max = offset - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go + // outside the reference bounds + + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want + // to include its full size in the calculation. If the reference is small + // and near the edge of a boundary, the popper can overflow even if the + // reference is not overflowing as well (e.g. virtual elements with no + // width or height) + + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? math_min(min, tetherMin) : min, offset, tether ? math_max(max, tetherMax) : max); + popperOffsets[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset; + } + + if (checkAltAxis) { + var _offsetModifierState$2; + + var _mainSide = mainAxis === 'x' ? enums_top : left; + + var _altSide = mainAxis === 'x' ? bottom : right; + + var _offset = popperOffsets[altAxis]; + + var _len = altAxis === 'y' ? 'height' : 'width'; + + var _min = _offset + overflow[_mainSide]; + + var _max = _offset - overflow[_altSide]; + + var isOriginSide = [enums_top, left].indexOf(basePlacement) !== -1; + + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + + popperOffsets[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_preventOverflow = ({ + name: 'preventOverflow', + enabled: true, + phase: 'main', + fn: preventOverflow, + requiresIfExists: ['offset'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/index.js + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js + + + + +function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js + + + + + + + + + +function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; +} // Returns the composite rect of an element relative to its offsetParent. +// Composite means it takes into account transforms as well as layout. + + +function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/orderModifiers.js + // source: https://stackoverflow.com/questions/49875255 + +function order(modifiers) { + var map = new Map(); + var visited = new Set(); + var result = []; + modifiers.forEach(function (modifier) { + map.set(modifier.name, modifier); + }); // On visiting object, check for its dependencies and visit them recursively + + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function (dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + + modifiers.forEach(function (modifier) { + if (!visited.has(modifier.name)) { + // check for visited object + sort(modifier); + } + }); + return result; +} + +function orderModifiers(modifiers) { + // order based on dependencies + var orderedModifiers = order(modifiers); // order based on phase + + return modifierPhases.reduce(function (acc, phase) { + return acc.concat(orderedModifiers.filter(function (modifier) { + return modifier.phase === phase; + })); + }, []); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/debounce.js +function debounce(fn) { + var pending; + return function () { + if (!pending) { + pending = new Promise(function (resolve) { + Promise.resolve().then(function () { + pending = undefined; + resolve(fn()); + }); + }); + } + + return pending; + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergeByName.js +function mergeByName(modifiers) { + var merged = modifiers.reduce(function (merged, current) { + var existing = merged[current.name]; + merged[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged; + }, {}); // IE11 does not support Object.values + + return Object.keys(merged).map(function (key) { + return merged[key]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/createPopper.js + + + + + + + + + + + + + + +var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.'; +var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.'; +var DEFAULT_OPTIONS = { + placement: 'bottom', + modifiers: [], + strategy: 'absolute' +}; + +function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return !args.some(function (element) { + return !(element && typeof element.getBoundingClientRect === 'function'); + }); +} + +function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + + var _generatorOptions = generatorOptions, + _generatorOptions$def = _generatorOptions.defaultModifiers, + defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, + _generatorOptions$def2 = _generatorOptions.defaultOptions, + defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper(reference, popper, options) { + if (options === void 0) { + options = defaultOptions; + } + + var state = { + placement: 'bottom', + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference, + popper: popper + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state: state, + setOptions: function setOptions(setOptionsAction) { + var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options); + state.scrollParents = { + reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], + popper: listScrollParents(popper) + }; // Orders the modifiers based on their dependencies and `phase` + // properties + + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers + + state.orderedModifiers = orderedModifiers.filter(function (m) { + return m.enabled; + }); // Validate the provided modifiers so that the consumer will get warned + // if one of the modifiers is invalid for any reason + + if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; } + + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + + var _state$elements = state.elements, + reference = _state$elements.reference, + popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements + // anymore + + if (!areValidElements(reference, popper)) { + if (false) {} + + return; + } // Store the reference and popper rects to be read by modifiers + + + state.rects = { + reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'), + popper: getLayoutRect(popper) + }; // Modifiers have the ability to reset the current update cycle. The + // most common use case for this is the `flip` modifier changing the + // placement, which then needs to re-run all the modifiers, because the + // logic was previously ran for the previous placement and is therefore + // stale/incorrect + + state.reset = false; + state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier + // is filled with the initial data specified by the modifier. This means + // it doesn't persist and is fresh on each update. + // To ensure persistent data, use `${name}#persistent` + + state.orderedModifiers.forEach(function (modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (false) {} + + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + + var _state$orderedModifie = state.orderedModifiers[index], + fn = _state$orderedModifie.fn, + _state$orderedModifie2 = _state$orderedModifie.options, + _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, + name = _state$orderedModifie.name; + + if (typeof fn === 'function') { + state = fn({ + state: state, + options: _options, + name: name, + instance: instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function () { + return new Promise(function (resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + + if (!areValidElements(reference, popper)) { + if (false) {} + + return instance; + } + + instance.setOptions(options).then(function (state) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state); + } + }); // Modifiers have the ability to execute arbitrary code before the first + // update cycle runs. They will be executed in the same order as the update + // cycle. This is useful when a modifier adds some persistent data that + // other modifiers need to use, but the modifier is run after the dependent + // one. + + function runModifierEffects() { + state.orderedModifiers.forEach(function (_ref3) { + var name = _ref3.name, + _ref3$options = _ref3.options, + options = _ref3$options === void 0 ? {} : _ref3$options, + effect = _ref3.effect; + + if (typeof effect === 'function') { + var cleanupFn = effect({ + state: state, + name: name, + instance: instance, + options: options + }); + + var noopFn = function noopFn() {}; + + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + + function cleanupModifierEffects() { + effectCleanupFns.forEach(function (fn) { + return fn(); + }); + effectCleanupFns = []; + } + + return instance; + }; +} +var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper.js + + + + + + + + + + +var defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles, modifiers_offset, modifiers_flip, modifiers_preventOverflow, modifiers_arrow, modifiers_hide]; +var popper_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper-lite.js + + + + + +var popper_lite_defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles]; +var popper_lite_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: popper_lite_defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/index.js + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + + +/***/ }), + +/***/ 554: +/***/ (function(__unused_webpack_module, exports) { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; +} +function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); +} +function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); +} +function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); + } +} +function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; +} +function _get() { + return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { + var p = _superPropBase(e, t); + if (p) { + var n = Object.getOwnPropertyDescriptor(p, t); + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; + } + }, _get.apply(null, arguments); +} +function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, _getPrototypeOf(t); +} +function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), Object.defineProperty(t, "prototype", { + writable: !1 + }), e && _setPrototypeOf(t, e); +} +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function () { + return !!t; + })(); +} +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _possibleConstructorReturn(t, e) { + if (e && ("object" == typeof e || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t); +} +function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { + return t.__proto__ = e, t; + }, _setPrototypeOf(t, e); +} +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); +} +function _superPropBase(t, o) { + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); + return t; +} +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; +} +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } +} + +function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +function lastItemOf(arr) { + return arr[arr.length - 1]; +} + +// push only the items not included in the array +function pushUnique(arr) { + for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + items[_key - 1] = arguments[_key]; + } + items.forEach(function (item) { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; +} +function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; +} +function isInRange(testVal, min, max) { + var minOK = min === undefined || testVal >= min; + var maxOK = max === undefined || testVal <= max; + return minOK && maxOK; +} +function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +} +function createTagRepeat(tagName, repeat) { + var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ''; + var openTagSrc = Object.keys(attributes).reduce(function (src, attr) { + var val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return "".concat(src, " ").concat(attr, "=\"").concat(val, "\""); + }, tagName); + html += "<".concat(openTagSrc, ">"); + var next = index + 1; + return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html; +} + +// Remove the spacing surrounding tags for HTML parser not to create text nodes +// before/after elements +function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0; + var baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); +} + +// Get the ISO week of a date +function getWeek(date) { + // start of ISO week is Monday + var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; +} + +// Get the start year of the period of years that includes given date +// years: length of the year period +function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + var year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; +} + +// pattern for format parts +var reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/; +// pattern for non date parts +var reNonDateParts = /[\s!-/:-@[-`{-~年月日]+/; +// cache for persed formats +var knownFormats = {}; +// parse funtions for date parts +var parseFns = { + y: function y(date, year) { + return new Date(date).setFullYear(parseInt(year, 10)); + }, + m: function m(date, month, locale) { + var newDate = new Date(date); + var monthIndex = parseInt(month, 10) - 1; + if (isNaN(monthIndex)) { + if (!month) { + return NaN; + } + var monthName = month.toLowerCase(); + var compareNames = function compareNames(name) { + return name.toLowerCase().startsWith(monthName); + }; + // compare with both short and full names because some locales have periods + // in the short names (not equal to the first X letters of the full names) + monthIndex = locale.monthsShort.findIndex(compareNames); + if (monthIndex < 0) { + monthIndex = locale.months.findIndex(compareNames); + } + if (monthIndex < 0) { + return NaN; + } + } + newDate.setMonth(monthIndex); + return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime(); + }, + d: function d(date, day) { + return new Date(date).setDate(parseInt(day, 10)); + } +}; +// format functions for date parts +var formatFns = { + d: function d(date) { + return date.getDate(); + }, + dd: function dd(date) { + return padZero(date.getDate(), 2); + }, + D: function D(date, locale) { + return locale.daysShort[date.getDay()]; + }, + DD: function DD(date, locale) { + return locale.days[date.getDay()]; + }, + m: function m(date) { + return date.getMonth() + 1; + }, + mm: function mm(date) { + return padZero(date.getMonth() + 1, 2); + }, + M: function M(date, locale) { + return locale.monthsShort[date.getMonth()]; + }, + MM: function MM(date, locale) { + return locale.months[date.getMonth()]; + }, + y: function y(date) { + return date.getFullYear(); + }, + yy: function yy(date) { + return padZero(date.getFullYear(), 2).slice(-2); + }, + yyyy: function yyyy(date) { + return padZero(date.getFullYear(), 4); + } +}; + +// get month index in normal range (0 - 11) from any number +function normalizeMonth(monthIndex) { + return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); +} +function padZero(num, length) { + return num.toString().padStart(length, '0'); +} +function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + var separators = format.split(reFormatTokens); + var parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + var partFormatters = parts.map(function (token) { + return formatFns[token]; + }); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) { + var token = parts.find(function (part) { + return part[0] !== 'D' && part[0].toLowerCase() === key; + }); + if (token) { + keys.push(key); + } + return keys; + }, []); + return knownFormats[format] = { + parser: function parser(dateStr, locale) { + var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) { + if (part.length > 0 && parts[index]) { + var token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce(function (origDate, key) { + var newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, today()); + }, + formatter: function formatter(date, locale) { + var dateStr = partFormatters.reduce(function (str, fn, index) { + return str += "".concat(separators[index]).concat(fn(date, locale)); + }, ''); + // separators' length is always parts' length + 1, + return dateStr += lastItemOf(separators); + } + }; +} +function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + var date = stripTime(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return today(); + } + if (format && format.toValue) { + var _date = format.toValue(dateStr, format, locale); + return isNaN(_date) ? undefined : stripTime(_date); + } + return parseFormatString(format).parser(dateStr, locale); +} +function formatDate(date, format, locale) { + if (isNaN(date) || !date && date !== 0) { + return ''; + } + var dateObj = typeof date === 'number' ? new Date(date) : date; + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + return parseFormatString(format).formatter(dateObj, locale); +} + +var listenerRegistry = new WeakMap(); +var _EventTarget$prototyp = EventTarget.prototype, + addEventListener = _EventTarget$prototyp.addEventListener, + removeEventListener = _EventTarget$prototyp.removeEventListener; + +// Register event listeners to a key object +// listeners: array of listener definitions; +// - each definition must be a flat array of event target and the arguments +// used to call addEventListener() on the target +function registerListeners(keyObj, listeners) { + var registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach(function (listener) { + addEventListener.call.apply(addEventListener, _toConsumableArray(listener)); + registered.push(listener); + }); +} +function unregisterListeners(keyObj) { + var listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach(function (listener) { + removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener)); + }); + listenerRegistry["delete"](keyObj); +} + +// Event.composedPath() polyfill for Edge +// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec +if (!Event.prototype.composedPath) { + var getComposedPath = function getComposedPath(node) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + path.push(node); + var parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { + // ShadowRoot + parent = node.host; + } else if (node.defaultView) { + // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; +} +function findFromPath(path, criteria, currentTarget) { + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); +} + +// Search for the actual target of a delegated event +function findElementInEventPath(ev, selector) { + var criteria = typeof selector === 'function' ? selector : function (el) { + return el.matches(selector); + }; + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); +} + +// default locales +var locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } +}; + +// config options updatable by setOptions() and their default values +var defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, + // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0 +}; + +var range = document.createRange(); +function parseHTML(html) { + return range.createContextualFragment(html); +} +function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; +} +function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } +} +function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } +} +function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach(function (node) { + el.appendChild(node); + }); + } +} + +var defaultLang = defaultOptions.language, + defaultFormat = defaultOptions.format, + defaultWeekStart = defaultOptions.weekStart; + +// Reducer function to filter out invalid day-of-week from the input +function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow; +} +function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; +} + +// validate input date. if invalid, fallback to the original value +function validateDate(value, format, locale, origValue) { + var date = parseDate(value, format, locale); + return date !== undefined ? date : origValue; +} + +// Validate viewId. if invalid, fallback to the original value +function validateViewId(value, origValue) { + var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; + var viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; +} + +// Create Datepicker configuration to set +function processOptions(options, datepicker) { + var inOpts = Object.assign({}, options); + var config = {}; + var locales = datepicker.constructor.locales; + var _ref = datepicker.config || {}, + format = _ref.format, + language = _ref.language, + locale = _ref.locale, + maxDate = _ref.maxDate, + maxView = _ref.maxView, + minDate = _ref.minDate, + pickLevel = _ref.pickLevel, + startView = _ref.startView, + weekStart = _ref.weekStart; + if (inOpts.language) { + var lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + var origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + if (inOpts.format) { + var hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + var hasToValue = typeof inOpts.format.toValue === 'function'; + var validFormatString = reFormatTokens.test(inOpts.format); + if (hasToDisplay && hasToValue || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + var minDt = minDate; + var maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) { + var date = parseDate(dt, format, locale); + return date !== undefined ? pushUnique(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + var viewDate = parseDate(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + var wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + var newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + var newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + var newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + var prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + var nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + var orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(function (x) { + return x === 'left' || x === 'right'; + }) || 'auto', + y: orientation.find(function (y) { + return y === 'top' || y === 'bottom'; + }) || 'auto' + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch (inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach(function (key) { + if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + return config; +} + +var pickerTemplate = optimizeTemplateHTML("
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    "); + +var daysTemplate = optimizeTemplateHTML("
    \n
    ".concat(createTagRepeat('span', 7, { + "class": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
    \n
    ").concat(createTagRepeat('span', 42, { + "class": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400' +}), "
    \n
    ")); + +var calendarWeeksTemplate = optimizeTemplateHTML("
    \n
    \n
    ".concat(createTagRepeat('span', 6, { + "class": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
    \n
    ")); + +// Base class of the view classes +var View = /*#__PURE__*/function () { + function View(picker, config) { + _classCallCheck(this, View); + Object.assign(this, config, { + picker: picker, + element: parseHTML("
    ").firstChild, + selected: [] + }); + this.init(this.picker.datepicker.config); + } + return _createClass(View, [{ + key: "init", + value: function init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + }, { + key: "performBeforeHook", + value: function performBeforeHook(el, current, timeValue) { + var result = this.beforeShow(new Date(timeValue)); + switch (_typeof(result)) { + case 'boolean': + result = { + enabled: result + }; + break; + case 'string': + result = { + classes: result + }; + } + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + var _el$classList; + var extraClasses = result.classes.split(/\s+/); + (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses)); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } + }]); +}(); + +var DaysView = /*#__PURE__*/function (_View) { + function DaysView(picker) { + _classCallCheck(this, DaysView); + return _callSuper(this, DaysView, [picker, { + id: 0, + name: 'days', + cellClass: 'day' + }]); + } + _inherits(DaysView, _View); + return _createClass(DaysView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + var inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + _get(_getPrototypeOf(DaysView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + var _this = this; + var updateDOW; + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + var locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined; + } + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + var weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach(function (el, index) { + var dow = (_this.weekStart + index) % 7; + el.textContent = _this.dayNames[dow]; + el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var viewYear = viewDate.getFullYear(); + var viewMonth = viewDate.getMonth(); + var firstOfMonth = dateValue(viewYear, viewMonth, 1); + var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = _toConsumableArray(this.datesDisabled); + var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + var startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = addDays(_this2.start, index); + var date = new Date(current); + var day = date.getDay(); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + el.dataset.date = current; + el.textContent = date.getDate(); + if (current < _this2.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > _this2.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (_this2.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (_this2.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(_this2.disabled, current); + } + if (_this2.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.dataset.date); + var classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg'); + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + var _range = _slicedToArray(range, 2), + _range$ = _slicedToArray(_range[0], 2), + startY = _range$[0], + startM = _range$[1], + _range$2 = _slicedToArray(_range[1], 2), + endY = _range$2[0], + endM = _range$2[1]; + if (startY > thisYear || endY < thisYear) { + return; + } + return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12]; +} +var MonthsView = /*#__PURE__*/function (_View) { + function MonthsView(picker) { + _classCallCheck(this, MonthsView); + return _callSuper(this, MonthsView, [picker, { + id: 1, + name: 'months', + cellClass: 'month' + }]); + } + _inherits(MonthsView, _View); + return _createClass(MonthsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, { + 'data-month': function dataMonth(ix) { + return ix; + } + }))); + } + _get(_getPrototypeOf(MonthsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + var minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + var maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (selected, timeValue) { + var date = new Date(timeValue); + var year = date.getFullYear(); + var month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + var date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this = this; + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + var selected = this.selected[this.year] || []; + var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + var isMinYear = this.year === this.minYear; + var isMaxYear = this.year === this.maxYear; + var range = computeMonthRange(this.range, this.year); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var date = dateValue(_this.year, index, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this.cellClass); + if (_this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = _this.monthNames[index]; + if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) { + classList.add('disabled'); + } + if (range) { + var _range2 = _slicedToArray(range, 2), + rangeStart = _range2[0], + rangeEnd = _range2[1]; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this.focused) { + classList.add('focused'); + } + if (_this.beforeShow) { + _this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this2 = this; + var selected = this.selected[this.year] || []; + var _ref = computeMonthRange(this.range, this.year) || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this2.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } + }]); +}(View); + +function toTitleCase(word) { + return _toConsumableArray(word).reduce(function (str, ch, ix) { + return str += ix ? ch : ch.toUpperCase(); + }, ''); +} + +// Class representing the years and decades view elements +var YearsView = /*#__PURE__*/function (_View) { + function YearsView(picker, config) { + _classCallCheck(this, YearsView); + return _callSuper(this, YearsView, [picker, config]); + } + _inherits(YearsView, _View); + return _createClass(YearsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = "beforeShow".concat(toTitleCase(this.cellClass)); + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + _get(_getPrototypeOf(YearsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + var beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var first = startOfYearPeriod(viewDate, this.navStep); + var last = first + 9 * this.step; + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this = this; + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (years, timeValue) { + return pushUnique(years, startOfYearPeriod(timeValue, _this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, _this.step); + } + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel("".concat(this.first, "-").concat(this.last)); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = _this2.start + index * _this2.step; + var date = dateValue(current, 0, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + if (_this2.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < _this2.minYear || current > _this2.maxYear) { + classList.add('disabled'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.textContent); + var classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function triggerDatepickerEvent(datepicker, type) { + var detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker: datepicker + }; + datepicker.element.dispatchEvent(new CustomEvent(type, { + detail: detail + })); +} + +// direction: -1 (to previous), 1 (to next) +function goToPrevOrNext(datepicker, direction) { + var _datepicker$config = datepicker.config, + minDate = _datepicker$config.minDate, + maxDate = _datepicker$config.maxDate; + var _datepicker$picker = datepicker.picker, + currentView = _datepicker$picker.currentView, + viewDate = _datepicker$picker.viewDate; + var newViewDate; + switch (currentView.id) { + case 0: + newViewDate = addMonths(viewDate, direction); + break; + case 1: + newViewDate = addYears(viewDate, direction); + break; + default: + newViewDate = addYears(viewDate, direction * currentView.navStep); + } + newViewDate = limitToRange(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); +} +function switchView(datepicker) { + var viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); +} +function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({ + autohide: true + }); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } +} + +function goToSelectedMonthOrYear(datepicker, selection) { + var picker = datepicker.picker; + var viewDate = new Date(picker.viewDate); + var viewId = picker.currentView.id; + var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear()); + picker.changeFocus(newDate).changeView(viewId - 1).render(); +} +function onClickTodayBtn(datepicker) { + var picker = datepicker.picker; + var currentDate = today(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, { + render: false + }); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); +} +function onClickClearBtn(datepicker) { + datepicker.setDate({ + clear: true + }); +} +function onClickViewSwitch(datepicker) { + switchView(datepicker); +} +function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); +} +function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); +} + +// For the picker's main block to delegete the events from `datepicker-cell`s +function onClickView(datepicker, ev) { + var target = findElementInEventPath(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + var _datepicker$picker$cu = datepicker.picker.currentView, + id = _datepicker$picker$cu.id, + isMinView = _datepicker$picker$cu.isMinView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } +} +function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } +} + +function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + var prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach(function (node) { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + var nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach(function (node) { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) { + var _picker$datepicker$co = picker.datepicker.config, + minDate = _picker$datepicker$co.minDate, + maxDate = _picker$datepicker$co.maxDate; + picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } +} + +// Compute view date to reset, which will be... +// - the last item of the selected dates or defaultViewDate if no selection +// - limitted to minDate or maxDate if it exceeds the range +function computeResetViewDate(datepicker) { + var dates = datepicker.dates, + config = datepicker.config; + var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate; + return limitToRange(viewDate, config.minDate, config.maxDate); +} + +// Change current view's view date +function setViewDate(picker, newDate) { + var oldViewDate = new Date(picker.viewDate); + var newViewDate = new Date(newDate); + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + year = _picker$currentView.year, + first = _picker$currentView.first, + last = _picker$currentView.last; + var viewYear = newViewDate.getFullYear(); + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } +} +function getTextDirection(el) { + return window.getComputedStyle(el).direction; +} + +// Class representing the picker UI +var Picker = /*#__PURE__*/function () { + function Picker(datepicker) { + _classCallCheck(this, Picker); + this.datepicker = datepicker; + var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + var element = this.element = parseHTML(template).firstChild; + var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3), + header = _element$firstChild$c[0], + main = _element$firstChild$c[1], + footer = _element$firstChild$c[2]; + var title = header.firstElementChild; + var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3), + prevBtn = _header$lastElementCh[0], + viewSwitch = _header$lastElementCh[1], + nextBtn = _header$lastElementCh[2]; + var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2), + todayBtn = _footer$firstChild$ch[0], + clearBtn = _footer$firstChild$ch[1]; + var controls = { + title: title, + prevBtn: prevBtn, + viewSwitch: viewSwitch, + nextBtn: nextBtn, + todayBtn: todayBtn, + clearBtn: clearBtn + }; + this.main = main; + this.controls = controls; + var elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add("datepicker-".concat(elementClass)); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), { + capture: true + }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]); + + // set up views + this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, { + id: 2, + name: 'years', + cellClass: 'year', + step: 1 + }), new YearsView(this, { + id: 3, + name: 'decades', + cellClass: 'decade', + step: 10 + })]; + this.currentView = this.views[datepicker.config.startView]; + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + return _createClass(Picker, [{ + key: "setOptions", + value: function setOptions(options) { + processPickerOptions(this, options); + this.views.forEach(function (view) { + view.init(options, false); + }); + this.currentView.render(); + } + }, { + key: "detach", + value: function detach() { + this.datepicker.config.container.removeChild(this.element); + } + }, { + key: "show", + value: function show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + var datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + var inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + }, { + key: "hide", + value: function hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + }, { + key: "place", + value: function place() { + var _this$element = this.element, + classList = _this$element.classList, + style = _this$element.style; + var _this$datepicker = this.datepicker, + config = _this$datepicker.config, + inputField = _this$datepicker.inputField; + var container = config.container; + var _this$element$getBoun = this.element.getBoundingClientRect(), + calendarWidth = _this$element$getBoun.width, + calendarHeight = _this$element$getBoun.height; + var _container$getBoundin = container.getBoundingClientRect(), + containerLeft = _container$getBoundin.left, + containerTop = _container$getBoundin.top, + containerWidth = _container$getBoundin.width; + var _inputField$getBoundi = inputField.getBoundingClientRect(), + inputLeft = _inputField$getBoundi.left, + inputTop = _inputField$getBoundi.top, + inputWidth = _inputField$getBoundi.width, + inputHeight = _inputField$getBoundi.height; + var _config$orientation = config.orientation, + orientX = _config$orientation.x, + orientY = _config$orientation.y; + var scrollTop; + var left; + var top; + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left'); + classList.add("datepicker-orient-".concat(orientY), "datepicker-orient-".concat(orientX)); + style.top = top ? "".concat(top, "px") : top; + style.left = left ? "".concat(left, "px") : left; + } + }, { + key: "setViewSwitchLabel", + value: function setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + }, { + key: "setPrevBtnDisabled", + value: function setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + }, { + key: "setNextBtnDisabled", + value: function setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + }, { + key: "changeView", + value: function changeView(viewId) { + var oldView = this.currentView; + var newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + }, { + key: "changeFocus", + value: function changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach(function (view) { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + }, { + key: "update", + value: function update() { + var newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach(function (view) { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + }, { + key: "render", + value: function render() { + var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var renderMethod = quickRender && this._renderMethod || 'render'; + delete this._renderMethod; + this.currentView[renderMethod](); + } + }]); +}(); + +// Find the closest date that doesn't meet the condition for unavailable date +// Returns undefined if no available date is found +// addFn: function to calculate the next date +// - args: time value, amount +// increase: amount to pass to addFn +// testFn: function to test the unavailablity of the date +// - args: time value; retun: true if unavailable +function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!isInRange(date, min, max)) { + return; + } + if (testFn(date)) { + var newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; +} + +// direction: -1 (left/up), 1 (right/down) +// vertical: true for up/down, false for left/right +function moveByArrowKey(datepicker, ev, direction, vertical) { + var picker = datepicker.picker; + var currentView = picker.currentView; + var step = currentView.step || 1; + var viewDate = picker.viewDate; + var addFn; + var testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = addDays(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = addYears(viewDate, direction); + } else { + viewDate = addDays(viewDate, direction); + } + addFn = addDays; + testFn = function testFn(date) { + return currentView.disabled.includes(date); + }; + break; + case 1: + viewDate = addMonths(viewDate, vertical ? direction * 4 : direction); + addFn = addMonths; + testFn = function testFn(date) { + var dt = new Date(date); + var year = currentView.year, + disabled = currentView.disabled; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = addYears; + testFn = function testFn(date) { + return currentView.disabled.includes(startOfYearPeriod(date, step)); + }; + } + viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } +} +function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + var picker = datepicker.picker; + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + isMinView = _picker$currentView.isMinView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({ + update: true, + autohide: datepicker.config.autohide + }); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); +} +function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } +} + +// for the prevention for entering edit mode while getting focus on click +function onMousedown(datepicker, ev) { + var el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(function () { + delete el._active; + delete el._clicking; + }, 2000); + } +} +function onClickInput(datepicker, ev) { + var el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + if (datepicker.config.showOnClick) { + datepicker.show(); + } +} +function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } +} + +// for the `document` to delegate the events from outside the picker/input field +function onClickOutside(datepicker, ev) { + var element = datepicker.element; + if (element !== document.activeElement) { + return; + } + var pickerElem = datepicker.picker.element; + if (findElementInEventPath(ev, function (el) { + return el === element || el === pickerElem; + })) { + return; + } + unfocus(datepicker); +} + +function stringifyDates(dates, config) { + return dates.map(function (dt) { + return formatDate(dt, config.format, config.locale); + }).join(config.dateDelimiter); +} + +// parse input dates and create an array of time values for selection +// returns undefined if there are no valid dates in inputDates +// when origDates (current selection) is passed, the function works to mix +// the input dates into the current selection +function processInputDates(datepicker, inputDates) { + var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var config = datepicker.config, + origDates = datepicker.dates, + rangepicker = datepicker.rangepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + var newDates = inputDates.reduce(function (dates, dt) { + var date = parseDate(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + var _dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1); + } else { + date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1); + } + } + if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce(function (dates, date) { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(function (date) { + return !newDates.includes(date); + })); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates; +} + +// refresh the UI elements +// modes: 1: input only, 2, picker only, 3 both +function refreshUI(datepicker) { + var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3; + var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var config = datepicker.config, + picker = datepicker.picker, + inputField = datepicker.inputField; + if (mode & 2) { + var newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } +} +function _setDate(datepicker, inputDates, options) { + var clear = options.clear, + render = options.render, + autohide = options.autohide; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + var newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } +} + +/** + * Class representing a date picker + */ +var Datepicker = /*#__PURE__*/function () { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + function Datepicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + _classCallCheck(this, Datepicker); + element.datepicker = this; + this.element = element; + + // set up config + var config = this.config = Object.assign({ + buttonClass: options.buttonClass && String(options.buttonClass) || 'button', + container: document.body, + defaultViewDate: today(), + maxDate: undefined, + minDate: undefined + }, processOptions(defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + var inline = this.inline = element.tagName !== 'INPUT'; + var inputField; + var initialDates; + if (inline) { + config.container = element; + initialDates = stringToArray(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + var container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = stringToArray(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + var index = rangepicker.inputs.indexOf(inputField); + var datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get: function get() { + return rangepicker; + } + }); + } + + // set initial dates + this.dates = []; + // process initial value + var inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + var picker = this.picker = new Picker(this); + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + var onMousedownDocument = onClickOutside.bind(null, this); + var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]]; + registerListeners(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + return _createClass(Datepicker, [{ + key: "active", + get: + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + function get() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + }, { + key: "pickerElement", + get: function get() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + var picker = this.picker; + var newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + }, { + key: "show", + value: function show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + }, { + key: "hide", + value: function hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.hide(); + unregisterListeners(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + }, { + key: "getDate", + value: function getDate() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.config.locale); + } : function (date) { + return new Date(date); + }; + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + }, { + key: "setDate", + value: function setDate() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + var dates = [].concat(args); + var opts = {}; + var lastArg = lastItemOf(args); + if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) { + Object.assign(opts, dates.pop()); + } + var inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + _setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + }, { + key: "update", + value: function update() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline) { + return; + } + var opts = { + clear: true, + autohide: !!(options && options.autohide) + }; + var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter); + _setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + }, { + key: "refresh", + value: function refresh() { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + var mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + }, { + key: "enterEditMode", + value: function enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + }, { + key: "exitEditMode", + value: function exitEditMode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline || !this.editMode) { + return; + } + var opts = Object.assign({ + update: false + }, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700'); + if (opts.update) { + this.update(opts); + } + } + }], [{ + key: "formatDate", + value: function formatDate$1(date, format, lang) { + return formatDate(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + }, { + key: "parseDate", + value: function parseDate$1(dateStr, format, lang) { + return parseDate(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + }, { + key: "locales", + get: function get() { + return locales; + } + }]); +}(); + +// filter out the config options inapproprite to pass to Datepicker +function filterOptions(options) { + var newOpts = Object.assign({}, options); + delete newOpts.inputs; + delete newOpts.allowOneSidedRange; + delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date + + return newOpts; +} +function setupDatepicker(rangepicker, changeDateListener, el, options) { + registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]); + new Datepicker(el, options, rangepicker); +} +function onChangeDate(rangepicker, ev) { + // to prevent both datepickers trigger the other side's update each other + if (rangepicker._updating) { + return; + } + rangepicker._updating = true; + var target = ev.target; + if (target.datepicker === undefined) { + return; + } + var datepickers = rangepicker.datepickers; + var setDateOptions = { + render: false + }; + var changedSide = rangepicker.inputs.indexOf(target); + var otherSide = changedSide === 0 ? 1 : 0; + var changedDate = datepickers[changedSide].dates[0]; + var otherDate = datepickers[otherSide].dates[0]; + if (changedDate !== undefined && otherDate !== undefined) { + // if the start of the range > the end, swap them + if (changedSide === 0 && changedDate > otherDate) { + datepickers[0].setDate(otherDate, setDateOptions); + datepickers[1].setDate(changedDate, setDateOptions); + } else if (changedSide === 1 && changedDate < otherDate) { + datepickers[0].setDate(changedDate, setDateOptions); + datepickers[1].setDate(otherDate, setDateOptions); + } + } else if (!rangepicker.allowOneSidedRange) { + // to prevent the range from becoming one-sided, copy changed side's + // selection (no matter if it's empty) to the other side + if (changedDate !== undefined || otherDate !== undefined) { + setDateOptions.clear = true; + datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions); + } + } + datepickers[0].picker.update().render(); + datepickers[1].picker.update().render(); + delete rangepicker._updating; +} + +/** + * Class representing a date range picker + */ +var DateRangePicker = /*#__PURE__*/function () { + /** + * Create a date range picker + * @param {Element} element - element to bind a date range picker + * @param {Object} [options] - config options + */ + function DateRangePicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + _classCallCheck(this, DateRangePicker); + var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input')); + if (inputs.length < 2) { + return; + } + element.rangepicker = this; + this.element = element; + this.inputs = inputs.slice(0, 2); + this.allowOneSidedRange = !!options.allowOneSidedRange; + var changeDateListener = onChangeDate.bind(null, this); + var cleanOptions = filterOptions(options); + // in order for initial date setup to work right when pcicLvel > 0, + // let Datepicker constructor add the instance to the rangepicker + var datepickers = []; + Object.defineProperty(this, 'datepickers', { + get: function get() { + return datepickers; + } + }); + setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions); + setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions); + Object.freeze(datepickers); + // normalize the range if inital dates are given + if (datepickers[0].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[0] + }); + } else if (datepickers[1].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[1] + }); + } + } + + /** + * @type {Array} - selected date of the linked date pickers + */ + return _createClass(DateRangePicker, [{ + key: "dates", + get: function get() { + return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + this.allowOneSidedRange = !!options.allowOneSidedRange; + var cleanOptions = filterOptions(options); + this.datepickers[0].setOptions(cleanOptions); + this.datepickers[1].setOptions(cleanOptions); + } + + /** + * Destroy the DateRangePicker instance + * @return {DateRangePicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.datepickers[0].destroy(); + this.datepickers[1].destroy(); + unregisterListeners(this); + delete this.element.rangepicker; + } + + /** + * Get the start and end dates of the date range + * + * The method returns Date objects by default. If format string is passed, + * it returns date strings formatted in given format. + * The result array always contains 2 items (start date/end date) and + * undefined is used for unselected side. (e.g. If none is selected, + * the result will be [undefined, undefined]. If only the end date is set + * when allowOneSidedRange config option is true, [undefined, endDate] will + * be returned.) + * + * @param {String} [format] - Format string to stringify the dates + * @return {Array} - Start and end dates + */ + }, { + key: "getDates", + value: function getDates() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.datepickers[0].config.locale); + } : function (date) { + return new Date(date); + }; + return this.dates.map(function (date) { + return date === undefined ? date : callback(date); + }); + } + + /** + * Set the start and end dates of the date range + * + * The method calls datepicker.setDate() internally using each of the + * arguments in start→end order. + * + * When a clear: true option object is passed instead of a date, the method + * clears the date. + * + * If an invalid date, the same date as the current one or an option object + * without clear: true is passed, the method considers that argument as an + * "ineffective" argument because calling datepicker.setDate() with those + * values makes no changes to the date selection. + * + * When the allowOneSidedRange config option is false, passing {clear: true} + * to clear the range works only when it is done to the last effective + * argument (in other words, passed to rangeEnd or to rangeStart along with + * ineffective rangeEnd). This is because when the date range is changed, + * it gets normalized based on the last change at the end of the changing + * process. + * + * @param {Date|Number|String|Object} rangeStart - Start date of the range + * or {clear: true} to clear the date + * @param {Date|Number|String|Object} rangeEnd - End date of the range + * or {clear: true} to clear the date + */ + }, { + key: "setDates", + value: function setDates(rangeStart, rangeEnd) { + var _this$datepickers = _slicedToArray(this.datepickers, 2), + datepicker0 = _this$datepickers[0], + datepicker1 = _this$datepickers[1]; + var origDates = this.dates; + + // If range normalization runs on every change, we can't set a new range + // that starts after the end of the current range correctly because the + // normalization process swaps start↔︎end right after setting the new start + // date. To prevent this, the normalization process needs to run once after + // both of the new dates are set. + this._updating = true; + datepicker0.setDate(rangeStart); + datepicker1.setDate(rangeEnd); + delete this._updating; + if (datepicker1.dates[0] !== origDates[1]) { + onChangeDate(this, { + target: this.inputs[1] + }); + } else if (datepicker0.dates[0] !== origDates[0]) { + onChangeDate(this, { + target: this.inputs[0] + }); + } + } + }]); +}(); + +exports.DateRangePicker = DateRangePicker; +exports.Datepicker = Datepicker; + + +/***/ }), + +/***/ 902: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initAccordions = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + alwaysOpen: false, + activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white', + inactiveClasses: 'text-gray-500 dark:text-gray-400', + onOpen: function () { }, + onClose: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Accordion = /** @class */ (function () { + function Accordion(accordionEl, items, options, instanceOptions) { + if (accordionEl === void 0) { accordionEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : accordionEl.id; + this._accordionEl = accordionEl; + this._items = items; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Accordion', this, this._instanceId, instanceOptions.override); + } + Accordion.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + // show accordion item based on click + this._items.forEach(function (item) { + if (item.active) { + _this.open(item.id); + } + var clickHandler = function () { + _this.toggle(item.id); + }; + item.triggerEl.addEventListener('click', clickHandler); + // Store the clickHandler in a property of the item for removal later + item.clickHandler = clickHandler; + }); + this._initialized = true; + } + }; + Accordion.prototype.destroy = function () { + if (this._items.length && this._initialized) { + this._items.forEach(function (item) { + item.triggerEl.removeEventListener('click', item.clickHandler); + // Clean up by deleting the clickHandler property from the item + delete item.clickHandler; + }); + this._initialized = false; + } + }; + Accordion.prototype.removeInstance = function () { + instances_1.default.removeInstance('Accordion', this._instanceId); + }; + Accordion.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Accordion.prototype.getItem = function (id) { + return this._items.filter(function (item) { return item.id === id; })[0]; + }; + Accordion.prototype.open = function (id) { + var _a, _b; + var _this = this; + var item = this.getItem(id); + // don't hide other accordions if always open + if (!this._options.alwaysOpen) { + this._items.map(function (i) { + var _a, _b; + if (i !== item) { + (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + i.targetEl.classList.add('hidden'); + i.triggerEl.setAttribute('aria-expanded', 'false'); + i.active = false; + // rotate icon if set + if (i.iconEl) { + i.iconEl.classList.add('rotate-180'); + } + } + }); + } + // show active item + (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + item.triggerEl.setAttribute('aria-expanded', 'true'); + item.targetEl.classList.remove('hidden'); + item.active = true; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.remove('rotate-180'); + } + // callback function + this._options.onOpen(this, item); + }; + Accordion.prototype.toggle = function (id) { + var item = this.getItem(id); + if (item.active) { + this.close(id); + } + else { + this.open(id); + } + // callback function + this._options.onToggle(this, item); + }; + Accordion.prototype.close = function (id) { + var _a, _b; + var item = this.getItem(id); + (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' ')); + item.targetEl.classList.add('hidden'); + item.triggerEl.setAttribute('aria-expanded', 'false'); + item.active = false; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.add('rotate-180'); + } + // callback function + this._options.onClose(this, item); + }; + Accordion.prototype.updateOnOpen = function (callback) { + this._options.onOpen = callback; + }; + Accordion.prototype.updateOnClose = function (callback) { + this._options.onClose = callback; + }; + Accordion.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Accordion; +}()); +function initAccordions() { + document.querySelectorAll('[data-accordion]').forEach(function ($accordionEl) { + var alwaysOpen = $accordionEl.getAttribute('data-accordion'); + var activeClasses = $accordionEl.getAttribute('data-active-classes'); + var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes'); + var items = []; + $accordionEl + .querySelectorAll('[data-accordion-target]') + .forEach(function ($triggerEl) { + // Consider only items that directly belong to $accordionEl + // (to make nested accordions work). + if ($triggerEl.closest('[data-accordion]') === $accordionEl) { + var item = { + id: $triggerEl.getAttribute('data-accordion-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')), + iconEl: $triggerEl.querySelector('[data-accordion-icon]'), + active: $triggerEl.getAttribute('aria-expanded') === 'true' + ? true + : false, + }; + items.push(item); + } + }); + new Accordion($accordionEl, items, { + alwaysOpen: alwaysOpen === 'open' ? true : false, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initAccordions = initAccordions; +if (typeof window !== 'undefined') { + window.Accordion = Accordion; + window.initAccordions = initAccordions; +} +exports["default"] = Accordion; + + +/***/ }), + +/***/ 33: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCarousels = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + defaultPosition: 0, + indicators: { + items: [], + activeClasses: 'bg-white dark:bg-gray-800', + inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800', + }, + interval: 3000, + onNext: function () { }, + onPrev: function () { }, + onChange: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Carousel = /** @class */ (function () { + function Carousel(carouselEl, items, options, instanceOptions) { + if (carouselEl === void 0) { carouselEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : carouselEl.id; + this._carouselEl = carouselEl; + this._items = items; + this._options = __assign(__assign(__assign({}, Default), options), { indicators: __assign(__assign({}, Default.indicators), options.indicators) }); + this._activeItem = this.getItem(this._options.defaultPosition); + this._indicators = this._options.indicators.items; + this._intervalDuration = this._options.interval; + this._intervalInstance = null; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Carousel', this, this._instanceId, instanceOptions.override); + } + /** + * initialize carousel and items based on active one + */ + Carousel.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + this._items.map(function (item) { + item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform'); + }); + // if no active item is set then first position is default + if (this.getActiveItem()) { + this.slideTo(this.getActiveItem().position); + } + else { + this.slideTo(0); + } + this._indicators.map(function (indicator, position) { + indicator.el.addEventListener('click', function () { + _this.slideTo(position); + }); + }); + this._initialized = true; + } + }; + Carousel.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + } + }; + Carousel.prototype.removeInstance = function () { + instances_1.default.removeInstance('Carousel', this._instanceId); + }; + Carousel.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Carousel.prototype.getItem = function (position) { + return this._items[position]; + }; + /** + * Slide to the element based on id + * @param {*} position + */ + Carousel.prototype.slideTo = function (position) { + var nextItem = this._items[position]; + var rotationItems = { + left: nextItem.position === 0 + ? this._items[this._items.length - 1] + : this._items[nextItem.position - 1], + middle: nextItem, + right: nextItem.position === this._items.length - 1 + ? this._items[0] + : this._items[nextItem.position + 1], + }; + this._rotate(rotationItems); + this._setActiveItem(nextItem); + if (this._intervalInstance) { + this.pause(); + this.cycle(); + } + this._options.onChange(this); + }; + /** + * Based on the currently active item it will go to the next position + */ + Carousel.prototype.next = function () { + var activeItem = this.getActiveItem(); + var nextItem = null; + // check if last item + if (activeItem.position === this._items.length - 1) { + nextItem = this._items[0]; + } + else { + nextItem = this._items[activeItem.position + 1]; + } + this.slideTo(nextItem.position); + // callback function + this._options.onNext(this); + }; + /** + * Based on the currently active item it will go to the previous position + */ + Carousel.prototype.prev = function () { + var activeItem = this.getActiveItem(); + var prevItem = null; + // check if first item + if (activeItem.position === 0) { + prevItem = this._items[this._items.length - 1]; + } + else { + prevItem = this._items[activeItem.position - 1]; + } + this.slideTo(prevItem.position); + // callback function + this._options.onPrev(this); + }; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + Carousel.prototype._rotate = function (rotationItems) { + // reset + this._items.map(function (item) { + item.el.classList.add('hidden'); + }); + // Handling the case when there is only one item + if (this._items.length === 1) { + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-20'); + return; + } + // left item (previously active) + rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.left.el.classList.add('-translate-x-full', 'z-10'); + // currently active item + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-30'); + // right item (upcoming active) + rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-30'); + rotationItems.right.el.classList.add('translate-x-full', 'z-20'); + }; + /** + * Set an interval to cycle through the carousel items + */ + Carousel.prototype.cycle = function () { + var _this = this; + if (typeof window !== 'undefined') { + this._intervalInstance = window.setInterval(function () { + _this.next(); + }, this._intervalDuration); + } + }; + /** + * Clears the cycling interval + */ + Carousel.prototype.pause = function () { + clearInterval(this._intervalInstance); + }; + /** + * Get the currently active item + */ + Carousel.prototype.getActiveItem = function () { + return this._activeItem; + }; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + Carousel.prototype._setActiveItem = function (item) { + var _a, _b; + var _this = this; + this._activeItem = item; + var position = item.position; + // update the indicators if available + if (this._indicators.length) { + this._indicators.map(function (indicator) { + var _a, _b; + indicator.el.setAttribute('aria-current', 'false'); + (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' ')); + (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' ')); + }); + (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' ')); + (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' ')); + this._indicators[position].el.setAttribute('aria-current', 'true'); + } + }; + Carousel.prototype.updateOnNext = function (callback) { + this._options.onNext = callback; + }; + Carousel.prototype.updateOnPrev = function (callback) { + this._options.onPrev = callback; + }; + Carousel.prototype.updateOnChange = function (callback) { + this._options.onChange = callback; + }; + return Carousel; +}()); +function initCarousels() { + document.querySelectorAll('[data-carousel]').forEach(function ($carouselEl) { + var interval = $carouselEl.getAttribute('data-carousel-interval'); + var slide = $carouselEl.getAttribute('data-carousel') === 'slide' + ? true + : false; + var items = []; + var defaultPosition = 0; + if ($carouselEl.querySelectorAll('[data-carousel-item]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function ($carouselItemEl, position) { + items.push({ + position: position, + el: $carouselItemEl, + }); + if ($carouselItemEl.getAttribute('data-carousel-item') === + 'active') { + defaultPosition = position; + } + }); + } + var indicators = []; + if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function ($indicatorEl) { + indicators.push({ + position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')), + el: $indicatorEl, + }); + }); + } + var carousel = new Carousel($carouselEl, items, { + defaultPosition: defaultPosition, + indicators: { + items: indicators, + }, + interval: interval ? interval : Default.interval, + }); + if (slide) { + carousel.cycle(); + } + // check for controls + var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]'); + var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]'); + if (carouselNextEl) { + carouselNextEl.addEventListener('click', function () { + carousel.next(); + }); + } + if (carouselPrevEl) { + carouselPrevEl.addEventListener('click', function () { + carousel.prev(); + }); + } + }); +} +exports.initCarousels = initCarousels; +if (typeof window !== 'undefined') { + window.Carousel = Carousel; + window.initCarousels = initCarousels; +} +exports["default"] = Carousel; + + +/***/ }), + +/***/ 673: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCopyClipboards = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + htmlEntities: false, + contentType: 'input', + onCopy: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var CopyClipboard = /** @class */ (function () { + function CopyClipboard(triggerEl, targetEl, options, instanceOptions) { + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('CopyClipboard', this, this._instanceId, instanceOptions.override); + } + CopyClipboard.prototype.init = function () { + var _this = this; + if (this._targetEl && this._triggerEl && !this._initialized) { + this._triggerElClickHandler = function () { + _this.copy(); + }; + // clicking on the trigger element should copy the value of the target element + if (this._triggerEl) { + this._triggerEl.addEventListener('click', this._triggerElClickHandler); + } + this._initialized = true; + } + }; + CopyClipboard.prototype.destroy = function () { + if (this._triggerEl && this._targetEl && this._initialized) { + if (this._triggerEl) { + this._triggerEl.removeEventListener('click', this._triggerElClickHandler); + } + this._initialized = false; + } + }; + CopyClipboard.prototype.removeInstance = function () { + instances_1.default.removeInstance('CopyClipboard', this._instanceId); + }; + CopyClipboard.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + CopyClipboard.prototype.getTargetValue = function () { + if (this._options.contentType === 'input') { + return this._targetEl.value; + } + if (this._options.contentType === 'innerHTML') { + return this._targetEl.innerHTML; + } + if (this._options.contentType === 'textContent') { + return this._targetEl.textContent.replace(/\s+/g, ' ').trim(); + } + }; + CopyClipboard.prototype.copy = function () { + var textToCopy = this.getTargetValue(); + // Check if HTMLEntities option is enabled + if (this._options.htmlEntities) { + // Encode the text using HTML entities + textToCopy = this.decodeHTML(textToCopy); + } + // Create a temporary textarea element + var tempTextArea = document.createElement('textarea'); + tempTextArea.value = textToCopy; + document.body.appendChild(tempTextArea); + // Select the text inside the textarea and copy it to the clipboard + tempTextArea.select(); + document.execCommand('copy'); + // Remove the temporary textarea + document.body.removeChild(tempTextArea); + // Callback function + this._options.onCopy(this); + return textToCopy; + }; + // Function to encode text into HTML entities + CopyClipboard.prototype.decodeHTML = function (html) { + var textarea = document.createElement('textarea'); + textarea.innerHTML = html; + return textarea.textContent; + }; + CopyClipboard.prototype.updateOnCopyCallback = function (callback) { + this._options.onCopy = callback; + }; + return CopyClipboard; +}()); +function initCopyClipboards() { + document + .querySelectorAll('[data-copy-to-clipboard-target]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-copy-to-clipboard-target'); + var $targetEl = document.getElementById(targetId); + var contentType = $triggerEl.getAttribute('data-copy-to-clipboard-content-type'); + var htmlEntities = $triggerEl.getAttribute('data-copy-to-clipboard-html-entities'); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('CopyClipboard', $targetEl.getAttribute('id'))) { + new CopyClipboard($triggerEl, $targetEl, { + htmlEntities: htmlEntities && htmlEntities === 'true' + ? true + : Default.htmlEntities, + contentType: contentType + ? contentType + : Default.contentType, + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-copy-to-clipboard-target attribute.")); + } + }); +} +exports.initCopyClipboards = initCopyClipboards; +if (typeof window !== 'undefined') { + window.CopyClipboard = CopyClipboard; + window.initClipboards = initCopyClipboards; +} +exports["default"] = CopyClipboard; + + +/***/ }), + +/***/ 922: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCollapses = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + onCollapse: function () { }, + onExpand: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Collapse = /** @class */ (function () { + function Collapse(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Collapse', this, this._instanceId, instanceOptions.override); + } + Collapse.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + if (this._triggerEl.hasAttribute('aria-expanded')) { + this._visible = + this._triggerEl.getAttribute('aria-expanded') === 'true'; + } + else { + // fix until v2 not to break previous single collapses which became dismiss + this._visible = !this._targetEl.classList.contains('hidden'); + } + this._clickHandler = function () { + _this.toggle(); + }; + this._triggerEl.addEventListener('click', this._clickHandler); + this._initialized = true; + } + }; + Collapse.prototype.destroy = function () { + if (this._triggerEl && this._initialized) { + this._triggerEl.removeEventListener('click', this._clickHandler); + this._initialized = false; + } + }; + Collapse.prototype.removeInstance = function () { + instances_1.default.removeInstance('Collapse', this._instanceId); + }; + Collapse.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Collapse.prototype.collapse = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onCollapse(this); + }; + Collapse.prototype.expand = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onExpand(this); + }; + Collapse.prototype.toggle = function () { + if (this._visible) { + this.collapse(); + } + else { + this.expand(); + } + // callback function + this._options.onToggle(this); + }; + Collapse.prototype.updateOnCollapse = function (callback) { + this._options.onCollapse = callback; + }; + Collapse.prototype.updateOnExpand = function (callback) { + this._options.onExpand = callback; + }; + Collapse.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Collapse; +}()); +function initCollapses() { + document + .querySelectorAll('[data-collapse-toggle]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-collapse-toggle'); + var $targetEl = document.getElementById(targetId); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('Collapse', $targetEl.getAttribute('id'))) { + new Collapse($targetEl, $triggerEl); + } + else { + // if instance exists already for the same target element then create a new one with a different trigger element + new Collapse($targetEl, $triggerEl, {}, { + id: $targetEl.getAttribute('id') + + '_' + + instances_1.default._generateRandomId(), + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-collapse-toggle attribute.")); + } + }); +} +exports.initCollapses = initCollapses; +if (typeof window !== 'undefined') { + window.Collapse = Collapse; + window.initCollapses = initCollapses; +} +exports["default"] = Collapse; + + +/***/ }), + +/***/ 132: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDatepickers = void 0; +var instances_1 = __webpack_require__(423); +var flowbite_datepicker_1 = __webpack_require__(554); +var Default = { + defaultDatepickerId: null, + autohide: false, + format: 'mm/dd/yyyy', + maxDate: null, + minDate: null, + orientation: 'bottom', + buttons: false, + autoSelectToday: 0, + title: null, + language: 'en', + rangePicker: false, + onShow: function () { }, + onHide: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Datepicker = /** @class */ (function () { + function Datepicker(datepickerEl, options, instanceOptions) { + if (datepickerEl === void 0) { datepickerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : datepickerEl.id; + this._datepickerEl = datepickerEl; + this._datepickerInstance = null; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Datepicker', this, this._instanceId, instanceOptions.override); + } + Datepicker.prototype.init = function () { + if (this._datepickerEl && !this._initialized) { + if (this._options.rangePicker) { + this._datepickerInstance = new flowbite_datepicker_1.DateRangePicker(this._datepickerEl, this._getDatepickerOptions(this._options)); + } + else { + this._datepickerInstance = new flowbite_datepicker_1.Datepicker(this._datepickerEl, this._getDatepickerOptions(this._options)); + } + this._initialized = true; + } + }; + Datepicker.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + this._datepickerInstance.destroy(); + } + }; + Datepicker.prototype.removeInstance = function () { + this.destroy(); + instances_1.default.removeInstance('Datepicker', this._instanceId); + }; + Datepicker.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Datepicker.prototype.getDatepickerInstance = function () { + return this._datepickerInstance; + }; + Datepicker.prototype.getDate = function () { + if (this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.DateRangePicker) { + return this._datepickerInstance.getDates(); + } + if (!this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.Datepicker) { + return this._datepickerInstance.getDate(); + } + }; + Datepicker.prototype.setDate = function (date) { + if (this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.DateRangePicker) { + return this._datepickerInstance.setDates(date); + } + if (!this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.Datepicker) { + return this._datepickerInstance.setDate(date); + } + }; + Datepicker.prototype.show = function () { + this._datepickerInstance.show(); + this._options.onShow(this); + }; + Datepicker.prototype.hide = function () { + this._datepickerInstance.hide(); + this._options.onHide(this); + }; + Datepicker.prototype._getDatepickerOptions = function (options) { + var datepickerOptions = {}; + if (options.buttons) { + datepickerOptions.todayBtn = true; + datepickerOptions.clearBtn = true; + if (options.autoSelectToday) { + datepickerOptions.todayBtnMode = 1; + } + } + if (options.autohide) { + datepickerOptions.autohide = true; + } + if (options.format) { + datepickerOptions.format = options.format; + } + if (options.maxDate) { + datepickerOptions.maxDate = options.maxDate; + } + if (options.minDate) { + datepickerOptions.minDate = options.minDate; + } + if (options.orientation) { + datepickerOptions.orientation = options.orientation; + } + if (options.title) { + datepickerOptions.title = options.title; + } + if (options.language) { + datepickerOptions.language = options.language; + } + return datepickerOptions; + }; + Datepicker.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Datepicker.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + return Datepicker; +}()); +function initDatepickers() { + document + .querySelectorAll('[datepicker], [inline-datepicker], [date-rangepicker]') + .forEach(function ($datepickerEl) { + if ($datepickerEl) { + var buttons = $datepickerEl.hasAttribute('datepicker-buttons'); + var autoselectToday = $datepickerEl.hasAttribute('datepicker-autoselect-today'); + var autohide = $datepickerEl.hasAttribute('datepicker-autohide'); + var format = $datepickerEl.getAttribute('datepicker-format'); + var maxDate = $datepickerEl.getAttribute('datepicker-max-date'); + var minDate = $datepickerEl.getAttribute('datepicker-min-date'); + var orientation = $datepickerEl.getAttribute('datepicker-orientation'); + var title = $datepickerEl.getAttribute('datepicker-title'); + var language = $datepickerEl.getAttribute('datepicker-language'); + var rangePicker = $datepickerEl.hasAttribute('date-rangepicker'); + new Datepicker($datepickerEl, { + buttons: buttons ? buttons : Default.buttons, + autoSelectToday: autoselectToday + ? autoselectToday + : Default.autoSelectToday, + autohide: autohide ? autohide : Default.autohide, + format: format ? format : Default.format, + maxDate: maxDate ? maxDate : Default.maxDate, + minDate: minDate ? minDate : Default.minDate, + orientation: orientation + ? orientation + : Default.orientation, + title: title ? title : Default.title, + language: language ? language : Default.language, + rangePicker: rangePicker + ? rangePicker + : Default.rangePicker, + }); + } + else { + console.error("The datepicker element does not exist. Please check the datepicker attribute."); + } + }); +} +exports.initDatepickers = initDatepickers; +if (typeof window !== 'undefined') { + window.Datepicker = Datepicker; + window.initDatepickers = initDatepickers; +} +exports["default"] = Datepicker; + + +/***/ }), + +/***/ 556: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDials = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dial = /** @class */ (function () { + function Dial(parentEl, triggerEl, targetEl, options, instanceOptions) { + if (parentEl === void 0) { parentEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._parentEl = parentEl; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dial', this, this._instanceId, instanceOptions.override); + } + Dial.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + this._showEventHandler = function () { + _this.show(); + }; + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showEventHandler); + _this._targetEl.addEventListener(ev, _this._showEventHandler); + }); + this._hideEventHandler = function () { + if (!_this._parentEl.matches(':hover')) { + _this.hide(); + } + }; + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.addEventListener(ev, _this._hideEventHandler); + }); + this._initialized = true; + } + }; + Dial.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showEventHandler); + _this._targetEl.removeEventListener(ev, _this._showEventHandler); + }); + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.removeEventListener(ev, _this._hideEventHandler); + }); + this._initialized = false; + } + }; + Dial.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dial', this._instanceId); + }; + Dial.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dial.prototype.hide = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Dial.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dial.prototype.toggle = function () { + if (this._visible) { + this.hide(); + } + else { + this.show(); + } + }; + Dial.prototype.isHidden = function () { + return !this._visible; + }; + Dial.prototype.isVisible = function () { + return this._visible; + }; + Dial.prototype._getTriggerEventTypes = function (triggerType) { + switch (triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Dial.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Dial.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Dial.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Dial; +}()); +function initDials() { + document.querySelectorAll('[data-dial-init]').forEach(function ($parentEl) { + var $triggerEl = $parentEl.querySelector('[data-dial-toggle]'); + if ($triggerEl) { + var dialId = $triggerEl.getAttribute('data-dial-toggle'); + var $dialEl = document.getElementById(dialId); + if ($dialEl) { + var triggerType = $triggerEl.getAttribute('data-dial-trigger'); + new Dial($parentEl, $triggerEl, $dialEl, { + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("Dial with id ".concat(dialId, " does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?")); + } + } + else { + console.error("Dial with id ".concat($parentEl.id, " does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?")); + } + }); +} +exports.initDials = initDials; +if (typeof window !== 'undefined') { + window.Dial = Dial; + window.initDials = initDials; +} +exports["default"] = Dial; + + +/***/ }), + +/***/ 791: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDismisses = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + transition: 'transition-opacity', + duration: 300, + timing: 'ease-out', + onHide: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dismiss = /** @class */ (function () { + function Dismiss(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dismiss', this, this._instanceId, instanceOptions.override); + } + Dismiss.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + this._clickHandler = function () { + _this.hide(); + }; + this._triggerEl.addEventListener('click', this._clickHandler); + this._initialized = true; + } + }; + Dismiss.prototype.destroy = function () { + if (this._triggerEl && this._initialized) { + this._triggerEl.removeEventListener('click', this._clickHandler); + this._initialized = false; + } + }; + Dismiss.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dismiss', this._instanceId); + }; + Dismiss.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dismiss.prototype.hide = function () { + var _this = this; + this._targetEl.classList.add(this._options.transition, "duration-".concat(this._options.duration), this._options.timing, 'opacity-0'); + setTimeout(function () { + _this._targetEl.classList.add('hidden'); + }, this._options.duration); + // callback function + this._options.onHide(this, this._targetEl); + }; + Dismiss.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + return Dismiss; +}()); +function initDismisses() { + document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-dismiss-target'); + var $dismissEl = document.querySelector(targetId); + if ($dismissEl) { + new Dismiss($dismissEl, $triggerEl); + } + else { + console.error("The dismiss element with id \"".concat(targetId, "\" does not exist. Please check the data-dismiss-target attribute.")); + } + }); +} +exports.initDismisses = initDismisses; +if (typeof window !== 'undefined') { + window.Dismiss = Dismiss; + window.initDismisses = initDismisses; +} +exports["default"] = Dismiss; + + +/***/ }), + +/***/ 340: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDrawers = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'left', + bodyScrolling: false, + backdrop: true, + edge: false, + edgeOffset: 'bottom-[60px]', + backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Drawer = /** @class */ (function () { + function Drawer(targetEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._eventListenerInstances = []; + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Drawer', this, this._instanceId, instanceOptions.override); + } + Drawer.prototype.init = function () { + var _this = this; + // set initial accessibility attributes + if (this._targetEl && !this._initialized) { + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.classList.add('transition-transform'); + // set base placement classes + this._getPlacementClasses(this._options.placement).base.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._handleEscapeKey = function (event) { + if (event.key === 'Escape') { + // if 'Escape' key is pressed + if (_this.isVisible()) { + // if the Drawer is visible + _this.hide(); // hide the Drawer + } + } + }; + // add keyboard event listener to document + document.addEventListener('keydown', this._handleEscapeKey); + this._initialized = true; + } + }; + Drawer.prototype.destroy = function () { + if (this._initialized) { + this.removeAllEventListenerInstances(); + this._destroyBackdropEl(); + // Remove the keyboard event listener + document.removeEventListener('keydown', this._handleEscapeKey); + this._initialized = false; + } + }; + Drawer.prototype.removeInstance = function () { + instances_1.default.removeInstance('Drawer', this._instanceId); + }; + Drawer.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Drawer.prototype.hide = function () { + var _this = this; + // based on the edge option show placement classes + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + // enable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.remove('overflow-hidden'); + } + // destroy backdrop + if (this._options.backdrop) { + this._destroyBackdropEl(); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Drawer.prototype.show = function () { + var _this = this; + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + // disable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.add('overflow-hidden'); + } + // show backdrop + if (this._options.backdrop) { + this._createBackdrop(); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Drawer.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Drawer.prototype._createBackdrop = function () { + var _a; + var _this = this; + if (!this._visible) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('drawer-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + backdropEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Drawer.prototype._destroyBackdropEl = function () { + if (this._visible && + document.querySelector('[drawer-backdrop]') !== null) { + document.querySelector('[drawer-backdrop]').remove(); + } + }; + Drawer.prototype._getPlacementClasses = function (placement) { + switch (placement) { + case 'top': + return { + base: ['top-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['-translate-y-full'], + }; + case 'right': + return { + base: ['right-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-x-full'], + }; + case 'bottom': + return { + base: ['bottom-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['translate-y-full'], + }; + case 'left': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + case 'bottom-edge': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-y-full', this._options.edgeOffset], + }; + default: + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + } + }; + Drawer.prototype.isHidden = function () { + return !this._visible; + }; + Drawer.prototype.isVisible = function () { + return this._visible; + }; + Drawer.prototype.addEventListenerInstance = function (element, type, handler) { + this._eventListenerInstances.push({ + element: element, + type: type, + handler: handler, + }); + }; + Drawer.prototype.removeAllEventListenerInstances = function () { + this._eventListenerInstances.map(function (eventListenerInstance) { + eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler); + }); + this._eventListenerInstances = []; + }; + Drawer.prototype.getAllEventListenerInstances = function () { + return this._eventListenerInstances; + }; + Drawer.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Drawer.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Drawer.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Drawer; +}()); +function initDrawers() { + document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) { + // mandatory + var drawerId = $triggerEl.getAttribute('data-drawer-target'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var placement = $triggerEl.getAttribute('data-drawer-placement'); + var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling'); + var backdrop = $triggerEl.getAttribute('data-drawer-backdrop'); + var edge = $triggerEl.getAttribute('data-drawer-edge'); + var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset'); + new Drawer($drawerEl, { + placement: placement ? placement : Default.placement, + bodyScrolling: bodyScrolling + ? bodyScrolling === 'true' + ? true + : false + : Default.bodyScrolling, + backdrop: backdrop + ? backdrop === 'true' + ? true + : false + : Default.backdrop, + edge: edge ? (edge === 'true' ? true : false) : Default.edge, + edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset, + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-toggle'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_1 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_1) { + var toggleDrawer = function () { + drawer_1.toggle(); + }; + $triggerEl.addEventListener('click', toggleDrawer); + drawer_1.addEventListenerInstance($triggerEl, 'click', toggleDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document + .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]') + .forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-dismiss') + ? $triggerEl.getAttribute('data-drawer-dismiss') + : $triggerEl.getAttribute('data-drawer-hide'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_2 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_2) { + var hideDrawer = function () { + drawer_2.hide(); + }; + $triggerEl.addEventListener('click', hideDrawer); + drawer_2.addEventListenerInstance($triggerEl, 'click', hideDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id")); + } + }); + document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-show'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_3 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_3) { + var showDrawer = function () { + drawer_3.show(); + }; + $triggerEl.addEventListener('click', showDrawer); + drawer_3.addEventListenerInstance($triggerEl, 'click', showDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); +} +exports.initDrawers = initDrawers; +if (typeof window !== 'undefined') { + window.Drawer = Drawer; + window.initDrawers = initDrawers; +} +exports["default"] = Drawer; + + +/***/ }), + +/***/ 316: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDropdowns = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'bottom', + triggerType: 'click', + offsetSkidding: 0, + offsetDistance: 10, + delay: 300, + ignoreClickOutsideClass: false, + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dropdown = /** @class */ (function () { + function Dropdown(targetElement, triggerElement, options, instanceOptions) { + if (targetElement === void 0) { targetElement = null; } + if (triggerElement === void 0) { triggerElement = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetElement.id; + this._targetEl = targetElement; + this._triggerEl = triggerElement; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dropdown', this, this._instanceId, instanceOptions.override); + } + Dropdown.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._popperInstance = this._createPopperInstance(); + this._setupEventListeners(); + this._initialized = true; + } + }; + Dropdown.prototype.destroy = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + // Remove click event listeners for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._clickHandler); + }); + } + // Remove hover event listeners for trigger and target elements + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hoverShowTriggerElHandler); + _this._targetEl.removeEventListener(ev, _this._hoverShowTargetElHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hoverHideHandler); + _this._targetEl.removeEventListener(ev, _this._hoverHideHandler); + }); + } + this._popperInstance.destroy(); + this._initialized = false; + }; + Dropdown.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dropdown', this._instanceId); + }; + Dropdown.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dropdown.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._clickHandler = function () { + _this.toggle(); + }; + // click event handling for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._clickHandler); + }); + } + this._hoverShowTriggerElHandler = function (ev) { + if (ev.type === 'click') { + _this.toggle(); + } + else { + setTimeout(function () { + _this.show(); + }, _this._options.delay); + } + }; + this._hoverShowTargetElHandler = function () { + _this.show(); + }; + this._hoverHideHandler = function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }; + // hover event handling for trigger element + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hoverShowTriggerElHandler); + _this._targetEl.addEventListener(ev, _this._hoverShowTargetElHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hoverHideHandler); + _this._targetEl.addEventListener(ev, _this._hoverHideHandler); + }); + } + }; + Dropdown.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [ + this._options.offsetSkidding, + this._options.offsetDistance, + ], + }, + }, + ], + }); + }; + Dropdown.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + // Ignore clicks on the trigger element (ie. a datepicker input) + var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass; + var isIgnored = false; + if (ignoreClickOutsideClass) { + var ignoredClickOutsideEls = document.querySelectorAll(".".concat(ignoreClickOutsideClass)); + ignoredClickOutsideEls.forEach(function (el) { + if (el.contains(clickedEl)) { + isIgnored = true; + return; + } + }); + } + // Ignore clicks on the target element (ie. dropdown itself) + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + !isIgnored && + this.isVisible()) { + this.hide(); + } + }; + Dropdown.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'click'], + hideEvents: ['mouseleave'], + }; + case 'click': + return { + showEvents: ['click'], + hideEvents: [], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['click'], + hideEvents: [], + }; + } + }; + Dropdown.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Dropdown.prototype.isVisible = function () { + return this._visible; + }; + Dropdown.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + this._targetEl.classList.add('block'); + this._targetEl.removeAttribute('aria-hidden'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + this._setupClickOutsideListener(); + // Update its position + this._popperInstance.update(); + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dropdown.prototype.hide = function () { + this._targetEl.classList.remove('block'); + this._targetEl.classList.add('hidden'); + this._targetEl.setAttribute('aria-hidden', 'true'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + this._visible = false; + this._removeClickOutsideListener(); + // callback function + this._options.onHide(this); + }; + Dropdown.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Dropdown.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Dropdown.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Dropdown; +}()); +function initDropdowns() { + document + .querySelectorAll('[data-dropdown-toggle]') + .forEach(function ($triggerEl) { + var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle'); + var $dropdownEl = document.getElementById(dropdownId); + if ($dropdownEl) { + var placement = $triggerEl.getAttribute('data-dropdown-placement'); + var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding'); + var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance'); + var triggerType = $triggerEl.getAttribute('data-dropdown-trigger'); + var delay = $triggerEl.getAttribute('data-dropdown-delay'); + var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class'); + new Dropdown($dropdownEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + offsetSkidding: offsetSkidding + ? parseInt(offsetSkidding) + : Default.offsetSkidding, + offsetDistance: offsetDistance + ? parseInt(offsetDistance) + : Default.offsetDistance, + delay: delay ? parseInt(delay) : Default.delay, + ignoreClickOutsideClass: ignoreClickOutsideClass + ? ignoreClickOutsideClass + : Default.ignoreClickOutsideClass, + }); + } + else { + console.error("The dropdown element with id \"".concat(dropdownId, "\" does not exist. Please check the data-dropdown-toggle attribute.")); + } + }); +} +exports.initDropdowns = initDropdowns; +if (typeof window !== 'undefined') { + window.Dropdown = Dropdown; + window.initDropdowns = initDropdowns; +} +exports["default"] = Dropdown; + + +/***/ }), + +/***/ 311: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initFlowbite = void 0; +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var clipboard_1 = __webpack_require__(673); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var input_counter_1 = __webpack_require__(656); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +var datepicker_1 = __webpack_require__(132); +function initFlowbite() { + (0, accordion_1.initAccordions)(); + (0, collapse_1.initCollapses)(); + (0, carousel_1.initCarousels)(); + (0, dismiss_1.initDismisses)(); + (0, dropdown_1.initDropdowns)(); + (0, modal_1.initModals)(); + (0, drawer_1.initDrawers)(); + (0, tabs_1.initTabs)(); + (0, tooltip_1.initTooltips)(); + (0, popover_1.initPopovers)(); + (0, dial_1.initDials)(); + (0, input_counter_1.initInputCounters)(); + (0, clipboard_1.initCopyClipboards)(); + (0, datepicker_1.initDatepickers)(); +} +exports.initFlowbite = initFlowbite; +if (typeof window !== 'undefined') { + window.initFlowbite = initFlowbite; +} + + +/***/ }), + +/***/ 656: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initInputCounters = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + minValue: null, + maxValue: null, + onIncrement: function () { }, + onDecrement: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var InputCounter = /** @class */ (function () { + function InputCounter(targetEl, incrementEl, decrementEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (incrementEl === void 0) { incrementEl = null; } + if (decrementEl === void 0) { decrementEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._incrementEl = incrementEl; + this._decrementEl = decrementEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('InputCounter', this, this._instanceId, instanceOptions.override); + } + InputCounter.prototype.init = function () { + var _this = this; + if (this._targetEl && !this._initialized) { + this._inputHandler = function (event) { + { + var target = event.target; + // check if the value is numeric + if (!/^\d*$/.test(target.value)) { + // Regex to check if the value is numeric + target.value = target.value.replace(/[^\d]/g, ''); // Remove non-numeric characters + } + // check for max value + if (_this._options.maxValue !== null && + parseInt(target.value) > _this._options.maxValue) { + target.value = _this._options.maxValue.toString(); + } + // check for min value + if (_this._options.minValue !== null && + parseInt(target.value) < _this._options.minValue) { + target.value = _this._options.minValue.toString(); + } + } + }; + this._incrementClickHandler = function () { + _this.increment(); + }; + this._decrementClickHandler = function () { + _this.decrement(); + }; + // Add event listener to restrict input to numeric values only + this._targetEl.addEventListener('input', this._inputHandler); + if (this._incrementEl) { + this._incrementEl.addEventListener('click', this._incrementClickHandler); + } + if (this._decrementEl) { + this._decrementEl.addEventListener('click', this._decrementClickHandler); + } + this._initialized = true; + } + }; + InputCounter.prototype.destroy = function () { + if (this._targetEl && this._initialized) { + this._targetEl.removeEventListener('input', this._inputHandler); + if (this._incrementEl) { + this._incrementEl.removeEventListener('click', this._incrementClickHandler); + } + if (this._decrementEl) { + this._decrementEl.removeEventListener('click', this._decrementClickHandler); + } + this._initialized = false; + } + }; + InputCounter.prototype.removeInstance = function () { + instances_1.default.removeInstance('InputCounter', this._instanceId); + }; + InputCounter.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + InputCounter.prototype.getCurrentValue = function () { + return parseInt(this._targetEl.value) || 0; + }; + InputCounter.prototype.increment = function () { + // don't increment if the value is already at the maximum value + if (this._options.maxValue !== null && + this.getCurrentValue() >= this._options.maxValue) { + return; + } + this._targetEl.value = (this.getCurrentValue() + 1).toString(); + this._options.onIncrement(this); + }; + InputCounter.prototype.decrement = function () { + // don't decrement if the value is already at the minimum value + if (this._options.minValue !== null && + this.getCurrentValue() <= this._options.minValue) { + return; + } + this._targetEl.value = (this.getCurrentValue() - 1).toString(); + this._options.onDecrement(this); + }; + InputCounter.prototype.updateOnIncrement = function (callback) { + this._options.onIncrement = callback; + }; + InputCounter.prototype.updateOnDecrement = function (callback) { + this._options.onDecrement = callback; + }; + return InputCounter; +}()); +function initInputCounters() { + document.querySelectorAll('[data-input-counter]').forEach(function ($targetEl) { + var targetId = $targetEl.id; + var $incrementEl = document.querySelector('[data-input-counter-increment="' + targetId + '"]'); + var $decrementEl = document.querySelector('[data-input-counter-decrement="' + targetId + '"]'); + var minValue = $targetEl.getAttribute('data-input-counter-min'); + var maxValue = $targetEl.getAttribute('data-input-counter-max'); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('InputCounter', $targetEl.getAttribute('id'))) { + new InputCounter($targetEl, $incrementEl ? $incrementEl : null, $decrementEl ? $decrementEl : null, { + minValue: minValue ? parseInt(minValue) : null, + maxValue: maxValue ? parseInt(maxValue) : null, + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-input-counter attribute.")); + } + }); +} +exports.initInputCounters = initInputCounters; +if (typeof window !== 'undefined') { + window.InputCounter = InputCounter; + window.initInputCounters = initInputCounters; +} +exports["default"] = InputCounter; + + +/***/ }), + +/***/ 16: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initModals = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'center', + backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40', + backdrop: 'dynamic', + closable: true, + onHide: function () { }, + onShow: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Modal = /** @class */ (function () { + function Modal(targetEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._eventListenerInstances = []; + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._isHidden = true; + this._backdropEl = null; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Modal', this, this._instanceId, instanceOptions.override); + } + Modal.prototype.init = function () { + var _this = this; + if (this._targetEl && !this._initialized) { + this._getPlacementClasses().map(function (c) { + _this._targetEl.classList.add(c); + }); + this._initialized = true; + } + }; + Modal.prototype.destroy = function () { + if (this._initialized) { + this.removeAllEventListenerInstances(); + this._destroyBackdropEl(); + this._initialized = false; + } + }; + Modal.prototype.removeInstance = function () { + instances_1.default.removeInstance('Modal', this._instanceId); + }; + Modal.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Modal.prototype._createBackdrop = function () { + var _a; + if (this._isHidden) { + var backdropEl = document.createElement('div'); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + this._backdropEl = backdropEl; + } + }; + Modal.prototype._destroyBackdropEl = function () { + if (!this._isHidden && this._backdropEl) { + this._backdropEl.remove(); + this._backdropEl = null; + } + }; + Modal.prototype._setupModalCloseEventListeners = function () { + var _this = this; + if (this._options.backdrop === 'dynamic') { + this._clickOutsideEventListener = function (ev) { + _this._handleOutsideClick(ev.target); + }; + this._targetEl.addEventListener('click', this._clickOutsideEventListener, true); + } + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._removeModalCloseEventListeners = function () { + if (this._options.backdrop === 'dynamic') { + this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true); + } + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._handleOutsideClick = function (target) { + if (target === this._targetEl || + (target === this._backdropEl && this.isVisible())) { + this.hide(); + } + }; + Modal.prototype._getPlacementClasses = function () { + switch (this._options.placement) { + // top + case 'top-left': + return ['justify-start', 'items-start']; + case 'top-center': + return ['justify-center', 'items-start']; + case 'top-right': + return ['justify-end', 'items-start']; + // center + case 'center-left': + return ['justify-start', 'items-center']; + case 'center': + return ['justify-center', 'items-center']; + case 'center-right': + return ['justify-end', 'items-center']; + // bottom + case 'bottom-left': + return ['justify-start', 'items-end']; + case 'bottom-center': + return ['justify-center', 'items-end']; + case 'bottom-right': + return ['justify-end', 'items-end']; + default: + return ['justify-center', 'items-center']; + } + }; + Modal.prototype.toggle = function () { + if (this._isHidden) { + this.show(); + } + else { + this.hide(); + } + // callback function + this._options.onToggle(this); + }; + Modal.prototype.show = function () { + if (this.isHidden) { + this._targetEl.classList.add('flex'); + this._targetEl.classList.remove('hidden'); + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + this._createBackdrop(); + this._isHidden = false; + // Add keyboard event listener to the document + if (this._options.closable) { + this._setupModalCloseEventListeners(); + } + // prevent body scroll + document.body.classList.add('overflow-hidden'); + // callback function + this._options.onShow(this); + } + }; + Modal.prototype.hide = function () { + if (this.isVisible) { + this._targetEl.classList.add('hidden'); + this._targetEl.classList.remove('flex'); + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + this._destroyBackdropEl(); + this._isHidden = true; + // re-apply body scroll + document.body.classList.remove('overflow-hidden'); + if (this._options.closable) { + this._removeModalCloseEventListeners(); + } + // callback function + this._options.onHide(this); + } + }; + Modal.prototype.isVisible = function () { + return !this._isHidden; + }; + Modal.prototype.isHidden = function () { + return this._isHidden; + }; + Modal.prototype.addEventListenerInstance = function (element, type, handler) { + this._eventListenerInstances.push({ + element: element, + type: type, + handler: handler, + }); + }; + Modal.prototype.removeAllEventListenerInstances = function () { + this._eventListenerInstances.map(function (eventListenerInstance) { + eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler); + }); + this._eventListenerInstances = []; + }; + Modal.prototype.getAllEventListenerInstances = function () { + return this._eventListenerInstances; + }; + Modal.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Modal.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Modal.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Modal; +}()); +function initModals() { + // initiate modal based on data-modal-target + document.querySelectorAll('[data-modal-target]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-target'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + new Modal($modalEl, { + placement: placement ? placement : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }); + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.")); + } + }); + // toggle modal visibility + document.querySelectorAll('[data-modal-toggle]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-toggle'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_1 = instances_1.default.getInstance('Modal', modalId); + if (modal_1) { + var toggleModal = function () { + modal_1.toggle(); + }; + $triggerEl.addEventListener('click', toggleModal); + modal_1.addEventListenerInstance($triggerEl, 'click', toggleModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?")); + } + }); + // show modal on click if exists based on id + document.querySelectorAll('[data-modal-show]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-show'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_2 = instances_1.default.getInstance('Modal', modalId); + if (modal_2) { + var showModal = function () { + modal_2.show(); + }; + $triggerEl.addEventListener('click', showModal); + modal_2.addEventListenerInstance($triggerEl, 'click', showModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?")); + } + }); + // hide modal on click if exists based on id + document.querySelectorAll('[data-modal-hide]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-hide'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_3 = instances_1.default.getInstance('Modal', modalId); + if (modal_3) { + var hideModal = function () { + modal_3.hide(); + }; + $triggerEl.addEventListener('click', hideModal); + modal_3.addEventListenerInstance($triggerEl, 'click', hideModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?")); + } + }); +} +exports.initModals = initModals; +if (typeof window !== 'undefined') { + window.Modal = Modal; + window.initModals = initModals; +} +exports["default"] = Modal; + + +/***/ }), + +/***/ 903: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initPopovers = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'top', + offset: 10, + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Popover = /** @class */ (function () { + function Popover(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Popover', this, instanceOptions.id ? instanceOptions.id : this._targetEl.id, instanceOptions.override); + } + Popover.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._setupEventListeners(); + this._popperInstance = this._createPopperInstance(); + this._initialized = true; + } + }; + Popover.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + // remove event listeners associated with the trigger element and target element + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showHandler); + _this._targetEl.removeEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hideHandler); + _this._targetEl.removeEventListener(ev, _this._hideHandler); + }); + // remove event listeners for keydown + this._removeKeydownListener(); + // remove event listeners for click outside + this._removeClickOutsideListener(); + // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance) + if (this._popperInstance) { + this._popperInstance.destroy(); + } + this._initialized = false; + } + }; + Popover.prototype.removeInstance = function () { + instances_1.default.removeInstance('Popover', this._instanceId); + }; + Popover.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Popover.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._showHandler = function () { + _this.show(); + }; + this._hideHandler = function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }; + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showHandler); + _this._targetEl.addEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hideHandler); + _this._targetEl.addEventListener(ev, _this._hideHandler); + }); + }; + Popover.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, this._options.offset], + }, + }, + ], + }); + }; + Popover.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Popover.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Popover.prototype.isVisible = function () { + return this._visible; + }; + Popover.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Popover.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility to true + this._visible = true; + // callback function + this._options.onShow(this); + }; + Popover.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility to false + this._visible = false; + // callback function + this._options.onHide(this); + }; + Popover.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Popover.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Popover.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Popover; +}()); +function initPopovers() { + document.querySelectorAll('[data-popover-target]').forEach(function ($triggerEl) { + var popoverID = $triggerEl.getAttribute('data-popover-target'); + var $popoverEl = document.getElementById(popoverID); + if ($popoverEl) { + var triggerType = $triggerEl.getAttribute('data-popover-trigger'); + var placement = $triggerEl.getAttribute('data-popover-placement'); + var offset = $triggerEl.getAttribute('data-popover-offset'); + new Popover($popoverEl, $triggerEl, { + placement: placement ? placement : Default.placement, + offset: offset ? parseInt(offset) : Default.offset, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The popover element with id \"".concat(popoverID, "\" does not exist. Please check the data-popover-target attribute.")); + } + }); +} +exports.initPopovers = initPopovers; +if (typeof window !== 'undefined') { + window.Popover = Popover; + window.initPopovers = initPopovers; +} +exports["default"] = Popover; + + +/***/ }), + +/***/ 247: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTabs = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + defaultTabId: null, + activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500', + inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300', + onShow: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Tabs = /** @class */ (function () { + function Tabs(tabsEl, items, options, instanceOptions) { + if (tabsEl === void 0) { tabsEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id; + this._tabsEl = tabsEl; + this._items = items; + this._activeTab = options ? this.getTab(options.defaultTabId) : null; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Tabs', this, this._instanceId, instanceOptions.override); + } + Tabs.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + // set the first tab as active if not set by explicitly + if (!this._activeTab) { + this.setActiveTab(this._items[0]); + } + // force show the first default tab + this.show(this._activeTab.id, true); + // show tab content based on click + this._items.map(function (tab) { + tab.triggerEl.addEventListener('click', function (event) { + event.preventDefault(); + _this.show(tab.id); + }); + }); + } + }; + Tabs.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + } + }; + Tabs.prototype.removeInstance = function () { + this.destroy(); + instances_1.default.removeInstance('Tabs', this._instanceId); + }; + Tabs.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Tabs.prototype.getActiveTab = function () { + return this._activeTab; + }; + Tabs.prototype.setActiveTab = function (tab) { + this._activeTab = tab; + }; + Tabs.prototype.getTab = function (id) { + return this._items.filter(function (t) { return t.id === id; })[0]; + }; + Tabs.prototype.show = function (id, forceShow) { + var _a, _b; + var _this = this; + if (forceShow === void 0) { forceShow = false; } + var tab = this.getTab(id); + // don't do anything if already active + if (tab === this._activeTab && !forceShow) { + return; + } + // hide other tabs + this._items.map(function (t) { + var _a, _b; + if (t !== tab) { + (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + t.targetEl.classList.add('hidden'); + t.triggerEl.setAttribute('aria-selected', 'false'); + } + }); + // show active tab + (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + tab.triggerEl.setAttribute('aria-selected', 'true'); + tab.targetEl.classList.remove('hidden'); + this.setActiveTab(tab); + // callback function + this._options.onShow(this, tab); + }; + Tabs.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + return Tabs; +}()); +function initTabs() { + document.querySelectorAll('[data-tabs-toggle]').forEach(function ($parentEl) { + var tabItems = []; + var activeClasses = $parentEl.getAttribute('data-tabs-active-classes'); + var inactiveClasses = $parentEl.getAttribute('data-tabs-inactive-classes'); + var defaultTabId = null; + $parentEl + .querySelectorAll('[role="tab"]') + .forEach(function ($triggerEl) { + var isActive = $triggerEl.getAttribute('aria-selected') === 'true'; + var tab = { + id: $triggerEl.getAttribute('data-tabs-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target')), + }; + tabItems.push(tab); + if (isActive) { + defaultTabId = tab.id; + } + }); + new Tabs($parentEl, tabItems, { + defaultTabId: defaultTabId, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initTabs = initTabs; +if (typeof window !== 'undefined') { + window.Tabs = Tabs; + window.initTabs = initTabs; +} +exports["default"] = Tabs; + + +/***/ }), + +/***/ 671: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTooltips = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'top', + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Tooltip = /** @class */ (function () { + function Tooltip(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Tooltip', this, this._instanceId, instanceOptions.override); + } + Tooltip.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._setupEventListeners(); + this._popperInstance = this._createPopperInstance(); + this._initialized = true; + } + }; + Tooltip.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + // remove event listeners associated with the trigger element + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hideHandler); + }); + // remove event listeners for keydown + this._removeKeydownListener(); + // remove event listeners for click outside + this._removeClickOutsideListener(); + // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance) + if (this._popperInstance) { + this._popperInstance.destroy(); + } + this._initialized = false; + } + }; + Tooltip.prototype.removeInstance = function () { + instances_1.default.removeInstance('Tooltip', this._instanceId); + }; + Tooltip.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Tooltip.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._showHandler = function () { + _this.show(); + }; + this._hideHandler = function () { + _this.hide(); + }; + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hideHandler); + }); + }; + Tooltip.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, 8], + }, + }, + ], + }); + }; + Tooltip.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Tooltip.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Tooltip.prototype.isVisible = function () { + return this._visible; + }; + Tooltip.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Tooltip.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility + this._visible = true; + // callback function + this._options.onShow(this); + }; + Tooltip.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility + this._visible = false; + // callback function + this._options.onHide(this); + }; + Tooltip.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Tooltip.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Tooltip.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Tooltip; +}()); +function initTooltips() { + document.querySelectorAll('[data-tooltip-target]').forEach(function ($triggerEl) { + var tooltipId = $triggerEl.getAttribute('data-tooltip-target'); + var $tooltipEl = document.getElementById(tooltipId); + if ($tooltipEl) { + var triggerType = $triggerEl.getAttribute('data-tooltip-trigger'); + var placement = $triggerEl.getAttribute('data-tooltip-placement'); + new Tooltip($tooltipEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The tooltip element with id \"".concat(tooltipId, "\" does not exist. Please check the data-tooltip-target attribute.")); + } + }); +} +exports.initTooltips = initTooltips; +if (typeof window !== 'undefined') { + window.Tooltip = Tooltip; + window.initTooltips = initTooltips; +} +exports["default"] = Tooltip; + + +/***/ }), + +/***/ 947: +/***/ (function(__unused_webpack_module, exports) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Events = /** @class */ (function () { + function Events(eventType, eventFunctions) { + if (eventFunctions === void 0) { eventFunctions = []; } + this._eventType = eventType; + this._eventFunctions = eventFunctions; + } + Events.prototype.init = function () { + var _this = this; + this._eventFunctions.forEach(function (eventFunction) { + if (typeof window !== 'undefined') { + window.addEventListener(_this._eventType, eventFunction); + } + }); + }; + return Events; +}()); +exports["default"] = Events; + + +/***/ }), + +/***/ 423: +/***/ (function(__unused_webpack_module, exports) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Instances = /** @class */ (function () { + function Instances() { + this._instances = { + Accordion: {}, + Carousel: {}, + Collapse: {}, + Dial: {}, + Dismiss: {}, + Drawer: {}, + Dropdown: {}, + Modal: {}, + Popover: {}, + Tabs: {}, + Tooltip: {}, + InputCounter: {}, + CopyClipboard: {}, + Datepicker: {}, + }; + } + Instances.prototype.addInstance = function (component, instance, id, override) { + if (override === void 0) { override = false; } + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + if (this._instances[component][id] && !override) { + console.warn("Flowbite: Instance with ID ".concat(id, " already exists.")); + return; + } + if (override && this._instances[component][id]) { + this._instances[component][id].destroyAndRemoveInstance(); + } + this._instances[component][id ? id : this._generateRandomId()] = + instance; + }; + Instances.prototype.getAllInstances = function () { + return this._instances; + }; + Instances.prototype.getInstances = function (component) { + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + return this._instances[component]; + }; + Instances.prototype.getInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + if (!this._instances[component][id]) { + console.warn("Flowbite: Instance with ID ".concat(id, " does not exist.")); + return; + } + return this._instances[component][id]; + }; + Instances.prototype.destroyAndRemoveInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + this.destroyInstanceObject(component, id); + this.removeInstance(component, id); + }; + Instances.prototype.removeInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + delete this._instances[component][id]; + }; + Instances.prototype.destroyInstanceObject = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + this._instances[component][id].destroy(); + }; + Instances.prototype.instanceExists = function (component, id) { + if (!this._instances[component]) { + return false; + } + if (!this._instances[component][id]) { + return false; + } + return true; + }; + Instances.prototype._generateRandomId = function () { + return Math.random().toString(36).substr(2, 9); + }; + Instances.prototype._componentAndInstanceCheck = function (component, id) { + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + if (!this._instances[component][id]) { + console.warn("Flowbite: Instance with ID ".concat(id, " does not exist.")); + return false; + } + return true; + }; + return Instances; +}()); +var instances = new Instances(); +exports["default"] = instances; +if (typeof window !== 'undefined') { + window.FlowbiteInstances = instances; +} + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ !function() { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +var exports = __webpack_exports__; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +// core components +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +var input_counter_1 = __webpack_require__(656); +var clipboard_1 = __webpack_require__(673); +var datepicker_1 = __webpack_require__(132); +__webpack_require__(311); +var events_1 = __webpack_require__(947); +var liveViewLoadEvents = new events_1.default('phx:page-loading-stop', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, + input_counter_1.initInputCounters, + clipboard_1.initCopyClipboards, + datepicker_1.initDatepickers, +]); +liveViewLoadEvents.init(); +var regularViewLoadEvents = new events_1.default('load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, + input_counter_1.initInputCounters, + clipboard_1.initCopyClipboards, + datepicker_1.initDatepickers, +]); +regularViewLoadEvents.init(); +exports["default"] = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + InputCounter: input_counter_1.default, + CopyClipboard: clipboard_1.default, + Datepicker: datepicker_1.default, + Events: events_1.default, +}; + +}(); +/******/ return __webpack_exports__; +/******/ })() +; +}); +//# sourceMappingURL=flowbite.phoenix.js.map \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.phoenix.js.map b/node_modules/flowbite/dist/flowbite.phoenix.js.map new file mode 100644 index 0000000..32921c1 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.phoenix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flowbite.phoenix.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVO,IAAI,SAAG;AACP;AACA;AACA;AACA;AACA,sBAAsB,SAAG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA,CAAC;AACM,IAAI,gBAAU;AACrB;AACA,CAAC,OAAO;;AAED;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;;AC9BQ;AACf;AACA;;ACFe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;ACXuC;;AAEvC;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;;;ACpBsD;AACK,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,SAAS,aAAa,cAAc,WAAW;AAC/C;AACA,MAAM;AACN;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uHAAuH;;AAEvH;AACA;AACA;AACA,OAAO,IAAI,GAAG;;AAEd,WAAW,aAAa,cAAc,WAAW;AACjD;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,EAAE;;;AAGF,0DAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;ACnFkC;AACpB;AACf;AACA;;ACHO,IAAI,QAAG;AACP,IAAI,QAAG;AACP;;ACFQ;AACf;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;ACVgD;AACjC;AACf,gDAAgD,WAAW;AAC3D;;ACH2D;AAClB;AACF;AACc;AACtC;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,aAAa;AACnC,uCAAuC,KAAK;AAC5C,wCAAwC,KAAK;AAC7C;;AAEA,aAAa,SAAS,YAAY,SAAS;AAC3C;;AAEA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxC+D,CAAC;AAChE;;AAEe;AACf,mBAAmB,qBAAqB,WAAW;AACnD;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxB+C;AAChC;AACf,2DAA2D;;AAE3D;AACA;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ACA;AACA;AACA,MAAM;;;AAGN;;AAEA,sBAAsB,SAAG,mBAAmB,IAAI,kBAAkB,KAAK,mBAAmB,GAAG;AAC7F,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,IAAI,mBAAmB,SAAG,kBAAkB,MAAM,mBAAmB,GAAG;AAC9F,cAAc,KAAK;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,2BAA2B,oCAAoC;AAC/D;;AAEA,yBAAyB,qCAAqC;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,KAAqC,EAAE,2BAQ1C;;AAEH;AACA,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,mDAAmD;AAC7F;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,yCAAyC,kDAAkD;AAC3F;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,4CAA4C;AAC5C;AACA,GAAG;AACH,EAAE;;;AAGF,4DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACpLiD,CAAC;;AAEnD;AACA;AACA;;AAEA,SAAS,qBAAM;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA,sBAAsB;AACtB,UAAU,qBAAM;AAChB;AACA,CAAC;;AChDD;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA,GAAG;AACH;;ACVA,IAAI,kCAAI;AACR;AACA;AACA;AACe;AACf;AACA,WAAW,kCAAI;AACf,GAAG;AACH;;ACRuC;AACxB;AACf,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;ACT+D;AACN;AACN;AACpC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,kBAAkB,kBAAkB,eAAe;AAClF;;ACZuC;AACkB;AACE;AACN;AACtC;AACf,YAAY,SAAS;AACrB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,gBAAgB;;AAEzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;;AC9ByD;AACJ;AACM;AACR;AACZ,CAAC;AACxC;;AAEe;AACf;;AAEA,aAAa,kBAAkB;AAC/B,kBAAkB,eAAe;AACjC;AACA,cAAc,QAAG;AACjB,eAAe,QAAG;AAClB,kCAAkC,mBAAmB;AACrD;;AAEA,MAAM,gBAAgB;AACtB,SAAS,QAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BqD;AACtC;AACf;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;;AAEA;AACA;;ACT+C;AACE;AACN;AACK;AACjC;AACf,4CAA4C,WAAW;AACvD;AACA;AACA;;AAEA,MAAM,aAAa,UAAU,cAAc;AAC3C;AACA;;AAEA,yBAAyB,aAAa;AACtC;;ACfmD;AACJ;AACR;AACU;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEe;AACf;;AAEA;AACA;AACA;;AAEA,qBAAqB,eAAe;AACpC;AACA,YAAY,SAAS;AACrB,+DAA+D,cAAc;AAC7E;AACA;AACA,uCAAuC,aAAa;AACpD;;ACzBe;AACf,yBAAyB;AACzB;AACA;AACA;AACA;AACA,GAAG;AACH;;ACPuC;AACY;AACA;AACI;AACJ;AACM;AACJ;AACM;AACI;AAChB;AACV;AACM;AACiB;AAChB;;AAE5C;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;A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A;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,uBAAuB;AACzC;;AAEA,yBAAyB,gBAAgB;;AAEzC,2BAA2B,YAAY,gBAAgB,KAAK;AAC5D,sBAAsB,SAAG,EAAE,MAAM;AACjC;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,4DAA4D,KAAK,GAAG,IAAI,sBAAsB,MAAM,GAAG,SAAG;;AAE1G;AACA,0BAA0B,oBAAoB;AAC9C;;AAEA,2BAA2B,oBAAoB;AAC/C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,QAAQ;AAC1C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AClJsD;AACC;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,SAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI;AAClC;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AC5D2D;AACD,CAAC;;AAErD;AACP,sBAAsB,gBAAgB;AACtC,wBAAwB,IAAI,EAAE,SAAG;;AAEjC,mEAAmE;AACnE;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,UAAU,IAAI,EAAE,KAAK;AACrB;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAiB;AAC9B;AACA;AACA,GAAG,IAAI;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF,qDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACrDuD;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,4DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACxBc;AACf;AACA;;ACF8D;AACF;AACgB;AAC5B;AACY;AACF;AACI;AACN;AACJ;AACY;AACE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,gBAAgB;AACtC,kBAAkB,YAAY;AAC9B;AACA,iBAAiB,wBAAwB;AACzC,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA,4FAA4F;AAC5F;AACA,GAAG;AACH;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,sCAAsC,SAAG,GAAG,IAAI;AAChD,qCAAqC,MAAM,GAAG,KAAK;AACnD;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC,+BAA+B,KAAK,2CAA2C;AAC/E;;AAEA;AACA,6CAA6C,aAAa;AAC1D;AACA;AACA;AACA,yHAAyH,kBAAkB;AAC3I;AACA,uDAAuD;AACvD;AACA;AACA;AACA;;AAEA,mBAAmB,MAAM;AACzB;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;AACA;AACA,0BAA0B,MAAM,U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AqB;AAC9B;AACA;AACA,KAAK;AACL,GAAG;AACH;;AC3Ce;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;;ACde;AACf;AACA;AACA,sDAAsD;AACtD,+BAA+B;AAC/B,4BAA4B;AAC5B,KAAK;AACL;AACA,GAAG,IAAI,GAAG;;AAEV;AACA;AACA,GAAG;AACH;;ACb+D;AACN;AACQ;AACJ;AACE;AACR;AACZ;AACkB;AAClB;AACgB;AACV;AACM;AACD;AACpB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sEAAsE,aAAa;AACnF;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B;AAC/B,uBAAuB;AACvB;AACA;AACA;AACA,OAAO;AACP,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qBAAqB,SAAS,cAAc,iBAAiB,yCAAyC,iBAAiB;AACvH,kBAAkB,iBAAiB;AACnC,WAAW;AACX;;AAEA,+BAA+B,cAAc,CAAC,WAAW,yDAAyD;;AAElH;AACA;AACA,SAAS,GAAG;AACZ;;AAEA,YAAY,KAAqC,EAAE,qGA+B1C;;AAET;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C;AAC7C;;AAEA;AACA,cAAc,KAAqC,EAAE,EAE1C;;AAEX;AACA,UAAU;;;AAGV;AACA,qBAAqB,gBAAgB,YAAY,eAAe;AAChE,kBAAkB,aAAa;AAC/B,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;AACA,6CAA6C,KAAK;;AAElD;AACA,sEAAsE;AACtE,SAAS;AACT;;AAEA,4BAA4B,uCAAuC;AACnE,cAAc,KAAqC,EAAE,EAO1C;;AAEX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gEAAgE;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,OAAO;AACP;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,KAAqC,EAAE,EAE1C;;AAEP;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACO,mDAAmD;;;;AChQU;AACT;AACF;AACA;AACJ;AACV;AACJ;AACsB;AACpB;AACF;AACvC,wBAAwB,cAAc,EAAE,uBAAa,EAAE,uBAAa,EAAE,qBAAW,EAAE,gBAAM,EAAE,cAAI,EAAE,yBAAe,EAAE,eAAK,EAAE,cAAI;AAC7H,IAAI,mBAAY,gBAAgB,eAAe;AAC/C;AACA,CAAC,GAAG;;AAEuE,CAAC;;AAER,CAAC;;;;ACjBD;AACT;AACF;AACA;AACJ;AACrD,IAAI,4BAAgB,IAAI,cAAc,EAAE,uBAAa,EAAE,uBAAa,EAAE,qBAAW;AACjF,IAAI,wBAAY,gBAAgB,eAAe;AAC/C,oBAAoB,4BAAgB;AACpC,CAAC,GAAG;;;;ACRuB;AACU,CAAC;;AAEgE,CAAC;;AAE5D,CAAC;;;;;;;;;ACL/B;;AAEb,8CAA6C,EAAE,aAAa,EAAC;;AAE7D;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,yFAAyF;AACzF,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,kEAAkE;AACtF,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,SAAS,GAAG,gEAAgE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0FAA0F,aAAa;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,OAAO,IAAI;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA,CAAC;AACD;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO,IAAI;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B;AACA;AACA,gBAAgB,MAAM;AACtB,kBAAkB,QAAQ;AAC1B,kBAAkB,QAAQ;AAC1B;AACA,UAAU,QAAQ;AAClB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;;AAEA;AACA,cAAc,gBAAgB;AAC9B;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,6BAA6B;AAC7C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,eAAe,QAAQ;AACvB,iBAAiB,SAAS;AAC1B;AACA,kBAAkB,SAAS;AAC3B;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,0EAA0E,aAAa;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,oBAAoB,SAAS;AAC7B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,SAAS;AACxB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA,qBAAqB,oBAAoB;AACzC,oBAAoB,QAAQ;AAC5B,oBAAoB,QAAQ;AAC5B;AACA,YAAY,aAAa;AACzB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA,gCAAgC;AAChC;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,OAAO;AACvB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C,WAAW,aAAa;AACxB,eA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BAAkB;IAClB,4BAAe;CAClB,CAAC,CAAC;AACH,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAE7B,qBAAe;IACX,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK;IACL,OAAO;IACP,IAAI;IACJ,OAAO;IACP,YAAY;IACZ,aAAa;IACb,UAAU;IACV,MAAM;CACT,CAAC","sources":["webpack:///webpack/universalModuleDefinition","webpack:///./node_modules/@popperjs/core/lib/enums.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack:///./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/math.js","webpack:///./node_modules/@popperjs/core/lib/utils/userAgent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack:///./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/within.js","webpack:///./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack:///./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack:///./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/index.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack:///./node_modules/@popperjs/core/lib/utils/debounce.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack:///./node_modules/@popperjs/core/lib/createPopper.js","webpack:///./node_modules/@popperjs/core/lib/popper.js","webpack:///./node_modules/@popperjs/core/lib/popper-lite.js","webpack:///./node_modules/@popperjs/core/lib/index.js","webpack:///./node_modules/flowbite-datepicker/dist/main.cjs.js","webpack:///./src/components/accordion/index.ts","webpack:///./src/components/carousel/index.ts","webpack:///./src/components/clipboard/index.ts","webpack:///./src/components/collapse/index.ts","webpack:///./src/components/datepicker/index.ts","webpack:///./src/components/dial/index.ts","webpack:///./src/components/dismiss/index.ts","webpack:///./src/components/drawer/index.ts","webpack:///./src/components/dropdown/index.ts","webpack:///./src/components/index.ts","webpack:///./src/components/input-counter/index.ts","webpack:///./src/components/modal/index.ts","webpack:///./src/components/popover/index.ts","webpack:///./src/components/tabs/index.ts","webpack:///./src/components/tooltip/index.ts","webpack:///./src/dom/events.ts","webpack:///./src/dom/instances.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/index.phoenix.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Flowbite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Flowbite\"] = factory();\n\telse\n\t\troot[\"Flowbite\"] = factory();\n})(self, function() {\nreturn ","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export { default as applyStyles } from \"./applyStyles.js\";\nexport { default as arrow } from \"./arrow.js\";\nexport { default as computeStyles } from \"./computeStyles.js\";\nexport { default as eventListeners } from \"./eventListeners.js\";\nexport { default as flip } from \"./flip.js\";\nexport { default as hide } from \"./hide.js\";\nexport { default as offset } from \"./offset.js\";\nexport { default as popperOffsets } from \"./popperOffsets.js\";\nexport { default as preventOverflow } from \"./preventOverflow.js\";","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nfunction _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nfunction _callSuper(t, o, e) {\n return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));\n}\nfunction _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nfunction _get() {\n return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {\n var p = _superPropBase(e, t);\n if (p) {\n var n = Object.getOwnPropertyDescriptor(p, t);\n return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;\n }\n }, _get.apply(null, arguments);\n}\nfunction _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && _setPrototypeOf(t, e);\n}\nfunction _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function () {\n return !!t;\n })();\n}\nfunction _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return _assertThisInitialized(t);\n}\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nfunction _slicedToArray(r, e) {\n return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _superPropBase(t, o) {\n for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););\n return t;\n}\nfunction _toConsumableArray(r) {\n return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n}\n\nfunction hasProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction lastItemOf(arr) {\n return arr[arr.length - 1];\n}\n\n// push only the items not included in the array\nfunction pushUnique(arr) {\n for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n items[_key - 1] = arguments[_key];\n }\n items.forEach(function (item) {\n if (arr.includes(item)) {\n return;\n }\n arr.push(item);\n });\n return arr;\n}\nfunction stringToArray(str, separator) {\n // convert empty string to an empty array\n return str ? str.split(separator) : [];\n}\nfunction isInRange(testVal, min, max) {\n var minOK = min === undefined || testVal >= min;\n var maxOK = max === undefined || testVal <= max;\n return minOK && maxOK;\n}\nfunction limitToRange(val, min, max) {\n if (val < min) {\n return min;\n }\n if (val > max) {\n return max;\n }\n return val;\n}\nfunction createTagRepeat(tagName, repeat) {\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';\n var openTagSrc = Object.keys(attributes).reduce(function (src, attr) {\n var val = attributes[attr];\n if (typeof val === 'function') {\n val = val(index);\n }\n return \"\".concat(src, \" \").concat(attr, \"=\\\"\").concat(val, \"\\\"\");\n }, tagName);\n html += \"<\".concat(openTagSrc, \">\");\n var next = index + 1;\n return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html;\n}\n\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nfunction optimizeTemplateHTML(html) {\n return html.replace(/>\\s+/g, '>').replace(/\\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var baseDay = new Date(baseDate).getDay();\n return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n}\n\n// Get the ISO week of a date\nfunction getWeek(date) {\n // start of ISO week is Monday\n var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n // 1st week == the week where the 4th of January is in\n var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nfunction startOfYearPeriod(date, years) {\n /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n var year = new Date(date).getFullYear();\n return Math.floor(year / years) * years;\n}\n\n// pattern for format parts\nvar reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nvar reNonDateParts = /[\\s!-/:-@[-`{-~年月日]+/;\n// cache for persed formats\nvar knownFormats = {};\n// parse funtions for date parts\nvar parseFns = {\n y: function y(date, year) {\n return new Date(date).setFullYear(parseInt(year, 10));\n },\n m: function m(date, month, locale) {\n var newDate = new Date(date);\n var monthIndex = parseInt(month, 10) - 1;\n if (isNaN(monthIndex)) {\n if (!month) {\n return NaN;\n }\n var monthName = month.toLowerCase();\n var compareNames = function compareNames(name) {\n return name.toLowerCase().startsWith(monthName);\n };\n // compare with both short and full names because some locales have periods\n // in the short names (not equal to the first X letters of the full names)\n monthIndex = locale.monthsShort.findIndex(compareNames);\n if (monthIndex < 0) {\n monthIndex = locale.months.findIndex(compareNames);\n }\n if (monthIndex < 0) {\n return NaN;\n }\n }\n newDate.setMonth(monthIndex);\n return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime();\n },\n d: function d(date, day) {\n return new Date(date).setDate(parseInt(day, 10));\n }\n};\n// format functions for date parts\nvar formatFns = {\n d: function d(date) {\n return date.getDate();\n },\n dd: function dd(date) {\n return padZero(date.getDate(), 2);\n },\n D: function D(date, locale) {\n return locale.daysShort[date.getDay()];\n },\n DD: function DD(date, locale) {\n return locale.days[date.getDay()];\n },\n m: function m(date) {\n return date.getMonth() + 1;\n },\n mm: function mm(date) {\n return padZero(date.getMonth() + 1, 2);\n },\n M: function M(date, locale) {\n return locale.monthsShort[date.getMonth()];\n },\n MM: function MM(date, locale) {\n return locale.months[date.getMonth()];\n },\n y: function y(date) {\n return date.getFullYear();\n },\n yy: function yy(date) {\n return padZero(date.getFullYear(), 2).slice(-2);\n },\n yyyy: function yyyy(date) {\n return padZero(date.getFullYear(), 4);\n }\n};\n\n// get month index in normal range (0 - 11) from any number\nfunction normalizeMonth(monthIndex) {\n return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n}\nfunction padZero(num, length) {\n return num.toString().padStart(length, '0');\n}\nfunction parseFormatString(format) {\n if (typeof format !== 'string') {\n throw new Error(\"Invalid date format.\");\n }\n if (format in knownFormats) {\n return knownFormats[format];\n }\n\n // sprit the format string into parts and seprators\n var separators = format.split(reFormatTokens);\n var parts = format.match(new RegExp(reFormatTokens, 'g'));\n if (separators.length === 0 || !parts) {\n throw new Error(\"Invalid date format.\");\n }\n\n // collect format functions used in the format\n var partFormatters = parts.map(function (token) {\n return formatFns[token];\n });\n\n // collect parse function keys used in the format\n // iterate over parseFns' keys in order to keep the order of the keys.\n var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) {\n var token = parts.find(function (part) {\n return part[0] !== 'D' && part[0].toLowerCase() === key;\n });\n if (token) {\n keys.push(key);\n }\n return keys;\n }, []);\n return knownFormats[format] = {\n parser: function parser(dateStr, locale) {\n var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) {\n if (part.length > 0 && parts[index]) {\n var token = parts[index][0];\n if (token === 'M') {\n dtParts.m = part;\n } else if (token !== 'D') {\n dtParts[token] = part;\n }\n }\n return dtParts;\n }, {});\n\n // iterate over partParserkeys so that the parsing is made in the oder\n // of year, month and day to prevent the day parser from correcting last\n // day of month wrongly\n return partParserKeys.reduce(function (origDate, key) {\n var newDate = parseFns[key](origDate, dateParts[key], locale);\n // ingnore the part failed to parse\n return isNaN(newDate) ? origDate : newDate;\n }, today());\n },\n formatter: function formatter(date, locale) {\n var dateStr = partFormatters.reduce(function (str, fn, index) {\n return str += \"\".concat(separators[index]).concat(fn(date, locale));\n }, '');\n // separators' length is always parts' length + 1,\n return dateStr += lastItemOf(separators);\n }\n };\n}\nfunction parseDate(dateStr, format, locale) {\n if (dateStr instanceof Date || typeof dateStr === 'number') {\n var date = stripTime(dateStr);\n return isNaN(date) ? undefined : date;\n }\n if (!dateStr) {\n return undefined;\n }\n if (dateStr === 'today') {\n return today();\n }\n if (format && format.toValue) {\n var _date = format.toValue(dateStr, format, locale);\n return isNaN(_date) ? undefined : stripTime(_date);\n }\n return parseFormatString(format).parser(dateStr, locale);\n}\nfunction formatDate(date, format, locale) {\n if (isNaN(date) || !date && date !== 0) {\n return '';\n }\n var dateObj = typeof date === 'number' ? new Date(date) : date;\n if (format.toDisplay) {\n return format.toDisplay(dateObj, format, locale);\n }\n return parseFormatString(format).formatter(dateObj, locale);\n}\n\nvar listenerRegistry = new WeakMap();\nvar _EventTarget$prototyp = EventTarget.prototype,\n addEventListener = _EventTarget$prototyp.addEventListener,\n removeEventListener = _EventTarget$prototyp.removeEventListener;\n\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n// - each definition must be a flat array of event target and the arguments\n// used to call addEventListener() on the target\nfunction registerListeners(keyObj, listeners) {\n var registered = listenerRegistry.get(keyObj);\n if (!registered) {\n registered = [];\n listenerRegistry.set(keyObj, registered);\n }\n listeners.forEach(function (listener) {\n addEventListener.call.apply(addEventListener, _toConsumableArray(listener));\n registered.push(listener);\n });\n}\nfunction unregisterListeners(keyObj) {\n var listeners = listenerRegistry.get(keyObj);\n if (!listeners) {\n return;\n }\n listeners.forEach(function (listener) {\n removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener));\n });\n listenerRegistry[\"delete\"](keyObj);\n}\n\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n var getComposedPath = function getComposedPath(node) {\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n path.push(node);\n var parent;\n if (node.parentNode) {\n parent = node.parentNode;\n } else if (node.host) {\n // ShadowRoot\n parent = node.host;\n } else if (node.defaultView) {\n // Document\n parent = node.defaultView;\n }\n return parent ? getComposedPath(parent, path) : path;\n };\n Event.prototype.composedPath = function () {\n return getComposedPath(this.target);\n };\n}\nfunction findFromPath(path, criteria, currentTarget) {\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var el = path[index];\n if (criteria(el)) {\n return el;\n } else if (el === currentTarget || !el.parentElement) {\n // stop when reaching currentTarget or \n return;\n }\n return findFromPath(path, criteria, currentTarget, index + 1);\n}\n\n// Search for the actual target of a delegated event\nfunction findElementInEventPath(ev, selector) {\n var criteria = typeof selector === 'function' ? selector : function (el) {\n return el.matches(selector);\n };\n return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n\n// default locales\nvar locales = {\n en: {\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n today: \"Today\",\n clear: \"Clear\",\n titleFormat: \"MM y\"\n }\n};\n\n// config options updatable by setOptions() and their default values\nvar defaultOptions = {\n autohide: false,\n beforeShowDay: null,\n beforeShowDecade: null,\n beforeShowMonth: null,\n beforeShowYear: null,\n calendarWeeks: false,\n clearBtn: false,\n dateDelimiter: ',',\n datesDisabled: [],\n daysOfWeekDisabled: [],\n daysOfWeekHighlighted: [],\n defaultViewDate: undefined,\n // placeholder, defaults to today() by the program\n disableTouchKeyboard: false,\n format: 'mm/dd/yyyy',\n language: 'en',\n maxDate: null,\n maxNumberOfDates: 1,\n maxView: 3,\n minDate: null,\n nextArrow: '',\n orientation: 'auto',\n pickLevel: 0,\n prevArrow: '',\n showDaysOfWeek: true,\n showOnClick: true,\n showOnFocus: true,\n startView: 0,\n title: '',\n todayBtn: false,\n todayBtnMode: 0,\n todayHighlight: false,\n updateOnBlur: true,\n weekStart: 0\n};\n\nvar range = document.createRange();\nfunction parseHTML(html) {\n return range.createContextualFragment(html);\n}\nfunction hideElement(el) {\n if (el.style.display === 'none') {\n return;\n }\n // back up the existing display setting in data-style-display\n if (el.style.display) {\n el.dataset.styleDisplay = el.style.display;\n }\n el.style.display = 'none';\n}\nfunction showElement(el) {\n if (el.style.display !== 'none') {\n return;\n }\n if (el.dataset.styleDisplay) {\n // restore backed-up dispay property\n el.style.display = el.dataset.styleDisplay;\n delete el.dataset.styleDisplay;\n } else {\n el.style.display = '';\n }\n}\nfunction emptyChildNodes(el) {\n if (el.firstChild) {\n el.removeChild(el.firstChild);\n emptyChildNodes(el);\n }\n}\nfunction replaceChildNodes(el, newChildNodes) {\n emptyChildNodes(el);\n if (newChildNodes instanceof DocumentFragment) {\n el.appendChild(newChildNodes);\n } else if (typeof newChildNodes === 'string') {\n el.appendChild(parseHTML(newChildNodes));\n } else if (typeof newChildNodes.forEach === 'function') {\n newChildNodes.forEach(function (node) {\n el.appendChild(node);\n });\n }\n}\n\nvar defaultLang = defaultOptions.language,\n defaultFormat = defaultOptions.format,\n defaultWeekStart = defaultOptions.weekStart;\n\n// Reducer function to filter out invalid day-of-week from the input\nfunction sanitizeDOW(dow, day) {\n return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow;\n}\nfunction calcEndOfWeek(startOfWeek) {\n return (startOfWeek + 6) % 7;\n}\n\n// validate input date. if invalid, fallback to the original value\nfunction validateDate(value, format, locale, origValue) {\n var date = parseDate(value, format, locale);\n return date !== undefined ? date : origValue;\n}\n\n// Validate viewId. if invalid, fallback to the original value\nfunction validateViewId(value, origValue) {\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;\n var viewId = parseInt(value, 10);\n return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n\n// Create Datepicker configuration to set\nfunction processOptions(options, datepicker) {\n var inOpts = Object.assign({}, options);\n var config = {};\n var locales = datepicker.constructor.locales;\n var _ref = datepicker.config || {},\n format = _ref.format,\n language = _ref.language,\n locale = _ref.locale,\n maxDate = _ref.maxDate,\n maxView = _ref.maxView,\n minDate = _ref.minDate,\n pickLevel = _ref.pickLevel,\n startView = _ref.startView,\n weekStart = _ref.weekStart;\n if (inOpts.language) {\n var lang;\n if (inOpts.language !== language) {\n if (locales[inOpts.language]) {\n lang = inOpts.language;\n } else {\n // Check if langauge + region tag can fallback to the one without\n // region (e.g. fr-CA → fr)\n lang = inOpts.language.split('-')[0];\n if (locales[lang] === undefined) {\n lang = false;\n }\n }\n }\n delete inOpts.language;\n if (lang) {\n language = config.language = lang;\n\n // update locale as well when updating language\n var origLocale = locale || locales[defaultLang];\n // use default language's properties for the fallback\n locale = Object.assign({\n format: defaultFormat,\n weekStart: defaultWeekStart\n }, locales[defaultLang]);\n if (language !== defaultLang) {\n Object.assign(locale, locales[language]);\n }\n config.locale = locale;\n // if format and/or weekStart are the same as old locale's defaults,\n // update them to new locale's defaults\n if (format === origLocale.format) {\n format = config.format = locale.format;\n }\n if (weekStart === origLocale.weekStart) {\n weekStart = config.weekStart = locale.weekStart;\n config.weekEnd = calcEndOfWeek(locale.weekStart);\n }\n }\n }\n if (inOpts.format) {\n var hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n var hasToValue = typeof inOpts.format.toValue === 'function';\n var validFormatString = reFormatTokens.test(inOpts.format);\n if (hasToDisplay && hasToValue || validFormatString) {\n format = config.format = inOpts.format;\n }\n delete inOpts.format;\n }\n\n //*** dates ***//\n // while min and maxDate for \"no limit\" in the options are better to be null\n // (especially when updating), the ones in the config have to be undefined\n // because null is treated as 0 (= unix epoch) when comparing with time value\n var minDt = minDate;\n var maxDt = maxDate;\n if (inOpts.minDate !== undefined) {\n minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n : validateDate(inOpts.minDate, format, locale, minDt);\n delete inOpts.minDate;\n }\n if (inOpts.maxDate !== undefined) {\n maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt);\n delete inOpts.maxDate;\n }\n if (maxDt < minDt) {\n minDate = config.minDate = maxDt;\n maxDate = config.maxDate = minDt;\n } else {\n if (minDate !== minDt) {\n minDate = config.minDate = minDt;\n }\n if (maxDate !== maxDt) {\n maxDate = config.maxDate = maxDt;\n }\n }\n if (inOpts.datesDisabled) {\n config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) {\n var date = parseDate(dt, format, locale);\n return date !== undefined ? pushUnique(dates, date) : dates;\n }, []);\n delete inOpts.datesDisabled;\n }\n if (inOpts.defaultViewDate !== undefined) {\n var viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n if (viewDate !== undefined) {\n config.defaultViewDate = viewDate;\n }\n delete inOpts.defaultViewDate;\n }\n\n //*** days of week ***//\n if (inOpts.weekStart !== undefined) {\n var wkStart = Number(inOpts.weekStart) % 7;\n if (!isNaN(wkStart)) {\n weekStart = config.weekStart = wkStart;\n config.weekEnd = calcEndOfWeek(wkStart);\n }\n delete inOpts.weekStart;\n }\n if (inOpts.daysOfWeekDisabled) {\n config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekDisabled;\n }\n if (inOpts.daysOfWeekHighlighted) {\n config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekHighlighted;\n }\n\n //*** multi date ***//\n if (inOpts.maxNumberOfDates !== undefined) {\n var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n if (maxNumberOfDates >= 0) {\n config.maxNumberOfDates = maxNumberOfDates;\n config.multidate = maxNumberOfDates !== 1;\n }\n delete inOpts.maxNumberOfDates;\n }\n if (inOpts.dateDelimiter) {\n config.dateDelimiter = String(inOpts.dateDelimiter);\n delete inOpts.dateDelimiter;\n }\n\n //*** pick level & view ***//\n var newPickLevel = pickLevel;\n if (inOpts.pickLevel !== undefined) {\n newPickLevel = validateViewId(inOpts.pickLevel, 2);\n delete inOpts.pickLevel;\n }\n if (newPickLevel !== pickLevel) {\n pickLevel = config.pickLevel = newPickLevel;\n }\n var newMaxView = maxView;\n if (inOpts.maxView !== undefined) {\n newMaxView = validateViewId(inOpts.maxView, maxView);\n delete inOpts.maxView;\n }\n // ensure max view >= pick level\n newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n if (newMaxView !== maxView) {\n maxView = config.maxView = newMaxView;\n }\n var newStartView = startView;\n if (inOpts.startView !== undefined) {\n newStartView = validateViewId(inOpts.startView, newStartView);\n delete inOpts.startView;\n }\n // ensure pick level <= start view <= max view\n if (newStartView < pickLevel) {\n newStartView = pickLevel;\n } else if (newStartView > maxView) {\n newStartView = maxView;\n }\n if (newStartView !== startView) {\n config.startView = newStartView;\n }\n\n //*** template ***//\n if (inOpts.prevArrow) {\n var prevArrow = parseHTML(inOpts.prevArrow);\n if (prevArrow.childNodes.length > 0) {\n config.prevArrow = prevArrow.childNodes;\n }\n delete inOpts.prevArrow;\n }\n if (inOpts.nextArrow) {\n var nextArrow = parseHTML(inOpts.nextArrow);\n if (nextArrow.childNodes.length > 0) {\n config.nextArrow = nextArrow.childNodes;\n }\n delete inOpts.nextArrow;\n }\n\n //*** misc ***//\n if (inOpts.disableTouchKeyboard !== undefined) {\n config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n delete inOpts.disableTouchKeyboard;\n }\n if (inOpts.orientation) {\n var orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n config.orientation = {\n x: orientation.find(function (x) {\n return x === 'left' || x === 'right';\n }) || 'auto',\n y: orientation.find(function (y) {\n return y === 'top' || y === 'bottom';\n }) || 'auto'\n };\n delete inOpts.orientation;\n }\n if (inOpts.todayBtnMode !== undefined) {\n switch (inOpts.todayBtnMode) {\n case 0:\n case 1:\n config.todayBtnMode = inOpts.todayBtnMode;\n }\n delete inOpts.todayBtnMode;\n }\n\n //*** copy the rest ***//\n Object.keys(inOpts).forEach(function (key) {\n if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) {\n config[key] = inOpts[key];\n }\n });\n return config;\n}\n\nvar pickerTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n \\n
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \");\n\nvar daysTemplate = optimizeTemplateHTML(\"
    \\n
    \".concat(createTagRepeat('span', 7, {\n \"class\": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \").concat(createTagRepeat('span', 42, {\n \"class\": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'\n}), \"
    \\n
    \"));\n\nvar calendarWeeksTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \".concat(createTagRepeat('span', 6, {\n \"class\": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \"));\n\n// Base class of the view classes\nvar View = /*#__PURE__*/function () {\n function View(picker, config) {\n _classCallCheck(this, View);\n Object.assign(this, config, {\n picker: picker,\n element: parseHTML(\"
    \").firstChild,\n selected: []\n });\n this.init(this.picker.datepicker.config);\n }\n return _createClass(View, [{\n key: \"init\",\n value: function init(options) {\n if (options.pickLevel !== undefined) {\n this.isMinView = this.id === options.pickLevel;\n }\n this.setOptions(options);\n this.updateFocus();\n this.updateSelection();\n }\n\n // Execute beforeShow() callback and apply the result to the element\n // args:\n // - current - current value on the iteration on view rendering\n // - timeValue - time value of the date to pass to beforeShow()\n }, {\n key: \"performBeforeHook\",\n value: function performBeforeHook(el, current, timeValue) {\n var result = this.beforeShow(new Date(timeValue));\n switch (_typeof(result)) {\n case 'boolean':\n result = {\n enabled: result\n };\n break;\n case 'string':\n result = {\n classes: result\n };\n }\n if (result) {\n if (result.enabled === false) {\n el.classList.add('disabled');\n pushUnique(this.disabled, current);\n }\n if (result.classes) {\n var _el$classList;\n var extraClasses = result.classes.split(/\\s+/);\n (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses));\n if (extraClasses.includes('disabled')) {\n pushUnique(this.disabled, current);\n }\n }\n if (result.content) {\n replaceChildNodes(el, result.content);\n }\n }\n }\n }]);\n}();\n\nvar DaysView = /*#__PURE__*/function (_View) {\n function DaysView(picker) {\n _classCallCheck(this, DaysView);\n return _callSuper(this, DaysView, [picker, {\n id: 0,\n name: 'days',\n cellClass: 'day'\n }]);\n }\n _inherits(DaysView, _View);\n return _createClass(DaysView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n var inner = parseHTML(daysTemplate).firstChild;\n this.dow = inner.firstChild;\n this.grid = inner.lastChild;\n this.element.appendChild(inner);\n }\n _get(_getPrototypeOf(DaysView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var _this = this;\n var updateDOW;\n if (hasProperty(options, 'minDate')) {\n this.minDate = options.minDate;\n }\n if (hasProperty(options, 'maxDate')) {\n this.maxDate = options.maxDate;\n }\n if (options.datesDisabled) {\n this.datesDisabled = options.datesDisabled;\n }\n if (options.daysOfWeekDisabled) {\n this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n updateDOW = true;\n }\n if (options.daysOfWeekHighlighted) {\n this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n }\n if (options.todayHighlight !== undefined) {\n this.todayHighlight = options.todayHighlight;\n }\n if (options.weekStart !== undefined) {\n this.weekStart = options.weekStart;\n this.weekEnd = options.weekEnd;\n updateDOW = true;\n }\n if (options.locale) {\n var locale = this.locale = options.locale;\n this.dayNames = locale.daysMin;\n this.switchLabelFormat = locale.titleFormat;\n updateDOW = true;\n }\n if (options.beforeShowDay !== undefined) {\n this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined;\n }\n if (options.calendarWeeks !== undefined) {\n if (options.calendarWeeks && !this.calendarWeeks) {\n var weeksElem = parseHTML(calendarWeeksTemplate).firstChild;\n this.calendarWeeks = {\n element: weeksElem,\n dow: weeksElem.firstChild,\n weeks: weeksElem.lastChild\n };\n this.element.insertBefore(weeksElem, this.element.firstChild);\n } else if (this.calendarWeeks && !options.calendarWeeks) {\n this.element.removeChild(this.calendarWeeks.element);\n this.calendarWeeks = null;\n }\n }\n if (options.showDaysOfWeek !== undefined) {\n if (options.showDaysOfWeek) {\n showElement(this.dow);\n if (this.calendarWeeks) {\n showElement(this.calendarWeeks.dow);\n }\n } else {\n hideElement(this.dow);\n if (this.calendarWeeks) {\n hideElement(this.calendarWeeks.dow);\n }\n }\n }\n\n // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n if (updateDOW) {\n Array.from(this.dow.children).forEach(function (el, index) {\n var dow = (_this.weekStart + index) % 7;\n el.textContent = _this.dayNames[dow];\n el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n });\n }\n }\n\n // Apply update on the focused date to view's settings\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var viewYear = viewDate.getFullYear();\n var viewMonth = viewDate.getMonth();\n var firstOfMonth = dateValue(viewYear, viewMonth, 1);\n var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n this.first = firstOfMonth;\n this.last = dateValue(viewYear, viewMonth + 1, 0);\n this.start = start;\n this.focused = this.picker.viewDate;\n }\n\n // Apply update on the selected dates to view's settings\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates;\n if (rangepicker) {\n this.range = rangepicker.dates;\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // update today marker on ever render\n this.today = this.todayHighlight ? today() : undefined;\n // refresh disabled dates on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = _toConsumableArray(this.datesDisabled);\n var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale);\n this.picker.setViewSwitchLabel(switchLabel);\n this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n if (this.calendarWeeks) {\n // start of the UTC week (Monday) of the 1st of the month\n var startOfWeek = dayOfTheWeekOf(this.first, 1, 1);\n Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) {\n el.textContent = getWeek(addWeeks(startOfWeek, index));\n });\n }\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = addDays(_this2.start, index);\n var date = new Date(current);\n var day = date.getDay();\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n el.dataset.date = current;\n el.textContent = date.getDate();\n if (current < _this2.first) {\n classList.add('prev', 'text-gray-500', 'dark:text-white');\n } else if (current > _this2.last) {\n classList.add('next', 'text-gray-500', 'dark:text-white');\n }\n if (_this2.today === current) {\n classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n }\n if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n }\n if (_this2.daysOfWeekDisabled.includes(day)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n pushUnique(_this2.disabled, current);\n }\n if (_this2.daysOfWeekHighlighted.includes(day)) {\n classList.add('highlighted');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg', 'rounded-r-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg', 'rounded-l-lg');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, current);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused');\n el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.dataset.date);\n var classList = el.classList;\n classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg');\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / 86400000);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction computeMonthRange(range, thisYear) {\n if (!range || !range[0] || !range[1]) {\n return;\n }\n var _range = _slicedToArray(range, 2),\n _range$ = _slicedToArray(_range[0], 2),\n startY = _range$[0],\n startM = _range$[1],\n _range$2 = _slicedToArray(_range[1], 2),\n endY = _range$2[0],\n endM = _range$2[1];\n if (startY > thisYear || endY < thisYear) {\n return;\n }\n return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12];\n}\nvar MonthsView = /*#__PURE__*/function (_View) {\n function MonthsView(picker) {\n _classCallCheck(this, MonthsView);\n return _callSuper(this, MonthsView, [picker, {\n id: 1,\n name: 'months',\n cellClass: 'month'\n }]);\n }\n _inherits(MonthsView, _View);\n return _createClass(MonthsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.grid = this.element;\n this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {\n 'data-month': function dataMonth(ix) {\n return ix;\n }\n })));\n }\n _get(_getPrototypeOf(MonthsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options.locale) {\n this.monthNames = options.locale.monthsShort;\n }\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minMonth = this.minDate = undefined;\n } else {\n var minDateObj = new Date(options.minDate);\n this.minYear = minDateObj.getFullYear();\n this.minMonth = minDateObj.getMonth();\n this.minDate = minDateObj.setDate(1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxMonth = this.maxDate = undefined;\n } else {\n var maxDateObj = new Date(options.maxDate);\n this.maxYear = maxDateObj.getFullYear();\n this.maxMonth = maxDateObj.getMonth();\n this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n }\n }\n if (options.beforeShowMonth !== undefined) {\n this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n this.year = viewDate.getFullYear();\n this.focused = viewDate.getMonth();\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (selected, timeValue) {\n var date = new Date(timeValue);\n var year = date.getFullYear();\n var month = date.getMonth();\n if (selected[year] === undefined) {\n selected[year] = [month];\n } else {\n pushUnique(selected[year], month);\n }\n return selected;\n }, {});\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n var date = new Date(timeValue);\n return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n // refresh disabled months on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(this.year);\n this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n var selected = this.selected[this.year] || [];\n var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n var isMinYear = this.year === this.minYear;\n var isMaxYear = this.year === this.maxYear;\n var range = computeMonthRange(this.range, this.year);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var date = dateValue(_this.year, index, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this.cellClass);\n if (_this.isMinView) {\n el.dataset.date = date;\n }\n // reset text on every render to clear the custom content set\n // by beforeShow hook at previous render\n el.textContent = _this.monthNames[index];\n if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) {\n classList.add('disabled');\n }\n if (range) {\n var _range2 = _slicedToArray(range, 2),\n rangeStart = _range2[0],\n rangeEnd = _range2[1];\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this.focused) {\n classList.add('focused');\n }\n if (_this.beforeShow) {\n _this.performBeforeHook(el, index, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this2 = this;\n var selected = this.selected[this.year] || [];\n var _ref = computeMonthRange(this.range, this.year) || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused');\n el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n });\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this2.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[this.focused].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction toTitleCase(word) {\n return _toConsumableArray(word).reduce(function (str, ch, ix) {\n return str += ix ? ch : ch.toUpperCase();\n }, '');\n}\n\n// Class representing the years and decades view elements\nvar YearsView = /*#__PURE__*/function (_View) {\n function YearsView(picker, config) {\n _classCallCheck(this, YearsView);\n return _callSuper(this, YearsView, [picker, config]);\n }\n _inherits(YearsView, _View);\n return _createClass(YearsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.navStep = this.step * 10;\n this.beforeShowOption = \"beforeShow\".concat(toTitleCase(this.cellClass));\n this.grid = this.element;\n this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n }\n _get(_getPrototypeOf(YearsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minDate = undefined;\n } else {\n this.minYear = startOfYearPeriod(options.minDate, this.step);\n this.minDate = dateValue(this.minYear, 0, 1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxDate = undefined;\n } else {\n this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n this.maxDate = dateValue(this.maxYear, 11, 31);\n }\n }\n if (options[this.beforeShowOption] !== undefined) {\n var beforeShow = options[this.beforeShowOption];\n this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var first = startOfYearPeriod(viewDate, this.navStep);\n var last = first + 9 * this.step;\n this.first = first;\n this.last = last;\n this.start = first - this.step;\n this.focused = startOfYearPeriod(viewDate, this.step);\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this = this;\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (years, timeValue) {\n return pushUnique(years, startOfYearPeriod(timeValue, _this.step));\n }, []);\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n if (timeValue !== undefined) {\n return startOfYearPeriod(timeValue, _this.step);\n }\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // refresh disabled years on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(\"\".concat(this.first, \"-\").concat(this.last));\n this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = _this2.start + index * _this2.step;\n var date = dateValue(current, 0, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n if (_this2.isMinView) {\n el.dataset.date = date;\n }\n el.textContent = el.dataset.year = current;\n if (index === 0) {\n classList.add('prev');\n } else if (index === 11) {\n classList.add('next');\n }\n if (current < _this2.minYear || current > _this2.maxYear) {\n classList.add('disabled');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.textContent);\n var classList = el.classList;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / this.step);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction triggerDatepickerEvent(datepicker, type) {\n var detail = {\n date: datepicker.getDate(),\n viewDate: new Date(datepicker.picker.viewDate),\n viewId: datepicker.picker.currentView.id,\n datepicker: datepicker\n };\n datepicker.element.dispatchEvent(new CustomEvent(type, {\n detail: detail\n }));\n}\n\n// direction: -1 (to previous), 1 (to next)\nfunction goToPrevOrNext(datepicker, direction) {\n var _datepicker$config = datepicker.config,\n minDate = _datepicker$config.minDate,\n maxDate = _datepicker$config.maxDate;\n var _datepicker$picker = datepicker.picker,\n currentView = _datepicker$picker.currentView,\n viewDate = _datepicker$picker.viewDate;\n var newViewDate;\n switch (currentView.id) {\n case 0:\n newViewDate = addMonths(viewDate, direction);\n break;\n case 1:\n newViewDate = addYears(viewDate, direction);\n break;\n default:\n newViewDate = addYears(viewDate, direction * currentView.navStep);\n }\n newViewDate = limitToRange(newViewDate, minDate, maxDate);\n datepicker.picker.changeFocus(newViewDate).render();\n}\nfunction switchView(datepicker) {\n var viewId = datepicker.picker.currentView.id;\n if (viewId === datepicker.config.maxView) {\n return;\n }\n datepicker.picker.changeView(viewId + 1).render();\n}\nfunction unfocus(datepicker) {\n if (datepicker.config.updateOnBlur) {\n datepicker.update({\n autohide: true\n });\n } else {\n datepicker.refresh('input');\n datepicker.hide();\n }\n}\n\nfunction goToSelectedMonthOrYear(datepicker, selection) {\n var picker = datepicker.picker;\n var viewDate = new Date(picker.viewDate);\n var viewId = picker.currentView.id;\n var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear());\n picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\nfunction onClickTodayBtn(datepicker) {\n var picker = datepicker.picker;\n var currentDate = today();\n if (datepicker.config.todayBtnMode === 1) {\n if (datepicker.config.autohide) {\n datepicker.setDate(currentDate);\n return;\n }\n datepicker.setDate(currentDate, {\n render: false\n });\n picker.update();\n }\n if (picker.viewDate !== currentDate) {\n picker.changeFocus(currentDate);\n }\n picker.changeView(0).render();\n}\nfunction onClickClearBtn(datepicker) {\n datepicker.setDate({\n clear: true\n });\n}\nfunction onClickViewSwitch(datepicker) {\n switchView(datepicker);\n}\nfunction onClickPrevBtn(datepicker) {\n goToPrevOrNext(datepicker, -1);\n}\nfunction onClickNextBtn(datepicker) {\n goToPrevOrNext(datepicker, 1);\n}\n\n// For the picker's main block to delegete the events from `datepicker-cell`s\nfunction onClickView(datepicker, ev) {\n var target = findElementInEventPath(ev, '.datepicker-cell');\n if (!target || target.classList.contains('disabled')) {\n return;\n }\n var _datepicker$picker$cu = datepicker.picker.currentView,\n id = _datepicker$picker$cu.id,\n isMinView = _datepicker$picker$cu.isMinView;\n if (isMinView) {\n datepicker.setDate(Number(target.dataset.date));\n } else if (id === 1) {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n } else {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n }\n}\nfunction onClickPicker(datepicker) {\n if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.focus();\n }\n}\n\nfunction processPickerOptions(picker, options) {\n if (options.title !== undefined) {\n if (options.title) {\n picker.controls.title.textContent = options.title;\n showElement(picker.controls.title);\n } else {\n picker.controls.title.textContent = '';\n hideElement(picker.controls.title);\n }\n }\n if (options.prevArrow) {\n var prevBtn = picker.controls.prevBtn;\n emptyChildNodes(prevBtn);\n options.prevArrow.forEach(function (node) {\n prevBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.nextArrow) {\n var nextBtn = picker.controls.nextBtn;\n emptyChildNodes(nextBtn);\n options.nextArrow.forEach(function (node) {\n nextBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.locale) {\n picker.controls.todayBtn.textContent = options.locale.today;\n picker.controls.clearBtn.textContent = options.locale.clear;\n }\n if (options.todayBtn !== undefined) {\n if (options.todayBtn) {\n showElement(picker.controls.todayBtn);\n } else {\n hideElement(picker.controls.todayBtn);\n }\n }\n if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) {\n var _picker$datepicker$co = picker.datepicker.config,\n minDate = _picker$datepicker$co.minDate,\n maxDate = _picker$datepicker$co.maxDate;\n picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate);\n }\n if (options.clearBtn !== undefined) {\n if (options.clearBtn) {\n showElement(picker.controls.clearBtn);\n } else {\n hideElement(picker.controls.clearBtn);\n }\n }\n}\n\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction computeResetViewDate(datepicker) {\n var dates = datepicker.dates,\n config = datepicker.config;\n var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate;\n return limitToRange(viewDate, config.minDate, config.maxDate);\n}\n\n// Change current view's view date\nfunction setViewDate(picker, newDate) {\n var oldViewDate = new Date(picker.viewDate);\n var newViewDate = new Date(newDate);\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n year = _picker$currentView.year,\n first = _picker$currentView.first,\n last = _picker$currentView.last;\n var viewYear = newViewDate.getFullYear();\n picker.viewDate = newDate;\n if (viewYear !== oldViewDate.getFullYear()) {\n triggerDatepickerEvent(picker.datepicker, 'changeYear');\n }\n if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n }\n\n // return whether the new date is in different period on time from the one\n // displayed in the current view\n // when true, the view needs to be re-rendered on the next UI refresh.\n switch (id) {\n case 0:\n return newDate < first || newDate > last;\n case 1:\n return viewYear !== year;\n default:\n return viewYear < first || viewYear > last;\n }\n}\nfunction getTextDirection(el) {\n return window.getComputedStyle(el).direction;\n}\n\n// Class representing the picker UI\nvar Picker = /*#__PURE__*/function () {\n function Picker(datepicker) {\n _classCallCheck(this, Picker);\n this.datepicker = datepicker;\n var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n var element = this.element = parseHTML(template).firstChild;\n var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3),\n header = _element$firstChild$c[0],\n main = _element$firstChild$c[1],\n footer = _element$firstChild$c[2];\n var title = header.firstElementChild;\n var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3),\n prevBtn = _header$lastElementCh[0],\n viewSwitch = _header$lastElementCh[1],\n nextBtn = _header$lastElementCh[2];\n var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2),\n todayBtn = _footer$firstChild$ch[0],\n clearBtn = _footer$firstChild$ch[1];\n var controls = {\n title: title,\n prevBtn: prevBtn,\n viewSwitch: viewSwitch,\n nextBtn: nextBtn,\n todayBtn: todayBtn,\n clearBtn: clearBtn\n };\n this.main = main;\n this.controls = controls;\n var elementClass = datepicker.inline ? 'inline' : 'dropdown';\n element.classList.add(\"datepicker-\".concat(elementClass));\n elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null;\n processPickerOptions(this, datepicker.config);\n this.viewDate = computeResetViewDate(datepicker);\n\n // set up event listeners\n registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), {\n capture: true\n }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]);\n\n // set up views\n this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {\n id: 2,\n name: 'years',\n cellClass: 'year',\n step: 1\n }), new YearsView(this, {\n id: 3,\n name: 'decades',\n cellClass: 'decade',\n step: 10\n })];\n this.currentView = this.views[datepicker.config.startView];\n this.currentView.render();\n this.main.appendChild(this.currentView.element);\n datepicker.config.container.appendChild(this.element);\n }\n return _createClass(Picker, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n processPickerOptions(this, options);\n this.views.forEach(function (view) {\n view.init(options, false);\n });\n this.currentView.render();\n }\n }, {\n key: \"detach\",\n value: function detach() {\n this.datepicker.config.container.removeChild(this.element);\n }\n }, {\n key: \"show\",\n value: function show() {\n if (this.active) {\n return;\n }\n this.element.classList.add('active', 'block');\n this.element.classList.remove('hidden');\n this.active = true;\n var datepicker = this.datepicker;\n if (!datepicker.inline) {\n // ensure picker's direction matches input's\n var inputDirection = getTextDirection(datepicker.inputField);\n if (inputDirection !== getTextDirection(datepicker.config.container)) {\n this.element.dir = inputDirection;\n } else if (this.element.dir) {\n this.element.removeAttribute('dir');\n }\n this.place();\n if (datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.blur();\n }\n }\n triggerDatepickerEvent(datepicker, 'show');\n }\n }, {\n key: \"hide\",\n value: function hide() {\n if (!this.active) {\n return;\n }\n this.datepicker.exitEditMode();\n this.element.classList.remove('active', 'block');\n this.element.classList.add('active', 'block', 'hidden');\n this.active = false;\n triggerDatepickerEvent(this.datepicker, 'hide');\n }\n }, {\n key: \"place\",\n value: function place() {\n var _this$element = this.element,\n classList = _this$element.classList,\n style = _this$element.style;\n var _this$datepicker = this.datepicker,\n config = _this$datepicker.config,\n inputField = _this$datepicker.inputField;\n var container = config.container;\n var _this$element$getBoun = this.element.getBoundingClientRect(),\n calendarWidth = _this$element$getBoun.width,\n calendarHeight = _this$element$getBoun.height;\n var _container$getBoundin = container.getBoundingClientRect(),\n containerLeft = _container$getBoundin.left,\n containerTop = _container$getBoundin.top,\n containerWidth = _container$getBoundin.width;\n var _inputField$getBoundi = inputField.getBoundingClientRect(),\n inputLeft = _inputField$getBoundi.left,\n inputTop = _inputField$getBoundi.top,\n inputWidth = _inputField$getBoundi.width,\n inputHeight = _inputField$getBoundi.height;\n var _config$orientation = config.orientation,\n orientX = _config$orientation.x,\n orientY = _config$orientation.y;\n var scrollTop;\n var left;\n var top;\n if (container === document.body) {\n scrollTop = window.scrollY;\n left = inputLeft + window.scrollX;\n top = inputTop + scrollTop;\n } else {\n scrollTop = container.scrollTop;\n left = inputLeft - containerLeft;\n top = inputTop - containerTop + scrollTop;\n }\n if (orientX === 'auto') {\n if (left < 0) {\n // align to the left and move into visible area if input's left edge < window's\n orientX = 'left';\n left = 10;\n } else if (left + calendarWidth > containerWidth) {\n // align to the right if canlendar's right edge > container's\n orientX = 'right';\n } else {\n orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n }\n }\n if (orientX === 'right') {\n left -= calendarWidth - inputWidth;\n }\n if (orientY === 'auto') {\n orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n }\n if (orientY === 'top') {\n top -= calendarHeight;\n } else {\n top += inputHeight;\n }\n classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left');\n classList.add(\"datepicker-orient-\".concat(orientY), \"datepicker-orient-\".concat(orientX));\n style.top = top ? \"\".concat(top, \"px\") : top;\n style.left = left ? \"\".concat(left, \"px\") : left;\n }\n }, {\n key: \"setViewSwitchLabel\",\n value: function setViewSwitchLabel(labelText) {\n this.controls.viewSwitch.textContent = labelText;\n }\n }, {\n key: \"setPrevBtnDisabled\",\n value: function setPrevBtnDisabled(disabled) {\n this.controls.prevBtn.disabled = disabled;\n }\n }, {\n key: \"setNextBtnDisabled\",\n value: function setNextBtnDisabled(disabled) {\n this.controls.nextBtn.disabled = disabled;\n }\n }, {\n key: \"changeView\",\n value: function changeView(viewId) {\n var oldView = this.currentView;\n var newView = this.views[viewId];\n if (newView.id !== oldView.id) {\n this.currentView = newView;\n this._renderMethod = 'render';\n triggerDatepickerEvent(this.datepicker, 'changeView');\n this.main.replaceChild(newView.element, oldView.element);\n }\n return this;\n }\n\n // Change the focused date (view date)\n }, {\n key: \"changeFocus\",\n value: function changeFocus(newViewDate) {\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n this.views.forEach(function (view) {\n view.updateFocus();\n });\n return this;\n }\n\n // Apply the change of the selected dates\n }, {\n key: \"update\",\n value: function update() {\n var newViewDate = computeResetViewDate(this.datepicker);\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n this.views.forEach(function (view) {\n view.updateFocus();\n view.updateSelection();\n });\n return this;\n }\n\n // Refresh the picker UI\n }, {\n key: \"render\",\n value: function render() {\n var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var renderMethod = quickRender && this._renderMethod || 'render';\n delete this._renderMethod;\n this.currentView[renderMethod]();\n }\n }]);\n}();\n\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n// - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n// - args: time value; retun: true if unavailable\nfunction findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n if (!isInRange(date, min, max)) {\n return;\n }\n if (testFn(date)) {\n var newDate = addFn(date, increase);\n return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n }\n return date;\n}\n\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction moveByArrowKey(datepicker, ev, direction, vertical) {\n var picker = datepicker.picker;\n var currentView = picker.currentView;\n var step = currentView.step || 1;\n var viewDate = picker.viewDate;\n var addFn;\n var testFn;\n switch (currentView.id) {\n case 0:\n if (vertical) {\n viewDate = addDays(viewDate, direction * 7);\n } else if (ev.ctrlKey || ev.metaKey) {\n viewDate = addYears(viewDate, direction);\n } else {\n viewDate = addDays(viewDate, direction);\n }\n addFn = addDays;\n testFn = function testFn(date) {\n return currentView.disabled.includes(date);\n };\n break;\n case 1:\n viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n addFn = addMonths;\n testFn = function testFn(date) {\n var dt = new Date(date);\n var year = currentView.year,\n disabled = currentView.disabled;\n return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n };\n break;\n default:\n viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n addFn = addYears;\n testFn = function testFn(date) {\n return currentView.disabled.includes(startOfYearPeriod(date, step));\n };\n }\n viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate);\n if (viewDate !== undefined) {\n picker.changeFocus(viewDate).render();\n }\n}\nfunction onKeydown(datepicker, ev) {\n if (ev.key === 'Tab') {\n unfocus(datepicker);\n return;\n }\n var picker = datepicker.picker;\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n isMinView = _picker$currentView.isMinView;\n if (!picker.active) {\n switch (ev.key) {\n case 'ArrowDown':\n case 'Escape':\n picker.show();\n break;\n case 'Enter':\n datepicker.update();\n break;\n default:\n return;\n }\n } else if (datepicker.editMode) {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'Enter':\n datepicker.exitEditMode({\n update: true,\n autohide: datepicker.config.autohide\n });\n break;\n default:\n return;\n }\n } else {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'ArrowLeft':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, -1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, false);\n }\n break;\n case 'ArrowRight':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, 1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, 1, false);\n }\n break;\n case 'ArrowUp':\n if (ev.ctrlKey || ev.metaKey) {\n switchView(datepicker);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, true);\n }\n break;\n case 'ArrowDown':\n if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n return;\n }\n moveByArrowKey(datepicker, ev, 1, true);\n break;\n case 'Enter':\n if (isMinView) {\n datepicker.setDate(picker.viewDate);\n } else {\n picker.changeView(id - 1).render();\n }\n break;\n case 'Backspace':\n case 'Delete':\n datepicker.enterEditMode();\n return;\n default:\n if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n }\n return;\n }\n }\n ev.preventDefault();\n ev.stopPropagation();\n}\nfunction onFocus(datepicker) {\n if (datepicker.config.showOnFocus && !datepicker._showing) {\n datepicker.show();\n }\n}\n\n// for the prevention for entering edit mode while getting focus on click\nfunction onMousedown(datepicker, ev) {\n var el = ev.target;\n if (datepicker.picker.active || datepicker.config.showOnClick) {\n el._active = el === document.activeElement;\n el._clicking = setTimeout(function () {\n delete el._active;\n delete el._clicking;\n }, 2000);\n }\n}\nfunction onClickInput(datepicker, ev) {\n var el = ev.target;\n if (!el._clicking) {\n return;\n }\n clearTimeout(el._clicking);\n delete el._clicking;\n if (el._active) {\n datepicker.enterEditMode();\n }\n delete el._active;\n if (datepicker.config.showOnClick) {\n datepicker.show();\n }\n}\nfunction onPaste(datepicker, ev) {\n if (ev.clipboardData.types.includes('text/plain')) {\n datepicker.enterEditMode();\n }\n}\n\n// for the `document` to delegate the events from outside the picker/input field\nfunction onClickOutside(datepicker, ev) {\n var element = datepicker.element;\n if (element !== document.activeElement) {\n return;\n }\n var pickerElem = datepicker.picker.element;\n if (findElementInEventPath(ev, function (el) {\n return el === element || el === pickerElem;\n })) {\n return;\n }\n unfocus(datepicker);\n}\n\nfunction stringifyDates(dates, config) {\n return dates.map(function (dt) {\n return formatDate(dt, config.format, config.locale);\n }).join(config.dateDelimiter);\n}\n\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction processInputDates(datepicker, inputDates) {\n var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var config = datepicker.config,\n origDates = datepicker.dates,\n rangepicker = datepicker.rangepicker;\n if (inputDates.length === 0) {\n // empty input is considered valid unless origiDates is passed\n return clear ? [] : undefined;\n }\n var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n var newDates = inputDates.reduce(function (dates, dt) {\n var date = parseDate(dt, config.format, config.locale);\n if (date === undefined) {\n return dates;\n }\n if (config.pickLevel > 0) {\n // adjust to 1st of the month/Jan 1st of the year\n // or to the last day of the monh/Dec 31st of the year if the datepicker\n // is the range-end picker of a rangepicker\n var _dt = new Date(date);\n if (config.pickLevel === 1) {\n date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1);\n } else {\n date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1);\n }\n }\n if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) {\n dates.push(date);\n }\n return dates;\n }, []);\n if (newDates.length === 0) {\n return;\n }\n if (config.multidate && !clear) {\n // get the synmetric difference between origDates and newDates\n newDates = newDates.reduce(function (dates, date) {\n if (!origDates.includes(date)) {\n dates.push(date);\n }\n return dates;\n }, origDates.filter(function (date) {\n return !newDates.includes(date);\n }));\n }\n // do length check always because user can input multiple dates regardless of the mode\n return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates;\n}\n\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction refreshUI(datepicker) {\n var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var config = datepicker.config,\n picker = datepicker.picker,\n inputField = datepicker.inputField;\n if (mode & 2) {\n var newView = picker.active ? config.pickLevel : config.startView;\n picker.update().changeView(newView).render(quickRender);\n }\n if (mode & 1 && inputField) {\n inputField.value = stringifyDates(datepicker.dates, config);\n }\n}\nfunction _setDate(datepicker, inputDates, options) {\n var clear = options.clear,\n render = options.render,\n autohide = options.autohide;\n if (render === undefined) {\n render = true;\n }\n if (!render) {\n autohide = false;\n } else if (autohide === undefined) {\n autohide = datepicker.config.autohide;\n }\n var newDates = processInputDates(datepicker, inputDates, clear);\n if (!newDates) {\n return;\n }\n if (newDates.toString() !== datepicker.dates.toString()) {\n datepicker.dates = newDates;\n refreshUI(datepicker, render ? 3 : 1);\n triggerDatepickerEvent(datepicker, 'changeDate');\n } else {\n refreshUI(datepicker, 1);\n }\n if (autohide) {\n datepicker.hide();\n }\n}\n\n/**\n * Class representing a date picker\n */\nvar Datepicker = /*#__PURE__*/function () {\n /**\n * Create a date picker\n * @param {Element} element - element to bind a date picker\n * @param {Object} [options] - config options\n * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the\n * date picker belongs to. Use this only when creating date picker as a part\n * of date range picker\n */\n function Datepicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n _classCallCheck(this, Datepicker);\n element.datepicker = this;\n this.element = element;\n\n // set up config\n var config = this.config = Object.assign({\n buttonClass: options.buttonClass && String(options.buttonClass) || 'button',\n container: document.body,\n defaultViewDate: today(),\n maxDate: undefined,\n minDate: undefined\n }, processOptions(defaultOptions, this));\n this._options = options;\n Object.assign(config, processOptions(options, this));\n\n // configure by type\n var inline = this.inline = element.tagName !== 'INPUT';\n var inputField;\n var initialDates;\n if (inline) {\n config.container = element;\n initialDates = stringToArray(element.dataset.date, config.dateDelimiter);\n delete element.dataset.date;\n } else {\n var container = options.container ? document.querySelector(options.container) : null;\n if (container) {\n config.container = container;\n }\n inputField = this.inputField = element;\n inputField.classList.add('datepicker-input');\n initialDates = stringToArray(inputField.value, config.dateDelimiter);\n }\n if (rangepicker) {\n // check validiry\n var index = rangepicker.inputs.indexOf(inputField);\n var datepickers = rangepicker.datepickers;\n if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n throw Error('Invalid rangepicker object.');\n }\n // attach itaelf to the rangepicker here so that processInputDates() can\n // determine if this is the range-end picker of the rangepicker while\n // setting inital values when pickLevel > 0\n datepickers[index] = this;\n // add getter for rangepicker\n Object.defineProperty(this, 'rangepicker', {\n get: function get() {\n return rangepicker;\n }\n });\n }\n\n // set initial dates\n this.dates = [];\n // process initial value\n var inputDateValues = processInputDates(this, initialDates);\n if (inputDateValues && inputDateValues.length > 0) {\n this.dates = inputDateValues;\n }\n if (inputField) {\n inputField.value = stringifyDates(this.dates, config);\n }\n var picker = this.picker = new Picker(this);\n if (inline) {\n this.show();\n } else {\n // set up event listeners in other modes\n var onMousedownDocument = onClickOutside.bind(null, this);\n var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]];\n registerListeners(this, listeners);\n }\n }\n\n /**\n * Format Date object or time value in given format and language\n * @param {Date|Number} date - date or time value to format\n * @param {String|Object} format - format string or object that contains\n * toDisplay() custom formatter, whose signature is\n * - args:\n * - date: {Date} - Date instance of the date passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {String} formatted date\n * @param {String} [lang=en] - language code for the locale to use\n * @return {String} formatted date\n */\n return _createClass(Datepicker, [{\n key: \"active\",\n get:\n /**\n * @type {Boolean} - Whether the picker element is shown. `true` whne shown\n */\n function get() {\n return !!(this.picker && this.picker.active);\n }\n\n /**\n * @type {HTMLDivElement} - DOM object of picker element\n */\n }, {\n key: \"pickerElement\",\n get: function get() {\n return this.picker ? this.picker.element : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var picker = this.picker;\n var newOptions = processOptions(options, this);\n Object.assign(this._options, options);\n Object.assign(this.config, newOptions);\n picker.setOptions(newOptions);\n refreshUI(this, 3);\n }\n\n /**\n * Show the picker element\n */\n }, {\n key: \"show\",\n value: function show() {\n if (this.inputField) {\n if (this.inputField.disabled) {\n return;\n }\n if (this.inputField !== document.activeElement) {\n this._showing = true;\n this.inputField.focus();\n delete this._showing;\n }\n }\n this.picker.show();\n }\n\n /**\n * Hide the picker element\n * Not available on inline picker\n */\n }, {\n key: \"hide\",\n value: function hide() {\n if (this.inline) {\n return;\n }\n this.picker.hide();\n this.picker.update().changeView(this.config.startView).render();\n }\n\n /**\n * Destroy the Datepicker instance\n * @return {Detepicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hide();\n unregisterListeners(this);\n this.picker.detach();\n if (!this.inline) {\n this.inputField.classList.remove('datepicker-input');\n }\n delete this.element.datepicker;\n return this;\n }\n\n /**\n * Get the selected date(s)\n *\n * The method returns a Date object of selected date by default, and returns\n * an array of selected dates in multidate mode. If format string is passed,\n * it returns date string(s) formatted in given format.\n *\n * @param {String} [format] - Format string to stringify the date(s)\n * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\n * selected, empty array in multidate mode and untitled in sigledate mode\n */\n }, {\n key: \"getDate\",\n value: function getDate() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.config.locale);\n } : function (date) {\n return new Date(date);\n };\n if (this.config.multidate) {\n return this.dates.map(callback);\n }\n if (this.dates.length > 0) {\n return callback(this.dates[0]);\n }\n }\n\n /**\n * Set selected date(s)\n *\n * In multidate mode, you can pass multiple dates as a series of arguments\n * or an array. (Since each date is parsed individually, the type of the\n * dates doesn't have to be the same.)\n * The given dates are used to toggle the select status of each date. The\n * number of selected dates is kept from exceeding the length set to\n * maxNumberOfDates.\n *\n * With clear: true option, the method can be used to clear the selection\n * and to replace the selection instead of toggling in multidate mode.\n * If the option is passed with no date arguments or an empty dates array,\n * it works as \"clear\" (clear the selection then set nothing), and if the\n * option is passed with new dates to select, it works as \"replace\" (clear\n * the selection then set the given dates)\n *\n * When render: false option is used, the method omits re-rendering the\n * picker element. In this case, you need to call refresh() method later in\n * order for the picker element to reflect the changes. The input field is\n * refreshed always regardless of this option.\n *\n * When invalid (unparsable, repeated, disabled or out-of-range) dates are\n * passed, the method ignores them and applies only valid ones. In the case\n * that all the given dates are invalid, which is distinguished from passing\n * no dates, the method considers it as an error and leaves the selection\n * untouched.\n *\n * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\n * objects, time values or mix of those for new selection\n * @param {Object} [options] - function options\n * - clear: {boolean} - Whether to clear the existing selection\n * defualt: false\n * - render: {boolean} - Whether to re-render the picker element\n * default: true\n * - autohide: {boolean} - Whether to hide the picker element after re-render\n * Ignored when used with render: false\n * default: config.autohide\n */\n }, {\n key: \"setDate\",\n value: function setDate() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var dates = [].concat(args);\n var opts = {};\n var lastArg = lastItemOf(args);\n if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) {\n Object.assign(opts, dates.pop());\n }\n var inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Update the selected date(s) with input field's value\n * Not available on inline picker\n *\n * The input field will be refreshed with properly formatted date string.\n *\n * @param {Object} [options] - function options\n * - autohide: {boolean} - whether to hide the picker element after refresh\n * default: false\n */\n }, {\n key: \"update\",\n value: function update() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline) {\n return;\n }\n var opts = {\n clear: true,\n autohide: !!(options && options.autohide)\n };\n var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Refresh the picker element and the associated input field\n * @param {String} [target] - target item when refreshing one item only\n * 'picker' or 'input'\n * @param {Boolean} [forceRender] - whether to re-render the picker element\n * regardless of its state instead of optimized refresh\n */\n }, {\n key: \"refresh\",\n value: function refresh() {\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (target && typeof target !== 'string') {\n forceRender = target;\n target = undefined;\n }\n var mode;\n if (target === 'picker') {\n mode = 2;\n } else if (target === 'input') {\n mode = 1;\n } else {\n mode = 3;\n }\n refreshUI(this, mode, !forceRender);\n }\n\n /**\n * Enter edit mode\n * Not available on inline picker or when the picker element is hidden\n */\n }, {\n key: \"enterEditMode\",\n value: function enterEditMode() {\n if (this.inline || !this.picker.active || this.editMode) {\n return;\n }\n this.editMode = true;\n this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700');\n }\n\n /**\n * Exit from edit mode\n * Not available on inline picker\n * @param {Object} [options] - function options\n * - update: {boolean} - whether to call update() after exiting\n * If false, input field is revert to the existing selection\n * default: false\n */\n }, {\n key: \"exitEditMode\",\n value: function exitEditMode() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline || !this.editMode) {\n return;\n }\n var opts = Object.assign({\n update: false\n }, options);\n delete this.editMode;\n this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700');\n if (opts.update) {\n this.update(opts);\n }\n }\n }], [{\n key: \"formatDate\",\n value: function formatDate$1(date, format, lang) {\n return formatDate(date, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * Parse date string\n * @param {String|Date|Number} dateStr - date string, Date object or time\n * value to parse\n * @param {String|Object} format - format string or object that contains\n * toValue() custom parser, whose signature is\n * - args:\n * - dateStr: {String|Date|Number} - the dateStr passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {Date|Number} parsed date or its time value\n * @param {String} [lang=en] - language code for the locale to use\n * @return {Number} time value of parsed date\n */\n }, {\n key: \"parseDate\",\n value: function parseDate$1(dateStr, format, lang) {\n return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * @type {Object} - Installed locales in `[languageCode]: localeObject` format\n * en`:_English (US)_ is pre-installed.\n */\n }, {\n key: \"locales\",\n get: function get() {\n return locales;\n }\n }]);\n}();\n\n// filter out the config options inapproprite to pass to Datepicker\nfunction filterOptions(options) {\n var newOpts = Object.assign({}, options);\n delete newOpts.inputs;\n delete newOpts.allowOneSidedRange;\n delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n\n return newOpts;\n}\nfunction setupDatepicker(rangepicker, changeDateListener, el, options) {\n registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]);\n new Datepicker(el, options, rangepicker);\n}\nfunction onChangeDate(rangepicker, ev) {\n // to prevent both datepickers trigger the other side's update each other\n if (rangepicker._updating) {\n return;\n }\n rangepicker._updating = true;\n var target = ev.target;\n if (target.datepicker === undefined) {\n return;\n }\n var datepickers = rangepicker.datepickers;\n var setDateOptions = {\n render: false\n };\n var changedSide = rangepicker.inputs.indexOf(target);\n var otherSide = changedSide === 0 ? 1 : 0;\n var changedDate = datepickers[changedSide].dates[0];\n var otherDate = datepickers[otherSide].dates[0];\n if (changedDate !== undefined && otherDate !== undefined) {\n // if the start of the range > the end, swap them\n if (changedSide === 0 && changedDate > otherDate) {\n datepickers[0].setDate(otherDate, setDateOptions);\n datepickers[1].setDate(changedDate, setDateOptions);\n } else if (changedSide === 1 && changedDate < otherDate) {\n datepickers[0].setDate(changedDate, setDateOptions);\n datepickers[1].setDate(otherDate, setDateOptions);\n }\n } else if (!rangepicker.allowOneSidedRange) {\n // to prevent the range from becoming one-sided, copy changed side's\n // selection (no matter if it's empty) to the other side\n if (changedDate !== undefined || otherDate !== undefined) {\n setDateOptions.clear = true;\n datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n }\n }\n datepickers[0].picker.update().render();\n datepickers[1].picker.update().render();\n delete rangepicker._updating;\n}\n\n/**\n * Class representing a date range picker\n */\nvar DateRangePicker = /*#__PURE__*/function () {\n /**\n * Create a date range picker\n * @param {Element} element - element to bind a date range picker\n * @param {Object} [options] - config options\n */\n function DateRangePicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, DateRangePicker);\n var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input'));\n if (inputs.length < 2) {\n return;\n }\n element.rangepicker = this;\n this.element = element;\n this.inputs = inputs.slice(0, 2);\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var changeDateListener = onChangeDate.bind(null, this);\n var cleanOptions = filterOptions(options);\n // in order for initial date setup to work right when pcicLvel > 0,\n // let Datepicker constructor add the instance to the rangepicker\n var datepickers = [];\n Object.defineProperty(this, 'datepickers', {\n get: function get() {\n return datepickers;\n }\n });\n setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n Object.freeze(datepickers);\n // normalize the range if inital dates are given\n if (datepickers[0].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n } else if (datepickers[1].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n }\n }\n\n /**\n * @type {Array} - selected date of the linked date pickers\n */\n return _createClass(DateRangePicker, [{\n key: \"dates\",\n get: function get() {\n return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var cleanOptions = filterOptions(options);\n this.datepickers[0].setOptions(cleanOptions);\n this.datepickers[1].setOptions(cleanOptions);\n }\n\n /**\n * Destroy the DateRangePicker instance\n * @return {DateRangePicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.datepickers[0].destroy();\n this.datepickers[1].destroy();\n unregisterListeners(this);\n delete this.element.rangepicker;\n }\n\n /**\n * Get the start and end dates of the date range\n *\n * The method returns Date objects by default. If format string is passed,\n * it returns date strings formatted in given format.\n * The result array always contains 2 items (start date/end date) and\n * undefined is used for unselected side. (e.g. If none is selected,\n * the result will be [undefined, undefined]. If only the end date is set\n * when allowOneSidedRange config option is true, [undefined, endDate] will\n * be returned.)\n *\n * @param {String} [format] - Format string to stringify the dates\n * @return {Array} - Start and end dates\n */\n }, {\n key: \"getDates\",\n value: function getDates() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.datepickers[0].config.locale);\n } : function (date) {\n return new Date(date);\n };\n return this.dates.map(function (date) {\n return date === undefined ? date : callback(date);\n });\n }\n\n /**\n * Set the start and end dates of the date range\n *\n * The method calls datepicker.setDate() internally using each of the\n * arguments in start→end order.\n *\n * When a clear: true option object is passed instead of a date, the method\n * clears the date.\n *\n * If an invalid date, the same date as the current one or an option object\n * without clear: true is passed, the method considers that argument as an\n * \"ineffective\" argument because calling datepicker.setDate() with those\n * values makes no changes to the date selection.\n *\n * When the allowOneSidedRange config option is false, passing {clear: true}\n * to clear the range works only when it is done to the last effective\n * argument (in other words, passed to rangeEnd or to rangeStart along with\n * ineffective rangeEnd). This is because when the date range is changed,\n * it gets normalized based on the last change at the end of the changing\n * process.\n *\n * @param {Date|Number|String|Object} rangeStart - Start date of the range\n * or {clear: true} to clear the date\n * @param {Date|Number|String|Object} rangeEnd - End date of the range\n * or {clear: true} to clear the date\n */\n }, {\n key: \"setDates\",\n value: function setDates(rangeStart, rangeEnd) {\n var _this$datepickers = _slicedToArray(this.datepickers, 2),\n datepicker0 = _this$datepickers[0],\n datepicker1 = _this$datepickers[1];\n var origDates = this.dates;\n\n // If range normalization runs on every change, we can't set a new range\n // that starts after the end of the current range correctly because the\n // normalization process swaps start↔︎end right after setting the new start\n // date. To prevent this, the normalization process needs to run once after\n // both of the new dates are set.\n this._updating = true;\n datepicker0.setDate(rangeStart);\n datepicker1.setDate(rangeEnd);\n delete this._updating;\n if (datepicker1.dates[0] !== origDates[1]) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n } else if (datepicker0.dates[0] !== origDates[0]) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n }\n }\n }]);\n}();\n\nexports.DateRangePicker = DateRangePicker;\nexports.Datepicker = Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { AccordionInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Accordion implements AccordionInterface {\n _instanceId: string;\n _accordionEl: HTMLElement;\n _items: AccordionItem[];\n _options: AccordionOptions;\n _clickHandler: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n accordionEl: HTMLElement | null = null,\n items: AccordionItem[] = [],\n options: AccordionOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : accordionEl.id;\n this._accordionEl = accordionEl;\n this._items = items;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Accordion',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // show accordion item based on click\n this._items.forEach((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n const clickHandler = () => {\n this.toggle(item.id);\n };\n\n item.triggerEl.addEventListener('click', clickHandler);\n\n // Store the clickHandler in a property of the item for removal later\n item.clickHandler = clickHandler;\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._items.length && this._initialized) {\n this._items.forEach((item) => {\n item.triggerEl.removeEventListener('click', item.clickHandler);\n\n // Clean up by deleting the clickHandler property from the item\n delete item.clickHandler;\n });\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Accordion', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.add('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n\n updateOnOpen(callback: () => void) {\n this._options.onOpen = callback;\n }\n\n updateOnClose(callback: () => void) {\n this._options.onClose = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion($accordionEl as HTMLElement, items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CarouselInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Carousel implements CarouselInterface {\n _instanceId: string;\n _carouselEl: HTMLElement;\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n _initialized: boolean;\n\n constructor(\n carouselEl: HTMLElement | null = null,\n items: CarouselItem[] = [],\n options: CarouselOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : carouselEl.id;\n this._carouselEl = carouselEl;\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Carousel',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n /**\n * initialize carousel and items based on active one\n */\n init() {\n if (this._items.length && !this._initialized) {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this.getActiveItem()) {\n this.slideTo(this.getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Carousel', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this.getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this.getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // Handling the case when there is only one item\n if (this._items.length === 1) {\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n return;\n }\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-30');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-30'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-20');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n\n updateOnNext(callback: () => void) {\n this._options.onNext = callback;\n }\n\n updateOnPrev(callback: () => void) {\n this._options.onPrev = callback;\n }\n\n updateOnChange(callback: () => void) {\n this._options.onChange = callback;\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel($carouselEl as HTMLElement, items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CopyClipboardOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CopyClipboardInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CopyClipboardOptions = {\n htmlEntities: false,\n contentType: 'input',\n onCopy: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass CopyClipboard implements CopyClipboardInterface {\n _instanceId: string;\n _triggerEl: HTMLElement | null;\n _targetEl: HTMLInputElement | null;\n _options: CopyClipboardOptions;\n _initialized: boolean;\n _triggerElClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLInputElement | null = null,\n options: CopyClipboardOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'CopyClipboard',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && this._triggerEl && !this._initialized) {\n this._triggerElClickHandler = () => {\n this.copy();\n };\n\n // clicking on the trigger element should copy the value of the target element\n if (this._triggerEl) {\n this._triggerEl.addEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._targetEl && this._initialized) {\n if (this._triggerEl) {\n this._triggerEl.removeEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('CopyClipboard', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getTargetValue() {\n if (this._options.contentType === 'input') {\n return this._targetEl.value;\n }\n\n if (this._options.contentType === 'innerHTML') {\n return this._targetEl.innerHTML;\n }\n\n if (this._options.contentType === 'textContent') {\n return this._targetEl.textContent.replace(/\\s+/g, ' ').trim();\n }\n }\n\n copy() {\n let textToCopy = this.getTargetValue();\n\n // Check if HTMLEntities option is enabled\n if (this._options.htmlEntities) {\n // Encode the text using HTML entities\n textToCopy = this.decodeHTML(textToCopy);\n }\n\n // Create a temporary textarea element\n const tempTextArea = document.createElement('textarea');\n tempTextArea.value = textToCopy;\n document.body.appendChild(tempTextArea);\n\n // Select the text inside the textarea and copy it to the clipboard\n tempTextArea.select();\n document.execCommand('copy');\n\n // Remove the temporary textarea\n document.body.removeChild(tempTextArea);\n\n // Callback function\n this._options.onCopy(this);\n\n return textToCopy;\n }\n\n // Function to encode text into HTML entities\n decodeHTML(html: string) {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = html;\n return textarea.textContent;\n }\n\n updateOnCopyCallback(callback: () => void) {\n this._options.onCopy = callback;\n }\n}\n\nexport function initCopyClipboards() {\n document\n .querySelectorAll('[data-copy-to-clipboard-target]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-target'\n );\n const $targetEl = document.getElementById(targetId);\n const contentType = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-content-type'\n );\n const htmlEntities = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-html-entities'\n );\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'CopyClipboard',\n $targetEl.getAttribute('id')\n )\n ) {\n new CopyClipboard(\n $triggerEl as HTMLElement,\n $targetEl as HTMLInputElement,\n {\n htmlEntities:\n htmlEntities && htmlEntities === 'true'\n ? true\n : Default.htmlEntities,\n contentType: contentType\n ? contentType\n : Default.contentType,\n } as CopyClipboardOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-copy-to-clipboard-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.CopyClipboard = CopyClipboard;\n window.initClipboards = initCopyClipboards;\n}\n\nexport default CopyClipboard;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CollapseInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Collapse implements CollapseInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Collapse',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Collapse', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n\n updateOnCollapse(callback: () => void) {\n this._options.onCollapse = callback;\n }\n\n updateOnExpand(callback: () => void) {\n this._options.onExpand = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'Collapse',\n $targetEl.getAttribute('id')\n )\n ) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n // if instance exists already for the same target element then create a new one with a different trigger element\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement,\n {},\n {\n id:\n $targetEl.getAttribute('id') +\n '_' +\n instances._generateRandomId(),\n }\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DatepickerOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DatepickerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nimport {\n Datepicker as FlowbiteDatepicker,\n DateRangePicker as FlowbiteDateRangePicker,\n} from 'flowbite-datepicker';\n\nconst Default: DatepickerOptions = {\n defaultDatepickerId: null,\n autohide: false,\n format: 'mm/dd/yyyy',\n maxDate: null,\n minDate: null,\n orientation: 'bottom',\n buttons: false,\n autoSelectToday: 0,\n title: null,\n language: 'en',\n rangePicker: false,\n onShow: () => {},\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Datepicker implements DatepickerInterface {\n _instanceId: string;\n _datepickerEl: HTMLElement;\n _datepickerInstance: FlowbiteDatepicker | FlowbiteDateRangePicker | null;\n _options: DatepickerOptions;\n _initialized: boolean;\n\n constructor(\n datepickerEl: HTMLElement | null = null,\n options: DatepickerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : datepickerEl.id;\n this._datepickerEl = datepickerEl;\n this._datepickerInstance = null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Datepicker',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._datepickerEl && !this._initialized) {\n if (this._options.rangePicker) {\n this._datepickerInstance = new FlowbiteDateRangePicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n } else {\n this._datepickerInstance = new FlowbiteDatepicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n this._datepickerInstance.destroy();\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Datepicker', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getDatepickerInstance() {\n return this._datepickerInstance;\n }\n\n getDate() {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.getDates();\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.getDate();\n }\n }\n\n setDate(date: any) {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.setDates(date);\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.setDate(date);\n }\n }\n\n show() {\n this._datepickerInstance.show();\n this._options.onShow(this);\n }\n\n hide() {\n this._datepickerInstance.hide();\n this._options.onHide(this);\n }\n\n _getDatepickerOptions(options: DatepickerOptions) {\n const datepickerOptions = {} as any;\n\n if (options.buttons) {\n datepickerOptions.todayBtn = true;\n datepickerOptions.clearBtn = true;\n\n if (options.autoSelectToday) {\n datepickerOptions.todayBtnMode = 1;\n }\n }\n\n if (options.autohide) {\n datepickerOptions.autohide = true;\n }\n\n if (options.format) {\n datepickerOptions.format = options.format;\n }\n\n if (options.maxDate) {\n datepickerOptions.maxDate = options.maxDate;\n }\n\n if (options.minDate) {\n datepickerOptions.minDate = options.minDate;\n }\n\n if (options.orientation) {\n datepickerOptions.orientation = options.orientation;\n }\n\n if (options.title) {\n datepickerOptions.title = options.title;\n }\n\n if (options.language) {\n datepickerOptions.language = options.language;\n }\n\n return datepickerOptions;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDatepickers() {\n document\n .querySelectorAll(\n '[datepicker], [inline-datepicker], [date-rangepicker]'\n )\n .forEach(($datepickerEl) => {\n if ($datepickerEl) {\n const buttons =\n $datepickerEl.hasAttribute('datepicker-buttons');\n const autoselectToday = $datepickerEl.hasAttribute(\n 'datepicker-autoselect-today'\n );\n const autohide = $datepickerEl.hasAttribute(\n 'datepicker-autohide'\n );\n const format = $datepickerEl.getAttribute('datepicker-format');\n const maxDate = $datepickerEl.getAttribute(\n 'datepicker-max-date'\n );\n const minDate = $datepickerEl.getAttribute(\n 'datepicker-min-date'\n );\n const orientation = $datepickerEl.getAttribute(\n 'datepicker-orientation'\n );\n const title = $datepickerEl.getAttribute('datepicker-title');\n const language = $datepickerEl.getAttribute(\n 'datepicker-language'\n );\n const rangePicker =\n $datepickerEl.hasAttribute('date-rangepicker');\n new Datepicker(\n $datepickerEl as HTMLElement,\n {\n buttons: buttons ? buttons : Default.buttons,\n autoSelectToday: autoselectToday\n ? autoselectToday\n : Default.autoSelectToday,\n autohide: autohide ? autohide : Default.autohide,\n format: format ? format : Default.format,\n maxDate: maxDate ? maxDate : Default.maxDate,\n minDate: minDate ? minDate : Default.minDate,\n orientation: orientation\n ? orientation\n : Default.orientation,\n title: title ? title : Default.title,\n language: language ? language : Default.language,\n rangePicker: rangePicker\n ? rangePicker\n : Default.rangePicker,\n } as DatepickerOptions\n );\n } else {\n console.error(\n `The datepicker element does not exist. Please check the datepicker attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Datepicker = Datepicker;\n window.initDatepickers = initDatepickers;\n}\n\nexport default Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DialInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dial implements DialInterface {\n _instanceId: string;\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n _initialized: boolean;\n _showEventHandler: EventListenerOrEventListenerObject;\n _hideEventHandler: EventListenerOrEventListenerObject;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dial',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n this._showEventHandler = () => {\n this.show();\n };\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, this._showEventHandler);\n this._targetEl.addEventListener(ev, this._showEventHandler);\n });\n\n this._hideEventHandler = () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n };\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, this._hideEventHandler);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.removeEventListener(ev, this._showEventHandler);\n this._targetEl.removeEventListener(ev, this._showEventHandler);\n });\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.removeEventListener(ev, this._hideEventHandler);\n });\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dial', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DismissInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dismiss implements DismissInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dismiss',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._clickHandler = () => {\n this.hide();\n };\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dismiss', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerOptions, PlacementClasses } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { DrawerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Drawer implements DrawerInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n _eventListenerInstances: EventListenerInstance[] = [];\n _handleEscapeKey: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Drawer',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n // set initial accessibility attributes\n if (this._targetEl && !this._initialized) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n this._handleEscapeKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n };\n\n // add keyboard event listener to document\n document.addEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n\n // Remove the keyboard event listener\n document.removeEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Drawer', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (\n this._visible &&\n document.querySelector('[drawer-backdrop]') !== null\n ) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDrawers() {\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge ? (edge === 'true' ? true : false) : Default.edge,\n edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset,\n } as DrawerOptions);\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const toggleDrawer = () => {\n drawer.toggle();\n };\n $triggerEl.addEventListener('click', toggleDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const hideDrawer = () => {\n drawer.hide();\n };\n $triggerEl.addEventListener('click', hideDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const showDrawer = () => {\n drawer.show();\n };\n $triggerEl.addEventListener('click', showDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DropdownInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dropdown implements DropdownInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _initialized: boolean;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _hoverShowTriggerElHandler: EventListenerOrEventListenerObject;\n _hoverShowTargetElHandler: EventListenerOrEventListenerObject;\n _hoverHideHandler: EventListenerOrEventListenerObject;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetElement.id;\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dropdown',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._popperInstance = this._createPopperInstance();\n this._setupEventListeners();\n this._initialized = true;\n }\n }\n\n destroy() {\n const triggerEvents = this._getTriggerEvents();\n\n // Remove click event listeners for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._clickHandler);\n });\n }\n\n // Remove hover event listeners for trigger and target elements\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.removeEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hoverHideHandler);\n this._targetEl.removeEventListener(ev, this._hoverHideHandler);\n });\n }\n\n this._popperInstance.destroy();\n this._initialized = false;\n }\n\n removeInstance() {\n instances.removeInstance('Dropdown', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._clickHandler);\n });\n }\n\n this._hoverShowTriggerElHandler = (ev) => {\n if (ev.type === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n };\n this._hoverShowTargetElHandler = () => {\n this.show();\n };\n\n this._hoverHideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n };\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.addEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hoverHideHandler);\n this._targetEl.addEventListener(ev, this._hoverHideHandler);\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n this._targetEl.removeAttribute('aria-hidden');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n this._targetEl.setAttribute('aria-hidden', 'true');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCopyClipboards } from './clipboard';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initInputCounters } from './input-counter';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\nimport { initDatepickers } from './datepicker';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n initInputCounters();\n initCopyClipboards();\n initDatepickers();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { InputCounterOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { InputCounterInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: InputCounterOptions = {\n minValue: null,\n maxValue: null,\n onIncrement: () => {},\n onDecrement: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass InputCounter implements InputCounterInterface {\n _instanceId: string;\n _targetEl: HTMLInputElement | null;\n _incrementEl: HTMLElement | null;\n _decrementEl: HTMLElement | null;\n _options: InputCounterOptions;\n _initialized: boolean;\n _incrementClickHandler: EventListenerOrEventListenerObject;\n _decrementClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLInputElement | null = null,\n incrementEl: HTMLElement | null = null,\n decrementEl: HTMLElement | null = null,\n options: InputCounterOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._targetEl = targetEl;\n this._incrementEl = incrementEl;\n this._decrementEl = decrementEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'InputCounter',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._inputHandler = (event) => {\n {\n const target = event.target as HTMLInputElement;\n\n // check if the value is numeric\n if (!/^\\d*$/.test(target.value)) {\n // Regex to check if the value is numeric\n target.value = target.value.replace(/[^\\d]/g, ''); // Remove non-numeric characters\n }\n\n // check for max value\n if (\n this._options.maxValue !== null &&\n parseInt(target.value) > this._options.maxValue\n ) {\n target.value = this._options.maxValue.toString();\n }\n\n // check for min value\n if (\n this._options.minValue !== null &&\n parseInt(target.value) < this._options.minValue\n ) {\n target.value = this._options.minValue.toString();\n }\n }\n };\n\n this._incrementClickHandler = () => {\n this.increment();\n };\n\n this._decrementClickHandler = () => {\n this.decrement();\n };\n\n // Add event listener to restrict input to numeric values only\n this._targetEl.addEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.addEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n\n if (this._decrementEl) {\n this._decrementEl.addEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._targetEl && this._initialized) {\n this._targetEl.removeEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.removeEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n if (this._decrementEl) {\n this._decrementEl.removeEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('InputCounter', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getCurrentValue() {\n return parseInt(this._targetEl.value) || 0;\n }\n\n increment() {\n // don't increment if the value is already at the maximum value\n if (\n this._options.maxValue !== null &&\n this.getCurrentValue() >= this._options.maxValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() + 1).toString();\n this._options.onIncrement(this);\n }\n\n decrement() {\n // don't decrement if the value is already at the minimum value\n if (\n this._options.minValue !== null &&\n this.getCurrentValue() <= this._options.minValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() - 1).toString();\n this._options.onDecrement(this);\n }\n\n updateOnIncrement(callback: () => void) {\n this._options.onIncrement = callback;\n }\n\n updateOnDecrement(callback: () => void) {\n this._options.onDecrement = callback;\n }\n}\n\nexport function initInputCounters() {\n document.querySelectorAll('[data-input-counter]').forEach(($targetEl) => {\n const targetId = $targetEl.id;\n\n const $incrementEl = document.querySelector(\n '[data-input-counter-increment=\"' + targetId + '\"]'\n );\n\n const $decrementEl = document.querySelector(\n '[data-input-counter-decrement=\"' + targetId + '\"]'\n );\n\n const minValue = $targetEl.getAttribute('data-input-counter-min');\n const maxValue = $targetEl.getAttribute('data-input-counter-max');\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'InputCounter',\n $targetEl.getAttribute('id')\n )\n ) {\n new InputCounter(\n $targetEl as HTMLInputElement,\n $incrementEl ? ($incrementEl as HTMLElement) : null,\n $decrementEl ? ($decrementEl as HTMLElement) : null,\n {\n minValue: minValue ? parseInt(minValue) : null,\n maxValue: maxValue ? parseInt(maxValue) : null,\n } as InputCounterOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-input-counter attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.InputCounter = InputCounter;\n window.initInputCounters = initInputCounters;\n}\n\nexport default InputCounter;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalOptions } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { ModalInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Modal implements ModalInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _eventListenerInstances: EventListenerInstance[] = [];\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Modal',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Modal', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden && this._backdropEl) {\n this._backdropEl.remove();\n this._backdropEl = null;\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initModals() {\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n );\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // toggle modal visibility\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const toggleModal = () => {\n modal.toggle();\n };\n $triggerEl.addEventListener('click', toggleModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const showModal = () => {\n modal.show();\n };\n $triggerEl.addEventListener('click', showModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const hideModal = () => {\n modal.hide();\n };\n $triggerEl.addEventListener('click', hideModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { PopoverInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Popover implements PopoverInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Popover',\n this,\n instanceOptions.id ? instanceOptions.id : this._targetEl.id,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element and target element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n this._targetEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n this._targetEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Popover', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n this._targetEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n this._targetEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TabsInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tabs implements TabsInterface {\n _instanceId: string;\n _tabsEl: HTMLElement;\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n _initialized: boolean;\n\n constructor(\n tabsEl: HTMLElement | null = null,\n items: TabItem[] = [],\n options: TabsOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id;\n this._tabsEl = tabsEl;\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tabs',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this.setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', (event) => {\n event.preventDefault();\n this.show(tab.id);\n });\n });\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Tabs', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this.setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($parentEl) => {\n const tabItems: TabItem[] = [];\n const activeClasses = $parentEl.getAttribute(\n 'data-tabs-active-classes'\n );\n const inactiveClasses = $parentEl.getAttribute(\n 'data-tabs-inactive-classes'\n );\n let defaultTabId = null;\n $parentEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n\n new Tabs($parentEl as HTMLElement, tabItems, {\n defaultTabId: defaultTabId,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TooltipInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tooltip implements TooltipInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tooltip',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Tooltip', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n this.hide();\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","import { AccordionInterface } from '../components/accordion/interface';\nimport { CarouselInterface } from '../components/carousel/interface';\nimport { CollapseInterface } from '../components/collapse/interface';\nimport { DialInterface } from '../components/dial/interface';\nimport { DismissInterface } from '../components/dismiss/interface';\nimport { DrawerInterface } from '../components/drawer/interface';\nimport { DropdownInterface } from '../components/dropdown/interface';\nimport { ModalInterface } from '../components/modal/interface';\nimport { PopoverInterface } from '../components/popover/interface';\nimport { TabsInterface } from '../components/tabs/interface';\nimport { TooltipInterface } from '../components/tooltip/interface';\nimport { InputCounterInterface } from '../components/input-counter/interface';\nimport { CopyClipboardInterface } from '../components/clipboard/interface';\nimport { DatepickerInterface } from '../components/datepicker/interface';\n\nclass Instances {\n private _instances: {\n Accordion: { [id: string]: AccordionInterface };\n Carousel: { [id: string]: CarouselInterface };\n Collapse: { [id: string]: CollapseInterface };\n Dial: { [id: string]: DialInterface };\n Dismiss: { [id: string]: DismissInterface };\n Drawer: { [id: string]: DrawerInterface };\n Dropdown: { [id: string]: DropdownInterface };\n Modal: { [id: string]: ModalInterface };\n Popover: { [id: string]: PopoverInterface };\n Tabs: { [id: string]: TabsInterface };\n Tooltip: { [id: string]: TooltipInterface };\n InputCounter: { [id: string]: InputCounterInterface };\n CopyClipboard: { [id: string]: CopyClipboardInterface };\n Datepicker: { [id: string]: DatepickerInterface };\n };\n\n constructor() {\n this._instances = {\n Accordion: {},\n Carousel: {},\n Collapse: {},\n Dial: {},\n Dismiss: {},\n Drawer: {},\n Dropdown: {},\n Modal: {},\n Popover: {},\n Tabs: {},\n Tooltip: {},\n InputCounter: {},\n CopyClipboard: {},\n Datepicker: {},\n };\n }\n\n addInstance(\n component: keyof Instances['_instances'],\n instance: any,\n id?: string,\n override = false\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (this._instances[component][id] && !override) {\n console.warn(`Flowbite: Instance with ID ${id} already exists.`);\n return;\n }\n\n if (override && this._instances[component][id]) {\n this._instances[component][id].destroyAndRemoveInstance();\n }\n\n this._instances[component][id ? id : this._generateRandomId()] =\n instance;\n }\n\n getAllInstances() {\n return this._instances;\n }\n\n getInstances(component: keyof Instances['_instances']) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n return this._instances[component];\n }\n\n getInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return;\n }\n return this._instances[component][id] as any;\n }\n\n destroyAndRemoveInstance(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this.destroyInstanceObject(component, id);\n this.removeInstance(component, id);\n }\n\n removeInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n delete this._instances[component][id];\n }\n\n destroyInstanceObject(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this._instances[component][id].destroy();\n }\n\n instanceExists(component: keyof Instances['_instances'], id: string) {\n if (!this._instances[component]) {\n return false;\n }\n\n if (!this._instances[component][id]) {\n return false;\n }\n\n return true;\n }\n\n _generateRandomId() {\n return Math.random().toString(36).substr(2, 9);\n }\n\n private _componentAndInstanceCheck(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return false;\n }\n\n return true;\n }\n}\n\nconst instances = new Instances();\n\nexport default instances;\n\nif (typeof window !== 'undefined') {\n window.FlowbiteInstances = instances;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// core components\nimport Accordion, { initAccordions } from './components/accordion';\nimport Carousel, { initCarousels } from './components/carousel';\nimport Collapse, { initCollapses } from './components/collapse';\nimport Dial, { initDials } from './components/dial';\nimport Dismiss, { initDismisses } from './components/dismiss';\nimport Drawer, { initDrawers } from './components/drawer';\nimport Dropdown, { initDropdowns } from './components/dropdown';\nimport Modal, { initModals } from './components/modal';\nimport Popover, { initPopovers } from './components/popover';\nimport Tabs, { initTabs } from './components/tabs';\nimport Tooltip, { initTooltips } from './components/tooltip';\nimport InputCounter, { initInputCounters } from './components/input-counter';\nimport CopyClipboard, { initCopyClipboards } from './components/clipboard';\nimport Datepicker, { initDatepickers } from './components/datepicker';\nimport './components/index';\nimport Events from './dom/events';\n\nconst liveViewLoadEvents = new Events('phx:page-loading-stop', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n initInputCounters,\n initCopyClipboards,\n initDatepickers,\n]);\nliveViewLoadEvents.init();\n\nconst regularViewLoadEvents = new Events('load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n initInputCounters,\n initCopyClipboards,\n initDatepickers,\n]);\nregularViewLoadEvents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n InputCounter,\n CopyClipboard,\n Datepicker,\n Events,\n};\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.phoenix.min.js b/node_modules/flowbite/dist/flowbite.phoenix.min.js new file mode 100644 index 0000000..050eb2d --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.phoenix.min.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Flowbite",[],e):"object"==typeof exports?exports.Flowbite=e():t.Flowbite=e()}(self,(function(){return function(){"use strict";var t={853:function(t,e,i){i.r(e),i.d(e,{afterMain:function(){return k},afterRead:function(){return b},afterWrite:function(){return D},applyStyles:function(){return T},arrow:function(){return Q},auto:function(){return s},basePlacements:function(){return d},beforeMain:function(){return _},beforeRead:function(){return y},beforeWrite:function(){return E},bottom:function(){return r},clippingParents:function(){return u},computeStyles:function(){return it},createPopper:function(){return Tt},createPopperBase:function(){return St},createPopperLite:function(){return Mt},detectOverflow:function(){return mt},end:function(){return l},eventListeners:function(){return rt},flip:function(){return bt},hide:function(){return kt},left:function(){return a},main:function(){return w},modifierPhases:function(){return O},offset:function(){return Et},placements:function(){return v},popper:function(){return p},popperGenerator:function(){return Ct},popperOffsets:function(){return xt},preventOverflow:function(){return Dt},read:function(){return m},reference:function(){return f},right:function(){return o},start:function(){return c},top:function(){return n},variationPlacements:function(){return g},viewport:function(){return h},write:function(){return x}});var n="top",r="bottom",o="right",a="left",s="auto",d=[n,r,o,a],c="start",l="end",u="clippingParents",h="viewport",p="popper",f="reference",g=d.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+l])}),[]),v=[].concat(d,[s]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+l])}),[]),y="beforeRead",m="read",b="afterRead",_="beforeMain",w="main",k="afterMain",E="beforeWrite",x="write",D="afterWrite",O=[y,m,b,_,w,k,E,x,D];function L(t){return t?(t.nodeName||"").toLowerCase():null}function I(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function A(t){return t instanceof I(t).Element||t instanceof Element}function C(t){return t instanceof I(t).HTMLElement||t instanceof HTMLElement}function S(t){return"undefined"!=typeof ShadowRoot&&(t instanceof I(t).ShadowRoot||t instanceof ShadowRoot)}var T={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];C(r)&&L(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});C(n)&&L(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function M(t){return t.split("-")[0]}var H=Math.max,P=Math.min,j=Math.round;function V(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function B(){return!/^((?!chrome|android).)*safari/i.test(V())}function z(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),r=1,o=1;e&&C(t)&&(r=t.offsetWidth>0&&j(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&j(n.height)/t.offsetHeight||1);var a=(A(t)?I(t):window).visualViewport,s=!B()&&i,d=(n.left+(s&&a?a.offsetLeft:0))/r,c=(n.top+(s&&a?a.offsetTop:0))/o,l=n.width/r,u=n.height/o;return{width:l,height:u,top:c,right:d+l,bottom:c+u,left:d,x:d,y:c}}function F(t){var e=z(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function N(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&S(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function W(t){return I(t).getComputedStyle(t)}function q(t){return["table","td","th"].indexOf(L(t))>=0}function R(t){return((A(t)?t.ownerDocument:t.document)||window.document).documentElement}function Y(t){return"html"===L(t)?t:t.assignedSlot||t.parentNode||(S(t)?t.host:null)||R(t)}function K(t){return C(t)&&"fixed"!==W(t).position?t.offsetParent:null}function U(t){for(var e=I(t),i=K(t);i&&q(i)&&"static"===W(i).position;)i=K(i);return i&&("html"===L(i)||"body"===L(i)&&"static"===W(i).position)?e:i||function(t){var e=/firefox/i.test(V());if(/Trident/i.test(V())&&C(t)&&"fixed"===W(t).position)return null;var i=Y(t);for(S(i)&&(i=i.host);C(i)&&["html","body"].indexOf(L(i))<0;){var n=W(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function J(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function X(t,e,i){return H(t,P(e,i))}function $(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function G(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,s=t.name,c=t.options,l=i.elements.arrow,u=i.modifiersData.popperOffsets,h=M(i.placement),p=J(h),f=[a,o].indexOf(h)>=0?"height":"width";if(l&&u){var g=function(t,e){return $("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:G(t,d))}(c.padding,i),v=F(l),y="y"===p?n:a,m="y"===p?r:o,b=i.rects.reference[f]+i.rects.reference[p]-u[p]-i.rects.popper[f],_=u[p]-i.rects.reference[p],w=U(l),k=w?"y"===p?w.clientHeight||0:w.clientWidth||0:0,E=b/2-_/2,x=g[y],D=k-v[f]-g[m],O=k/2-v[f]/2+E,L=X(x,O,D),I=p;i.modifiersData[s]=((e={})[I]=L,e.centerOffset=L-O,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&N(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,i=t.popper,s=t.popperRect,d=t.placement,c=t.variation,u=t.offsets,h=t.position,p=t.gpuAcceleration,f=t.adaptive,g=t.roundOffsets,v=t.isFixed,y=u.x,m=void 0===y?0:y,b=u.y,_=void 0===b?0:b,w="function"==typeof g?g({x:m,y:_}):{x:m,y:_};m=w.x,_=w.y;var k=u.hasOwnProperty("x"),E=u.hasOwnProperty("y"),x=a,D=n,O=window;if(f){var L=U(i),A="clientHeight",C="clientWidth";if(L===I(i)&&"static"!==W(L=R(i)).position&&"absolute"===h&&(A="scrollHeight",C="scrollWidth"),d===n||(d===a||d===o)&&c===l)D=r,_-=(v&&L===O&&O.visualViewport?O.visualViewport.height:L[A])-s.height,_*=p?1:-1;if(d===a||(d===n||d===r)&&c===l)x=o,m-=(v&&L===O&&O.visualViewport?O.visualViewport.width:L[C])-s.width,m*=p?1:-1}var S,T=Object.assign({position:h},f&&tt),M=!0===g?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:j(e*n)/n||0,y:j(i*n)/n||0}}({x:m,y:_}):{x:m,y:_};return m=M.x,_=M.y,p?Object.assign({},T,((S={})[D]=E?"0":"",S[x]=k?"0":"",S.transform=(O.devicePixelRatio||1)<=1?"translate("+m+"px, "+_+"px)":"translate3d("+m+"px, "+_+"px, 0)",S)):Object.assign({},T,((e={})[D]=E?_+"px":"",e[x]=k?m+"px":"",e.transform="",e))}var it={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,a=void 0===o||o,s=i.roundOffsets,d=void 0===s||s,c={placement:M(e.placement),variation:Z(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:d})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},nt={passive:!0};var rt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,o=void 0===r||r,a=n.resize,s=void 0===a||a,d=I(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,nt)})),s&&d.addEventListener("resize",i.update,nt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,nt)})),s&&d.removeEventListener("resize",i.update,nt)}},data:{}},ot={left:"right",right:"left",bottom:"top",top:"bottom"};function at(t){return t.replace(/left|right|bottom|top/g,(function(t){return ot[t]}))}var st={start:"end",end:"start"};function dt(t){return t.replace(/start|end/g,(function(t){return st[t]}))}function ct(t){var e=I(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lt(t){return z(R(t)).left+ct(t).scrollLeft}function ut(t){var e=W(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function ht(t){return["html","body","#document"].indexOf(L(t))>=0?t.ownerDocument.body:C(t)&&ut(t)?t:ht(Y(t))}function pt(t,e){var i;void 0===e&&(e=[]);var n=ht(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=I(n),a=r?[o].concat(o.visualViewport||[],ut(n)?n:[]):n,s=e.concat(a);return r?s:s.concat(pt(Y(a)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gt(t,e,i){return e===h?ft(function(t,e){var i=I(t),n=R(t),r=i.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,d=0;if(r){o=r.width,a=r.height;var c=B();(c||!c&&"fixed"===e)&&(s=r.offsetLeft,d=r.offsetTop)}return{width:o,height:a,x:s+lt(t),y:d}}(t,i)):A(e)?function(t,e){var i=z(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ft(function(t){var e,i=R(t),n=ct(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=H(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=H(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-n.scrollLeft+lt(t),d=-n.scrollTop;return"rtl"===W(r||i).direction&&(s+=H(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:d}}(R(t)))}function vt(t,e,i,n){var r="clippingParents"===e?function(t){var e=pt(Y(t)),i=["absolute","fixed"].indexOf(W(t).position)>=0&&C(t)?U(t):t;return A(i)?e.filter((function(t){return A(t)&&N(t,i)&&"body"!==L(t)})):[]}(t):[].concat(e),o=[].concat(r,[i]),a=o[0],s=o.reduce((function(e,i){var r=gt(t,i,n);return e.top=H(r.top,e.top),e.right=P(r.right,e.right),e.bottom=P(r.bottom,e.bottom),e.left=H(r.left,e.left),e}),gt(t,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function yt(t){var e,i=t.reference,s=t.element,d=t.placement,u=d?M(d):null,h=d?Z(d):null,p=i.x+i.width/2-s.width/2,f=i.y+i.height/2-s.height/2;switch(u){case n:e={x:p,y:i.y-s.height};break;case r:e={x:p,y:i.y+i.height};break;case o:e={x:i.x+i.width,y:f};break;case a:e={x:i.x-s.width,y:f};break;default:e={x:i.x,y:i.y}}var g=u?J(u):null;if(null!=g){var v="y"===g?"height":"width";switch(h){case c:e[g]=e[g]-(i[v]/2-s[v]/2);break;case l:e[g]=e[g]+(i[v]/2-s[v]/2)}}return e}function mt(t,e){void 0===e&&(e={});var i=e,a=i.placement,s=void 0===a?t.placement:a,c=i.strategy,l=void 0===c?t.strategy:c,g=i.boundary,v=void 0===g?u:g,y=i.rootBoundary,m=void 0===y?h:y,b=i.elementContext,_=void 0===b?p:b,w=i.altBoundary,k=void 0!==w&&w,E=i.padding,x=void 0===E?0:E,D=$("number"!=typeof x?x:G(x,d)),O=_===p?f:p,L=t.rects.popper,I=t.elements[k?O:_],C=vt(A(I)?I:I.contextElement||R(t.elements.popper),v,m,l),S=z(t.elements.reference),T=yt({reference:S,element:L,strategy:"absolute",placement:s}),M=ft(Object.assign({},L,T)),H=_===p?M:S,P={top:C.top-H.top+D.top,bottom:H.bottom-C.bottom+D.bottom,left:C.left-H.left+D.left,right:H.right-C.right+D.right},j=t.modifiersData.offset;if(_===p&&j){var V=j[s];Object.keys(P).forEach((function(t){var e=[o,r].indexOf(t)>=0?1:-1,i=[n,r].indexOf(t)>=0?"y":"x";P[t]+=V[i]*e}))}return P}var bt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,l=t.name;if(!e.modifiersData[l]._skip){for(var u=i.mainAxis,h=void 0===u||u,p=i.altAxis,f=void 0===p||p,y=i.fallbackPlacements,m=i.padding,b=i.boundary,_=i.rootBoundary,w=i.altBoundary,k=i.flipVariations,E=void 0===k||k,x=i.allowedAutoPlacements,D=e.options.placement,O=M(D),L=y||(O===D||!E?[at(D)]:function(t){if(M(t)===s)return[];var e=at(t);return[dt(t),e,dt(e)]}(D)),I=[D].concat(L).reduce((function(t,i){return t.concat(M(i)===s?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,a=i.padding,s=i.flipVariations,c=i.allowedAutoPlacements,l=void 0===c?v:c,u=Z(n),h=u?s?g:g.filter((function(t){return Z(t)===u})):d,p=h.filter((function(t){return l.indexOf(t)>=0}));0===p.length&&(p=h);var f=p.reduce((function(e,i){return e[i]=mt(t,{placement:i,boundary:r,rootBoundary:o,padding:a})[M(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:b,rootBoundary:_,padding:m,flipVariations:E,allowedAutoPlacements:x}):i)}),[]),A=e.rects.reference,C=e.rects.popper,S=new Map,T=!0,H=I[0],P=0;P=0,F=z?"width":"height",N=mt(e,{placement:j,boundary:b,rootBoundary:_,altBoundary:w,padding:m}),W=z?B?o:a:B?r:n;A[F]>C[F]&&(W=at(W));var q=at(W),R=[];if(h&&R.push(N[V]<=0),f&&R.push(N[W]<=0,N[q]<=0),R.every((function(t){return t}))){H=j,T=!1;break}S.set(j,R)}if(T)for(var Y=function(t){var e=I.find((function(e){var i=S.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return H=e,"break"},K=E?3:1;K>0;K--){if("break"===Y(K))break}e.placement!==H&&(e.modifiersData[l]._skip=!0,e.placement=H,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function _t(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function wt(t){return[n,o,r,a].some((function(e){return t[e]>=0}))}var kt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,a=mt(e,{elementContext:"reference"}),s=mt(e,{altBoundary:!0}),d=_t(a,n),c=_t(s,r,o),l=wt(d),u=wt(c);e.modifiersData[i]={referenceClippingOffsets:d,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":u})}};var Et={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,r=t.name,s=i.offset,d=void 0===s?[0,0]:s,c=v.reduce((function(t,i){return t[i]=function(t,e,i){var r=M(t),s=[a,n].indexOf(r)>=0?-1:1,d="function"==typeof i?i(Object.assign({},e,{placement:t})):i,c=d[0],l=d[1];return c=c||0,l=(l||0)*s,[a,o].indexOf(r)>=0?{x:l,y:c}:{x:c,y:l}}(i,e.rects,d),t}),{}),l=c[e.placement],u=l.x,h=l.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=h),e.modifiersData[r]=c}};var xt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=yt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var Dt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,s=t.name,d=i.mainAxis,l=void 0===d||d,u=i.altAxis,h=void 0!==u&&u,p=i.boundary,f=i.rootBoundary,g=i.altBoundary,v=i.padding,y=i.tether,m=void 0===y||y,b=i.tetherOffset,_=void 0===b?0:b,w=mt(e,{boundary:p,rootBoundary:f,padding:v,altBoundary:g}),k=M(e.placement),E=Z(e.placement),x=!E,D=J(k),O="x"===D?"y":"x",L=e.modifiersData.popperOffsets,I=e.rects.reference,A=e.rects.popper,C="function"==typeof _?_(Object.assign({},e.rects,{placement:e.placement})):_,S="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(L){if(l){var V,B="y"===D?n:a,z="y"===D?r:o,N="y"===D?"height":"width",W=L[D],q=W+w[B],R=W-w[z],Y=m?-A[N]/2:0,K=E===c?I[N]:A[N],$=E===c?-A[N]:-I[N],G=e.elements.arrow,Q=m&&G?F(G):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[B],it=tt[z],nt=X(0,I[N],Q[N]),rt=x?I[N]/2-Y-nt-et-S.mainAxis:K-nt-et-S.mainAxis,ot=x?-I[N]/2+Y+nt+it+S.mainAxis:$+nt+it+S.mainAxis,at=e.elements.arrow&&U(e.elements.arrow),st=at?"y"===D?at.clientTop||0:at.clientLeft||0:0,dt=null!=(V=null==T?void 0:T[D])?V:0,ct=W+ot-dt,lt=X(m?P(q,W+rt-dt-st):q,W,m?H(R,ct):R);L[D]=lt,j[D]=lt-W}if(h){var ut,ht="x"===D?n:a,pt="x"===D?r:o,ft=L[O],gt="y"===O?"height":"width",vt=ft+w[ht],yt=ft-w[pt],bt=-1!==[n,a].indexOf(k),_t=null!=(ut=null==T?void 0:T[O])?ut:0,wt=bt?vt:ft-I[gt]-A[gt]-_t+S.altAxis,kt=bt?ft+I[gt]+A[gt]-_t-S.altAxis:yt,Et=m&&bt?function(t,e,i){var n=X(t,e,i);return n>i?i:n}(wt,ft,kt):X(m?wt:vt,ft,m?kt:yt);L[O]=Et,j[O]=Et-ft}e.modifiersData[s]=j}},requiresIfExists:["offset"]};function Ot(t,e,i){void 0===i&&(i=!1);var n,r,o=C(e),a=C(e)&&function(t){var e=t.getBoundingClientRect(),i=j(e.width)/t.offsetWidth||1,n=j(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),s=R(e),d=z(t,a,i),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!i)&&(("body"!==L(e)||ut(s))&&(c=(n=e)!==I(n)&&C(n)?{scrollLeft:(r=n).scrollLeft,scrollTop:r.scrollTop}:ct(n)),C(e)?((l=z(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=lt(s))),{x:d.left+c.scrollLeft-l.x,y:d.top+c.scrollTop-l.y,width:d.width,height:d.height}}function Lt(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var It={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var t=arguments.length,e=new Array(t),i=0;it.length)&&(e=t.length);for(var i=0,n=Array(e);i1?e-1:0),n=1;n=e)&&(void 0===i||t<=i)}function E(t,e,i){return ti?i:t}function x(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=Object.keys(i).reduce((function(t,e){var r=i[e];return"function"==typeof r&&(r=r(n)),"".concat(t," ").concat(e,'="').concat(r,'"')}),t);r+="<".concat(o,">");var a=n+1;return a\s+/g,">").replace(/\s+2&&void 0!==arguments[2]?arguments[2]:0,n=new Date(t).getDay();return A(t,T(e,i)-T(n,i))}function H(t,e){var i=new Date(t).getFullYear();return Math.floor(i/e)*e}Object.defineProperty(e,"__esModule",{value:!0});var P=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,j=/[\s!-/:-@[-`{-~年月日]+/,V={},B={y:function(t,e){return new Date(t).setFullYear(parseInt(e,10))},m:function(t,e,i){var n=new Date(t),r=parseInt(e,10)-1;if(isNaN(r)){if(!e)return NaN;var o=e.toLowerCase(),a=function(t){return t.toLowerCase().startsWith(o)};if((r=i.monthsShort.findIndex(a))<0&&(r=i.months.findIndex(a)),r<0)return NaN}return n.setMonth(r),n.getMonth()!==F(r)?n.setDate(0):n.getTime()},d:function(t,e){return new Date(t).setDate(parseInt(e,10))}},z={d:function(t){return t.getDate()},dd:function(t){return N(t.getDate(),2)},D:function(t,e){return e.daysShort[t.getDay()]},DD:function(t,e){return e.days[t.getDay()]},m:function(t){return t.getMonth()+1},mm:function(t){return N(t.getMonth()+1,2)},M:function(t,e){return e.monthsShort[t.getMonth()]},MM:function(t,e){return e.months[t.getMonth()]},y:function(t){return t.getFullYear()},yy:function(t){return N(t.getFullYear(),2).slice(-2)},yyyy:function(t){return N(t.getFullYear(),4)}};function F(t){return t>-1?t%12:F(t+12)}function N(t,e){return t.toString().padStart(e,"0")}function W(t){if("string"!=typeof t)throw new Error("Invalid date format.");if(t in V)return V[t];var e=t.split(P),i=t.match(new RegExp(P,"g"));if(0===e.length||!i)throw new Error("Invalid date format.");var n=i.map((function(t){return z[t]})),r=Object.keys(B).reduce((function(t,e){return i.find((function(t){return"D"!==t[0]&&t[0].toLowerCase()===e}))&&t.push(e),t}),[]);return V[t]={parser:function(t,e){var n=t.split(j).reduce((function(t,e,n){if(e.length>0&&i[n]){var r=i[n][0];"M"===r?t.m=e:"D"!==r&&(t[r]=e)}return t}),{});return r.reduce((function(t,i){var r=B[i](t,n[i],e);return isNaN(r)?t:r}),L())},formatter:function(t,i){return n.reduce((function(n,r,o){return n+"".concat(e[o]).concat(r(t,i))}),"")+b(e)}}}function q(t,e,i){if(t instanceof Date||"number"==typeof t){var n=O(t);return isNaN(n)?void 0:n}if(t){if("today"===t)return L();if(e&&e.toValue){var r=e.toValue(t,e,i);return isNaN(r)?void 0:O(r)}return W(e).parser(t,i)}}function R(t,e,i){if(isNaN(t)||!t&&0!==t)return"";var n="number"==typeof t?new Date(t):t;return e.toDisplay?e.toDisplay(n,e,i):W(e).formatter(n,i)}var Y=new WeakMap,K=EventTarget.prototype,U=K.addEventListener,J=K.removeEventListener;function X(t,e){var i=Y.get(t);i||(i=[],Y.set(t,i)),e.forEach((function(t){U.call.apply(U,f(t)),i.push(t)}))}function $(t){var e=Y.get(t);e&&(e.forEach((function(t){J.call.apply(J,f(t))})),Y.delete(t))}if(!Event.prototype.composedPath){var G=function t(e){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.push(e),e.parentNode?i=e.parentNode:e.host?i=e.host:e.defaultView&&(i=e.defaultView),i?t(i,n):n};Event.prototype.composedPath=function(){return G(this.target)}}function Q(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=t[n];return e(r)?r:r!==i&&r.parentElement?Q(t,e,i,n+1):void 0}function Z(t,e){var i="function"==typeof e?e:function(t){return t.matches(e)};return Q(t.composedPath(),i,t.currentTarget)}var tt={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}},et={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:'',orientation:"auto",pickLevel:0,prevArrow:'',showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},it=document.createRange();function nt(t){return it.createContextualFragment(t)}function rt(t){"none"!==t.style.display&&(t.style.display&&(t.dataset.styleDisplay=t.style.display),t.style.display="none")}function ot(t){"none"===t.style.display&&(t.dataset.styleDisplay?(t.style.display=t.dataset.styleDisplay,delete t.dataset.styleDisplay):t.style.display="")}function at(t){t.firstChild&&(t.removeChild(t.firstChild),at(t))}var st=et.language,dt=et.format,ct=et.weekStart;function lt(t,e){return t.length<6&&e>=0&&e<7?_(t,e):t}function ut(t){return(t+6)%7}function ht(t,e,i,n){var r=q(t,e,i);return void 0!==r?r:n}function pt(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=parseInt(t,10);return n>=0&&n<=i?n:e}function ft(t,e){var i,n=Object.assign({},t),r={},o=e.constructor.locales,a=e.config||{},s=a.format,d=a.language,c=a.locale,l=a.maxDate,u=a.maxView,h=a.minDate,p=a.pickLevel,f=a.startView,g=a.weekStart;if(n.language&&(n.language!==d&&(o[n.language]?i=n.language:void 0===o[i=n.language.split("-")[0]]&&(i=!1)),delete n.language,i)){d=r.language=i;var v=c||o[st];c=Object.assign({format:dt,weekStart:ct},o[st]),d!==st&&Object.assign(c,o[d]),r.locale=c,s===v.format&&(s=r.format=c.format),g===v.weekStart&&(g=r.weekStart=c.weekStart,r.weekEnd=ut(c.weekStart))}if(n.format){var y="function"==typeof n.format.toDisplay,b="function"==typeof n.format.toValue,w=P.test(n.format);(y&&b||w)&&(s=r.format=n.format),delete n.format}var k=h,E=l;if(void 0!==n.minDate&&(k=null===n.minDate?I(0,0,1):ht(n.minDate,s,c,k),delete n.minDate),void 0!==n.maxDate&&(E=null===n.maxDate?void 0:ht(n.maxDate,s,c,E),delete n.maxDate),E=0&&(r.maxNumberOfDates=O,r.multidate=1!==O),delete n.maxNumberOfDates}n.dateDelimiter&&(r.dateDelimiter=String(n.dateDelimiter),delete n.dateDelimiter);var L=p;void 0!==n.pickLevel&&(L=pt(n.pickLevel,2),delete n.pickLevel),L!==p&&(p=r.pickLevel=L);var A=u;void 0!==n.maxView&&(A=pt(n.maxView,u),delete n.maxView),(A=p>A?p:A)!==u&&(u=r.maxView=A);var C=f;if(void 0!==n.startView&&(C=pt(n.startView,C),delete n.startView),Cu&&(C=u),C!==f&&(r.startView=C),n.prevArrow){var S=nt(n.prevArrow);S.childNodes.length>0&&(r.prevArrow=S.childNodes),delete n.prevArrow}if(n.nextArrow){var T=nt(n.nextArrow);T.childNodes.length>0&&(r.nextArrow=T.childNodes),delete n.nextArrow}if(void 0!==n.disableTouchKeyboard&&(r.disableTouchKeyboard="ontouchstart"in document&&!!n.disableTouchKeyboard,delete n.disableTouchKeyboard),n.orientation){var M=n.orientation.toLowerCase().split(/\s+/g);r.orientation={x:M.find((function(t){return"left"===t||"right"===t}))||"auto",y:M.find((function(t){return"top"===t||"bottom"===t}))||"auto"},delete n.orientation}if(void 0!==n.todayBtnMode){switch(n.todayBtnMode){case 0:case 1:r.todayBtnMode=n.todayBtnMode}delete n.todayBtnMode}return Object.keys(n).forEach((function(t){void 0!==n[t]&&m(et,t)&&(r[t]=n[t])})),r}var gt=D(''),vt=D('
    \n
    '.concat(x("span",7,{class:"dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"}),'
    \n
    ').concat(x("span",42,{class:"block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"}),"
    \n
    ")),yt=D('
    \n
    \n
    '.concat(x("span",6,{class:"week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"}),"
    \n
    ")),mt=function(){return a((function t(e,i){r(this,t),Object.assign(this,i,{picker:e,element:nt('
    ').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}),[{key:"init",value:function(t){void 0!==t.pickLevel&&(this.isMinView=this.id===t.pickLevel),this.setOptions(t),this.updateFocus(),this.updateSelection()}},{key:"performBeforeHook",value:function(t,e,i){var n=this.beforeShow(new Date(i));switch(v(n)){case"boolean":n={enabled:n};break;case"string":n={classes:n}}if(n){if(!1===n.enabled&&(t.classList.add("disabled"),_(this.disabled,e)),n.classes){var r,o=n.classes.split(/\s+/);(r=t.classList).add.apply(r,f(o)),o.includes("disabled")&&_(this.disabled,e)}n.content&&function(t,e){at(t),e instanceof DocumentFragment?t.appendChild(e):"string"==typeof e?t.appendChild(nt(e)):"function"==typeof e.forEach&&e.forEach((function(e){t.appendChild(e)}))}(t,n.content)}}}])}(),bt=function(t){function e(t){return r(this,e),n(this,e,[t,{id:0,name:"days",cellClass:"day"}])}return c(e,t),a(e,[{key:"init",value:function(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(i){var n=nt(vt).firstChild;this.dow=n.firstChild,this.grid=n.lastChild,this.element.appendChild(n)}s(d(e.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function(t){var e,i=this;if(m(t,"minDate")&&(this.minDate=t.minDate),m(t,"maxDate")&&(this.maxDate=t.maxDate),t.datesDisabled&&(this.datesDisabled=t.datesDisabled),t.daysOfWeekDisabled&&(this.daysOfWeekDisabled=t.daysOfWeekDisabled,e=!0),t.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=t.daysOfWeekHighlighted),void 0!==t.todayHighlight&&(this.todayHighlight=t.todayHighlight),void 0!==t.weekStart&&(this.weekStart=t.weekStart,this.weekEnd=t.weekEnd,e=!0),t.locale){var n=this.locale=t.locale;this.dayNames=n.daysMin,this.switchLabelFormat=n.titleFormat,e=!0}if(void 0!==t.beforeShowDay&&(this.beforeShow="function"==typeof t.beforeShowDay?t.beforeShowDay:void 0),void 0!==t.calendarWeeks)if(t.calendarWeeks&&!this.calendarWeeks){var r=nt(yt).firstChild;this.calendarWeeks={element:r,dow:r.firstChild,weeks:r.lastChild},this.element.insertBefore(r,this.element.firstChild)}else this.calendarWeeks&&!t.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==t.showDaysOfWeek&&(t.showDaysOfWeek?(ot(this.dow),this.calendarWeeks&&ot(this.calendarWeeks.dow)):(rt(this.dow),this.calendarWeeks&&rt(this.calendarWeeks.dow))),e&&Array.from(this.dow.children).forEach((function(t,e){var n=(i.weekStart+e)%7;t.textContent=i.dayNames[n],t.className=i.daysOfWeekDisabled.includes(n)?"dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed":"dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"}))}},{key:"updateFocus",value:function(){var t=new Date(this.picker.viewDate),e=t.getFullYear(),i=t.getMonth(),n=I(e,i,1),r=M(n,this.weekStart,this.weekStart);this.first=n,this.last=I(e,i+1,0),this.start=r,this.focused=this.picker.viewDate}},{key:"updateSelection",value:function(){var t=this.picker.datepicker,e=t.dates,i=t.rangepicker;this.selected=e,i&&(this.range=i.dates)}},{key:"render",value:function(){var t=this;this.today=this.todayHighlight?L():void 0,this.disabled=f(this.datesDisabled);var e=R(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(e),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){var i=M(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((function(t,e){t.textContent=function(t){var e=M(t,4,1),i=M(new Date(e).setMonth(0,4),4,1);return Math.round((e-i)/6048e5)+1}(A(i,7*e))}))}Array.from(this.grid.children).forEach((function(e,i){var n=e.classList,r=A(t.start,i),o=new Date(r),a=o.getDay();if(e.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(t.cellClass),e.dataset.date=r,e.textContent=o.getDate(),rt.last&&n.add("next","text-gray-500","dark:text-white"),t.today===r&&n.add("today","bg-gray-100","dark:bg-gray-600"),(rt.maxDate||t.disabled.includes(r))&&(n.add("disabled","cursor-not-allowed","text-gray-400","dark:text-gray-500"),n.remove("hover:bg-gray-100","dark:hover:bg-gray-600","text-gray-900","dark:text-white","cursor-pointer")),t.daysOfWeekDisabled.includes(a)&&(n.add("disabled","cursor-not-allowed","text-gray-400","dark:text-gray-500"),n.remove("hover:bg-gray-100","dark:hover:bg-gray-600","text-gray-900","dark:text-white","cursor-pointer"),_(t.disabled,r)),t.daysOfWeekHighlighted.includes(a)&&n.add("highlighted"),t.range){var s=h(t.range,2),d=s[0],c=s[1];r>d&&ri&&re||s1&&void 0!==arguments[1])||arguments[1];i&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(nt(x("span",12,{"data-month":function(t){return t}})))),s(d(e.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function(t){if(t.locale&&(this.monthNames=t.locale.monthsShort),m(t,"minDate"))if(void 0===t.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{var e=new Date(t.minDate);this.minYear=e.getFullYear(),this.minMonth=e.getMonth(),this.minDate=e.setDate(1)}if(m(t,"maxDate"))if(void 0===t.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{var i=new Date(t.maxDate);this.maxYear=i.getFullYear(),this.maxMonth=i.getMonth(),this.maxDate=I(this.maxYear,this.maxMonth+1,0)}void 0!==t.beforeShowMonth&&(this.beforeShow="function"==typeof t.beforeShowMonth?t.beforeShowMonth:void 0)}},{key:"updateFocus",value:function(){var t=new Date(this.picker.viewDate);this.year=t.getFullYear(),this.focused=t.getMonth()}},{key:"updateSelection",value:function(){var t=this.picker.datepicker,e=t.dates,i=t.rangepicker;this.selected=e.reduce((function(t,e){var i=new Date(e),n=i.getFullYear(),r=i.getMonth();return void 0===t[n]?t[n]=[r]:_(t[n],r),t}),{}),i&&i.dates&&(this.range=i.dates.map((function(t){var e=new Date(t);return isNaN(e)?void 0:[e.getFullYear(),e.getMonth()]})))}},{key:"render",value:function(){var t=this;this.disabled=[],this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);var e=this.selected[this.year]||[],i=this.yearthis.maxYear,n=this.year===this.minYear,r=this.year===this.maxYear,o=_t(this.range,this.year);Array.from(this.grid.children).forEach((function(a,s){var d=a.classList,c=I(t.year,s,1);if(a.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(t.cellClass),t.isMinView&&(a.dataset.date=c),a.textContent=t.monthNames[s],(i||n&&st.maxMonth)&&d.add("disabled"),o){var l=h(o,2),u=l[0],p=l[1];s>u&&sn&&o1&&void 0!==arguments[1])||arguments[1];i&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow".concat(kt(this.cellClass)),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(nt(x("span",12)))),s(d(e.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function(t){if(m(t,"minDate")&&(void 0===t.minDate?this.minYear=this.minDate=void 0:(this.minYear=H(t.minDate,this.step),this.minDate=I(this.minYear,0,1))),m(t,"maxDate")&&(void 0===t.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=H(t.maxDate,this.step),this.maxDate=I(this.maxYear,11,31))),void 0!==t[this.beforeShowOption]){var e=t[this.beforeShowOption];this.beforeShow="function"==typeof e?e:void 0}}},{key:"updateFocus",value:function(){var t=new Date(this.picker.viewDate),e=H(t,this.navStep),i=e+9*this.step;this.first=e,this.last=i,this.start=e-this.step,this.focused=H(t,this.step)}},{key:"updateSelection",value:function(){var t=this,e=this.picker.datepicker,i=e.dates,n=e.rangepicker;this.selected=i.reduce((function(e,i){return _(e,H(i,t.step))}),[]),n&&n.dates&&(this.range=n.dates.map((function(e){if(void 0!==e)return H(e,t.step)})))}},{key:"render",value:function(){var t=this;this.disabled=[],this.picker.setViewSwitchLabel("".concat(this.first,"-").concat(this.last)),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((function(e,i){var n=e.classList,r=t.start+i*t.step,o=I(r,0,1);if(e.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(t.cellClass),t.isMinView&&(e.dataset.date=o),e.textContent=e.dataset.year=r,0===i?n.add("prev"):11===i&&n.add("next"),(rt.maxYear)&&n.add("disabled"),t.range){var a=h(t.range,2),s=a[0],d=a[1];r>s&&ri&&r0?b(e):i.defaultViewDate,i.minDate,i.maxDate)}function Bt(t,e){var i=new Date(t.viewDate),n=new Date(e),r=t.currentView,o=r.id,a=r.year,s=r.first,d=r.last,c=n.getFullYear();switch(t.viewDate=e,c!==i.getFullYear()&&xt(t.datepicker,"changeYear"),n.getMonth()!==i.getMonth()&&xt(t.datepicker,"changeMonth"),o){case 0:return ed;case 1:return c!==a;default:return cd}}function zt(t){return window.getComputedStyle(t).direction}var Ft=function(){return a((function t(e){r(this,t),this.datepicker=e;var i=gt.replace(/%buttonClass%/g,e.config.buttonClass),n=this.element=nt(i).firstChild,o=h(n.firstChild.children,3),a=o[0],s=o[1],d=o[2],c=a.firstElementChild,l=h(a.lastElementChild.children,3),u=l[0],p=l[1],f=l[2],g=h(d.firstChild.children,2),v={title:c,prevBtn:u,viewSwitch:p,nextBtn:f,todayBtn:g[0],clearBtn:g[1]};this.main=s,this.controls=v;var y=e.inline?"inline":"dropdown";n.classList.add("datepicker-".concat(y)),"dropdown"===y&&n.classList.add("dropdown","absolute","top-0","left-0","z-50","pt-2"),jt(this,e.config),this.viewDate=Vt(e),X(e,[[n,"click",Pt.bind(null,e),{capture:!0}],[s,"click",Ht.bind(null,e)],[v.viewSwitch,"click",St.bind(null,e)],[v.prevBtn,"click",Tt.bind(null,e)],[v.nextBtn,"click",Mt.bind(null,e)],[v.todayBtn,"click",At.bind(null,e)],[v.clearBtn,"click",Ct.bind(null,e)]]),this.views=[new bt(this),new wt(this),new Et(this,{id:2,name:"years",cellClass:"year",step:1}),new Et(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[e.config.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),e.config.container.appendChild(this.element)}),[{key:"setOptions",value:function(t){jt(this,t),this.views.forEach((function(e){e.init(t,!1)})),this.currentView.render()}},{key:"detach",value:function(){this.datepicker.config.container.removeChild(this.element)}},{key:"show",value:function(){if(!this.active){this.element.classList.add("active","block"),this.element.classList.remove("hidden"),this.active=!0;var t=this.datepicker;if(!t.inline){var e=zt(t.inputField);e!==zt(t.config.container)?this.element.dir=e:this.element.dir&&this.element.removeAttribute("dir"),this.place(),t.config.disableTouchKeyboard&&t.inputField.blur()}xt(t,"show")}}},{key:"hide",value:function(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active","block"),this.element.classList.add("active","block","hidden"),this.active=!1,xt(this.datepicker,"hide"))}},{key:"place",value:function(){var t,e,i,n=this.element,r=n.classList,o=n.style,a=this.datepicker,s=a.config,d=a.inputField,c=s.container,l=this.element.getBoundingClientRect(),u=l.width,h=l.height,p=c.getBoundingClientRect(),f=p.left,g=p.top,v=p.width,y=d.getBoundingClientRect(),m=y.left,b=y.top,_=y.width,w=y.height,k=s.orientation,E=k.x,x=k.y;c===document.body?(t=window.scrollY,e=m+window.scrollX,i=b+t):(e=m-f,i=b-g+(t=c.scrollTop)),"auto"===E&&(e<0?(E="left",e=10):E=e+u>v||"rtl"===zt(d)?"right":"left"),"right"===E&&(e-=u-_),"auto"===x&&(x=i-h0&&void 0!==arguments[0])||arguments[0],e=t&&this._renderMethod||"render";delete this._renderMethod,this.currentView[e]()}}])}();function Nt(t,e,i,n,r,o){if(k(t,r,o))return n(t)?Nt(e(t,i),e,i,n,r,o):t}function Wt(t,e,i,n){var r,o,a=t.picker,s=a.currentView,d=s.step||1,c=a.viewDate;switch(s.id){case 0:c=n?A(c,7*i):e.ctrlKey||e.metaKey?S(c,i):A(c,i),r=A,o=function(t){return s.disabled.includes(t)};break;case 1:c=C(c,n?4*i:i),r=C,o=function(t){var e=new Date(t),i=s.year,n=s.disabled;return e.getFullYear()===i&&n.includes(e.getMonth())};break;default:c=S(c,i*(n?4:1)*d),r=S,o=function(t){return s.disabled.includes(H(t,d))}}void 0!==(c=Nt(c,r,i<0?-d:d,o,s.minDate,s.maxDate))&&a.changeFocus(c).render()}function qt(t,e){if("Tab"!==e.key){var i=t.picker,n=i.currentView,r=n.id,o=n.isMinView;if(i.active)if(t.editMode)switch(e.key){case"Escape":i.hide();break;case"Enter":t.exitEditMode({update:!0,autohide:t.config.autohide});break;default:return}else switch(e.key){case"Escape":i.hide();break;case"ArrowLeft":if(e.ctrlKey||e.metaKey)Dt(t,-1);else{if(e.shiftKey)return void t.enterEditMode();Wt(t,e,-1,!1)}break;case"ArrowRight":if(e.ctrlKey||e.metaKey)Dt(t,1);else{if(e.shiftKey)return void t.enterEditMode();Wt(t,e,1,!1)}break;case"ArrowUp":if(e.ctrlKey||e.metaKey)Ot(t);else{if(e.shiftKey)return void t.enterEditMode();Wt(t,e,-1,!0)}break;case"ArrowDown":if(e.shiftKey&&!e.ctrlKey&&!e.metaKey)return void t.enterEditMode();Wt(t,e,1,!0);break;case"Enter":o?t.setDate(i.viewDate):i.changeView(r-1).render();break;case"Backspace":case"Delete":return void t.enterEditMode();default:return void(1!==e.key.length||e.ctrlKey||e.metaKey||t.enterEditMode())}else switch(e.key){case"ArrowDown":case"Escape":i.show();break;case"Enter":t.update();break;default:return}e.preventDefault(),e.stopPropagation()}else Lt(t)}function Rt(t){t.config.showOnFocus&&!t._showing&&t.show()}function Yt(t,e){var i=e.target;(t.picker.active||t.config.showOnClick)&&(i._active=i===document.activeElement,i._clicking=setTimeout((function(){delete i._active,delete i._clicking}),2e3))}function Kt(t,e){var i=e.target;i._clicking&&(clearTimeout(i._clicking),delete i._clicking,i._active&&t.enterEditMode(),delete i._active,t.config.showOnClick&&t.show())}function Ut(t,e){e.clipboardData.types.includes("text/plain")&&t.enterEditMode()}function Jt(t,e){var i=t.element;if(i===document.activeElement){var n=t.picker.element;Z(e,(function(t){return t===i||t===n}))||Lt(t)}}function Xt(t,e){return t.map((function(t){return R(t,e.format,e.locale)})).join(e.dateDelimiter)}function $t(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.config,r=t.dates,o=t.rangepicker;if(0===e.length)return i?[]:void 0;var a=o&&t===o.datepickers[1],s=e.reduce((function(t,e){var i=q(e,n.format,n.locale);if(void 0===i)return t;if(n.pickLevel>0){var r=new Date(i);i=1===n.pickLevel?a?r.setMonth(r.getMonth()+1,0):r.setDate(1):a?r.setFullYear(r.getFullYear()+1,0,0):r.setMonth(0,1)}return!k(i,n.minDate,n.maxDate)||t.includes(i)||n.datesDisabled.includes(i)||n.daysOfWeekDisabled.includes(new Date(i).getDay())||t.push(i),t}),[]);return 0!==s.length?(n.multidate&&!i&&(s=s.reduce((function(t,e){return r.includes(e)||t.push(e),t}),r.filter((function(t){return!s.includes(t)})))),n.maxNumberOfDates&&s.length>n.maxNumberOfDates?s.slice(-1*n.maxNumberOfDates):s):void 0}function Gt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.config,r=t.picker,o=t.inputField;if(2&e){var a=r.active?n.pickLevel:n.startView;r.update().changeView(a).render(i)}1&e&&o&&(o.value=Xt(t.dates,n))}function Qt(t,e,i){var n=i.clear,r=i.render,o=i.autohide;void 0===r&&(r=!0),r?void 0===o&&(o=t.config.autohide):o=!1;var a=$t(t,e,n);a&&(a.toString()!==t.dates.toString()?(t.dates=a,Gt(t,r?3:1),xt(t,"changeDate")):Gt(t,1),o&&t.hide())}var Zt=function(){return a((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;r(this,t),e.datepicker=this,this.element=e;var o=this.config=Object.assign({buttonClass:i.buttonClass&&String(i.buttonClass)||"button",container:document.body,defaultViewDate:L(),maxDate:void 0,minDate:void 0},ft(et,this));this._options=i,Object.assign(o,ft(i,this));var a,s,d=this.inline="INPUT"!==e.tagName;if(d)o.container=e,s=w(e.dataset.date,o.dateDelimiter),delete e.dataset.date;else{var c=i.container?document.querySelector(i.container):null;c&&(o.container=c),(a=this.inputField=e).classList.add("datepicker-input"),s=w(a.value,o.dateDelimiter)}if(n){var l=n.inputs.indexOf(a),u=n.datepickers;if(l<0||l>1||!Array.isArray(u))throw Error("Invalid rangepicker object.");u[l]=this,Object.defineProperty(this,"rangepicker",{get:function(){return n}})}this.dates=[];var h=$t(this,s);h&&h.length>0&&(this.dates=h),a&&(a.value=Xt(this.dates,o));var p=this.picker=new Ft(this);if(d)this.show();else{var f=Jt.bind(null,this),g=[[a,"keydown",qt.bind(null,this)],[a,"focus",Rt.bind(null,this)],[a,"mousedown",Yt.bind(null,this)],[a,"click",Kt.bind(null,this)],[a,"paste",Ut.bind(null,this)],[document,"mousedown",f],[document,"touchstart",f],[window,"resize",p.place.bind(p)]];X(this,g)}}),[{key:"active",get:function(){return!(!this.picker||!this.picker.active)}},{key:"pickerElement",get:function(){return this.picker?this.picker.element:void 0}},{key:"setOptions",value:function(t){var e=this.picker,i=ft(t,this);Object.assign(this._options,t),Object.assign(this.config,i),e.setOptions(i),Gt(this,3)}},{key:"show",value:function(){if(this.inputField){if(this.inputField.disabled)return;this.inputField!==document.activeElement&&(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}},{key:"hide",value:function(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}},{key:"destroy",value:function(){return this.hide(),$(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}},{key:"getDate",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,i=e?function(i){return R(i,e,t.config.locale)}:function(t){return new Date(t)};return this.config.multidate?this.dates.map(i):this.dates.length>0?i(this.dates[0]):void 0}},{key:"setDate",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline){var e={clear:!0,autohide:!(!t||!t.autohide)},i=w(this.inputField.value,this.config.dateDelimiter);Qt(this,i,e)}}},{key:"refresh",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&"string"!=typeof t&&(e=t,t=void 0),Gt(this,"picker"===t?2:"input"===t?1:3,!e)}},{key:"enterEditMode",value:function(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit","border-blue-700","!border-primary-700"))}},{key:"exitEditMode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline&&this.editMode){var e=Object.assign({update:!1},t);delete this.editMode,this.inputField.classList.remove("in-edit","border-blue-700","!border-primary-700"),e.update&&this.update(e)}}}],[{key:"formatDate",value:function(t,e,i){return R(t,e,i&&tt[i]||tt.en)}},{key:"parseDate",value:function(t,e,i){return q(t,e,i&&tt[i]||tt.en)}},{key:"locales",get:function(){return tt}}])}();function te(t){var e=Object.assign({},t);return delete e.inputs,delete e.allowOneSidedRange,delete e.maxNumberOfDates,e}function ee(t,e,i,n){X(t,[[i,"changeDate",e]]),new Zt(i,n,t)}function ie(t,e){if(!t._updating){t._updating=!0;var i=e.target;if(void 0!==i.datepicker){var n=t.datepickers,r={render:!1},o=t.inputs.indexOf(i),a=0===o?1:0,s=n[o].dates[0],d=n[a].dates[0];void 0!==s&&void 0!==d?0===o&&s>d?(n[0].setDate(d,r),n[1].setDate(s,r)):1===o&&s1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var n=Array.isArray(i.inputs)?i.inputs:Array.from(e.querySelectorAll("input"));if(!(n.length<2)){e.rangepicker=this,this.element=e,this.inputs=n.slice(0,2),this.allowOneSidedRange=!!i.allowOneSidedRange;var o=ie.bind(null,this),a=te(i),s=[];Object.defineProperty(this,"datepickers",{get:function(){return s}}),ee(this,o,this.inputs[0],a),ee(this,o,this.inputs[1],a),Object.freeze(s),s[0].dates.length>0?ie(this,{target:this.inputs[0]}):s[1].dates.length>0&&ie(this,{target:this.inputs[1]})}}),[{key:"dates",get:function(){return 2===this.datepickers.length?[this.datepickers[0].dates[0],this.datepickers[1].dates[0]]:void 0}},{key:"setOptions",value:function(t){this.allowOneSidedRange=!!t.allowOneSidedRange;var e=te(t);this.datepickers[0].setOptions(e),this.datepickers[1].setOptions(e)}},{key:"destroy",value:function(){this.datepickers[0].destroy(),this.datepickers[1].destroy(),$(this),delete this.element.rangepicker}},{key:"getDates",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,i=e?function(i){return R(i,e,t.datepickers[0].config.locale)}:function(t){return new Date(t)};return this.dates.map((function(t){return void 0===t?t:i(t)}))}},{key:"setDates",value:function(t,e){var i=h(this.datepickers,2),n=i[0],r=i[1],o=this.dates;this._updating=!0,n.setDate(t),r.setDate(e),delete this._updating,r.dates[0]!==o[1]?ie(this,{target:this.inputs[1]}):n.dates[0]!==o[0]&&ie(this,{target:this.inputs[0]})}}])}();e.DateRangePicker=ne,e.Datepicker=Zt},902:function(t,e,i){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;it._options.maxValue&&(i.value=t._options.maxValue.toString()),null!==t._options.minValue&&parseInt(i.value)=this._options.maxValue||(this._targetEl.value=(this.getCurrentValue()+1).toString(),this._options.onIncrement(this))},t.prototype.decrement=function(){null!==this._options.minValue&&this.getCurrentValue()<=this._options.minValue||(this._targetEl.value=(this.getCurrentValue()-1).toString(),this._options.onDecrement(this))},t.prototype.updateOnIncrement=function(t){this._options.onIncrement=t},t.prototype.updateOnDecrement=function(t){this._options.onDecrement=t},t}();function d(){document.querySelectorAll("[data-input-counter]").forEach((function(t){var e=t.id,i=document.querySelector('[data-input-counter-increment="'+e+'"]'),n=document.querySelector('[data-input-counter-decrement="'+e+'"]'),o=t.getAttribute("data-input-counter-min"),a=t.getAttribute("data-input-counter-max");t?r.default.instanceExists("InputCounter",t.getAttribute("id"))||new s(t,i||null,n||null,{minValue:o?parseInt(o):null,maxValue:a?parseInt(a):null}):console.error('The target element with id "'.concat(e,'" does not exist. Please check the data-input-counter attribute.'))}))}e.initInputCounters=d,"undefined"!=typeof window&&(window.InputCounter=s,window.initInputCounters=d),e.default=s},16:function(t,e,i){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nfunction _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nfunction _callSuper(t, o, e) {\n return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));\n}\nfunction _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nfunction _get() {\n return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {\n var p = _superPropBase(e, t);\n if (p) {\n var n = Object.getOwnPropertyDescriptor(p, t);\n return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;\n }\n }, _get.apply(null, arguments);\n}\nfunction _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && _setPrototypeOf(t, e);\n}\nfunction _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function () {\n return !!t;\n })();\n}\nfunction _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return _assertThisInitialized(t);\n}\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nfunction _slicedToArray(r, e) {\n return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _superPropBase(t, o) {\n for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););\n return t;\n}\nfunction _toConsumableArray(r) {\n return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n}\n\nfunction hasProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction lastItemOf(arr) {\n return arr[arr.length - 1];\n}\n\n// push only the items not included in the array\nfunction pushUnique(arr) {\n for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n items[_key - 1] = arguments[_key];\n }\n items.forEach(function (item) {\n if (arr.includes(item)) {\n return;\n }\n arr.push(item);\n });\n return arr;\n}\nfunction stringToArray(str, separator) {\n // convert empty string to an empty array\n return str ? str.split(separator) : [];\n}\nfunction isInRange(testVal, min, max) {\n var minOK = min === undefined || testVal >= min;\n var maxOK = max === undefined || testVal <= max;\n return minOK && maxOK;\n}\nfunction limitToRange(val, min, max) {\n if (val < min) {\n return min;\n }\n if (val > max) {\n return max;\n }\n return val;\n}\nfunction createTagRepeat(tagName, repeat) {\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';\n var openTagSrc = Object.keys(attributes).reduce(function (src, attr) {\n var val = attributes[attr];\n if (typeof val === 'function') {\n val = val(index);\n }\n return \"\".concat(src, \" \").concat(attr, \"=\\\"\").concat(val, \"\\\"\");\n }, tagName);\n html += \"<\".concat(openTagSrc, \">\");\n var next = index + 1;\n return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html;\n}\n\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nfunction optimizeTemplateHTML(html) {\n return html.replace(/>\\s+/g, '>').replace(/\\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var baseDay = new Date(baseDate).getDay();\n return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n}\n\n// Get the ISO week of a date\nfunction getWeek(date) {\n // start of ISO week is Monday\n var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n // 1st week == the week where the 4th of January is in\n var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nfunction startOfYearPeriod(date, years) {\n /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n var year = new Date(date).getFullYear();\n return Math.floor(year / years) * years;\n}\n\n// pattern for format parts\nvar reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nvar reNonDateParts = /[\\s!-/:-@[-`{-~年月日]+/;\n// cache for persed formats\nvar knownFormats = {};\n// parse funtions for date parts\nvar parseFns = {\n y: function y(date, year) {\n return new Date(date).setFullYear(parseInt(year, 10));\n },\n m: function m(date, month, locale) {\n var newDate = new Date(date);\n var monthIndex = parseInt(month, 10) - 1;\n if (isNaN(monthIndex)) {\n if (!month) {\n return NaN;\n }\n var monthName = month.toLowerCase();\n var compareNames = function compareNames(name) {\n return name.toLowerCase().startsWith(monthName);\n };\n // compare with both short and full names because some locales have periods\n // in the short names (not equal to the first X letters of the full names)\n monthIndex = locale.monthsShort.findIndex(compareNames);\n if (monthIndex < 0) {\n monthIndex = locale.months.findIndex(compareNames);\n }\n if (monthIndex < 0) {\n return NaN;\n }\n }\n newDate.setMonth(monthIndex);\n return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime();\n },\n d: function d(date, day) {\n return new Date(date).setDate(parseInt(day, 10));\n }\n};\n// format functions for date parts\nvar formatFns = {\n d: function d(date) {\n return date.getDate();\n },\n dd: function dd(date) {\n return padZero(date.getDate(), 2);\n },\n D: function D(date, locale) {\n return locale.daysShort[date.getDay()];\n },\n DD: function DD(date, locale) {\n return locale.days[date.getDay()];\n },\n m: function m(date) {\n return date.getMonth() + 1;\n },\n mm: function mm(date) {\n return padZero(date.getMonth() + 1, 2);\n },\n M: function M(date, locale) {\n return locale.monthsShort[date.getMonth()];\n },\n MM: function MM(date, locale) {\n return locale.months[date.getMonth()];\n },\n y: function y(date) {\n return date.getFullYear();\n },\n yy: function yy(date) {\n return padZero(date.getFullYear(), 2).slice(-2);\n },\n yyyy: function yyyy(date) {\n return padZero(date.getFullYear(), 4);\n }\n};\n\n// get month index in normal range (0 - 11) from any number\nfunction normalizeMonth(monthIndex) {\n return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n}\nfunction padZero(num, length) {\n return num.toString().padStart(length, '0');\n}\nfunction parseFormatString(format) {\n if (typeof format !== 'string') {\n throw new Error(\"Invalid date format.\");\n }\n if (format in knownFormats) {\n return knownFormats[format];\n }\n\n // sprit the format string into parts and seprators\n var separators = format.split(reFormatTokens);\n var parts = format.match(new RegExp(reFormatTokens, 'g'));\n if (separators.length === 0 || !parts) {\n throw new Error(\"Invalid date format.\");\n }\n\n // collect format functions used in the format\n var partFormatters = parts.map(function (token) {\n return formatFns[token];\n });\n\n // collect parse function keys used in the format\n // iterate over parseFns' keys in order to keep the order of the keys.\n var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) {\n var token = parts.find(function (part) {\n return part[0] !== 'D' && part[0].toLowerCase() === key;\n });\n if (token) {\n keys.push(key);\n }\n return keys;\n }, []);\n return knownFormats[format] = {\n parser: function parser(dateStr, locale) {\n var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) {\n if (part.length > 0 && parts[index]) {\n var token = parts[index][0];\n if (token === 'M') {\n dtParts.m = part;\n } else if (token !== 'D') {\n dtParts[token] = part;\n }\n }\n return dtParts;\n }, {});\n\n // iterate over partParserkeys so that the parsing is made in the oder\n // of year, month and day to prevent the day parser from correcting last\n // day of month wrongly\n return partParserKeys.reduce(function (origDate, key) {\n var newDate = parseFns[key](origDate, dateParts[key], locale);\n // ingnore the part failed to parse\n return isNaN(newDate) ? origDate : newDate;\n }, today());\n },\n formatter: function formatter(date, locale) {\n var dateStr = partFormatters.reduce(function (str, fn, index) {\n return str += \"\".concat(separators[index]).concat(fn(date, locale));\n }, '');\n // separators' length is always parts' length + 1,\n return dateStr += lastItemOf(separators);\n }\n };\n}\nfunction parseDate(dateStr, format, locale) {\n if (dateStr instanceof Date || typeof dateStr === 'number') {\n var date = stripTime(dateStr);\n return isNaN(date) ? undefined : date;\n }\n if (!dateStr) {\n return undefined;\n }\n if (dateStr === 'today') {\n return today();\n }\n if (format && format.toValue) {\n var _date = format.toValue(dateStr, format, locale);\n return isNaN(_date) ? undefined : stripTime(_date);\n }\n return parseFormatString(format).parser(dateStr, locale);\n}\nfunction formatDate(date, format, locale) {\n if (isNaN(date) || !date && date !== 0) {\n return '';\n }\n var dateObj = typeof date === 'number' ? new Date(date) : date;\n if (format.toDisplay) {\n return format.toDisplay(dateObj, format, locale);\n }\n return parseFormatString(format).formatter(dateObj, locale);\n}\n\nvar listenerRegistry = new WeakMap();\nvar _EventTarget$prototyp = EventTarget.prototype,\n addEventListener = _EventTarget$prototyp.addEventListener,\n removeEventListener = _EventTarget$prototyp.removeEventListener;\n\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n// - each definition must be a flat array of event target and the arguments\n// used to call addEventListener() on the target\nfunction registerListeners(keyObj, listeners) {\n var registered = listenerRegistry.get(keyObj);\n if (!registered) {\n registered = [];\n listenerRegistry.set(keyObj, registered);\n }\n listeners.forEach(function (listener) {\n addEventListener.call.apply(addEventListener, _toConsumableArray(listener));\n registered.push(listener);\n });\n}\nfunction unregisterListeners(keyObj) {\n var listeners = listenerRegistry.get(keyObj);\n if (!listeners) {\n return;\n }\n listeners.forEach(function (listener) {\n removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener));\n });\n listenerRegistry[\"delete\"](keyObj);\n}\n\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n var getComposedPath = function getComposedPath(node) {\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n path.push(node);\n var parent;\n if (node.parentNode) {\n parent = node.parentNode;\n } else if (node.host) {\n // ShadowRoot\n parent = node.host;\n } else if (node.defaultView) {\n // Document\n parent = node.defaultView;\n }\n return parent ? getComposedPath(parent, path) : path;\n };\n Event.prototype.composedPath = function () {\n return getComposedPath(this.target);\n };\n}\nfunction findFromPath(path, criteria, currentTarget) {\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var el = path[index];\n if (criteria(el)) {\n return el;\n } else if (el === currentTarget || !el.parentElement) {\n // stop when reaching currentTarget or \n return;\n }\n return findFromPath(path, criteria, currentTarget, index + 1);\n}\n\n// Search for the actual target of a delegated event\nfunction findElementInEventPath(ev, selector) {\n var criteria = typeof selector === 'function' ? selector : function (el) {\n return el.matches(selector);\n };\n return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n\n// default locales\nvar locales = {\n en: {\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n today: \"Today\",\n clear: \"Clear\",\n titleFormat: \"MM y\"\n }\n};\n\n// config options updatable by setOptions() and their default values\nvar defaultOptions = {\n autohide: false,\n beforeShowDay: null,\n beforeShowDecade: null,\n beforeShowMonth: null,\n beforeShowYear: null,\n calendarWeeks: false,\n clearBtn: false,\n dateDelimiter: ',',\n datesDisabled: [],\n daysOfWeekDisabled: [],\n daysOfWeekHighlighted: [],\n defaultViewDate: undefined,\n // placeholder, defaults to today() by the program\n disableTouchKeyboard: false,\n format: 'mm/dd/yyyy',\n language: 'en',\n maxDate: null,\n maxNumberOfDates: 1,\n maxView: 3,\n minDate: null,\n nextArrow: '',\n orientation: 'auto',\n pickLevel: 0,\n prevArrow: '',\n showDaysOfWeek: true,\n showOnClick: true,\n showOnFocus: true,\n startView: 0,\n title: '',\n todayBtn: false,\n todayBtnMode: 0,\n todayHighlight: false,\n updateOnBlur: true,\n weekStart: 0\n};\n\nvar range = document.createRange();\nfunction parseHTML(html) {\n return range.createContextualFragment(html);\n}\nfunction hideElement(el) {\n if (el.style.display === 'none') {\n return;\n }\n // back up the existing display setting in data-style-display\n if (el.style.display) {\n el.dataset.styleDisplay = el.style.display;\n }\n el.style.display = 'none';\n}\nfunction showElement(el) {\n if (el.style.display !== 'none') {\n return;\n }\n if (el.dataset.styleDisplay) {\n // restore backed-up dispay property\n el.style.display = el.dataset.styleDisplay;\n delete el.dataset.styleDisplay;\n } else {\n el.style.display = '';\n }\n}\nfunction emptyChildNodes(el) {\n if (el.firstChild) {\n el.removeChild(el.firstChild);\n emptyChildNodes(el);\n }\n}\nfunction replaceChildNodes(el, newChildNodes) {\n emptyChildNodes(el);\n if (newChildNodes instanceof DocumentFragment) {\n el.appendChild(newChildNodes);\n } else if (typeof newChildNodes === 'string') {\n el.appendChild(parseHTML(newChildNodes));\n } else if (typeof newChildNodes.forEach === 'function') {\n newChildNodes.forEach(function (node) {\n el.appendChild(node);\n });\n }\n}\n\nvar defaultLang = defaultOptions.language,\n defaultFormat = defaultOptions.format,\n defaultWeekStart = defaultOptions.weekStart;\n\n// Reducer function to filter out invalid day-of-week from the input\nfunction sanitizeDOW(dow, day) {\n return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow;\n}\nfunction calcEndOfWeek(startOfWeek) {\n return (startOfWeek + 6) % 7;\n}\n\n// validate input date. if invalid, fallback to the original value\nfunction validateDate(value, format, locale, origValue) {\n var date = parseDate(value, format, locale);\n return date !== undefined ? date : origValue;\n}\n\n// Validate viewId. if invalid, fallback to the original value\nfunction validateViewId(value, origValue) {\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;\n var viewId = parseInt(value, 10);\n return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n\n// Create Datepicker configuration to set\nfunction processOptions(options, datepicker) {\n var inOpts = Object.assign({}, options);\n var config = {};\n var locales = datepicker.constructor.locales;\n var _ref = datepicker.config || {},\n format = _ref.format,\n language = _ref.language,\n locale = _ref.locale,\n maxDate = _ref.maxDate,\n maxView = _ref.maxView,\n minDate = _ref.minDate,\n pickLevel = _ref.pickLevel,\n startView = _ref.startView,\n weekStart = _ref.weekStart;\n if (inOpts.language) {\n var lang;\n if (inOpts.language !== language) {\n if (locales[inOpts.language]) {\n lang = inOpts.language;\n } else {\n // Check if langauge + region tag can fallback to the one without\n // region (e.g. fr-CA → fr)\n lang = inOpts.language.split('-')[0];\n if (locales[lang] === undefined) {\n lang = false;\n }\n }\n }\n delete inOpts.language;\n if (lang) {\n language = config.language = lang;\n\n // update locale as well when updating language\n var origLocale = locale || locales[defaultLang];\n // use default language's properties for the fallback\n locale = Object.assign({\n format: defaultFormat,\n weekStart: defaultWeekStart\n }, locales[defaultLang]);\n if (language !== defaultLang) {\n Object.assign(locale, locales[language]);\n }\n config.locale = locale;\n // if format and/or weekStart are the same as old locale's defaults,\n // update them to new locale's defaults\n if (format === origLocale.format) {\n format = config.format = locale.format;\n }\n if (weekStart === origLocale.weekStart) {\n weekStart = config.weekStart = locale.weekStart;\n config.weekEnd = calcEndOfWeek(locale.weekStart);\n }\n }\n }\n if (inOpts.format) {\n var hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n var hasToValue = typeof inOpts.format.toValue === 'function';\n var validFormatString = reFormatTokens.test(inOpts.format);\n if (hasToDisplay && hasToValue || validFormatString) {\n format = config.format = inOpts.format;\n }\n delete inOpts.format;\n }\n\n //*** dates ***//\n // while min and maxDate for \"no limit\" in the options are better to be null\n // (especially when updating), the ones in the config have to be undefined\n // because null is treated as 0 (= unix epoch) when comparing with time value\n var minDt = minDate;\n var maxDt = maxDate;\n if (inOpts.minDate !== undefined) {\n minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n : validateDate(inOpts.minDate, format, locale, minDt);\n delete inOpts.minDate;\n }\n if (inOpts.maxDate !== undefined) {\n maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt);\n delete inOpts.maxDate;\n }\n if (maxDt < minDt) {\n minDate = config.minDate = maxDt;\n maxDate = config.maxDate = minDt;\n } else {\n if (minDate !== minDt) {\n minDate = config.minDate = minDt;\n }\n if (maxDate !== maxDt) {\n maxDate = config.maxDate = maxDt;\n }\n }\n if (inOpts.datesDisabled) {\n config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) {\n var date = parseDate(dt, format, locale);\n return date !== undefined ? pushUnique(dates, date) : dates;\n }, []);\n delete inOpts.datesDisabled;\n }\n if (inOpts.defaultViewDate !== undefined) {\n var viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n if (viewDate !== undefined) {\n config.defaultViewDate = viewDate;\n }\n delete inOpts.defaultViewDate;\n }\n\n //*** days of week ***//\n if (inOpts.weekStart !== undefined) {\n var wkStart = Number(inOpts.weekStart) % 7;\n if (!isNaN(wkStart)) {\n weekStart = config.weekStart = wkStart;\n config.weekEnd = calcEndOfWeek(wkStart);\n }\n delete inOpts.weekStart;\n }\n if (inOpts.daysOfWeekDisabled) {\n config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekDisabled;\n }\n if (inOpts.daysOfWeekHighlighted) {\n config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekHighlighted;\n }\n\n //*** multi date ***//\n if (inOpts.maxNumberOfDates !== undefined) {\n var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n if (maxNumberOfDates >= 0) {\n config.maxNumberOfDates = maxNumberOfDates;\n config.multidate = maxNumberOfDates !== 1;\n }\n delete inOpts.maxNumberOfDates;\n }\n if (inOpts.dateDelimiter) {\n config.dateDelimiter = String(inOpts.dateDelimiter);\n delete inOpts.dateDelimiter;\n }\n\n //*** pick level & view ***//\n var newPickLevel = pickLevel;\n if (inOpts.pickLevel !== undefined) {\n newPickLevel = validateViewId(inOpts.pickLevel, 2);\n delete inOpts.pickLevel;\n }\n if (newPickLevel !== pickLevel) {\n pickLevel = config.pickLevel = newPickLevel;\n }\n var newMaxView = maxView;\n if (inOpts.maxView !== undefined) {\n newMaxView = validateViewId(inOpts.maxView, maxView);\n delete inOpts.maxView;\n }\n // ensure max view >= pick level\n newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n if (newMaxView !== maxView) {\n maxView = config.maxView = newMaxView;\n }\n var newStartView = startView;\n if (inOpts.startView !== undefined) {\n newStartView = validateViewId(inOpts.startView, newStartView);\n delete inOpts.startView;\n }\n // ensure pick level <= start view <= max view\n if (newStartView < pickLevel) {\n newStartView = pickLevel;\n } else if (newStartView > maxView) {\n newStartView = maxView;\n }\n if (newStartView !== startView) {\n config.startView = newStartView;\n }\n\n //*** template ***//\n if (inOpts.prevArrow) {\n var prevArrow = parseHTML(inOpts.prevArrow);\n if (prevArrow.childNodes.length > 0) {\n config.prevArrow = prevArrow.childNodes;\n }\n delete inOpts.prevArrow;\n }\n if (inOpts.nextArrow) {\n var nextArrow = parseHTML(inOpts.nextArrow);\n if (nextArrow.childNodes.length > 0) {\n config.nextArrow = nextArrow.childNodes;\n }\n delete inOpts.nextArrow;\n }\n\n //*** misc ***//\n if (inOpts.disableTouchKeyboard !== undefined) {\n config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n delete inOpts.disableTouchKeyboard;\n }\n if (inOpts.orientation) {\n var orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n config.orientation = {\n x: orientation.find(function (x) {\n return x === 'left' || x === 'right';\n }) || 'auto',\n y: orientation.find(function (y) {\n return y === 'top' || y === 'bottom';\n }) || 'auto'\n };\n delete inOpts.orientation;\n }\n if (inOpts.todayBtnMode !== undefined) {\n switch (inOpts.todayBtnMode) {\n case 0:\n case 1:\n config.todayBtnMode = inOpts.todayBtnMode;\n }\n delete inOpts.todayBtnMode;\n }\n\n //*** copy the rest ***//\n Object.keys(inOpts).forEach(function (key) {\n if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) {\n config[key] = inOpts[key];\n }\n });\n return config;\n}\n\nvar pickerTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n \\n
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \");\n\nvar daysTemplate = optimizeTemplateHTML(\"
    \\n
    \".concat(createTagRepeat('span', 7, {\n \"class\": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \").concat(createTagRepeat('span', 42, {\n \"class\": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'\n}), \"
    \\n
    \"));\n\nvar calendarWeeksTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \".concat(createTagRepeat('span', 6, {\n \"class\": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \"));\n\n// Base class of the view classes\nvar View = /*#__PURE__*/function () {\n function View(picker, config) {\n _classCallCheck(this, View);\n Object.assign(this, config, {\n picker: picker,\n element: parseHTML(\"
    \").firstChild,\n selected: []\n });\n this.init(this.picker.datepicker.config);\n }\n return _createClass(View, [{\n key: \"init\",\n value: function init(options) {\n if (options.pickLevel !== undefined) {\n this.isMinView = this.id === options.pickLevel;\n }\n this.setOptions(options);\n this.updateFocus();\n this.updateSelection();\n }\n\n // Execute beforeShow() callback and apply the result to the element\n // args:\n // - current - current value on the iteration on view rendering\n // - timeValue - time value of the date to pass to beforeShow()\n }, {\n key: \"performBeforeHook\",\n value: function performBeforeHook(el, current, timeValue) {\n var result = this.beforeShow(new Date(timeValue));\n switch (_typeof(result)) {\n case 'boolean':\n result = {\n enabled: result\n };\n break;\n case 'string':\n result = {\n classes: result\n };\n }\n if (result) {\n if (result.enabled === false) {\n el.classList.add('disabled');\n pushUnique(this.disabled, current);\n }\n if (result.classes) {\n var _el$classList;\n var extraClasses = result.classes.split(/\\s+/);\n (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses));\n if (extraClasses.includes('disabled')) {\n pushUnique(this.disabled, current);\n }\n }\n if (result.content) {\n replaceChildNodes(el, result.content);\n }\n }\n }\n }]);\n}();\n\nvar DaysView = /*#__PURE__*/function (_View) {\n function DaysView(picker) {\n _classCallCheck(this, DaysView);\n return _callSuper(this, DaysView, [picker, {\n id: 0,\n name: 'days',\n cellClass: 'day'\n }]);\n }\n _inherits(DaysView, _View);\n return _createClass(DaysView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n var inner = parseHTML(daysTemplate).firstChild;\n this.dow = inner.firstChild;\n this.grid = inner.lastChild;\n this.element.appendChild(inner);\n }\n _get(_getPrototypeOf(DaysView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var _this = this;\n var updateDOW;\n if (hasProperty(options, 'minDate')) {\n this.minDate = options.minDate;\n }\n if (hasProperty(options, 'maxDate')) {\n this.maxDate = options.maxDate;\n }\n if (options.datesDisabled) {\n this.datesDisabled = options.datesDisabled;\n }\n if (options.daysOfWeekDisabled) {\n this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n updateDOW = true;\n }\n if (options.daysOfWeekHighlighted) {\n this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n }\n if (options.todayHighlight !== undefined) {\n this.todayHighlight = options.todayHighlight;\n }\n if (options.weekStart !== undefined) {\n this.weekStart = options.weekStart;\n this.weekEnd = options.weekEnd;\n updateDOW = true;\n }\n if (options.locale) {\n var locale = this.locale = options.locale;\n this.dayNames = locale.daysMin;\n this.switchLabelFormat = locale.titleFormat;\n updateDOW = true;\n }\n if (options.beforeShowDay !== undefined) {\n this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined;\n }\n if (options.calendarWeeks !== undefined) {\n if (options.calendarWeeks && !this.calendarWeeks) {\n var weeksElem = parseHTML(calendarWeeksTemplate).firstChild;\n this.calendarWeeks = {\n element: weeksElem,\n dow: weeksElem.firstChild,\n weeks: weeksElem.lastChild\n };\n this.element.insertBefore(weeksElem, this.element.firstChild);\n } else if (this.calendarWeeks && !options.calendarWeeks) {\n this.element.removeChild(this.calendarWeeks.element);\n this.calendarWeeks = null;\n }\n }\n if (options.showDaysOfWeek !== undefined) {\n if (options.showDaysOfWeek) {\n showElement(this.dow);\n if (this.calendarWeeks) {\n showElement(this.calendarWeeks.dow);\n }\n } else {\n hideElement(this.dow);\n if (this.calendarWeeks) {\n hideElement(this.calendarWeeks.dow);\n }\n }\n }\n\n // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n if (updateDOW) {\n Array.from(this.dow.children).forEach(function (el, index) {\n var dow = (_this.weekStart + index) % 7;\n el.textContent = _this.dayNames[dow];\n el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n });\n }\n }\n\n // Apply update on the focused date to view's settings\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var viewYear = viewDate.getFullYear();\n var viewMonth = viewDate.getMonth();\n var firstOfMonth = dateValue(viewYear, viewMonth, 1);\n var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n this.first = firstOfMonth;\n this.last = dateValue(viewYear, viewMonth + 1, 0);\n this.start = start;\n this.focused = this.picker.viewDate;\n }\n\n // Apply update on the selected dates to view's settings\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates;\n if (rangepicker) {\n this.range = rangepicker.dates;\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // update today marker on ever render\n this.today = this.todayHighlight ? today() : undefined;\n // refresh disabled dates on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = _toConsumableArray(this.datesDisabled);\n var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale);\n this.picker.setViewSwitchLabel(switchLabel);\n this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n if (this.calendarWeeks) {\n // start of the UTC week (Monday) of the 1st of the month\n var startOfWeek = dayOfTheWeekOf(this.first, 1, 1);\n Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) {\n el.textContent = getWeek(addWeeks(startOfWeek, index));\n });\n }\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = addDays(_this2.start, index);\n var date = new Date(current);\n var day = date.getDay();\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n el.dataset.date = current;\n el.textContent = date.getDate();\n if (current < _this2.first) {\n classList.add('prev', 'text-gray-500', 'dark:text-white');\n } else if (current > _this2.last) {\n classList.add('next', 'text-gray-500', 'dark:text-white');\n }\n if (_this2.today === current) {\n classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n }\n if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n }\n if (_this2.daysOfWeekDisabled.includes(day)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n pushUnique(_this2.disabled, current);\n }\n if (_this2.daysOfWeekHighlighted.includes(day)) {\n classList.add('highlighted');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg', 'rounded-r-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg', 'rounded-l-lg');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, current);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused');\n el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.dataset.date);\n var classList = el.classList;\n classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg');\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / 86400000);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction computeMonthRange(range, thisYear) {\n if (!range || !range[0] || !range[1]) {\n return;\n }\n var _range = _slicedToArray(range, 2),\n _range$ = _slicedToArray(_range[0], 2),\n startY = _range$[0],\n startM = _range$[1],\n _range$2 = _slicedToArray(_range[1], 2),\n endY = _range$2[0],\n endM = _range$2[1];\n if (startY > thisYear || endY < thisYear) {\n return;\n }\n return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12];\n}\nvar MonthsView = /*#__PURE__*/function (_View) {\n function MonthsView(picker) {\n _classCallCheck(this, MonthsView);\n return _callSuper(this, MonthsView, [picker, {\n id: 1,\n name: 'months',\n cellClass: 'month'\n }]);\n }\n _inherits(MonthsView, _View);\n return _createClass(MonthsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.grid = this.element;\n this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {\n 'data-month': function dataMonth(ix) {\n return ix;\n }\n })));\n }\n _get(_getPrototypeOf(MonthsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options.locale) {\n this.monthNames = options.locale.monthsShort;\n }\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minMonth = this.minDate = undefined;\n } else {\n var minDateObj = new Date(options.minDate);\n this.minYear = minDateObj.getFullYear();\n this.minMonth = minDateObj.getMonth();\n this.minDate = minDateObj.setDate(1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxMonth = this.maxDate = undefined;\n } else {\n var maxDateObj = new Date(options.maxDate);\n this.maxYear = maxDateObj.getFullYear();\n this.maxMonth = maxDateObj.getMonth();\n this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n }\n }\n if (options.beforeShowMonth !== undefined) {\n this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n this.year = viewDate.getFullYear();\n this.focused = viewDate.getMonth();\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (selected, timeValue) {\n var date = new Date(timeValue);\n var year = date.getFullYear();\n var month = date.getMonth();\n if (selected[year] === undefined) {\n selected[year] = [month];\n } else {\n pushUnique(selected[year], month);\n }\n return selected;\n }, {});\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n var date = new Date(timeValue);\n return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n // refresh disabled months on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(this.year);\n this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n var selected = this.selected[this.year] || [];\n var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n var isMinYear = this.year === this.minYear;\n var isMaxYear = this.year === this.maxYear;\n var range = computeMonthRange(this.range, this.year);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var date = dateValue(_this.year, index, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this.cellClass);\n if (_this.isMinView) {\n el.dataset.date = date;\n }\n // reset text on every render to clear the custom content set\n // by beforeShow hook at previous render\n el.textContent = _this.monthNames[index];\n if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) {\n classList.add('disabled');\n }\n if (range) {\n var _range2 = _slicedToArray(range, 2),\n rangeStart = _range2[0],\n rangeEnd = _range2[1];\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this.focused) {\n classList.add('focused');\n }\n if (_this.beforeShow) {\n _this.performBeforeHook(el, index, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this2 = this;\n var selected = this.selected[this.year] || [];\n var _ref = computeMonthRange(this.range, this.year) || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused');\n el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n });\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this2.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[this.focused].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction toTitleCase(word) {\n return _toConsumableArray(word).reduce(function (str, ch, ix) {\n return str += ix ? ch : ch.toUpperCase();\n }, '');\n}\n\n// Class representing the years and decades view elements\nvar YearsView = /*#__PURE__*/function (_View) {\n function YearsView(picker, config) {\n _classCallCheck(this, YearsView);\n return _callSuper(this, YearsView, [picker, config]);\n }\n _inherits(YearsView, _View);\n return _createClass(YearsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.navStep = this.step * 10;\n this.beforeShowOption = \"beforeShow\".concat(toTitleCase(this.cellClass));\n this.grid = this.element;\n this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n }\n _get(_getPrototypeOf(YearsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minDate = undefined;\n } else {\n this.minYear = startOfYearPeriod(options.minDate, this.step);\n this.minDate = dateValue(this.minYear, 0, 1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxDate = undefined;\n } else {\n this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n this.maxDate = dateValue(this.maxYear, 11, 31);\n }\n }\n if (options[this.beforeShowOption] !== undefined) {\n var beforeShow = options[this.beforeShowOption];\n this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var first = startOfYearPeriod(viewDate, this.navStep);\n var last = first + 9 * this.step;\n this.first = first;\n this.last = last;\n this.start = first - this.step;\n this.focused = startOfYearPeriod(viewDate, this.step);\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this = this;\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (years, timeValue) {\n return pushUnique(years, startOfYearPeriod(timeValue, _this.step));\n }, []);\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n if (timeValue !== undefined) {\n return startOfYearPeriod(timeValue, _this.step);\n }\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // refresh disabled years on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(\"\".concat(this.first, \"-\").concat(this.last));\n this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = _this2.start + index * _this2.step;\n var date = dateValue(current, 0, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n if (_this2.isMinView) {\n el.dataset.date = date;\n }\n el.textContent = el.dataset.year = current;\n if (index === 0) {\n classList.add('prev');\n } else if (index === 11) {\n classList.add('next');\n }\n if (current < _this2.minYear || current > _this2.maxYear) {\n classList.add('disabled');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.textContent);\n var classList = el.classList;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / this.step);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction triggerDatepickerEvent(datepicker, type) {\n var detail = {\n date: datepicker.getDate(),\n viewDate: new Date(datepicker.picker.viewDate),\n viewId: datepicker.picker.currentView.id,\n datepicker: datepicker\n };\n datepicker.element.dispatchEvent(new CustomEvent(type, {\n detail: detail\n }));\n}\n\n// direction: -1 (to previous), 1 (to next)\nfunction goToPrevOrNext(datepicker, direction) {\n var _datepicker$config = datepicker.config,\n minDate = _datepicker$config.minDate,\n maxDate = _datepicker$config.maxDate;\n var _datepicker$picker = datepicker.picker,\n currentView = _datepicker$picker.currentView,\n viewDate = _datepicker$picker.viewDate;\n var newViewDate;\n switch (currentView.id) {\n case 0:\n newViewDate = addMonths(viewDate, direction);\n break;\n case 1:\n newViewDate = addYears(viewDate, direction);\n break;\n default:\n newViewDate = addYears(viewDate, direction * currentView.navStep);\n }\n newViewDate = limitToRange(newViewDate, minDate, maxDate);\n datepicker.picker.changeFocus(newViewDate).render();\n}\nfunction switchView(datepicker) {\n var viewId = datepicker.picker.currentView.id;\n if (viewId === datepicker.config.maxView) {\n return;\n }\n datepicker.picker.changeView(viewId + 1).render();\n}\nfunction unfocus(datepicker) {\n if (datepicker.config.updateOnBlur) {\n datepicker.update({\n autohide: true\n });\n } else {\n datepicker.refresh('input');\n datepicker.hide();\n }\n}\n\nfunction goToSelectedMonthOrYear(datepicker, selection) {\n var picker = datepicker.picker;\n var viewDate = new Date(picker.viewDate);\n var viewId = picker.currentView.id;\n var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear());\n picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\nfunction onClickTodayBtn(datepicker) {\n var picker = datepicker.picker;\n var currentDate = today();\n if (datepicker.config.todayBtnMode === 1) {\n if (datepicker.config.autohide) {\n datepicker.setDate(currentDate);\n return;\n }\n datepicker.setDate(currentDate, {\n render: false\n });\n picker.update();\n }\n if (picker.viewDate !== currentDate) {\n picker.changeFocus(currentDate);\n }\n picker.changeView(0).render();\n}\nfunction onClickClearBtn(datepicker) {\n datepicker.setDate({\n clear: true\n });\n}\nfunction onClickViewSwitch(datepicker) {\n switchView(datepicker);\n}\nfunction onClickPrevBtn(datepicker) {\n goToPrevOrNext(datepicker, -1);\n}\nfunction onClickNextBtn(datepicker) {\n goToPrevOrNext(datepicker, 1);\n}\n\n// For the picker's main block to delegete the events from `datepicker-cell`s\nfunction onClickView(datepicker, ev) {\n var target = findElementInEventPath(ev, '.datepicker-cell');\n if (!target || target.classList.contains('disabled')) {\n return;\n }\n var _datepicker$picker$cu = datepicker.picker.currentView,\n id = _datepicker$picker$cu.id,\n isMinView = _datepicker$picker$cu.isMinView;\n if (isMinView) {\n datepicker.setDate(Number(target.dataset.date));\n } else if (id === 1) {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n } else {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n }\n}\nfunction onClickPicker(datepicker) {\n if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.focus();\n }\n}\n\nfunction processPickerOptions(picker, options) {\n if (options.title !== undefined) {\n if (options.title) {\n picker.controls.title.textContent = options.title;\n showElement(picker.controls.title);\n } else {\n picker.controls.title.textContent = '';\n hideElement(picker.controls.title);\n }\n }\n if (options.prevArrow) {\n var prevBtn = picker.controls.prevBtn;\n emptyChildNodes(prevBtn);\n options.prevArrow.forEach(function (node) {\n prevBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.nextArrow) {\n var nextBtn = picker.controls.nextBtn;\n emptyChildNodes(nextBtn);\n options.nextArrow.forEach(function (node) {\n nextBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.locale) {\n picker.controls.todayBtn.textContent = options.locale.today;\n picker.controls.clearBtn.textContent = options.locale.clear;\n }\n if (options.todayBtn !== undefined) {\n if (options.todayBtn) {\n showElement(picker.controls.todayBtn);\n } else {\n hideElement(picker.controls.todayBtn);\n }\n }\n if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) {\n var _picker$datepicker$co = picker.datepicker.config,\n minDate = _picker$datepicker$co.minDate,\n maxDate = _picker$datepicker$co.maxDate;\n picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate);\n }\n if (options.clearBtn !== undefined) {\n if (options.clearBtn) {\n showElement(picker.controls.clearBtn);\n } else {\n hideElement(picker.controls.clearBtn);\n }\n }\n}\n\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction computeResetViewDate(datepicker) {\n var dates = datepicker.dates,\n config = datepicker.config;\n var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate;\n return limitToRange(viewDate, config.minDate, config.maxDate);\n}\n\n// Change current view's view date\nfunction setViewDate(picker, newDate) {\n var oldViewDate = new Date(picker.viewDate);\n var newViewDate = new Date(newDate);\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n year = _picker$currentView.year,\n first = _picker$currentView.first,\n last = _picker$currentView.last;\n var viewYear = newViewDate.getFullYear();\n picker.viewDate = newDate;\n if (viewYear !== oldViewDate.getFullYear()) {\n triggerDatepickerEvent(picker.datepicker, 'changeYear');\n }\n if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n }\n\n // return whether the new date is in different period on time from the one\n // displayed in the current view\n // when true, the view needs to be re-rendered on the next UI refresh.\n switch (id) {\n case 0:\n return newDate < first || newDate > last;\n case 1:\n return viewYear !== year;\n default:\n return viewYear < first || viewYear > last;\n }\n}\nfunction getTextDirection(el) {\n return window.getComputedStyle(el).direction;\n}\n\n// Class representing the picker UI\nvar Picker = /*#__PURE__*/function () {\n function Picker(datepicker) {\n _classCallCheck(this, Picker);\n this.datepicker = datepicker;\n var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n var element = this.element = parseHTML(template).firstChild;\n var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3),\n header = _element$firstChild$c[0],\n main = _element$firstChild$c[1],\n footer = _element$firstChild$c[2];\n var title = header.firstElementChild;\n var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3),\n prevBtn = _header$lastElementCh[0],\n viewSwitch = _header$lastElementCh[1],\n nextBtn = _header$lastElementCh[2];\n var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2),\n todayBtn = _footer$firstChild$ch[0],\n clearBtn = _footer$firstChild$ch[1];\n var controls = {\n title: title,\n prevBtn: prevBtn,\n viewSwitch: viewSwitch,\n nextBtn: nextBtn,\n todayBtn: todayBtn,\n clearBtn: clearBtn\n };\n this.main = main;\n this.controls = controls;\n var elementClass = datepicker.inline ? 'inline' : 'dropdown';\n element.classList.add(\"datepicker-\".concat(elementClass));\n elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null;\n processPickerOptions(this, datepicker.config);\n this.viewDate = computeResetViewDate(datepicker);\n\n // set up event listeners\n registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), {\n capture: true\n }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]);\n\n // set up views\n this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {\n id: 2,\n name: 'years',\n cellClass: 'year',\n step: 1\n }), new YearsView(this, {\n id: 3,\n name: 'decades',\n cellClass: 'decade',\n step: 10\n })];\n this.currentView = this.views[datepicker.config.startView];\n this.currentView.render();\n this.main.appendChild(this.currentView.element);\n datepicker.config.container.appendChild(this.element);\n }\n return _createClass(Picker, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n processPickerOptions(this, options);\n this.views.forEach(function (view) {\n view.init(options, false);\n });\n this.currentView.render();\n }\n }, {\n key: \"detach\",\n value: function detach() {\n this.datepicker.config.container.removeChild(this.element);\n }\n }, {\n key: \"show\",\n value: function show() {\n if (this.active) {\n return;\n }\n this.element.classList.add('active', 'block');\n this.element.classList.remove('hidden');\n this.active = true;\n var datepicker = this.datepicker;\n if (!datepicker.inline) {\n // ensure picker's direction matches input's\n var inputDirection = getTextDirection(datepicker.inputField);\n if (inputDirection !== getTextDirection(datepicker.config.container)) {\n this.element.dir = inputDirection;\n } else if (this.element.dir) {\n this.element.removeAttribute('dir');\n }\n this.place();\n if (datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.blur();\n }\n }\n triggerDatepickerEvent(datepicker, 'show');\n }\n }, {\n key: \"hide\",\n value: function hide() {\n if (!this.active) {\n return;\n }\n this.datepicker.exitEditMode();\n this.element.classList.remove('active', 'block');\n this.element.classList.add('active', 'block', 'hidden');\n this.active = false;\n triggerDatepickerEvent(this.datepicker, 'hide');\n }\n }, {\n key: \"place\",\n value: function place() {\n var _this$element = this.element,\n classList = _this$element.classList,\n style = _this$element.style;\n var _this$datepicker = this.datepicker,\n config = _this$datepicker.config,\n inputField = _this$datepicker.inputField;\n var container = config.container;\n var _this$element$getBoun = this.element.getBoundingClientRect(),\n calendarWidth = _this$element$getBoun.width,\n calendarHeight = _this$element$getBoun.height;\n var _container$getBoundin = container.getBoundingClientRect(),\n containerLeft = _container$getBoundin.left,\n containerTop = _container$getBoundin.top,\n containerWidth = _container$getBoundin.width;\n var _inputField$getBoundi = inputField.getBoundingClientRect(),\n inputLeft = _inputField$getBoundi.left,\n inputTop = _inputField$getBoundi.top,\n inputWidth = _inputField$getBoundi.width,\n inputHeight = _inputField$getBoundi.height;\n var _config$orientation = config.orientation,\n orientX = _config$orientation.x,\n orientY = _config$orientation.y;\n var scrollTop;\n var left;\n var top;\n if (container === document.body) {\n scrollTop = window.scrollY;\n left = inputLeft + window.scrollX;\n top = inputTop + scrollTop;\n } else {\n scrollTop = container.scrollTop;\n left = inputLeft - containerLeft;\n top = inputTop - containerTop + scrollTop;\n }\n if (orientX === 'auto') {\n if (left < 0) {\n // align to the left and move into visible area if input's left edge < window's\n orientX = 'left';\n left = 10;\n } else if (left + calendarWidth > containerWidth) {\n // align to the right if canlendar's right edge > container's\n orientX = 'right';\n } else {\n orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n }\n }\n if (orientX === 'right') {\n left -= calendarWidth - inputWidth;\n }\n if (orientY === 'auto') {\n orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n }\n if (orientY === 'top') {\n top -= calendarHeight;\n } else {\n top += inputHeight;\n }\n classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left');\n classList.add(\"datepicker-orient-\".concat(orientY), \"datepicker-orient-\".concat(orientX));\n style.top = top ? \"\".concat(top, \"px\") : top;\n style.left = left ? \"\".concat(left, \"px\") : left;\n }\n }, {\n key: \"setViewSwitchLabel\",\n value: function setViewSwitchLabel(labelText) {\n this.controls.viewSwitch.textContent = labelText;\n }\n }, {\n key: \"setPrevBtnDisabled\",\n value: function setPrevBtnDisabled(disabled) {\n this.controls.prevBtn.disabled = disabled;\n }\n }, {\n key: \"setNextBtnDisabled\",\n value: function setNextBtnDisabled(disabled) {\n this.controls.nextBtn.disabled = disabled;\n }\n }, {\n key: \"changeView\",\n value: function changeView(viewId) {\n var oldView = this.currentView;\n var newView = this.views[viewId];\n if (newView.id !== oldView.id) {\n this.currentView = newView;\n this._renderMethod = 'render';\n triggerDatepickerEvent(this.datepicker, 'changeView');\n this.main.replaceChild(newView.element, oldView.element);\n }\n return this;\n }\n\n // Change the focused date (view date)\n }, {\n key: \"changeFocus\",\n value: function changeFocus(newViewDate) {\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n this.views.forEach(function (view) {\n view.updateFocus();\n });\n return this;\n }\n\n // Apply the change of the selected dates\n }, {\n key: \"update\",\n value: function update() {\n var newViewDate = computeResetViewDate(this.datepicker);\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n this.views.forEach(function (view) {\n view.updateFocus();\n view.updateSelection();\n });\n return this;\n }\n\n // Refresh the picker UI\n }, {\n key: \"render\",\n value: function render() {\n var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var renderMethod = quickRender && this._renderMethod || 'render';\n delete this._renderMethod;\n this.currentView[renderMethod]();\n }\n }]);\n}();\n\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n// - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n// - args: time value; retun: true if unavailable\nfunction findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n if (!isInRange(date, min, max)) {\n return;\n }\n if (testFn(date)) {\n var newDate = addFn(date, increase);\n return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n }\n return date;\n}\n\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction moveByArrowKey(datepicker, ev, direction, vertical) {\n var picker = datepicker.picker;\n var currentView = picker.currentView;\n var step = currentView.step || 1;\n var viewDate = picker.viewDate;\n var addFn;\n var testFn;\n switch (currentView.id) {\n case 0:\n if (vertical) {\n viewDate = addDays(viewDate, direction * 7);\n } else if (ev.ctrlKey || ev.metaKey) {\n viewDate = addYears(viewDate, direction);\n } else {\n viewDate = addDays(viewDate, direction);\n }\n addFn = addDays;\n testFn = function testFn(date) {\n return currentView.disabled.includes(date);\n };\n break;\n case 1:\n viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n addFn = addMonths;\n testFn = function testFn(date) {\n var dt = new Date(date);\n var year = currentView.year,\n disabled = currentView.disabled;\n return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n };\n break;\n default:\n viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n addFn = addYears;\n testFn = function testFn(date) {\n return currentView.disabled.includes(startOfYearPeriod(date, step));\n };\n }\n viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate);\n if (viewDate !== undefined) {\n picker.changeFocus(viewDate).render();\n }\n}\nfunction onKeydown(datepicker, ev) {\n if (ev.key === 'Tab') {\n unfocus(datepicker);\n return;\n }\n var picker = datepicker.picker;\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n isMinView = _picker$currentView.isMinView;\n if (!picker.active) {\n switch (ev.key) {\n case 'ArrowDown':\n case 'Escape':\n picker.show();\n break;\n case 'Enter':\n datepicker.update();\n break;\n default:\n return;\n }\n } else if (datepicker.editMode) {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'Enter':\n datepicker.exitEditMode({\n update: true,\n autohide: datepicker.config.autohide\n });\n break;\n default:\n return;\n }\n } else {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'ArrowLeft':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, -1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, false);\n }\n break;\n case 'ArrowRight':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, 1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, 1, false);\n }\n break;\n case 'ArrowUp':\n if (ev.ctrlKey || ev.metaKey) {\n switchView(datepicker);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, true);\n }\n break;\n case 'ArrowDown':\n if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n return;\n }\n moveByArrowKey(datepicker, ev, 1, true);\n break;\n case 'Enter':\n if (isMinView) {\n datepicker.setDate(picker.viewDate);\n } else {\n picker.changeView(id - 1).render();\n }\n break;\n case 'Backspace':\n case 'Delete':\n datepicker.enterEditMode();\n return;\n default:\n if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n }\n return;\n }\n }\n ev.preventDefault();\n ev.stopPropagation();\n}\nfunction onFocus(datepicker) {\n if (datepicker.config.showOnFocus && !datepicker._showing) {\n datepicker.show();\n }\n}\n\n// for the prevention for entering edit mode while getting focus on click\nfunction onMousedown(datepicker, ev) {\n var el = ev.target;\n if (datepicker.picker.active || datepicker.config.showOnClick) {\n el._active = el === document.activeElement;\n el._clicking = setTimeout(function () {\n delete el._active;\n delete el._clicking;\n }, 2000);\n }\n}\nfunction onClickInput(datepicker, ev) {\n var el = ev.target;\n if (!el._clicking) {\n return;\n }\n clearTimeout(el._clicking);\n delete el._clicking;\n if (el._active) {\n datepicker.enterEditMode();\n }\n delete el._active;\n if (datepicker.config.showOnClick) {\n datepicker.show();\n }\n}\nfunction onPaste(datepicker, ev) {\n if (ev.clipboardData.types.includes('text/plain')) {\n datepicker.enterEditMode();\n }\n}\n\n// for the `document` to delegate the events from outside the picker/input field\nfunction onClickOutside(datepicker, ev) {\n var element = datepicker.element;\n if (element !== document.activeElement) {\n return;\n }\n var pickerElem = datepicker.picker.element;\n if (findElementInEventPath(ev, function (el) {\n return el === element || el === pickerElem;\n })) {\n return;\n }\n unfocus(datepicker);\n}\n\nfunction stringifyDates(dates, config) {\n return dates.map(function (dt) {\n return formatDate(dt, config.format, config.locale);\n }).join(config.dateDelimiter);\n}\n\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction processInputDates(datepicker, inputDates) {\n var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var config = datepicker.config,\n origDates = datepicker.dates,\n rangepicker = datepicker.rangepicker;\n if (inputDates.length === 0) {\n // empty input is considered valid unless origiDates is passed\n return clear ? [] : undefined;\n }\n var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n var newDates = inputDates.reduce(function (dates, dt) {\n var date = parseDate(dt, config.format, config.locale);\n if (date === undefined) {\n return dates;\n }\n if (config.pickLevel > 0) {\n // adjust to 1st of the month/Jan 1st of the year\n // or to the last day of the monh/Dec 31st of the year if the datepicker\n // is the range-end picker of a rangepicker\n var _dt = new Date(date);\n if (config.pickLevel === 1) {\n date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1);\n } else {\n date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1);\n }\n }\n if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) {\n dates.push(date);\n }\n return dates;\n }, []);\n if (newDates.length === 0) {\n return;\n }\n if (config.multidate && !clear) {\n // get the synmetric difference between origDates and newDates\n newDates = newDates.reduce(function (dates, date) {\n if (!origDates.includes(date)) {\n dates.push(date);\n }\n return dates;\n }, origDates.filter(function (date) {\n return !newDates.includes(date);\n }));\n }\n // do length check always because user can input multiple dates regardless of the mode\n return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates;\n}\n\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction refreshUI(datepicker) {\n var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var config = datepicker.config,\n picker = datepicker.picker,\n inputField = datepicker.inputField;\n if (mode & 2) {\n var newView = picker.active ? config.pickLevel : config.startView;\n picker.update().changeView(newView).render(quickRender);\n }\n if (mode & 1 && inputField) {\n inputField.value = stringifyDates(datepicker.dates, config);\n }\n}\nfunction _setDate(datepicker, inputDates, options) {\n var clear = options.clear,\n render = options.render,\n autohide = options.autohide;\n if (render === undefined) {\n render = true;\n }\n if (!render) {\n autohide = false;\n } else if (autohide === undefined) {\n autohide = datepicker.config.autohide;\n }\n var newDates = processInputDates(datepicker, inputDates, clear);\n if (!newDates) {\n return;\n }\n if (newDates.toString() !== datepicker.dates.toString()) {\n datepicker.dates = newDates;\n refreshUI(datepicker, render ? 3 : 1);\n triggerDatepickerEvent(datepicker, 'changeDate');\n } else {\n refreshUI(datepicker, 1);\n }\n if (autohide) {\n datepicker.hide();\n }\n}\n\n/**\n * Class representing a date picker\n */\nvar Datepicker = /*#__PURE__*/function () {\n /**\n * Create a date picker\n * @param {Element} element - element to bind a date picker\n * @param {Object} [options] - config options\n * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the\n * date picker belongs to. Use this only when creating date picker as a part\n * of date range picker\n */\n function Datepicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n _classCallCheck(this, Datepicker);\n element.datepicker = this;\n this.element = element;\n\n // set up config\n var config = this.config = Object.assign({\n buttonClass: options.buttonClass && String(options.buttonClass) || 'button',\n container: document.body,\n defaultViewDate: today(),\n maxDate: undefined,\n minDate: undefined\n }, processOptions(defaultOptions, this));\n this._options = options;\n Object.assign(config, processOptions(options, this));\n\n // configure by type\n var inline = this.inline = element.tagName !== 'INPUT';\n var inputField;\n var initialDates;\n if (inline) {\n config.container = element;\n initialDates = stringToArray(element.dataset.date, config.dateDelimiter);\n delete element.dataset.date;\n } else {\n var container = options.container ? document.querySelector(options.container) : null;\n if (container) {\n config.container = container;\n }\n inputField = this.inputField = element;\n inputField.classList.add('datepicker-input');\n initialDates = stringToArray(inputField.value, config.dateDelimiter);\n }\n if (rangepicker) {\n // check validiry\n var index = rangepicker.inputs.indexOf(inputField);\n var datepickers = rangepicker.datepickers;\n if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n throw Error('Invalid rangepicker object.');\n }\n // attach itaelf to the rangepicker here so that processInputDates() can\n // determine if this is the range-end picker of the rangepicker while\n // setting inital values when pickLevel > 0\n datepickers[index] = this;\n // add getter for rangepicker\n Object.defineProperty(this, 'rangepicker', {\n get: function get() {\n return rangepicker;\n }\n });\n }\n\n // set initial dates\n this.dates = [];\n // process initial value\n var inputDateValues = processInputDates(this, initialDates);\n if (inputDateValues && inputDateValues.length > 0) {\n this.dates = inputDateValues;\n }\n if (inputField) {\n inputField.value = stringifyDates(this.dates, config);\n }\n var picker = this.picker = new Picker(this);\n if (inline) {\n this.show();\n } else {\n // set up event listeners in other modes\n var onMousedownDocument = onClickOutside.bind(null, this);\n var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]];\n registerListeners(this, listeners);\n }\n }\n\n /**\n * Format Date object or time value in given format and language\n * @param {Date|Number} date - date or time value to format\n * @param {String|Object} format - format string or object that contains\n * toDisplay() custom formatter, whose signature is\n * - args:\n * - date: {Date} - Date instance of the date passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {String} formatted date\n * @param {String} [lang=en] - language code for the locale to use\n * @return {String} formatted date\n */\n return _createClass(Datepicker, [{\n key: \"active\",\n get:\n /**\n * @type {Boolean} - Whether the picker element is shown. `true` whne shown\n */\n function get() {\n return !!(this.picker && this.picker.active);\n }\n\n /**\n * @type {HTMLDivElement} - DOM object of picker element\n */\n }, {\n key: \"pickerElement\",\n get: function get() {\n return this.picker ? this.picker.element : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var picker = this.picker;\n var newOptions = processOptions(options, this);\n Object.assign(this._options, options);\n Object.assign(this.config, newOptions);\n picker.setOptions(newOptions);\n refreshUI(this, 3);\n }\n\n /**\n * Show the picker element\n */\n }, {\n key: \"show\",\n value: function show() {\n if (this.inputField) {\n if (this.inputField.disabled) {\n return;\n }\n if (this.inputField !== document.activeElement) {\n this._showing = true;\n this.inputField.focus();\n delete this._showing;\n }\n }\n this.picker.show();\n }\n\n /**\n * Hide the picker element\n * Not available on inline picker\n */\n }, {\n key: \"hide\",\n value: function hide() {\n if (this.inline) {\n return;\n }\n this.picker.hide();\n this.picker.update().changeView(this.config.startView).render();\n }\n\n /**\n * Destroy the Datepicker instance\n * @return {Detepicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hide();\n unregisterListeners(this);\n this.picker.detach();\n if (!this.inline) {\n this.inputField.classList.remove('datepicker-input');\n }\n delete this.element.datepicker;\n return this;\n }\n\n /**\n * Get the selected date(s)\n *\n * The method returns a Date object of selected date by default, and returns\n * an array of selected dates in multidate mode. If format string is passed,\n * it returns date string(s) formatted in given format.\n *\n * @param {String} [format] - Format string to stringify the date(s)\n * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\n * selected, empty array in multidate mode and untitled in sigledate mode\n */\n }, {\n key: \"getDate\",\n value: function getDate() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.config.locale);\n } : function (date) {\n return new Date(date);\n };\n if (this.config.multidate) {\n return this.dates.map(callback);\n }\n if (this.dates.length > 0) {\n return callback(this.dates[0]);\n }\n }\n\n /**\n * Set selected date(s)\n *\n * In multidate mode, you can pass multiple dates as a series of arguments\n * or an array. (Since each date is parsed individually, the type of the\n * dates doesn't have to be the same.)\n * The given dates are used to toggle the select status of each date. The\n * number of selected dates is kept from exceeding the length set to\n * maxNumberOfDates.\n *\n * With clear: true option, the method can be used to clear the selection\n * and to replace the selection instead of toggling in multidate mode.\n * If the option is passed with no date arguments or an empty dates array,\n * it works as \"clear\" (clear the selection then set nothing), and if the\n * option is passed with new dates to select, it works as \"replace\" (clear\n * the selection then set the given dates)\n *\n * When render: false option is used, the method omits re-rendering the\n * picker element. In this case, you need to call refresh() method later in\n * order for the picker element to reflect the changes. The input field is\n * refreshed always regardless of this option.\n *\n * When invalid (unparsable, repeated, disabled or out-of-range) dates are\n * passed, the method ignores them and applies only valid ones. In the case\n * that all the given dates are invalid, which is distinguished from passing\n * no dates, the method considers it as an error and leaves the selection\n * untouched.\n *\n * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\n * objects, time values or mix of those for new selection\n * @param {Object} [options] - function options\n * - clear: {boolean} - Whether to clear the existing selection\n * defualt: false\n * - render: {boolean} - Whether to re-render the picker element\n * default: true\n * - autohide: {boolean} - Whether to hide the picker element after re-render\n * Ignored when used with render: false\n * default: config.autohide\n */\n }, {\n key: \"setDate\",\n value: function setDate() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var dates = [].concat(args);\n var opts = {};\n var lastArg = lastItemOf(args);\n if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) {\n Object.assign(opts, dates.pop());\n }\n var inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Update the selected date(s) with input field's value\n * Not available on inline picker\n *\n * The input field will be refreshed with properly formatted date string.\n *\n * @param {Object} [options] - function options\n * - autohide: {boolean} - whether to hide the picker element after refresh\n * default: false\n */\n }, {\n key: \"update\",\n value: function update() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline) {\n return;\n }\n var opts = {\n clear: true,\n autohide: !!(options && options.autohide)\n };\n var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Refresh the picker element and the associated input field\n * @param {String} [target] - target item when refreshing one item only\n * 'picker' or 'input'\n * @param {Boolean} [forceRender] - whether to re-render the picker element\n * regardless of its state instead of optimized refresh\n */\n }, {\n key: \"refresh\",\n value: function refresh() {\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (target && typeof target !== 'string') {\n forceRender = target;\n target = undefined;\n }\n var mode;\n if (target === 'picker') {\n mode = 2;\n } else if (target === 'input') {\n mode = 1;\n } else {\n mode = 3;\n }\n refreshUI(this, mode, !forceRender);\n }\n\n /**\n * Enter edit mode\n * Not available on inline picker or when the picker element is hidden\n */\n }, {\n key: \"enterEditMode\",\n value: function enterEditMode() {\n if (this.inline || !this.picker.active || this.editMode) {\n return;\n }\n this.editMode = true;\n this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700');\n }\n\n /**\n * Exit from edit mode\n * Not available on inline picker\n * @param {Object} [options] - function options\n * - update: {boolean} - whether to call update() after exiting\n * If false, input field is revert to the existing selection\n * default: false\n */\n }, {\n key: \"exitEditMode\",\n value: function exitEditMode() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline || !this.editMode) {\n return;\n }\n var opts = Object.assign({\n update: false\n }, options);\n delete this.editMode;\n this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700');\n if (opts.update) {\n this.update(opts);\n }\n }\n }], [{\n key: \"formatDate\",\n value: function formatDate$1(date, format, lang) {\n return formatDate(date, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * Parse date string\n * @param {String|Date|Number} dateStr - date string, Date object or time\n * value to parse\n * @param {String|Object} format - format string or object that contains\n * toValue() custom parser, whose signature is\n * - args:\n * - dateStr: {String|Date|Number} - the dateStr passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {Date|Number} parsed date or its time value\n * @param {String} [lang=en] - language code for the locale to use\n * @return {Number} time value of parsed date\n */\n }, {\n key: \"parseDate\",\n value: function parseDate$1(dateStr, format, lang) {\n return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * @type {Object} - Installed locales in `[languageCode]: localeObject` format\n * en`:_English (US)_ is pre-installed.\n */\n }, {\n key: \"locales\",\n get: function get() {\n return locales;\n }\n }]);\n}();\n\n// filter out the config options inapproprite to pass to Datepicker\nfunction filterOptions(options) {\n var newOpts = Object.assign({}, options);\n delete newOpts.inputs;\n delete newOpts.allowOneSidedRange;\n delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n\n return newOpts;\n}\nfunction setupDatepicker(rangepicker, changeDateListener, el, options) {\n registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]);\n new Datepicker(el, options, rangepicker);\n}\nfunction onChangeDate(rangepicker, ev) {\n // to prevent both datepickers trigger the other side's update each other\n if (rangepicker._updating) {\n return;\n }\n rangepicker._updating = true;\n var target = ev.target;\n if (target.datepicker === undefined) {\n return;\n }\n var datepickers = rangepicker.datepickers;\n var setDateOptions = {\n render: false\n };\n var changedSide = rangepicker.inputs.indexOf(target);\n var otherSide = changedSide === 0 ? 1 : 0;\n var changedDate = datepickers[changedSide].dates[0];\n var otherDate = datepickers[otherSide].dates[0];\n if (changedDate !== undefined && otherDate !== undefined) {\n // if the start of the range > the end, swap them\n if (changedSide === 0 && changedDate > otherDate) {\n datepickers[0].setDate(otherDate, setDateOptions);\n datepickers[1].setDate(changedDate, setDateOptions);\n } else if (changedSide === 1 && changedDate < otherDate) {\n datepickers[0].setDate(changedDate, setDateOptions);\n datepickers[1].setDate(otherDate, setDateOptions);\n }\n } else if (!rangepicker.allowOneSidedRange) {\n // to prevent the range from becoming one-sided, copy changed side's\n // selection (no matter if it's empty) to the other side\n if (changedDate !== undefined || otherDate !== undefined) {\n setDateOptions.clear = true;\n datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n }\n }\n datepickers[0].picker.update().render();\n datepickers[1].picker.update().render();\n delete rangepicker._updating;\n}\n\n/**\n * Class representing a date range picker\n */\nvar DateRangePicker = /*#__PURE__*/function () {\n /**\n * Create a date range picker\n * @param {Element} element - element to bind a date range picker\n * @param {Object} [options] - config options\n */\n function DateRangePicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, DateRangePicker);\n var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input'));\n if (inputs.length < 2) {\n return;\n }\n element.rangepicker = this;\n this.element = element;\n this.inputs = inputs.slice(0, 2);\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var changeDateListener = onChangeDate.bind(null, this);\n var cleanOptions = filterOptions(options);\n // in order for initial date setup to work right when pcicLvel > 0,\n // let Datepicker constructor add the instance to the rangepicker\n var datepickers = [];\n Object.defineProperty(this, 'datepickers', {\n get: function get() {\n return datepickers;\n }\n });\n setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n Object.freeze(datepickers);\n // normalize the range if inital dates are given\n if (datepickers[0].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n } else if (datepickers[1].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n }\n }\n\n /**\n * @type {Array} - selected date of the linked date pickers\n */\n return _createClass(DateRangePicker, [{\n key: \"dates\",\n get: function get() {\n return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var cleanOptions = filterOptions(options);\n this.datepickers[0].setOptions(cleanOptions);\n this.datepickers[1].setOptions(cleanOptions);\n }\n\n /**\n * Destroy the DateRangePicker instance\n * @return {DateRangePicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.datepickers[0].destroy();\n this.datepickers[1].destroy();\n unregisterListeners(this);\n delete this.element.rangepicker;\n }\n\n /**\n * Get the start and end dates of the date range\n *\n * The method returns Date objects by default. If format string is passed,\n * it returns date strings formatted in given format.\n * The result array always contains 2 items (start date/end date) and\n * undefined is used for unselected side. (e.g. If none is selected,\n * the result will be [undefined, undefined]. If only the end date is set\n * when allowOneSidedRange config option is true, [undefined, endDate] will\n * be returned.)\n *\n * @param {String} [format] - Format string to stringify the dates\n * @return {Array} - Start and end dates\n */\n }, {\n key: \"getDates\",\n value: function getDates() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.datepickers[0].config.locale);\n } : function (date) {\n return new Date(date);\n };\n return this.dates.map(function (date) {\n return date === undefined ? date : callback(date);\n });\n }\n\n /**\n * Set the start and end dates of the date range\n *\n * The method calls datepicker.setDate() internally using each of the\n * arguments in start→end order.\n *\n * When a clear: true option object is passed instead of a date, the method\n * clears the date.\n *\n * If an invalid date, the same date as the current one or an option object\n * without clear: true is passed, the method considers that argument as an\n * \"ineffective\" argument because calling datepicker.setDate() with those\n * values makes no changes to the date selection.\n *\n * When the allowOneSidedRange config option is false, passing {clear: true}\n * to clear the range works only when it is done to the last effective\n * argument (in other words, passed to rangeEnd or to rangeStart along with\n * ineffective rangeEnd). This is because when the date range is changed,\n * it gets normalized based on the last change at the end of the changing\n * process.\n *\n * @param {Date|Number|String|Object} rangeStart - Start date of the range\n * or {clear: true} to clear the date\n * @param {Date|Number|String|Object} rangeEnd - End date of the range\n * or {clear: true} to clear the date\n */\n }, {\n key: \"setDates\",\n value: function setDates(rangeStart, rangeEnd) {\n var _this$datepickers = _slicedToArray(this.datepickers, 2),\n datepicker0 = _this$datepickers[0],\n datepicker1 = _this$datepickers[1];\n var origDates = this.dates;\n\n // If range normalization runs on every change, we can't set a new range\n // that starts after the end of the current range correctly because the\n // normalization process swaps start↔︎end right after setting the new start\n // date. To prevent this, the normalization process needs to run once after\n // both of the new dates are set.\n this._updating = true;\n datepicker0.setDate(rangeStart);\n datepicker1.setDate(rangeEnd);\n delete this._updating;\n if (datepicker1.dates[0] !== origDates[1]) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n } else if (datepicker0.dates[0] !== origDates[0]) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n }\n }\n }]);\n}();\n\nexports.DateRangePicker = DateRangePicker;\nexports.Datepicker = Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { AccordionInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Accordion implements AccordionInterface {\n _instanceId: string;\n _accordionEl: HTMLElement;\n _items: AccordionItem[];\n _options: AccordionOptions;\n _clickHandler: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n accordionEl: HTMLElement | null = null,\n items: AccordionItem[] = [],\n options: AccordionOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : accordionEl.id;\n this._accordionEl = accordionEl;\n this._items = items;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Accordion',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // show accordion item based on click\n this._items.forEach((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n const clickHandler = () => {\n this.toggle(item.id);\n };\n\n item.triggerEl.addEventListener('click', clickHandler);\n\n // Store the clickHandler in a property of the item for removal later\n item.clickHandler = clickHandler;\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._items.length && this._initialized) {\n this._items.forEach((item) => {\n item.triggerEl.removeEventListener('click', item.clickHandler);\n\n // Clean up by deleting the clickHandler property from the item\n delete item.clickHandler;\n });\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Accordion', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.add('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n\n updateOnOpen(callback: () => void) {\n this._options.onOpen = callback;\n }\n\n updateOnClose(callback: () => void) {\n this._options.onClose = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion($accordionEl as HTMLElement, items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CarouselInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Carousel implements CarouselInterface {\n _instanceId: string;\n _carouselEl: HTMLElement;\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n _initialized: boolean;\n\n constructor(\n carouselEl: HTMLElement | null = null,\n items: CarouselItem[] = [],\n options: CarouselOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : carouselEl.id;\n this._carouselEl = carouselEl;\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Carousel',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n /**\n * initialize carousel and items based on active one\n */\n init() {\n if (this._items.length && !this._initialized) {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this.getActiveItem()) {\n this.slideTo(this.getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Carousel', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this.getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this.getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // Handling the case when there is only one item\n if (this._items.length === 1) {\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n return;\n }\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-30');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-30'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-20');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n\n updateOnNext(callback: () => void) {\n this._options.onNext = callback;\n }\n\n updateOnPrev(callback: () => void) {\n this._options.onPrev = callback;\n }\n\n updateOnChange(callback: () => void) {\n this._options.onChange = callback;\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel($carouselEl as HTMLElement, items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CopyClipboardOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CopyClipboardInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CopyClipboardOptions = {\n htmlEntities: false,\n contentType: 'input',\n onCopy: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass CopyClipboard implements CopyClipboardInterface {\n _instanceId: string;\n _triggerEl: HTMLElement | null;\n _targetEl: HTMLInputElement | null;\n _options: CopyClipboardOptions;\n _initialized: boolean;\n _triggerElClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLInputElement | null = null,\n options: CopyClipboardOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'CopyClipboard',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && this._triggerEl && !this._initialized) {\n this._triggerElClickHandler = () => {\n this.copy();\n };\n\n // clicking on the trigger element should copy the value of the target element\n if (this._triggerEl) {\n this._triggerEl.addEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._targetEl && this._initialized) {\n if (this._triggerEl) {\n this._triggerEl.removeEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('CopyClipboard', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getTargetValue() {\n if (this._options.contentType === 'input') {\n return this._targetEl.value;\n }\n\n if (this._options.contentType === 'innerHTML') {\n return this._targetEl.innerHTML;\n }\n\n if (this._options.contentType === 'textContent') {\n return this._targetEl.textContent.replace(/\\s+/g, ' ').trim();\n }\n }\n\n copy() {\n let textToCopy = this.getTargetValue();\n\n // Check if HTMLEntities option is enabled\n if (this._options.htmlEntities) {\n // Encode the text using HTML entities\n textToCopy = this.decodeHTML(textToCopy);\n }\n\n // Create a temporary textarea element\n const tempTextArea = document.createElement('textarea');\n tempTextArea.value = textToCopy;\n document.body.appendChild(tempTextArea);\n\n // Select the text inside the textarea and copy it to the clipboard\n tempTextArea.select();\n document.execCommand('copy');\n\n // Remove the temporary textarea\n document.body.removeChild(tempTextArea);\n\n // Callback function\n this._options.onCopy(this);\n\n return textToCopy;\n }\n\n // Function to encode text into HTML entities\n decodeHTML(html: string) {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = html;\n return textarea.textContent;\n }\n\n updateOnCopyCallback(callback: () => void) {\n this._options.onCopy = callback;\n }\n}\n\nexport function initCopyClipboards() {\n document\n .querySelectorAll('[data-copy-to-clipboard-target]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-target'\n );\n const $targetEl = document.getElementById(targetId);\n const contentType = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-content-type'\n );\n const htmlEntities = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-html-entities'\n );\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'CopyClipboard',\n $targetEl.getAttribute('id')\n )\n ) {\n new CopyClipboard(\n $triggerEl as HTMLElement,\n $targetEl as HTMLInputElement,\n {\n htmlEntities:\n htmlEntities && htmlEntities === 'true'\n ? true\n : Default.htmlEntities,\n contentType: contentType\n ? contentType\n : Default.contentType,\n } as CopyClipboardOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-copy-to-clipboard-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.CopyClipboard = CopyClipboard;\n window.initClipboards = initCopyClipboards;\n}\n\nexport default CopyClipboard;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CollapseInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Collapse implements CollapseInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Collapse',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Collapse', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n\n updateOnCollapse(callback: () => void) {\n this._options.onCollapse = callback;\n }\n\n updateOnExpand(callback: () => void) {\n this._options.onExpand = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'Collapse',\n $targetEl.getAttribute('id')\n )\n ) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n // if instance exists already for the same target element then create a new one with a different trigger element\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement,\n {},\n {\n id:\n $targetEl.getAttribute('id') +\n '_' +\n instances._generateRandomId(),\n }\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DatepickerOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DatepickerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nimport {\n Datepicker as FlowbiteDatepicker,\n DateRangePicker as FlowbiteDateRangePicker,\n} from 'flowbite-datepicker';\n\nconst Default: DatepickerOptions = {\n defaultDatepickerId: null,\n autohide: false,\n format: 'mm/dd/yyyy',\n maxDate: null,\n minDate: null,\n orientation: 'bottom',\n buttons: false,\n autoSelectToday: 0,\n title: null,\n language: 'en',\n rangePicker: false,\n onShow: () => {},\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Datepicker implements DatepickerInterface {\n _instanceId: string;\n _datepickerEl: HTMLElement;\n _datepickerInstance: FlowbiteDatepicker | FlowbiteDateRangePicker | null;\n _options: DatepickerOptions;\n _initialized: boolean;\n\n constructor(\n datepickerEl: HTMLElement | null = null,\n options: DatepickerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : datepickerEl.id;\n this._datepickerEl = datepickerEl;\n this._datepickerInstance = null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Datepicker',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._datepickerEl && !this._initialized) {\n if (this._options.rangePicker) {\n this._datepickerInstance = new FlowbiteDateRangePicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n } else {\n this._datepickerInstance = new FlowbiteDatepicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n this._datepickerInstance.destroy();\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Datepicker', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getDatepickerInstance() {\n return this._datepickerInstance;\n }\n\n getDate() {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.getDates();\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.getDate();\n }\n }\n\n setDate(date: any) {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.setDates(date);\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.setDate(date);\n }\n }\n\n show() {\n this._datepickerInstance.show();\n this._options.onShow(this);\n }\n\n hide() {\n this._datepickerInstance.hide();\n this._options.onHide(this);\n }\n\n _getDatepickerOptions(options: DatepickerOptions) {\n const datepickerOptions = {} as any;\n\n if (options.buttons) {\n datepickerOptions.todayBtn = true;\n datepickerOptions.clearBtn = true;\n\n if (options.autoSelectToday) {\n datepickerOptions.todayBtnMode = 1;\n }\n }\n\n if (options.autohide) {\n datepickerOptions.autohide = true;\n }\n\n if (options.format) {\n datepickerOptions.format = options.format;\n }\n\n if (options.maxDate) {\n datepickerOptions.maxDate = options.maxDate;\n }\n\n if (options.minDate) {\n datepickerOptions.minDate = options.minDate;\n }\n\n if (options.orientation) {\n datepickerOptions.orientation = options.orientation;\n }\n\n if (options.title) {\n datepickerOptions.title = options.title;\n }\n\n if (options.language) {\n datepickerOptions.language = options.language;\n }\n\n return datepickerOptions;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDatepickers() {\n document\n .querySelectorAll(\n '[datepicker], [inline-datepicker], [date-rangepicker]'\n )\n .forEach(($datepickerEl) => {\n if ($datepickerEl) {\n const buttons =\n $datepickerEl.hasAttribute('datepicker-buttons');\n const autoselectToday = $datepickerEl.hasAttribute(\n 'datepicker-autoselect-today'\n );\n const autohide = $datepickerEl.hasAttribute(\n 'datepicker-autohide'\n );\n const format = $datepickerEl.getAttribute('datepicker-format');\n const maxDate = $datepickerEl.getAttribute(\n 'datepicker-max-date'\n );\n const minDate = $datepickerEl.getAttribute(\n 'datepicker-min-date'\n );\n const orientation = $datepickerEl.getAttribute(\n 'datepicker-orientation'\n );\n const title = $datepickerEl.getAttribute('datepicker-title');\n const language = $datepickerEl.getAttribute(\n 'datepicker-language'\n );\n const rangePicker =\n $datepickerEl.hasAttribute('date-rangepicker');\n new Datepicker(\n $datepickerEl as HTMLElement,\n {\n buttons: buttons ? buttons : Default.buttons,\n autoSelectToday: autoselectToday\n ? autoselectToday\n : Default.autoSelectToday,\n autohide: autohide ? autohide : Default.autohide,\n format: format ? format : Default.format,\n maxDate: maxDate ? maxDate : Default.maxDate,\n minDate: minDate ? minDate : Default.minDate,\n orientation: orientation\n ? orientation\n : Default.orientation,\n title: title ? title : Default.title,\n language: language ? language : Default.language,\n rangePicker: rangePicker\n ? rangePicker\n : Default.rangePicker,\n } as DatepickerOptions\n );\n } else {\n console.error(\n `The datepicker element does not exist. Please check the datepicker attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Datepicker = Datepicker;\n window.initDatepickers = initDatepickers;\n}\n\nexport default Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DialInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dial implements DialInterface {\n _instanceId: string;\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n _initialized: boolean;\n _showEventHandler: EventListenerOrEventListenerObject;\n _hideEventHandler: EventListenerOrEventListenerObject;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dial',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n this._showEventHandler = () => {\n this.show();\n };\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, this._showEventHandler);\n this._targetEl.addEventListener(ev, this._showEventHandler);\n });\n\n this._hideEventHandler = () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n };\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, this._hideEventHandler);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.removeEventListener(ev, this._showEventHandler);\n this._targetEl.removeEventListener(ev, this._showEventHandler);\n });\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.removeEventListener(ev, this._hideEventHandler);\n });\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dial', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DismissInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dismiss implements DismissInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dismiss',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._clickHandler = () => {\n this.hide();\n };\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dismiss', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerOptions, PlacementClasses } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { DrawerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Drawer implements DrawerInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n _eventListenerInstances: EventListenerInstance[] = [];\n _handleEscapeKey: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Drawer',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n // set initial accessibility attributes\n if (this._targetEl && !this._initialized) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n this._handleEscapeKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n };\n\n // add keyboard event listener to document\n document.addEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n\n // Remove the keyboard event listener\n document.removeEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Drawer', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (\n this._visible &&\n document.querySelector('[drawer-backdrop]') !== null\n ) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDrawers() {\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge ? (edge === 'true' ? true : false) : Default.edge,\n edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset,\n } as DrawerOptions);\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const toggleDrawer = () => {\n drawer.toggle();\n };\n $triggerEl.addEventListener('click', toggleDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const hideDrawer = () => {\n drawer.hide();\n };\n $triggerEl.addEventListener('click', hideDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const showDrawer = () => {\n drawer.show();\n };\n $triggerEl.addEventListener('click', showDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DropdownInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dropdown implements DropdownInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _initialized: boolean;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _hoverShowTriggerElHandler: EventListenerOrEventListenerObject;\n _hoverShowTargetElHandler: EventListenerOrEventListenerObject;\n _hoverHideHandler: EventListenerOrEventListenerObject;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetElement.id;\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dropdown',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._popperInstance = this._createPopperInstance();\n this._setupEventListeners();\n this._initialized = true;\n }\n }\n\n destroy() {\n const triggerEvents = this._getTriggerEvents();\n\n // Remove click event listeners for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._clickHandler);\n });\n }\n\n // Remove hover event listeners for trigger and target elements\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.removeEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hoverHideHandler);\n this._targetEl.removeEventListener(ev, this._hoverHideHandler);\n });\n }\n\n this._popperInstance.destroy();\n this._initialized = false;\n }\n\n removeInstance() {\n instances.removeInstance('Dropdown', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._clickHandler);\n });\n }\n\n this._hoverShowTriggerElHandler = (ev) => {\n if (ev.type === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n };\n this._hoverShowTargetElHandler = () => {\n this.show();\n };\n\n this._hoverHideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n };\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.addEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hoverHideHandler);\n this._targetEl.addEventListener(ev, this._hoverHideHandler);\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n this._targetEl.removeAttribute('aria-hidden');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n this._targetEl.setAttribute('aria-hidden', 'true');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCopyClipboards } from './clipboard';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initInputCounters } from './input-counter';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\nimport { initDatepickers } from './datepicker';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n initInputCounters();\n initCopyClipboards();\n initDatepickers();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { InputCounterOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { InputCounterInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: InputCounterOptions = {\n minValue: null,\n maxValue: null,\n onIncrement: () => {},\n onDecrement: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass InputCounter implements InputCounterInterface {\n _instanceId: string;\n _targetEl: HTMLInputElement | null;\n _incrementEl: HTMLElement | null;\n _decrementEl: HTMLElement | null;\n _options: InputCounterOptions;\n _initialized: boolean;\n _incrementClickHandler: EventListenerOrEventListenerObject;\n _decrementClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLInputElement | null = null,\n incrementEl: HTMLElement | null = null,\n decrementEl: HTMLElement | null = null,\n options: InputCounterOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._targetEl = targetEl;\n this._incrementEl = incrementEl;\n this._decrementEl = decrementEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'InputCounter',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._inputHandler = (event) => {\n {\n const target = event.target as HTMLInputElement;\n\n // check if the value is numeric\n if (!/^\\d*$/.test(target.value)) {\n // Regex to check if the value is numeric\n target.value = target.value.replace(/[^\\d]/g, ''); // Remove non-numeric characters\n }\n\n // check for max value\n if (\n this._options.maxValue !== null &&\n parseInt(target.value) > this._options.maxValue\n ) {\n target.value = this._options.maxValue.toString();\n }\n\n // check for min value\n if (\n this._options.minValue !== null &&\n parseInt(target.value) < this._options.minValue\n ) {\n target.value = this._options.minValue.toString();\n }\n }\n };\n\n this._incrementClickHandler = () => {\n this.increment();\n };\n\n this._decrementClickHandler = () => {\n this.decrement();\n };\n\n // Add event listener to restrict input to numeric values only\n this._targetEl.addEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.addEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n\n if (this._decrementEl) {\n this._decrementEl.addEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._targetEl && this._initialized) {\n this._targetEl.removeEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.removeEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n if (this._decrementEl) {\n this._decrementEl.removeEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('InputCounter', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getCurrentValue() {\n return parseInt(this._targetEl.value) || 0;\n }\n\n increment() {\n // don't increment if the value is already at the maximum value\n if (\n this._options.maxValue !== null &&\n this.getCurrentValue() >= this._options.maxValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() + 1).toString();\n this._options.onIncrement(this);\n }\n\n decrement() {\n // don't decrement if the value is already at the minimum value\n if (\n this._options.minValue !== null &&\n this.getCurrentValue() <= this._options.minValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() - 1).toString();\n this._options.onDecrement(this);\n }\n\n updateOnIncrement(callback: () => void) {\n this._options.onIncrement = callback;\n }\n\n updateOnDecrement(callback: () => void) {\n this._options.onDecrement = callback;\n }\n}\n\nexport function initInputCounters() {\n document.querySelectorAll('[data-input-counter]').forEach(($targetEl) => {\n const targetId = $targetEl.id;\n\n const $incrementEl = document.querySelector(\n '[data-input-counter-increment=\"' + targetId + '\"]'\n );\n\n const $decrementEl = document.querySelector(\n '[data-input-counter-decrement=\"' + targetId + '\"]'\n );\n\n const minValue = $targetEl.getAttribute('data-input-counter-min');\n const maxValue = $targetEl.getAttribute('data-input-counter-max');\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'InputCounter',\n $targetEl.getAttribute('id')\n )\n ) {\n new InputCounter(\n $targetEl as HTMLInputElement,\n $incrementEl ? ($incrementEl as HTMLElement) : null,\n $decrementEl ? ($decrementEl as HTMLElement) : null,\n {\n minValue: minValue ? parseInt(minValue) : null,\n maxValue: maxValue ? parseInt(maxValue) : null,\n } as InputCounterOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-input-counter attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.InputCounter = InputCounter;\n window.initInputCounters = initInputCounters;\n}\n\nexport default InputCounter;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalOptions } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { ModalInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Modal implements ModalInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _eventListenerInstances: EventListenerInstance[] = [];\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Modal',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Modal', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden && this._backdropEl) {\n this._backdropEl.remove();\n this._backdropEl = null;\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initModals() {\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n );\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // toggle modal visibility\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const toggleModal = () => {\n modal.toggle();\n };\n $triggerEl.addEventListener('click', toggleModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const showModal = () => {\n modal.show();\n };\n $triggerEl.addEventListener('click', showModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const hideModal = () => {\n modal.hide();\n };\n $triggerEl.addEventListener('click', hideModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { PopoverInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Popover implements PopoverInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Popover',\n this,\n instanceOptions.id ? instanceOptions.id : this._targetEl.id,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element and target element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n this._targetEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n this._targetEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Popover', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n this._targetEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n this._targetEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TabsInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tabs implements TabsInterface {\n _instanceId: string;\n _tabsEl: HTMLElement;\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n _initialized: boolean;\n\n constructor(\n tabsEl: HTMLElement | null = null,\n items: TabItem[] = [],\n options: TabsOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id;\n this._tabsEl = tabsEl;\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tabs',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this.setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', (event) => {\n event.preventDefault();\n this.show(tab.id);\n });\n });\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Tabs', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this.setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($parentEl) => {\n const tabItems: TabItem[] = [];\n const activeClasses = $parentEl.getAttribute(\n 'data-tabs-active-classes'\n );\n const inactiveClasses = $parentEl.getAttribute(\n 'data-tabs-inactive-classes'\n );\n let defaultTabId = null;\n $parentEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n\n new Tabs($parentEl as HTMLElement, tabItems, {\n defaultTabId: defaultTabId,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TooltipInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tooltip implements TooltipInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tooltip',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Tooltip', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n this.hide();\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","import { AccordionInterface } from '../components/accordion/interface';\nimport { CarouselInterface } from '../components/carousel/interface';\nimport { CollapseInterface } from '../components/collapse/interface';\nimport { DialInterface } from '../components/dial/interface';\nimport { DismissInterface } from '../components/dismiss/interface';\nimport { DrawerInterface } from '../components/drawer/interface';\nimport { DropdownInterface } from '../components/dropdown/interface';\nimport { ModalInterface } from '../components/modal/interface';\nimport { PopoverInterface } from '../components/popover/interface';\nimport { TabsInterface } from '../components/tabs/interface';\nimport { TooltipInterface } from '../components/tooltip/interface';\nimport { InputCounterInterface } from '../components/input-counter/interface';\nimport { CopyClipboardInterface } from '../components/clipboard/interface';\nimport { DatepickerInterface } from '../components/datepicker/interface';\n\nclass Instances {\n private _instances: {\n Accordion: { [id: string]: AccordionInterface };\n Carousel: { [id: string]: CarouselInterface };\n Collapse: { [id: string]: CollapseInterface };\n Dial: { [id: string]: DialInterface };\n Dismiss: { [id: string]: DismissInterface };\n Drawer: { [id: string]: DrawerInterface };\n Dropdown: { [id: string]: DropdownInterface };\n Modal: { [id: string]: ModalInterface };\n Popover: { [id: string]: PopoverInterface };\n Tabs: { [id: string]: TabsInterface };\n Tooltip: { [id: string]: TooltipInterface };\n InputCounter: { [id: string]: InputCounterInterface };\n CopyClipboard: { [id: string]: CopyClipboardInterface };\n Datepicker: { [id: string]: DatepickerInterface };\n };\n\n constructor() {\n this._instances = {\n Accordion: {},\n Carousel: {},\n Collapse: {},\n Dial: {},\n Dismiss: {},\n Drawer: {},\n Dropdown: {},\n Modal: {},\n Popover: {},\n Tabs: {},\n Tooltip: {},\n InputCounter: {},\n CopyClipboard: {},\n Datepicker: {},\n };\n }\n\n addInstance(\n component: keyof Instances['_instances'],\n instance: any,\n id?: string,\n override = false\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (this._instances[component][id] && !override) {\n console.warn(`Flowbite: Instance with ID ${id} already exists.`);\n return;\n }\n\n if (override && this._instances[component][id]) {\n this._instances[component][id].destroyAndRemoveInstance();\n }\n\n this._instances[component][id ? id : this._generateRandomId()] =\n instance;\n }\n\n getAllInstances() {\n return this._instances;\n }\n\n getInstances(component: keyof Instances['_instances']) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n return this._instances[component];\n }\n\n getInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return;\n }\n return this._instances[component][id] as any;\n }\n\n destroyAndRemoveInstance(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this.destroyInstanceObject(component, id);\n this.removeInstance(component, id);\n }\n\n removeInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n delete this._instances[component][id];\n }\n\n destroyInstanceObject(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this._instances[component][id].destroy();\n }\n\n instanceExists(component: keyof Instances['_instances'], id: string) {\n if (!this._instances[component]) {\n return false;\n }\n\n if (!this._instances[component][id]) {\n return false;\n }\n\n return true;\n }\n\n _generateRandomId() {\n return Math.random().toString(36).substr(2, 9);\n }\n\n private _componentAndInstanceCheck(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return false;\n }\n\n return true;\n }\n}\n\nconst instances = new Instances();\n\nexport default instances;\n\nif (typeof window !== 'undefined') {\n window.FlowbiteInstances = instances;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// core components\nimport Accordion, { initAccordions } from './components/accordion';\nimport Carousel, { initCarousels } from './components/carousel';\nimport Collapse, { initCollapses } from './components/collapse';\nimport Dial, { initDials } from './components/dial';\nimport Dismiss, { initDismisses } from './components/dismiss';\nimport Drawer, { initDrawers } from './components/drawer';\nimport Dropdown, { initDropdowns } from './components/dropdown';\nimport Modal, { initModals } from './components/modal';\nimport Popover, { initPopovers } from './components/popover';\nimport Tabs, { initTabs } from './components/tabs';\nimport Tooltip, { initTooltips } from './components/tooltip';\nimport InputCounter, { initInputCounters } from './components/input-counter';\nimport CopyClipboard, { initCopyClipboards } from './components/clipboard';\nimport Datepicker, { initDatepickers } from './components/datepicker';\nimport './components/index';\nimport Events from './dom/events';\n\nconst liveViewLoadEvents = new Events('phx:page-loading-stop', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n initInputCounters,\n initCopyClipboards,\n initDatepickers,\n]);\nliveViewLoadEvents.init();\n\nconst regularViewLoadEvents = new Events('load', [\n initAccordions,\n initCollapses,\n initCarousels,\n initDismisses,\n initDropdowns,\n initModals,\n initDrawers,\n initTabs,\n initTooltips,\n initPopovers,\n initDials,\n initInputCounters,\n initCopyClipboards,\n initDatepickers,\n]);\nregularViewLoadEvents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n InputCounter,\n CopyClipboard,\n Datepicker,\n Events,\n};\n"],"names":["root","factory","exports","module","define","amd","self","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","variationPlacements","reduce","acc","placement","concat","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","element","nodeName","toLowerCase","getWindow","node","window","toString","ownerDocument","defaultView","isElement","Element","isHTMLElement","HTMLElement","isShadowRoot","ShadowRoot","name","enabled","phase","fn","_ref","state","Object","keys","elements","forEach","style","styles","attributes","assign","value","removeAttribute","setAttribute","effect","_ref2","initialStyles","position","options","strategy","top","margin","arrow","hasOwnProperty","property","attribute","requires","getBasePlacement","split","Math","max","min","round","getUAString","uaData","navigator","userAgentData","brands","map","item","brand","version","join","userAgent","isLayoutViewport","test","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","width","offsetHeight","height","visualViewport","addVisualOffsets","x","offsetLeft","y","offsetTop","getLayoutRect","abs","contains","parent","child","rootNode","getRootNode","next","isSameNode","parentNode","host","getComputedStyle","isTableElement","indexOf","getDocumentElement","document","documentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getOffsetParent","isFirefox","currentNode","css","transform","perspective","contain","willChange","filter","getContainingBlock","getMainAxisFromPlacement","within","mergePaddingObject","paddingObject","expandToHashMap","hashMap","key","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","len","padding","rects","toPaddingObject","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","offset","axisProp","centerOffset","_options$element","querySelector","requiresIfExists","getVariation","unsetSides","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","win","heightProp","widthProp","_Object$assign","commonStyles","_ref4","dpr","devicePixelRatio","roundOffsetsByDPR","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","data","passive","instance","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","addEventListener","update","removeEventListener","hash","getOppositePlacement","replace","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","body","listScrollParents","list","_element$ownerDocumen","isBody","target","updatedList","rectToClientRect","rect","getClientRectFromMixedType","clippingParent","html","layoutViewport","getViewportRect","clientTop","clientLeft","getInnerBoundingClientRect","winScroll","scrollWidth","scrollHeight","direction","getDocumentRect","getClippingRect","boundary","rootBoundary","mainClippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","length","overflows","sort","a","b","computeAutoPlacement","referenceRect","checksMap","Map","makeFallbackChecks","firstFittingPlacement","i","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","push","every","check","set","_loop","_i","fittingPlacement","find","get","slice","reset","getSideOffsets","preventedOffsets","isAnySideFullyClipped","some","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","_options$offset","invertDistance","skidding","distance","distanceAndSkiddingToXY","_data$state$placement","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","v","withinMaxClamp","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","isElementScaled","order","modifiers","visited","Set","result","modifier","add","dep","has","depModifier","DEFAULT_OPTIONS","areValidElements","arguments","args","Array","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","pending","orderedModifiers","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","orderModifiers","merged","current","existing","mergeByName","m","_ref3$options","cleanupFn","noopFn","forceUpdate","_state$elements","index","_state$orderedModifie","_state$orderedModifie2","Promise","resolve","then","undefined","destroy","onFirstUpdate","createPopper","eventListeners","_arrayLikeToArray","r","e","n","_callSuper","t","o","_getPrototypeOf","TypeError","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","constructor","apply","_classCallCheck","_defineProperties","enumerable","configurable","writable","defineProperty","_toPropertyKey","_createClass","prototype","_get","bind","p","_superPropBase","getOwnPropertyDescriptor","call","setPrototypeOf","getPrototypeOf","__proto__","_inherits","create","_setPrototypeOf","Boolean","valueOf","_slicedToArray","isArray","_arrayWithHoles","l","Symbol","iterator","u","f","done","return","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_toConsumableArray","_arrayWithoutHoles","from","_iterableToArray","_nonIterableSpread","toPrimitive","String","Number","_toPrimitive","_typeof","hasProperty","obj","prop","lastItemOf","arr","pushUnique","items","includes","stringToArray","str","separator","isInRange","testVal","limitToRange","val","createTagRepeat","tagName","repeat","openTagSrc","src","attr","optimizeTemplateHTML","stripTime","timeValue","Date","setHours","today","dateValue","newDate","setFullYear","addDays","date","amount","setDate","getDate","addMonths","monthsToSet","getMonth","expectedMonth","time","setMonth","addYears","getFullYear","dayDiff","day","dayOfTheWeekOf","baseDate","dayOfWeek","weekStart","baseDay","getDay","startOfYearPeriod","years","year","floor","reFormatTokens","reNonDateParts","knownFormats","parseFns","parseInt","month","locale","monthIndex","isNaN","NaN","monthName","compareNames","startsWith","monthsShort","findIndex","months","normalizeMonth","getTime","d","formatFns","dd","padZero","D","daysShort","DD","days","mm","M","MM","yy","yyyy","num","padStart","parseFormatString","format","Error","separators","parts","match","RegExp","partFormatters","token","partParserKeys","part","parser","dateStr","dateParts","dtParts","origDate","formatter","parseDate","toValue","_date","formatDate","dateObj","toDisplay","listenerRegistry","WeakMap","_EventTarget$prototyp","EventTarget","registerListeners","keyObj","listeners","registered","listener","unregisterListeners","Event","composedPath","getComposedPath","path","this","findFromPath","criteria","currentTarget","el","parentElement","findElementInEventPath","ev","selector","matches","locales","en","daysMin","clear","titleFormat","autohide","beforeShowDay","beforeShowDecade","beforeShowMonth","beforeShowYear","calendarWeeks","clearBtn","dateDelimiter","datesDisabled","daysOfWeekDisabled","daysOfWeekHighlighted","defaultViewDate","disableTouchKeyboard","language","maxDate","maxNumberOfDates","maxView","minDate","nextArrow","orientation","pickLevel","prevArrow","showDaysOfWeek","showOnClick","showOnFocus","startView","title","todayBtn","todayBtnMode","todayHighlight","updateOnBlur","range","createRange","parseHTML","createContextualFragment","hideElement","display","dataset","styleDisplay","showElement","emptyChildNodes","firstChild","removeChild","defaultLang","defaultFormat","defaultWeekStart","sanitizeDOW","dow","calcEndOfWeek","startOfWeek","validateDate","origValue","validateViewId","viewId","processOptions","datepicker","lang","inOpts","config","origLocale","weekEnd","hasToDisplay","hasToValue","validFormatString","minDt","maxDt","dates","dt","viewDate","wkStart","multidate","newPickLevel","newMaxView","newStartView","childNodes","pickerTemplate","daysTemplate","calendarWeeksTemplate","View","picker","selected","init","isMinView","id","updateFocus","updateSelection","beforeShow","classes","classList","disabled","_el$classList","extraClasses","content","newChildNodes","DocumentFragment","appendChild","replaceChildNodes","DaysView","_View","cellClass","onConstruction","inner","grid","lastChild","updateDOW","_this","dayNames","switchLabelFormat","weeksElem","weeks","insertBefore","children","textContent","className","viewYear","viewMonth","firstOfMonth","first","last","focused","_this$picker$datepick","rangepicker","_this2","switchLabel","setViewSwitchLabel","setPrevBtnDisabled","setNextBtnDisabled","thuOfTheWeek","firstThu","getWeek","remove","_this2$range","rangeStart","rangeEnd","performBeforeHook","_this3","querySelectorAll","computeMonthRange","thisYear","_range","_range$","startY","startM","_range$2","endY","endM","MonthsView","ix","monthNames","minYear","minMonth","minDateObj","maxYear","maxMonth","maxDateObj","yrOutOfRange","isMinYear","isMaxYear","_range2","toTitleCase","word","ch","toUpperCase","YearsView","navStep","step","beforeShowOption","triggerDatepickerEvent","type","detail","currentView","dispatchEvent","CustomEvent","goToPrevOrNext","newViewDate","_datepicker$config","_datepicker$picker","changeFocus","render","switchView","changeView","unfocus","refresh","hide","goToSelectedMonthOrYear","selection","onClickTodayBtn","currentDate","onClickClearBtn","onClickViewSwitch","onClickPrevBtn","onClickNextBtn","onClickView","_datepicker$picker$cu","onClickPicker","inline","inputField","focus","processPickerOptions","controls","prevBtn","cloneNode","nextBtn","_picker$datepicker$co","computeResetViewDate","setViewDate","oldViewDate","_picker$currentView","getTextDirection","Picker","template","buttonClass","_element$firstChild$c","header","footer","firstElementChild","_header$lastElementCh","lastElementChild","viewSwitch","_footer$firstChild$ch","elementClass","capture","views","container","view","active","inputDirection","dir","place","blur","exitEditMode","_this$element","_this$datepicker","_this$element$getBoun","calendarWidth","calendarHeight","_container$getBoundin","containerLeft","containerTop","containerWidth","_inputField$getBoundi","inputLeft","inputTop","inputWidth","inputHeight","_config$orientation","orientX","orientY","scrollY","scrollX","labelText","oldView","newView","_renderMethod","replaceChild","quickRender","renderMethod","findNextAvailableOne","addFn","increase","testFn","moveByArrowKey","vertical","ctrlKey","metaKey","onKeydown","editMode","shiftKey","enterEditMode","show","preventDefault","stopPropagation","onFocus","_showing","onMousedown","_active","activeElement","_clicking","setTimeout","onClickInput","clearTimeout","onPaste","clipboardData","types","onClickOutside","pickerElem","stringifyDates","processInputDates","inputDates","origDates","datepickers","newDates","_dt","refreshUI","mode","_setDate","Datepicker","initialDates","inputs","inputDateValues","onMousedownDocument","newOptions","detach","callback","opts","lastArg","pop","forceRender","filterOptions","newOpts","allowOneSidedRange","setupDatepicker","changeDateListener","onChangeDate","_updating","setDateOptions","changedSide","otherSide","changedDate","otherDate","DateRangePicker","cleanOptions","freeze","_this$datepickers","datepicker0","datepicker1","Default","alwaysOpen","activeClasses","inactiveClasses","onOpen","onClose","onToggle","DefaultInstanceOptions","override","accordionEl","instanceOptions","_instanceId","_accordionEl","_items","_initialized","addInstance","open","clickHandler","toggle","triggerEl","removeInstance","destroyAndRemoveInstance","getItem","targetEl","iconEl","close","updateOnOpen","updateOnClose","updateOnToggle","initAccordions","$accordionEl","getAttribute","$triggerEl","closest","Accordion","defaultPosition","indicators","interval","onNext","onPrev","onChange","carouselEl","_carouselEl","_activeItem","_indicators","_intervalDuration","_intervalInstance","getActiveItem","slideTo","indicator","nextItem","rotationItems","middle","_rotate","_setActiveItem","pause","cycle","activeItem","prev","prevItem","setInterval","clearInterval","updateOnNext","updateOnPrev","updateOnChange","initCarousels","$carouselEl","slide","$carouselItemEl","$indicatorEl","carousel","Carousel","carouselNextEl","carouselPrevEl","htmlEntities","contentType","onCopy","_triggerEl","_targetEl","_triggerElClickHandler","copy","getTargetValue","innerHTML","trim","textToCopy","decodeHTML","tempTextArea","createElement","select","execCommand","textarea","updateOnCopyCallback","initCopyClipboards","targetId","$targetEl","getElementById","instanceExists","CopyClipboard","console","error","initClipboards","onCollapse","onExpand","_visible","hasAttribute","_clickHandler","collapse","expand","updateOnCollapse","updateOnExpand","initCollapses","Collapse","_generateRandomId","defaultDatepickerId","buttons","autoSelectToday","rangePicker","onShow","onHide","datepickerEl","_datepickerEl","_datepickerInstance","_getDatepickerOptions","getDatepickerInstance","getDates","setDates","datepickerOptions","updateOnShow","updateOnHide","initDatepickers","$datepickerEl","autoselectToday","triggerType","parentEl","_parentEl","triggerEventTypes","_getTriggerEventTypes","_showEventHandler","showEvents","_hideEventHandler","hideEvents","isHidden","isVisible","initDials","$parentEl","dialId","$dialEl","Dial","transition","duration","timing","initDismisses","$dismissEl","Dismiss","bodyScrolling","backdrop","edge","edgeOffset","backdropClasses","_eventListenerInstances","_getPlacementClasses","base","c","_handleEscapeKey","event","removeAllEventListenerInstances","_destroyBackdropEl","inactive","_createBackdrop","backdropEl","append","addEventListenerInstance","handler","eventListenerInstance","getAllEventListenerInstances","initDrawers","drawerId","$drawerEl","Drawer","getInstance","toggleDrawer","hideDrawer","showDrawer","offsetSkidding","offsetDistance","delay","ignoreClickOutsideClass","targetElement","triggerElement","_popperInstance","_createPopperInstance","_setupEventListeners","triggerEvents","_getTriggerEvents","_hoverShowTriggerElHandler","_hoverShowTargetElHandler","_hoverHideHandler","_setupClickOutsideListener","_clickOutsideEventListener","_handleClickOutside","_removeClickOutsideListener","clickedEl","isIgnored","initDropdowns","dropdownId","$dropdownEl","Dropdown","initFlowbite","initModals","initTabs","initTooltips","initPopovers","initInputCounters","minValue","maxValue","onIncrement","onDecrement","incrementEl","decrementEl","_incrementEl","_decrementEl","_inputHandler","_incrementClickHandler","increment","_decrementClickHandler","decrement","getCurrentValue","updateOnIncrement","updateOnDecrement","$incrementEl","$decrementEl","InputCounter","closable","_isHidden","_backdropEl","_setupModalCloseEventListeners","_handleOutsideClick","_keydownEventListener","_removeModalCloseEventListeners","modalId","$modalEl","Modal","toggleModal","showModal","hideModal","_showHandler","_hideHandler","_removeKeydownListener","_setupKeydownListener","popoverID","$popoverEl","Popover","defaultTabId","tabsEl","_tabsEl","_activeTab","getTab","setActiveTab","tab","getActiveTab","forceShow","tabItems","isActive","Tabs","tooltipId","$tooltipEl","Tooltip","eventType","eventFunctions","_eventType","_eventFunctions","eventFunction","Events","instances","_instances","component","warn","getAllInstances","getInstances","_componentAndInstanceCheck","destroyInstanceObject","random","substr","FlowbiteInstances","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","toStringTag"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.turbo.js b/node_modules/flowbite/dist/flowbite.turbo.js new file mode 100644 index 0000000..781958e --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.turbo.js @@ -0,0 +1,8533 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("Flowbite", [], factory); + else if(typeof exports === 'object') + exports["Flowbite"] = factory(); + else + root["Flowbite"] = factory(); +})(self, function() { +return /******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 853: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "afterMain": function() { return /* reexport */ afterMain; }, + "afterRead": function() { return /* reexport */ afterRead; }, + "afterWrite": function() { return /* reexport */ afterWrite; }, + "applyStyles": function() { return /* reexport */ modifiers_applyStyles; }, + "arrow": function() { return /* reexport */ modifiers_arrow; }, + "auto": function() { return /* reexport */ auto; }, + "basePlacements": function() { return /* reexport */ basePlacements; }, + "beforeMain": function() { return /* reexport */ beforeMain; }, + "beforeRead": function() { return /* reexport */ beforeRead; }, + "beforeWrite": function() { return /* reexport */ beforeWrite; }, + "bottom": function() { return /* reexport */ bottom; }, + "clippingParents": function() { return /* reexport */ clippingParents; }, + "computeStyles": function() { return /* reexport */ modifiers_computeStyles; }, + "createPopper": function() { return /* reexport */ popper_createPopper; }, + "createPopperBase": function() { return /* reexport */ createPopper; }, + "createPopperLite": function() { return /* reexport */ popper_lite_createPopper; }, + "detectOverflow": function() { return /* reexport */ detectOverflow; }, + "end": function() { return /* reexport */ end; }, + "eventListeners": function() { return /* reexport */ eventListeners; }, + "flip": function() { return /* reexport */ modifiers_flip; }, + "hide": function() { return /* reexport */ modifiers_hide; }, + "left": function() { return /* reexport */ left; }, + "main": function() { return /* reexport */ main; }, + "modifierPhases": function() { return /* reexport */ modifierPhases; }, + "offset": function() { return /* reexport */ modifiers_offset; }, + "placements": function() { return /* reexport */ enums_placements; }, + "popper": function() { return /* reexport */ popper; }, + "popperGenerator": function() { return /* reexport */ popperGenerator; }, + "popperOffsets": function() { return /* reexport */ modifiers_popperOffsets; }, + "preventOverflow": function() { return /* reexport */ modifiers_preventOverflow; }, + "read": function() { return /* reexport */ read; }, + "reference": function() { return /* reexport */ reference; }, + "right": function() { return /* reexport */ right; }, + "start": function() { return /* reexport */ start; }, + "top": function() { return /* reexport */ enums_top; }, + "variationPlacements": function() { return /* reexport */ variationPlacements; }, + "viewport": function() { return /* reexport */ viewport; }, + "write": function() { return /* reexport */ write; } +}); + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/enums.js +var enums_top = 'top'; +var bottom = 'bottom'; +var right = 'right'; +var left = 'left'; +var auto = 'auto'; +var basePlacements = [enums_top, bottom, right, left]; +var start = 'start'; +var end = 'end'; +var clippingParents = 'clippingParents'; +var viewport = 'viewport'; +var popper = 'popper'; +var reference = 'reference'; +var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); +}, []); +var enums_placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); +}, []); // modifiers that need to read the DOM + +var beforeRead = 'beforeRead'; +var read = 'read'; +var afterRead = 'afterRead'; // pure-logic modifiers + +var beforeMain = 'beforeMain'; +var main = 'main'; +var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state) + +var beforeWrite = 'beforeWrite'; +var write = 'write'; +var afterWrite = 'afterWrite'; +var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +function getNodeName(element) { + return element ? (element.nodeName || '').toLowerCase() : null; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindow.js +function getWindow(node) { + if (node == null) { + return window; + } + + if (node.toString() !== '[object Window]') { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + + return node; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js + + +function isElement(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; +} + +function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; +} + +function isShadowRoot(node) { + // IE 11 has no ShadowRoot + if (typeof ShadowRoot === 'undefined') { + return false; + } + + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; +} + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/applyStyles.js + + // This modifier takes the styles prepared by the `computeStyles` modifier +// and applies them to the HTMLElements such as popper and arrow + +function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function (name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } // Flow doesn't support to extend this property, but it's the most + // effective way to apply styles to an HTMLElement + // $FlowFixMe[cannot-write] + + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (name) { + var value = attributes[name]; + + if (value === false) { + element.removeAttribute(name); + } else { + element.setAttribute(name, value === true ? '' : value); + } + }); + }); +} + +function effect(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: '0', + top: '0', + margin: '0' + }, + arrow: { + position: 'absolute' + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + + return function () { + Object.keys(state.elements).forEach(function (name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them + + var style = styleProperties.reduce(function (style, property) { + style[property] = ''; + return style; + }, {}); // arrow is optional + virtual elements + + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + + Object.assign(element.style, style); + Object.keys(attributes).forEach(function (attribute) { + element.removeAttribute(attribute); + }); + }); + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_applyStyles = ({ + name: 'applyStyles', + enabled: true, + phase: 'write', + fn: applyStyles, + effect: effect, + requires: ['computeStyles'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getBasePlacement.js + +function getBasePlacement(placement) { + return placement.split('-')[0]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/math.js +var math_max = Math.max; +var math_min = Math.min; +var round = Math.round; +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/userAgent.js +function getUAString() { + var uaData = navigator.userAgentData; + + if (uaData != null && uaData.brands) { + return uaData.brands.map(function (item) { + return item.brand + "/" + item.version; + }).join(' '); + } + + return navigator.userAgent; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js + +function isLayoutViewport() { + return !/^((?!chrome|android).)*safari/i.test(getUAString()); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js + + + + +function getBoundingClientRect(element, includeScale, isFixedStrategy) { + if (includeScale === void 0) { + includeScale = false; + } + + if (isFixedStrategy === void 0) { + isFixedStrategy = false; + } + + var clientRect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + + if (includeScale && isHTMLElement(element)) { + scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1; + scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1; + } + + var _ref = isElement(element) ? getWindow(element) : window, + visualViewport = _ref.visualViewport; + + var addVisualOffsets = !isLayoutViewport() && isFixedStrategy; + var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX; + var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY; + var width = clientRect.width / scaleX; + var height = clientRect.height / scaleY; + return { + width: width, + height: height, + top: y, + right: x + width, + bottom: y + height, + left: x, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js + // Returns the layout rect of an element relative to its offsetParent. Layout +// means it doesn't take into account transforms. + +function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed. + // Fixes https://github.com/popperjs/popper-core/issues/1223 + + var width = element.offsetWidth; + var height = element.offsetHeight; + + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + + return { + x: element.offsetLeft, + y: element.offsetTop, + width: width, + height: height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/contains.js + +function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method + + if (parent.contains(child)) { + return true; + } // then fallback to custom implementation with Shadow DOM support + else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + + do { + if (next && parent.isSameNode(next)) { + return true; + } // $FlowFixMe[prop-missing]: need a better way to handle this... + + + next = next.parentNode || next.host; + } while (next); + } // Give up, the result is false + + + return false; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js + +function getComputedStyle(element) { + return getWindow(element).getComputedStyle(element); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js + +function isTableElement(element) { + return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js + +function getDocumentElement(element) { + // $FlowFixMe[incompatible-return]: assume body is always available + return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing] + element.document) || window.document).documentElement; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js + + + +function getParentNode(element) { + if (getNodeName(element) === 'html') { + return element; + } + + return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || ( // DOM Element detected + isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) // fallback + + ); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js + + + + + + + + +function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle(element).position === 'fixed') { + return null; + } + + return element.offsetParent; +} // `.offsetParent` reports `null` for fixed elements, while absolute elements +// return the containing block + + +function getContainingBlock(element) { + var isFirefox = /firefox/i.test(getUAString()); + var isIE = /Trident/i.test(getUAString()); + + if (isIE && isHTMLElement(element)) { + // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport + var elementCss = getComputedStyle(element); + + if (elementCss.position === 'fixed') { + return null; + } + } + + var currentNode = getParentNode(element); + + if (isShadowRoot(currentNode)) { + currentNode = currentNode.host; + } + + while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that + // create a containing block. + // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block + + if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + + return null; +} // Gets the closest ancestor positioned element. Handles some edge cases, +// such as table ancestors and cross browser bugs. + + +function getOffsetParent(element) { + var window = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + + while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') { + offsetParent = getTrueOffsetParent(offsetParent); + } + + if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) { + return window; + } + + return offsetParent || getContainingBlock(element) || window; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +function getMainAxisFromPlacement(placement) { + return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/within.js + +function within(min, value, max) { + return math_max(min, math_min(value, max)); +} +function withinMaxClamp(min, value, max) { + var v = within(min, value, max); + return v > max ? max : v; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js + +function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/expandToHashMap.js +function expandToHashMap(value, keys) { + return keys.reduce(function (hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/arrow.js + + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var toPaddingObject = function toPaddingObject(padding, state) { + padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); +}; + +function arrow(_ref) { + var _state$modifiersData$; + + var state = _ref.state, + name = _ref.name, + options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? 'height' : 'width'; + + if (!arrowElement || !popperOffsets) { + return; + } + + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === 'y' ? enums_top : left; + var maxProp = axis === 'y' ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len]; + var startDiff = popperOffsets[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is + // outside of the popper bounds + + var min = paddingObject[minProp]; + var max = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset = within(min, center, max); // Prevents breaking syntax highlighting... + + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$); +} + +function arrow_effect(_ref2) { + var state = _ref2.state, + options = _ref2.options; + var _options$element = options.element, + arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element; + + if (arrowElement == null) { + return; + } // CSS selector + + + if (typeof arrowElement === 'string') { + arrowElement = state.elements.popper.querySelector(arrowElement); + + if (!arrowElement) { + return; + } + } + + if (false) {} + + if (!contains(state.elements.popper, arrowElement)) { + if (false) {} + + return; + } + + state.elements.arrow = arrowElement; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_arrow = ({ + name: 'arrow', + enabled: true, + phase: 'main', + fn: arrow, + effect: arrow_effect, + requires: ['popperOffsets'], + requiresIfExists: ['preventOverflow'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getVariation.js +function getVariation(placement) { + return placement.split('-')[1]; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/computeStyles.js + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +var unsetSides = { + top: 'auto', + right: 'auto', + bottom: 'auto', + left: 'auto' +}; // Round the offsets to the nearest suitable subpixel based on the DPR. +// Zooming can change the DPR, but it seems to report a value that will +// cleanly divide the values into the appropriate subpixels. + +function roundOffsetsByDPR(_ref) { + var x = _ref.x, + y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; +} + +function mapToStyles(_ref2) { + var _Object$assign2; + + var popper = _ref2.popper, + popperRect = _ref2.popperRect, + placement = _ref2.placement, + variation = _ref2.variation, + offsets = _ref2.offsets, + position = _ref2.position, + gpuAcceleration = _ref2.gpuAcceleration, + adaptive = _ref2.adaptive, + roundOffsets = _ref2.roundOffsets, + isFixed = _ref2.isFixed; + var _offsets$x = offsets.x, + x = _offsets$x === void 0 ? 0 : _offsets$x, + _offsets$y = offsets.y, + y = _offsets$y === void 0 ? 0 : _offsets$y; + + var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref3.x; + y = _ref3.y; + var hasX = offsets.hasOwnProperty('x'); + var hasY = offsets.hasOwnProperty('y'); + var sideX = left; + var sideY = enums_top; + var win = window; + + if (adaptive) { + var offsetParent = getOffsetParent(popper); + var heightProp = 'clientHeight'; + var widthProp = 'clientWidth'; + + if (offsetParent === getWindow(popper)) { + offsetParent = getDocumentElement(popper); + + if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') { + heightProp = 'scrollHeight'; + widthProp = 'scrollWidth'; + } + } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it + + + offsetParent = offsetParent; + + if (placement === enums_top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] + offsetParent[heightProp]; + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + + if (placement === left || (placement === enums_top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] + offsetParent[widthProp]; + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + + var commonStyles = Object.assign({ + position: position + }, adaptive && unsetSides); + + var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ + x: x, + y: y + }) : { + x: x, + y: y + }; + + x = _ref4.x; + y = _ref4.y; + + if (gpuAcceleration) { + var _Object$assign; + + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); +} + +function computeStyles(_ref5) { + var state = _ref5.state, + options = _ref5.options; + var _options$gpuAccelerat = options.gpuAcceleration, + gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, + _options$adaptive = options.adaptive, + adaptive = _options$adaptive === void 0 ? true : _options$adaptive, + _options$roundOffsets = options.roundOffsets, + roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + + if (false) { var transitionProperty; } + + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration: gpuAcceleration, + isFixed: state.options.strategy === 'fixed' + }; + + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive: adaptive, + roundOffsets: roundOffsets + }))); + } + + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: 'absolute', + adaptive: false, + roundOffsets: roundOffsets + }))); + } + + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-placement': state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_computeStyles = ({ + name: 'computeStyles', + enabled: true, + phase: 'beforeWrite', + fn: computeStyles, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/eventListeners.js + // eslint-disable-next-line import/no-unused-modules + +var passive = { + passive: true +}; + +function eventListeners_effect(_ref) { + var state = _ref.state, + instance = _ref.instance, + options = _ref.options; + var _options$scroll = options.scroll, + scroll = _options$scroll === void 0 ? true : _options$scroll, + _options$resize = options.resize, + resize = _options$resize === void 0 ? true : _options$resize; + var window = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.addEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.addEventListener('resize', instance.update, passive); + } + + return function () { + if (scroll) { + scrollParents.forEach(function (scrollParent) { + scrollParent.removeEventListener('scroll', instance.update, passive); + }); + } + + if (resize) { + window.removeEventListener('resize', instance.update, passive); + } + }; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var eventListeners = ({ + name: 'eventListeners', + enabled: true, + phase: 'write', + fn: function fn() {}, + effect: eventListeners_effect, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +var hash = { + left: 'right', + right: 'left', + bottom: 'top', + top: 'bottom' +}; +function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function (matched) { + return hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +var getOppositeVariationPlacement_hash = { + start: 'end', + end: 'start' +}; +function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function (matched) { + return getOppositeVariationPlacement_hash[matched]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js + +function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft: scrollLeft, + scrollTop: scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js + + + +function getWindowScrollBarX(element) { + // If has a CSS width greater than the viewport, then this will be + // incorrect for RTL. + // Popper 1 is broken in this case and never had a bug report so let's assume + // it's not an issue. I don't think anyone ever specifies width on + // anyway. + // Browsers where the left scrollbar doesn't cause an issue report `0` for + // this (e.g. Edge 2019, IE11, Safari) + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js + + + + +function getViewportRect(element, strategy) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + var layoutViewport = isLayoutViewport(); + + if (layoutViewport || !layoutViewport && strategy === 'fixed') { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + + return { + width: width, + height: height, + x: x + getWindowScrollBarX(element), + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js + + + + + // Gets the entire size of the scrollable document area, even extending outside +// of the `` and `` rect bounds if horizontally scrollable + +function getDocumentRect(element) { + var _element$ownerDocumen; + + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = math_max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = math_max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + + if (getComputedStyle(body || html).direction === 'rtl') { + x += math_max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + + return { + width: width, + height: height, + x: x, + y: y + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js + +function isScrollParent(element) { + // Firefox wants us to check `-x` and `-y` variations as well + var _getComputedStyle = getComputedStyle(element), + overflow = _getComputedStyle.overflow, + overflowX = _getComputedStyle.overflowX, + overflowY = _getComputedStyle.overflowY; + + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js + + + + +function getScrollParent(node) { + if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) { + // $FlowFixMe[incompatible-return]: assume body is always available + return node.ownerDocument.body; + } + + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + + return getScrollParent(getParentNode(node)); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js + + + + +/* +given a DOM element, return the list of all scroll parents, up the list of ancesors +until we get to the top window object. This list is what we attach scroll listeners +to, because if any of these parent elements scroll, we'll need to re-calculate the +reference element's position. +*/ + +function listScrollParents(element, list) { + var _element$ownerDocumen; + + if (list === void 0) { + list = []; + } + + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js +function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js + + + + + + + + + + + + + + + +function getInnerBoundingClientRect(element, strategy) { + var rect = getBoundingClientRect(element, false, strategy === 'fixed'); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; +} + +function getClientRectFromMixedType(element, clippingParent, strategy) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element))); +} // A "clipping parent" is an overflowable container with the characteristic of +// clipping (or hiding) overflowing elements with a position different from +// `initial` + + +function getClippingParents(element) { + var clippingParents = listScrollParents(getParentNode(element)); + var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + + if (!isElement(clipperElement)) { + return []; + } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414 + + + return clippingParents.filter(function (clippingParent) { + return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; + }); +} // Gets the maximum area that the element is visible in due to any number of +// clipping parents + + +function getClippingRect(element, boundary, rootBoundary, strategy) { + var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary); + var clippingParents = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents[0]; + var clippingRect = clippingParents.reduce(function (accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent, strategy); + accRect.top = math_max(rect.top, accRect.top); + accRect.right = math_min(rect.right, accRect.right); + accRect.bottom = math_min(rect.bottom, accRect.bottom); + accRect.left = math_max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent, strategy)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeOffsets.js + + + + +function computeOffsets(_ref) { + var reference = _ref.reference, + element = _ref.element, + placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference.x + reference.width / 2 - element.width / 2; + var commonY = reference.y + reference.height / 2 - element.height / 2; + var offsets; + + switch (basePlacement) { + case enums_top: + offsets = { + x: commonX, + y: reference.y - element.height + }; + break; + + case bottom: + offsets = { + x: commonX, + y: reference.y + reference.height + }; + break; + + case right: + offsets = { + x: reference.x + reference.width, + y: commonY + }; + break; + + case left: + offsets = { + x: reference.x - element.width, + y: commonY + }; + break; + + default: + offsets = { + x: reference.x, + y: reference.y + }; + } + + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + + if (mainAxis != null) { + var len = mainAxis === 'y' ? 'height' : 'width'; + + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2); + break; + + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2); + break; + + default: + } + } + + return offsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/detectOverflow.js + + + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + _options$placement = _options.placement, + placement = _options$placement === void 0 ? state.placement : _options$placement, + _options$strategy = _options.strategy, + strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, + _options$boundary = _options.boundary, + boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, + _options$rootBoundary = _options.rootBoundary, + rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, + _options$elementConte = _options.elementContext, + elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, + _options$altBoundary = _options.altBoundary, + altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, + _options$padding = _options.padding, + padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: 'absolute', + placement: placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect + // 0 or negative = within the clipping rect + + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element + + if (elementContext === popper && offsetData) { + var offset = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function (key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [enums_top, bottom].indexOf(key) >= 0 ? 'y' : 'x'; + overflowOffsets[key] += offset[axis] * multiply; + }); + } + + return overflowOffsets; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js + + + + +function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + placement = _options.placement, + boundary = _options.boundary, + rootBoundary = _options.rootBoundary, + padding = _options.padding, + flipVariations = _options.flipVariations, + _options$allowedAutoP = _options.allowedAutoPlacements, + allowedAutoPlacements = _options$allowedAutoP === void 0 ? enums_placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) { + return getVariation(placement) === variation; + }) : basePlacements; + var allowedPlacements = placements.filter(function (placement) { + return allowedAutoPlacements.indexOf(placement) >= 0; + }); + + if (allowedPlacements.length === 0) { + allowedPlacements = placements; + + if (false) {} + } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions... + + + var overflows = allowedPlacements.reduce(function (acc, placement) { + acc[placement] = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding + })[getBasePlacement(placement)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function (a, b) { + return overflows[a] - overflows[b]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/flip.js + + + + + + + // eslint-disable-next-line import/no-unused-modules + +function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; +} + +function flip(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + + if (state.modifiersData[name]._skip) { + return; + } + + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, + specifiedFallbackPlacements = options.fallbackPlacements, + padding = options.padding, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + _options$flipVariatio = options.flipVariations, + flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, + allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) { + return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + flipVariations: flipVariations, + allowedAutoPlacements: allowedAutoPlacements + }) : placement); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements[0]; + + for (var i = 0; i < placements.length; i++) { + var placement = placements[i]; + + var _basePlacement = getBasePlacement(placement); + + var isStartVariation = getVariation(placement) === start; + var isVertical = [enums_top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? 'width' : 'height'; + var overflow = detectOverflow(state, { + placement: placement, + boundary: boundary, + rootBoundary: rootBoundary, + altBoundary: altBoundary, + padding: padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : enums_top; + + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + + if (checks.every(function (check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + + checksMap.set(placement, checks); + } + + if (makeFallbackChecks) { + // `2` may be desired in some cases – research later + var numberOfChecks = flipVariations ? 3 : 1; + + var _loop = function _loop(_i) { + var fittingPlacement = placements.find(function (placement) { + var checks = checksMap.get(placement); + + if (checks) { + return checks.slice(0, _i).every(function (check) { + return check; + }); + } + }); + + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + + if (_ret === "break") break; + } + } + + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_flip = ({ + name: 'flip', + enabled: true, + phase: 'main', + fn: flip, + requiresIfExists: ['offset'], + data: { + _skip: false + } +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/hide.js + + + +function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; +} + +function isAnySideFullyClipped(overflow) { + return [enums_top, right, bottom, left].some(function (side) { + return overflow[side] >= 0; + }); +} + +function hide(_ref) { + var state = _ref.state, + name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: 'reference' + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets: referenceClippingOffsets, + popperEscapeOffsets: popperEscapeOffsets, + isReferenceHidden: isReferenceHidden, + hasPopperEscaped: hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + 'data-popper-reference-hidden': isReferenceHidden, + 'data-popper-escaped': hasPopperEscaped + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_hide = ({ + name: 'hide', + enabled: true, + phase: 'main', + requiresIfExists: ['preventOverflow'], + fn: hide +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/offset.js + + // eslint-disable-next-line import/no-unused-modules + +function distanceAndSkiddingToXY(placement, rects, offset) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, enums_top].indexOf(basePlacement) >= 0 ? -1 : 1; + + var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { + placement: placement + })) : offset, + skidding = _ref[0], + distance = _ref[1]; + + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; +} + +function offset(_ref2) { + var state = _ref2.state, + options = _ref2.options, + name = _ref2.name; + var _options$offset = options.offset, + offset = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = enums_placements.reduce(function (acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset); + return acc; + }, {}); + var _data$state$placement = data[state.placement], + x = _data$state$placement.x, + y = _data$state$placement.y; + + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_offset = ({ + name: 'offset', + enabled: true, + phase: 'main', + requires: ['popperOffsets'], + fn: offset +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js + + +function popperOffsets(_ref) { + var state = _ref.state, + name = _ref.name; + // Offsets are the actual position the popper needs to have to be + // properly positioned near its reference element + // This is the most basic placement, and will be adjusted by + // the modifiers in the next step + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: 'absolute', + placement: state.placement + }); +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_popperOffsets = ({ + name: 'popperOffsets', + enabled: true, + phase: 'read', + fn: popperOffsets, + data: {} +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getAltAxis.js +function getAltAxis(axis) { + return axis === 'x' ? 'y' : 'x'; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js + + + + + + + + + + + + +function preventOverflow(_ref) { + var state = _ref.state, + options = _ref.options, + name = _ref.name; + var _options$mainAxis = options.mainAxis, + checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, + _options$altAxis = options.altAxis, + checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, + boundary = options.boundary, + rootBoundary = options.rootBoundary, + altBoundary = options.altBoundary, + padding = options.padding, + _options$tether = options.tether, + tether = _options$tether === void 0 ? true : _options$tether, + _options$tetherOffset = options.tetherOffset, + tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary: boundary, + rootBoundary: rootBoundary, + padding: padding, + altBoundary: altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + + if (!popperOffsets) { + return; + } + + if (checkMainAxis) { + var _offsetModifierState$; + + var mainSide = mainAxis === 'y' ? enums_top : left; + var altSide = mainAxis === 'y' ? bottom : right; + var len = mainAxis === 'y' ? 'height' : 'width'; + var offset = popperOffsets[mainAxis]; + var min = offset + overflow[mainSide]; + var max = offset - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go + // outside the reference bounds + + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want + // to include its full size in the calculation. If the reference is small + // and near the edge of a boundary, the popper can overflow even if the + // reference is not overflowing as well (e.g. virtual elements with no + // width or height) + + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? math_min(min, tetherMin) : min, offset, tether ? math_max(max, tetherMax) : max); + popperOffsets[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset; + } + + if (checkAltAxis) { + var _offsetModifierState$2; + + var _mainSide = mainAxis === 'x' ? enums_top : left; + + var _altSide = mainAxis === 'x' ? bottom : right; + + var _offset = popperOffsets[altAxis]; + + var _len = altAxis === 'y' ? 'height' : 'width'; + + var _min = _offset + overflow[_mainSide]; + + var _max = _offset - overflow[_altSide]; + + var isOriginSide = [enums_top, left].indexOf(basePlacement) !== -1; + + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + + popperOffsets[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + + state.modifiersData[name] = data; +} // eslint-disable-next-line import/no-unused-modules + + +/* harmony default export */ var modifiers_preventOverflow = ({ + name: 'preventOverflow', + enabled: true, + phase: 'main', + fn: preventOverflow, + requiresIfExists: ['offset'] +}); +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/index.js + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js + + + + +function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js + + + + + + + + + +function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; +} // Returns the composite rect of an element relative to its offsetParent. +// Composite means it takes into account transforms as well as layout. + + +function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/orderModifiers.js + // source: https://stackoverflow.com/questions/49875255 + +function order(modifiers) { + var map = new Map(); + var visited = new Set(); + var result = []; + modifiers.forEach(function (modifier) { + map.set(modifier.name, modifier); + }); // On visiting object, check for its dependencies and visit them recursively + + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function (dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + + modifiers.forEach(function (modifier) { + if (!visited.has(modifier.name)) { + // check for visited object + sort(modifier); + } + }); + return result; +} + +function orderModifiers(modifiers) { + // order based on dependencies + var orderedModifiers = order(modifiers); // order based on phase + + return modifierPhases.reduce(function (acc, phase) { + return acc.concat(orderedModifiers.filter(function (modifier) { + return modifier.phase === phase; + })); + }, []); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/debounce.js +function debounce(fn) { + var pending; + return function () { + if (!pending) { + pending = new Promise(function (resolve) { + Promise.resolve().then(function () { + pending = undefined; + resolve(fn()); + }); + }); + } + + return pending; + }; +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergeByName.js +function mergeByName(modifiers) { + var merged = modifiers.reduce(function (merged, current) { + var existing = merged[current.name]; + merged[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged; + }, {}); // IE11 does not support Object.values + + return Object.keys(merged).map(function (key) { + return merged[key]; + }); +} +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/createPopper.js + + + + + + + + + + + + + + +var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.'; +var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.'; +var DEFAULT_OPTIONS = { + placement: 'bottom', + modifiers: [], + strategy: 'absolute' +}; + +function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return !args.some(function (element) { + return !(element && typeof element.getBoundingClientRect === 'function'); + }); +} + +function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + + var _generatorOptions = generatorOptions, + _generatorOptions$def = _generatorOptions.defaultModifiers, + defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, + _generatorOptions$def2 = _generatorOptions.defaultOptions, + defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper(reference, popper, options) { + if (options === void 0) { + options = defaultOptions; + } + + var state = { + placement: 'bottom', + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference, + popper: popper + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state: state, + setOptions: function setOptions(setOptionsAction) { + var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options); + state.scrollParents = { + reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], + popper: listScrollParents(popper) + }; // Orders the modifiers based on their dependencies and `phase` + // properties + + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers + + state.orderedModifiers = orderedModifiers.filter(function (m) { + return m.enabled; + }); // Validate the provided modifiers so that the consumer will get warned + // if one of the modifiers is invalid for any reason + + if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; } + + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + + var _state$elements = state.elements, + reference = _state$elements.reference, + popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements + // anymore + + if (!areValidElements(reference, popper)) { + if (false) {} + + return; + } // Store the reference and popper rects to be read by modifiers + + + state.rects = { + reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'), + popper: getLayoutRect(popper) + }; // Modifiers have the ability to reset the current update cycle. The + // most common use case for this is the `flip` modifier changing the + // placement, which then needs to re-run all the modifiers, because the + // logic was previously ran for the previous placement and is therefore + // stale/incorrect + + state.reset = false; + state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier + // is filled with the initial data specified by the modifier. This means + // it doesn't persist and is fresh on each update. + // To ensure persistent data, use `${name}#persistent` + + state.orderedModifiers.forEach(function (modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (false) {} + + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + + var _state$orderedModifie = state.orderedModifiers[index], + fn = _state$orderedModifie.fn, + _state$orderedModifie2 = _state$orderedModifie.options, + _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, + name = _state$orderedModifie.name; + + if (typeof fn === 'function') { + state = fn({ + state: state, + options: _options, + name: name, + instance: instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function () { + return new Promise(function (resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + + if (!areValidElements(reference, popper)) { + if (false) {} + + return instance; + } + + instance.setOptions(options).then(function (state) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state); + } + }); // Modifiers have the ability to execute arbitrary code before the first + // update cycle runs. They will be executed in the same order as the update + // cycle. This is useful when a modifier adds some persistent data that + // other modifiers need to use, but the modifier is run after the dependent + // one. + + function runModifierEffects() { + state.orderedModifiers.forEach(function (_ref3) { + var name = _ref3.name, + _ref3$options = _ref3.options, + options = _ref3$options === void 0 ? {} : _ref3$options, + effect = _ref3.effect; + + if (typeof effect === 'function') { + var cleanupFn = effect({ + state: state, + name: name, + instance: instance, + options: options + }); + + var noopFn = function noopFn() {}; + + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + + function cleanupModifierEffects() { + effectCleanupFns.forEach(function (fn) { + return fn(); + }); + effectCleanupFns = []; + } + + return instance; + }; +} +var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper.js + + + + + + + + + + +var defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles, modifiers_offset, modifiers_flip, modifiers_preventOverflow, modifiers_arrow, modifiers_hide]; +var popper_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/popper-lite.js + + + + + +var popper_lite_defaultModifiers = [eventListeners, modifiers_popperOffsets, modifiers_computeStyles, modifiers_applyStyles]; +var popper_lite_createPopper = /*#__PURE__*/popperGenerator({ + defaultModifiers: popper_lite_defaultModifiers +}); // eslint-disable-next-line import/no-unused-modules + + +;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/index.js + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + // eslint-disable-next-line import/no-unused-modules + + + +/***/ }), + +/***/ 554: +/***/ (function(__unused_webpack_module, exports) { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; +} +function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); +} +function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); +} +function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); + } +} +function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; +} +function _get() { + return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { + var p = _superPropBase(e, t); + if (p) { + var n = Object.getOwnPropertyDescriptor(p, t); + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; + } + }, _get.apply(null, arguments); +} +function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, _getPrototypeOf(t); +} +function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), Object.defineProperty(t, "prototype", { + writable: !1 + }), e && _setPrototypeOf(t, e); +} +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function () { + return !!t; + })(); +} +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _possibleConstructorReturn(t, e) { + if (e && ("object" == typeof e || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t); +} +function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { + return t.__proto__ = e, t; + }, _setPrototypeOf(t, e); +} +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); +} +function _superPropBase(t, o) { + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); + return t; +} +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; +} +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } +} + +function hasProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +function lastItemOf(arr) { + return arr[arr.length - 1]; +} + +// push only the items not included in the array +function pushUnique(arr) { + for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + items[_key - 1] = arguments[_key]; + } + items.forEach(function (item) { + if (arr.includes(item)) { + return; + } + arr.push(item); + }); + return arr; +} +function stringToArray(str, separator) { + // convert empty string to an empty array + return str ? str.split(separator) : []; +} +function isInRange(testVal, min, max) { + var minOK = min === undefined || testVal >= min; + var maxOK = max === undefined || testVal <= max; + return minOK && maxOK; +} +function limitToRange(val, min, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +} +function createTagRepeat(tagName, repeat) { + var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ''; + var openTagSrc = Object.keys(attributes).reduce(function (src, attr) { + var val = attributes[attr]; + if (typeof val === 'function') { + val = val(index); + } + return "".concat(src, " ").concat(attr, "=\"").concat(val, "\""); + }, tagName); + html += "<".concat(openTagSrc, ">"); + var next = index + 1; + return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html; +} + +// Remove the spacing surrounding tags for HTML parser not to create text nodes +// before/after elements +function optimizeTemplateHTML(html) { + return html.replace(/>\s+/g, '>').replace(/\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0; + var baseDay = new Date(baseDate).getDay(); + return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart)); +} + +// Get the ISO week of a date +function getWeek(date) { + // start of ISO week is Monday + var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1); + // 1st week == the week where the 4th of January is in + var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1); + return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1; +} + +// Get the start year of the period of years that includes given date +// years: length of the year period +function startOfYearPeriod(date, years) { + /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */ + var year = new Date(date).getFullYear(); + return Math.floor(year / years) * years; +} + +// pattern for format parts +var reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/; +// pattern for non date parts +var reNonDateParts = /[\s!-/:-@[-`{-~年月日]+/; +// cache for persed formats +var knownFormats = {}; +// parse funtions for date parts +var parseFns = { + y: function y(date, year) { + return new Date(date).setFullYear(parseInt(year, 10)); + }, + m: function m(date, month, locale) { + var newDate = new Date(date); + var monthIndex = parseInt(month, 10) - 1; + if (isNaN(monthIndex)) { + if (!month) { + return NaN; + } + var monthName = month.toLowerCase(); + var compareNames = function compareNames(name) { + return name.toLowerCase().startsWith(monthName); + }; + // compare with both short and full names because some locales have periods + // in the short names (not equal to the first X letters of the full names) + monthIndex = locale.monthsShort.findIndex(compareNames); + if (monthIndex < 0) { + monthIndex = locale.months.findIndex(compareNames); + } + if (monthIndex < 0) { + return NaN; + } + } + newDate.setMonth(monthIndex); + return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime(); + }, + d: function d(date, day) { + return new Date(date).setDate(parseInt(day, 10)); + } +}; +// format functions for date parts +var formatFns = { + d: function d(date) { + return date.getDate(); + }, + dd: function dd(date) { + return padZero(date.getDate(), 2); + }, + D: function D(date, locale) { + return locale.daysShort[date.getDay()]; + }, + DD: function DD(date, locale) { + return locale.days[date.getDay()]; + }, + m: function m(date) { + return date.getMonth() + 1; + }, + mm: function mm(date) { + return padZero(date.getMonth() + 1, 2); + }, + M: function M(date, locale) { + return locale.monthsShort[date.getMonth()]; + }, + MM: function MM(date, locale) { + return locale.months[date.getMonth()]; + }, + y: function y(date) { + return date.getFullYear(); + }, + yy: function yy(date) { + return padZero(date.getFullYear(), 2).slice(-2); + }, + yyyy: function yyyy(date) { + return padZero(date.getFullYear(), 4); + } +}; + +// get month index in normal range (0 - 11) from any number +function normalizeMonth(monthIndex) { + return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12); +} +function padZero(num, length) { + return num.toString().padStart(length, '0'); +} +function parseFormatString(format) { + if (typeof format !== 'string') { + throw new Error("Invalid date format."); + } + if (format in knownFormats) { + return knownFormats[format]; + } + + // sprit the format string into parts and seprators + var separators = format.split(reFormatTokens); + var parts = format.match(new RegExp(reFormatTokens, 'g')); + if (separators.length === 0 || !parts) { + throw new Error("Invalid date format."); + } + + // collect format functions used in the format + var partFormatters = parts.map(function (token) { + return formatFns[token]; + }); + + // collect parse function keys used in the format + // iterate over parseFns' keys in order to keep the order of the keys. + var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) { + var token = parts.find(function (part) { + return part[0] !== 'D' && part[0].toLowerCase() === key; + }); + if (token) { + keys.push(key); + } + return keys; + }, []); + return knownFormats[format] = { + parser: function parser(dateStr, locale) { + var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) { + if (part.length > 0 && parts[index]) { + var token = parts[index][0]; + if (token === 'M') { + dtParts.m = part; + } else if (token !== 'D') { + dtParts[token] = part; + } + } + return dtParts; + }, {}); + + // iterate over partParserkeys so that the parsing is made in the oder + // of year, month and day to prevent the day parser from correcting last + // day of month wrongly + return partParserKeys.reduce(function (origDate, key) { + var newDate = parseFns[key](origDate, dateParts[key], locale); + // ingnore the part failed to parse + return isNaN(newDate) ? origDate : newDate; + }, today()); + }, + formatter: function formatter(date, locale) { + var dateStr = partFormatters.reduce(function (str, fn, index) { + return str += "".concat(separators[index]).concat(fn(date, locale)); + }, ''); + // separators' length is always parts' length + 1, + return dateStr += lastItemOf(separators); + } + }; +} +function parseDate(dateStr, format, locale) { + if (dateStr instanceof Date || typeof dateStr === 'number') { + var date = stripTime(dateStr); + return isNaN(date) ? undefined : date; + } + if (!dateStr) { + return undefined; + } + if (dateStr === 'today') { + return today(); + } + if (format && format.toValue) { + var _date = format.toValue(dateStr, format, locale); + return isNaN(_date) ? undefined : stripTime(_date); + } + return parseFormatString(format).parser(dateStr, locale); +} +function formatDate(date, format, locale) { + if (isNaN(date) || !date && date !== 0) { + return ''; + } + var dateObj = typeof date === 'number' ? new Date(date) : date; + if (format.toDisplay) { + return format.toDisplay(dateObj, format, locale); + } + return parseFormatString(format).formatter(dateObj, locale); +} + +var listenerRegistry = new WeakMap(); +var _EventTarget$prototyp = EventTarget.prototype, + addEventListener = _EventTarget$prototyp.addEventListener, + removeEventListener = _EventTarget$prototyp.removeEventListener; + +// Register event listeners to a key object +// listeners: array of listener definitions; +// - each definition must be a flat array of event target and the arguments +// used to call addEventListener() on the target +function registerListeners(keyObj, listeners) { + var registered = listenerRegistry.get(keyObj); + if (!registered) { + registered = []; + listenerRegistry.set(keyObj, registered); + } + listeners.forEach(function (listener) { + addEventListener.call.apply(addEventListener, _toConsumableArray(listener)); + registered.push(listener); + }); +} +function unregisterListeners(keyObj) { + var listeners = listenerRegistry.get(keyObj); + if (!listeners) { + return; + } + listeners.forEach(function (listener) { + removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener)); + }); + listenerRegistry["delete"](keyObj); +} + +// Event.composedPath() polyfill for Edge +// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec +if (!Event.prototype.composedPath) { + var getComposedPath = function getComposedPath(node) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + path.push(node); + var parent; + if (node.parentNode) { + parent = node.parentNode; + } else if (node.host) { + // ShadowRoot + parent = node.host; + } else if (node.defaultView) { + // Document + parent = node.defaultView; + } + return parent ? getComposedPath(parent, path) : path; + }; + Event.prototype.composedPath = function () { + return getComposedPath(this.target); + }; +} +function findFromPath(path, criteria, currentTarget) { + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var el = path[index]; + if (criteria(el)) { + return el; + } else if (el === currentTarget || !el.parentElement) { + // stop when reaching currentTarget or + return; + } + return findFromPath(path, criteria, currentTarget, index + 1); +} + +// Search for the actual target of a delegated event +function findElementInEventPath(ev, selector) { + var criteria = typeof selector === 'function' ? selector : function (el) { + return el.matches(selector); + }; + return findFromPath(ev.composedPath(), criteria, ev.currentTarget); +} + +// default locales +var locales = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear", + titleFormat: "MM y" + } +}; + +// config options updatable by setOptions() and their default values +var defaultOptions = { + autohide: false, + beforeShowDay: null, + beforeShowDecade: null, + beforeShowMonth: null, + beforeShowYear: null, + calendarWeeks: false, + clearBtn: false, + dateDelimiter: ',', + datesDisabled: [], + daysOfWeekDisabled: [], + daysOfWeekHighlighted: [], + defaultViewDate: undefined, + // placeholder, defaults to today() by the program + disableTouchKeyboard: false, + format: 'mm/dd/yyyy', + language: 'en', + maxDate: null, + maxNumberOfDates: 1, + maxView: 3, + minDate: null, + nextArrow: '', + orientation: 'auto', + pickLevel: 0, + prevArrow: '', + showDaysOfWeek: true, + showOnClick: true, + showOnFocus: true, + startView: 0, + title: '', + todayBtn: false, + todayBtnMode: 0, + todayHighlight: false, + updateOnBlur: true, + weekStart: 0 +}; + +var range = document.createRange(); +function parseHTML(html) { + return range.createContextualFragment(html); +} +function hideElement(el) { + if (el.style.display === 'none') { + return; + } + // back up the existing display setting in data-style-display + if (el.style.display) { + el.dataset.styleDisplay = el.style.display; + } + el.style.display = 'none'; +} +function showElement(el) { + if (el.style.display !== 'none') { + return; + } + if (el.dataset.styleDisplay) { + // restore backed-up dispay property + el.style.display = el.dataset.styleDisplay; + delete el.dataset.styleDisplay; + } else { + el.style.display = ''; + } +} +function emptyChildNodes(el) { + if (el.firstChild) { + el.removeChild(el.firstChild); + emptyChildNodes(el); + } +} +function replaceChildNodes(el, newChildNodes) { + emptyChildNodes(el); + if (newChildNodes instanceof DocumentFragment) { + el.appendChild(newChildNodes); + } else if (typeof newChildNodes === 'string') { + el.appendChild(parseHTML(newChildNodes)); + } else if (typeof newChildNodes.forEach === 'function') { + newChildNodes.forEach(function (node) { + el.appendChild(node); + }); + } +} + +var defaultLang = defaultOptions.language, + defaultFormat = defaultOptions.format, + defaultWeekStart = defaultOptions.weekStart; + +// Reducer function to filter out invalid day-of-week from the input +function sanitizeDOW(dow, day) { + return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow; +} +function calcEndOfWeek(startOfWeek) { + return (startOfWeek + 6) % 7; +} + +// validate input date. if invalid, fallback to the original value +function validateDate(value, format, locale, origValue) { + var date = parseDate(value, format, locale); + return date !== undefined ? date : origValue; +} + +// Validate viewId. if invalid, fallback to the original value +function validateViewId(value, origValue) { + var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; + var viewId = parseInt(value, 10); + return viewId >= 0 && viewId <= max ? viewId : origValue; +} + +// Create Datepicker configuration to set +function processOptions(options, datepicker) { + var inOpts = Object.assign({}, options); + var config = {}; + var locales = datepicker.constructor.locales; + var _ref = datepicker.config || {}, + format = _ref.format, + language = _ref.language, + locale = _ref.locale, + maxDate = _ref.maxDate, + maxView = _ref.maxView, + minDate = _ref.minDate, + pickLevel = _ref.pickLevel, + startView = _ref.startView, + weekStart = _ref.weekStart; + if (inOpts.language) { + var lang; + if (inOpts.language !== language) { + if (locales[inOpts.language]) { + lang = inOpts.language; + } else { + // Check if langauge + region tag can fallback to the one without + // region (e.g. fr-CA → fr) + lang = inOpts.language.split('-')[0]; + if (locales[lang] === undefined) { + lang = false; + } + } + } + delete inOpts.language; + if (lang) { + language = config.language = lang; + + // update locale as well when updating language + var origLocale = locale || locales[defaultLang]; + // use default language's properties for the fallback + locale = Object.assign({ + format: defaultFormat, + weekStart: defaultWeekStart + }, locales[defaultLang]); + if (language !== defaultLang) { + Object.assign(locale, locales[language]); + } + config.locale = locale; + // if format and/or weekStart are the same as old locale's defaults, + // update them to new locale's defaults + if (format === origLocale.format) { + format = config.format = locale.format; + } + if (weekStart === origLocale.weekStart) { + weekStart = config.weekStart = locale.weekStart; + config.weekEnd = calcEndOfWeek(locale.weekStart); + } + } + } + if (inOpts.format) { + var hasToDisplay = typeof inOpts.format.toDisplay === 'function'; + var hasToValue = typeof inOpts.format.toValue === 'function'; + var validFormatString = reFormatTokens.test(inOpts.format); + if (hasToDisplay && hasToValue || validFormatString) { + format = config.format = inOpts.format; + } + delete inOpts.format; + } + + //*** dates ***// + // while min and maxDate for "no limit" in the options are better to be null + // (especially when updating), the ones in the config have to be undefined + // because null is treated as 0 (= unix epoch) when comparing with time value + var minDt = minDate; + var maxDt = maxDate; + if (inOpts.minDate !== undefined) { + minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year + : validateDate(inOpts.minDate, format, locale, minDt); + delete inOpts.minDate; + } + if (inOpts.maxDate !== undefined) { + maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt); + delete inOpts.maxDate; + } + if (maxDt < minDt) { + minDate = config.minDate = maxDt; + maxDate = config.maxDate = minDt; + } else { + if (minDate !== minDt) { + minDate = config.minDate = minDt; + } + if (maxDate !== maxDt) { + maxDate = config.maxDate = maxDt; + } + } + if (inOpts.datesDisabled) { + config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) { + var date = parseDate(dt, format, locale); + return date !== undefined ? pushUnique(dates, date) : dates; + }, []); + delete inOpts.datesDisabled; + } + if (inOpts.defaultViewDate !== undefined) { + var viewDate = parseDate(inOpts.defaultViewDate, format, locale); + if (viewDate !== undefined) { + config.defaultViewDate = viewDate; + } + delete inOpts.defaultViewDate; + } + + //*** days of week ***// + if (inOpts.weekStart !== undefined) { + var wkStart = Number(inOpts.weekStart) % 7; + if (!isNaN(wkStart)) { + weekStart = config.weekStart = wkStart; + config.weekEnd = calcEndOfWeek(wkStart); + } + delete inOpts.weekStart; + } + if (inOpts.daysOfWeekDisabled) { + config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekDisabled; + } + if (inOpts.daysOfWeekHighlighted) { + config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []); + delete inOpts.daysOfWeekHighlighted; + } + + //*** multi date ***// + if (inOpts.maxNumberOfDates !== undefined) { + var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10); + if (maxNumberOfDates >= 0) { + config.maxNumberOfDates = maxNumberOfDates; + config.multidate = maxNumberOfDates !== 1; + } + delete inOpts.maxNumberOfDates; + } + if (inOpts.dateDelimiter) { + config.dateDelimiter = String(inOpts.dateDelimiter); + delete inOpts.dateDelimiter; + } + + //*** pick level & view ***// + var newPickLevel = pickLevel; + if (inOpts.pickLevel !== undefined) { + newPickLevel = validateViewId(inOpts.pickLevel, 2); + delete inOpts.pickLevel; + } + if (newPickLevel !== pickLevel) { + pickLevel = config.pickLevel = newPickLevel; + } + var newMaxView = maxView; + if (inOpts.maxView !== undefined) { + newMaxView = validateViewId(inOpts.maxView, maxView); + delete inOpts.maxView; + } + // ensure max view >= pick level + newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView; + if (newMaxView !== maxView) { + maxView = config.maxView = newMaxView; + } + var newStartView = startView; + if (inOpts.startView !== undefined) { + newStartView = validateViewId(inOpts.startView, newStartView); + delete inOpts.startView; + } + // ensure pick level <= start view <= max view + if (newStartView < pickLevel) { + newStartView = pickLevel; + } else if (newStartView > maxView) { + newStartView = maxView; + } + if (newStartView !== startView) { + config.startView = newStartView; + } + + //*** template ***// + if (inOpts.prevArrow) { + var prevArrow = parseHTML(inOpts.prevArrow); + if (prevArrow.childNodes.length > 0) { + config.prevArrow = prevArrow.childNodes; + } + delete inOpts.prevArrow; + } + if (inOpts.nextArrow) { + var nextArrow = parseHTML(inOpts.nextArrow); + if (nextArrow.childNodes.length > 0) { + config.nextArrow = nextArrow.childNodes; + } + delete inOpts.nextArrow; + } + + //*** misc ***// + if (inOpts.disableTouchKeyboard !== undefined) { + config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard; + delete inOpts.disableTouchKeyboard; + } + if (inOpts.orientation) { + var orientation = inOpts.orientation.toLowerCase().split(/\s+/g); + config.orientation = { + x: orientation.find(function (x) { + return x === 'left' || x === 'right'; + }) || 'auto', + y: orientation.find(function (y) { + return y === 'top' || y === 'bottom'; + }) || 'auto' + }; + delete inOpts.orientation; + } + if (inOpts.todayBtnMode !== undefined) { + switch (inOpts.todayBtnMode) { + case 0: + case 1: + config.todayBtnMode = inOpts.todayBtnMode; + } + delete inOpts.todayBtnMode; + } + + //*** copy the rest ***// + Object.keys(inOpts).forEach(function (key) { + if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) { + config[key] = inOpts[key]; + } + }); + return config; +} + +var pickerTemplate = optimizeTemplateHTML("
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    "); + +var daysTemplate = optimizeTemplateHTML("
    \n
    ".concat(createTagRepeat('span', 7, { + "class": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
    \n
    ").concat(createTagRepeat('span', 42, { + "class": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400' +}), "
    \n
    ")); + +var calendarWeeksTemplate = optimizeTemplateHTML("
    \n
    \n
    ".concat(createTagRepeat('span', 6, { + "class": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm' +}), "
    \n
    ")); + +// Base class of the view classes +var View = /*#__PURE__*/function () { + function View(picker, config) { + _classCallCheck(this, View); + Object.assign(this, config, { + picker: picker, + element: parseHTML("
    ").firstChild, + selected: [] + }); + this.init(this.picker.datepicker.config); + } + return _createClass(View, [{ + key: "init", + value: function init(options) { + if (options.pickLevel !== undefined) { + this.isMinView = this.id === options.pickLevel; + } + this.setOptions(options); + this.updateFocus(); + this.updateSelection(); + } + + // Execute beforeShow() callback and apply the result to the element + // args: + // - current - current value on the iteration on view rendering + // - timeValue - time value of the date to pass to beforeShow() + }, { + key: "performBeforeHook", + value: function performBeforeHook(el, current, timeValue) { + var result = this.beforeShow(new Date(timeValue)); + switch (_typeof(result)) { + case 'boolean': + result = { + enabled: result + }; + break; + case 'string': + result = { + classes: result + }; + } + if (result) { + if (result.enabled === false) { + el.classList.add('disabled'); + pushUnique(this.disabled, current); + } + if (result.classes) { + var _el$classList; + var extraClasses = result.classes.split(/\s+/); + (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses)); + if (extraClasses.includes('disabled')) { + pushUnique(this.disabled, current); + } + } + if (result.content) { + replaceChildNodes(el, result.content); + } + } + } + }]); +}(); + +var DaysView = /*#__PURE__*/function (_View) { + function DaysView(picker) { + _classCallCheck(this, DaysView); + return _callSuper(this, DaysView, [picker, { + id: 0, + name: 'days', + cellClass: 'day' + }]); + } + _inherits(DaysView, _View); + return _createClass(DaysView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + var inner = parseHTML(daysTemplate).firstChild; + this.dow = inner.firstChild; + this.grid = inner.lastChild; + this.element.appendChild(inner); + } + _get(_getPrototypeOf(DaysView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + var _this = this; + var updateDOW; + if (hasProperty(options, 'minDate')) { + this.minDate = options.minDate; + } + if (hasProperty(options, 'maxDate')) { + this.maxDate = options.maxDate; + } + if (options.datesDisabled) { + this.datesDisabled = options.datesDisabled; + } + if (options.daysOfWeekDisabled) { + this.daysOfWeekDisabled = options.daysOfWeekDisabled; + updateDOW = true; + } + if (options.daysOfWeekHighlighted) { + this.daysOfWeekHighlighted = options.daysOfWeekHighlighted; + } + if (options.todayHighlight !== undefined) { + this.todayHighlight = options.todayHighlight; + } + if (options.weekStart !== undefined) { + this.weekStart = options.weekStart; + this.weekEnd = options.weekEnd; + updateDOW = true; + } + if (options.locale) { + var locale = this.locale = options.locale; + this.dayNames = locale.daysMin; + this.switchLabelFormat = locale.titleFormat; + updateDOW = true; + } + if (options.beforeShowDay !== undefined) { + this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined; + } + if (options.calendarWeeks !== undefined) { + if (options.calendarWeeks && !this.calendarWeeks) { + var weeksElem = parseHTML(calendarWeeksTemplate).firstChild; + this.calendarWeeks = { + element: weeksElem, + dow: weeksElem.firstChild, + weeks: weeksElem.lastChild + }; + this.element.insertBefore(weeksElem, this.element.firstChild); + } else if (this.calendarWeeks && !options.calendarWeeks) { + this.element.removeChild(this.calendarWeeks.element); + this.calendarWeeks = null; + } + } + if (options.showDaysOfWeek !== undefined) { + if (options.showDaysOfWeek) { + showElement(this.dow); + if (this.calendarWeeks) { + showElement(this.calendarWeeks.dow); + } + } else { + hideElement(this.dow); + if (this.calendarWeeks) { + hideElement(this.calendarWeeks.dow); + } + } + } + + // update days-of-week when locale, daysOfweekDisabled or weekStart is changed + if (updateDOW) { + Array.from(this.dow.children).forEach(function (el, index) { + var dow = (_this.weekStart + index) % 7; + el.textContent = _this.dayNames[dow]; + el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'; + }); + } + } + + // Apply update on the focused date to view's settings + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var viewYear = viewDate.getFullYear(); + var viewMonth = viewDate.getMonth(); + var firstOfMonth = dateValue(viewYear, viewMonth, 1); + var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart); + this.first = firstOfMonth; + this.last = dateValue(viewYear, viewMonth + 1, 0); + this.start = start; + this.focused = this.picker.viewDate; + } + + // Apply update on the selected dates to view's settings + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates; + if (rangepicker) { + this.range = rangepicker.dates; + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // update today marker on ever render + this.today = this.todayHighlight ? today() : undefined; + // refresh disabled dates on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = _toConsumableArray(this.datesDisabled); + var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale); + this.picker.setViewSwitchLabel(switchLabel); + this.picker.setPrevBtnDisabled(this.first <= this.minDate); + this.picker.setNextBtnDisabled(this.last >= this.maxDate); + if (this.calendarWeeks) { + // start of the UTC week (Monday) of the 1st of the month + var startOfWeek = dayOfTheWeekOf(this.first, 1, 1); + Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) { + el.textContent = getWeek(addWeeks(startOfWeek, index)); + }); + } + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = addDays(_this2.start, index); + var date = new Date(current); + var day = date.getDay(); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + el.dataset.date = current; + el.textContent = date.getDate(); + if (current < _this2.first) { + classList.add('prev', 'text-gray-500', 'dark:text-white'); + } else if (current > _this2.last) { + classList.add('next', 'text-gray-500', 'dark:text-white'); + } + if (_this2.today === current) { + classList.add('today', 'bg-gray-100', 'dark:bg-gray-600'); + } + if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + } + if (_this2.daysOfWeekDisabled.includes(day)) { + classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500'); + classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer'); + pushUnique(_this2.disabled, current); + } + if (_this2.daysOfWeekHighlighted.includes(day)) { + classList.add('highlighted'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg', 'rounded-r-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg', 'rounded-l-lg'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, current); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused'); + el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.dataset.date); + var classList = el.classList; + classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg'); + if (current > rangeStart && current < rangeEnd) { + classList.add('range', 'bg-gray-200', 'dark:bg-gray-600'); + classList.remove('rounded-lg'); + } + if (current === rangeStart) { + classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg'); + classList.remove('rounded-lg'); + } + if (current === rangeEnd) { + classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg'); + classList.remove('rounded-lg'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / 86400000); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function computeMonthRange(range, thisYear) { + if (!range || !range[0] || !range[1]) { + return; + } + var _range = _slicedToArray(range, 2), + _range$ = _slicedToArray(_range[0], 2), + startY = _range$[0], + startM = _range$[1], + _range$2 = _slicedToArray(_range[1], 2), + endY = _range$2[0], + endM = _range$2[1]; + if (startY > thisYear || endY < thisYear) { + return; + } + return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12]; +} +var MonthsView = /*#__PURE__*/function (_View) { + function MonthsView(picker) { + _classCallCheck(this, MonthsView); + return _callSuper(this, MonthsView, [picker, { + id: 1, + name: 'months', + cellClass: 'month' + }]); + } + _inherits(MonthsView, _View); + return _createClass(MonthsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.grid = this.element; + this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12, { + 'data-month': function dataMonth(ix) { + return ix; + } + }))); + } + _get(_getPrototypeOf(MonthsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (options.locale) { + this.monthNames = options.locale.monthsShort; + } + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minMonth = this.minDate = undefined; + } else { + var minDateObj = new Date(options.minDate); + this.minYear = minDateObj.getFullYear(); + this.minMonth = minDateObj.getMonth(); + this.minDate = minDateObj.setDate(1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxMonth = this.maxDate = undefined; + } else { + var maxDateObj = new Date(options.maxDate); + this.maxYear = maxDateObj.getFullYear(); + this.maxMonth = maxDateObj.getMonth(); + this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0); + } + } + if (options.beforeShowMonth !== undefined) { + this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + this.year = viewDate.getFullYear(); + this.focused = viewDate.getMonth(); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (selected, timeValue) { + var date = new Date(timeValue); + var year = date.getFullYear(); + var month = date.getMonth(); + if (selected[year] === undefined) { + selected[year] = [month]; + } else { + pushUnique(selected[year], month); + } + return selected; + }, {}); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + var date = new Date(timeValue); + return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()]; + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this = this; + // refresh disabled months on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel(this.year); + this.picker.setPrevBtnDisabled(this.year <= this.minYear); + this.picker.setNextBtnDisabled(this.year >= this.maxYear); + var selected = this.selected[this.year] || []; + var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear; + var isMinYear = this.year === this.minYear; + var isMaxYear = this.year === this.maxYear; + var range = computeMonthRange(this.range, this.year); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var date = dateValue(_this.year, index, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this.cellClass); + if (_this.isMinView) { + el.dataset.date = date; + } + // reset text on every render to clear the custom content set + // by beforeShow hook at previous render + el.textContent = _this.monthNames[index]; + if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) { + classList.add('disabled'); + } + if (range) { + var _range2 = _slicedToArray(range, 2), + rangeStart = _range2[0], + rangeEnd = _range2[1]; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this.focused) { + classList.add('focused'); + } + if (_this.beforeShow) { + _this.performBeforeHook(el, index, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this2 = this; + var selected = this.selected[this.year] || []; + var _ref = computeMonthRange(this.range, this.year) || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused'); + el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + }); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + if (index > rangeStart && index < rangeEnd) { + classList.add('range'); + } + if (index === rangeStart) { + classList.add('range-start'); + } + if (index === rangeEnd) { + classList.add('range-end'); + } + if (selected.includes(index)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (index === _this2.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[this.focused].classList.add('focused'); + } + }]); +}(View); + +function toTitleCase(word) { + return _toConsumableArray(word).reduce(function (str, ch, ix) { + return str += ix ? ch : ch.toUpperCase(); + }, ''); +} + +// Class representing the years and decades view elements +var YearsView = /*#__PURE__*/function (_View) { + function YearsView(picker, config) { + _classCallCheck(this, YearsView); + return _callSuper(this, YearsView, [picker, config]); + } + _inherits(YearsView, _View); + return _createClass(YearsView, [{ + key: "init", + value: function init(options) { + var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (onConstruction) { + this.navStep = this.step * 10; + this.beforeShowOption = "beforeShow".concat(toTitleCase(this.cellClass)); + this.grid = this.element; + this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4'); + this.grid.appendChild(parseHTML(createTagRepeat('span', 12))); + } + _get(_getPrototypeOf(YearsView.prototype), "init", this).call(this, options); + } + }, { + key: "setOptions", + value: function setOptions(options) { + if (hasProperty(options, 'minDate')) { + if (options.minDate === undefined) { + this.minYear = this.minDate = undefined; + } else { + this.minYear = startOfYearPeriod(options.minDate, this.step); + this.minDate = dateValue(this.minYear, 0, 1); + } + } + if (hasProperty(options, 'maxDate')) { + if (options.maxDate === undefined) { + this.maxYear = this.maxDate = undefined; + } else { + this.maxYear = startOfYearPeriod(options.maxDate, this.step); + this.maxDate = dateValue(this.maxYear, 11, 31); + } + } + if (options[this.beforeShowOption] !== undefined) { + var beforeShow = options[this.beforeShowOption]; + this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined; + } + } + + // Update view's settings to reflect the viewDate set on the picker + }, { + key: "updateFocus", + value: function updateFocus() { + var viewDate = new Date(this.picker.viewDate); + var first = startOfYearPeriod(viewDate, this.navStep); + var last = first + 9 * this.step; + this.first = first; + this.last = last; + this.start = first - this.step; + this.focused = startOfYearPeriod(viewDate, this.step); + } + + // Update view's settings to reflect the selected dates + }, { + key: "updateSelection", + value: function updateSelection() { + var _this = this; + var _this$picker$datepick = this.picker.datepicker, + dates = _this$picker$datepick.dates, + rangepicker = _this$picker$datepick.rangepicker; + this.selected = dates.reduce(function (years, timeValue) { + return pushUnique(years, startOfYearPeriod(timeValue, _this.step)); + }, []); + if (rangepicker && rangepicker.dates) { + this.range = rangepicker.dates.map(function (timeValue) { + if (timeValue !== undefined) { + return startOfYearPeriod(timeValue, _this.step); + } + }); + } + } + + // Update the entire view UI + }, { + key: "render", + value: function render() { + var _this2 = this; + // refresh disabled years on every render in order to clear the ones added + // by beforeShow hook at previous render + this.disabled = []; + this.picker.setViewSwitchLabel("".concat(this.first, "-").concat(this.last)); + this.picker.setPrevBtnDisabled(this.first <= this.minYear); + this.picker.setNextBtnDisabled(this.last >= this.maxYear); + Array.from(this.grid.children).forEach(function (el, index) { + var classList = el.classList; + var current = _this2.start + index * _this2.step; + var date = dateValue(current, 0, 1); + el.className = "datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(_this2.cellClass); + if (_this2.isMinView) { + el.dataset.date = date; + } + el.textContent = el.dataset.year = current; + if (index === 0) { + classList.add('prev'); + } else if (index === 11) { + classList.add('next'); + } + if (current < _this2.minYear || current > _this2.maxYear) { + classList.add('disabled'); + } + if (_this2.range) { + var _this2$range = _slicedToArray(_this2.range, 2), + rangeStart = _this2$range[0], + rangeEnd = _this2$range[1]; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + } + if (_this2.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this2.focused) { + classList.add('focused'); + } + if (_this2.beforeShow) { + _this2.performBeforeHook(el, current, date); + } + }); + } + + // Update the view UI by applying the changes of selected and focused items + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + var _ref = this.range || [], + _ref2 = _slicedToArray(_ref, 2), + rangeStart = _ref2[0], + rangeEnd = _ref2[1]; + this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) { + el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused'); + }); + Array.from(this.grid.children).forEach(function (el) { + var current = Number(el.textContent); + var classList = el.classList; + if (current > rangeStart && current < rangeEnd) { + classList.add('range'); + } + if (current === rangeStart) { + classList.add('range-start'); + } + if (current === rangeEnd) { + classList.add('range-end'); + } + if (_this3.selected.includes(current)) { + classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white'); + classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600'); + } + if (current === _this3.focused) { + classList.add('focused'); + } + }); + } + + // Update the view UI by applying the change of focused item + }, { + key: "refreshFocus", + value: function refreshFocus() { + var index = Math.round((this.focused - this.start) / this.step); + this.grid.querySelectorAll('.focused').forEach(function (el) { + el.classList.remove('focused'); + }); + this.grid.children[index].classList.add('focused'); + } + }]); +}(View); + +function triggerDatepickerEvent(datepicker, type) { + var detail = { + date: datepicker.getDate(), + viewDate: new Date(datepicker.picker.viewDate), + viewId: datepicker.picker.currentView.id, + datepicker: datepicker + }; + datepicker.element.dispatchEvent(new CustomEvent(type, { + detail: detail + })); +} + +// direction: -1 (to previous), 1 (to next) +function goToPrevOrNext(datepicker, direction) { + var _datepicker$config = datepicker.config, + minDate = _datepicker$config.minDate, + maxDate = _datepicker$config.maxDate; + var _datepicker$picker = datepicker.picker, + currentView = _datepicker$picker.currentView, + viewDate = _datepicker$picker.viewDate; + var newViewDate; + switch (currentView.id) { + case 0: + newViewDate = addMonths(viewDate, direction); + break; + case 1: + newViewDate = addYears(viewDate, direction); + break; + default: + newViewDate = addYears(viewDate, direction * currentView.navStep); + } + newViewDate = limitToRange(newViewDate, minDate, maxDate); + datepicker.picker.changeFocus(newViewDate).render(); +} +function switchView(datepicker) { + var viewId = datepicker.picker.currentView.id; + if (viewId === datepicker.config.maxView) { + return; + } + datepicker.picker.changeView(viewId + 1).render(); +} +function unfocus(datepicker) { + if (datepicker.config.updateOnBlur) { + datepicker.update({ + autohide: true + }); + } else { + datepicker.refresh('input'); + datepicker.hide(); + } +} + +function goToSelectedMonthOrYear(datepicker, selection) { + var picker = datepicker.picker; + var viewDate = new Date(picker.viewDate); + var viewId = picker.currentView.id; + var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear()); + picker.changeFocus(newDate).changeView(viewId - 1).render(); +} +function onClickTodayBtn(datepicker) { + var picker = datepicker.picker; + var currentDate = today(); + if (datepicker.config.todayBtnMode === 1) { + if (datepicker.config.autohide) { + datepicker.setDate(currentDate); + return; + } + datepicker.setDate(currentDate, { + render: false + }); + picker.update(); + } + if (picker.viewDate !== currentDate) { + picker.changeFocus(currentDate); + } + picker.changeView(0).render(); +} +function onClickClearBtn(datepicker) { + datepicker.setDate({ + clear: true + }); +} +function onClickViewSwitch(datepicker) { + switchView(datepicker); +} +function onClickPrevBtn(datepicker) { + goToPrevOrNext(datepicker, -1); +} +function onClickNextBtn(datepicker) { + goToPrevOrNext(datepicker, 1); +} + +// For the picker's main block to delegete the events from `datepicker-cell`s +function onClickView(datepicker, ev) { + var target = findElementInEventPath(ev, '.datepicker-cell'); + if (!target || target.classList.contains('disabled')) { + return; + } + var _datepicker$picker$cu = datepicker.picker.currentView, + id = _datepicker$picker$cu.id, + isMinView = _datepicker$picker$cu.isMinView; + if (isMinView) { + datepicker.setDate(Number(target.dataset.date)); + } else if (id === 1) { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.month)); + } else { + goToSelectedMonthOrYear(datepicker, Number(target.dataset.year)); + } +} +function onClickPicker(datepicker) { + if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) { + datepicker.inputField.focus(); + } +} + +function processPickerOptions(picker, options) { + if (options.title !== undefined) { + if (options.title) { + picker.controls.title.textContent = options.title; + showElement(picker.controls.title); + } else { + picker.controls.title.textContent = ''; + hideElement(picker.controls.title); + } + } + if (options.prevArrow) { + var prevBtn = picker.controls.prevBtn; + emptyChildNodes(prevBtn); + options.prevArrow.forEach(function (node) { + prevBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.nextArrow) { + var nextBtn = picker.controls.nextBtn; + emptyChildNodes(nextBtn); + options.nextArrow.forEach(function (node) { + nextBtn.appendChild(node.cloneNode(true)); + }); + } + if (options.locale) { + picker.controls.todayBtn.textContent = options.locale.today; + picker.controls.clearBtn.textContent = options.locale.clear; + } + if (options.todayBtn !== undefined) { + if (options.todayBtn) { + showElement(picker.controls.todayBtn); + } else { + hideElement(picker.controls.todayBtn); + } + } + if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) { + var _picker$datepicker$co = picker.datepicker.config, + minDate = _picker$datepicker$co.minDate, + maxDate = _picker$datepicker$co.maxDate; + picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate); + } + if (options.clearBtn !== undefined) { + if (options.clearBtn) { + showElement(picker.controls.clearBtn); + } else { + hideElement(picker.controls.clearBtn); + } + } +} + +// Compute view date to reset, which will be... +// - the last item of the selected dates or defaultViewDate if no selection +// - limitted to minDate or maxDate if it exceeds the range +function computeResetViewDate(datepicker) { + var dates = datepicker.dates, + config = datepicker.config; + var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate; + return limitToRange(viewDate, config.minDate, config.maxDate); +} + +// Change current view's view date +function setViewDate(picker, newDate) { + var oldViewDate = new Date(picker.viewDate); + var newViewDate = new Date(newDate); + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + year = _picker$currentView.year, + first = _picker$currentView.first, + last = _picker$currentView.last; + var viewYear = newViewDate.getFullYear(); + picker.viewDate = newDate; + if (viewYear !== oldViewDate.getFullYear()) { + triggerDatepickerEvent(picker.datepicker, 'changeYear'); + } + if (newViewDate.getMonth() !== oldViewDate.getMonth()) { + triggerDatepickerEvent(picker.datepicker, 'changeMonth'); + } + + // return whether the new date is in different period on time from the one + // displayed in the current view + // when true, the view needs to be re-rendered on the next UI refresh. + switch (id) { + case 0: + return newDate < first || newDate > last; + case 1: + return viewYear !== year; + default: + return viewYear < first || viewYear > last; + } +} +function getTextDirection(el) { + return window.getComputedStyle(el).direction; +} + +// Class representing the picker UI +var Picker = /*#__PURE__*/function () { + function Picker(datepicker) { + _classCallCheck(this, Picker); + this.datepicker = datepicker; + var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass); + var element = this.element = parseHTML(template).firstChild; + var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3), + header = _element$firstChild$c[0], + main = _element$firstChild$c[1], + footer = _element$firstChild$c[2]; + var title = header.firstElementChild; + var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3), + prevBtn = _header$lastElementCh[0], + viewSwitch = _header$lastElementCh[1], + nextBtn = _header$lastElementCh[2]; + var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2), + todayBtn = _footer$firstChild$ch[0], + clearBtn = _footer$firstChild$ch[1]; + var controls = { + title: title, + prevBtn: prevBtn, + viewSwitch: viewSwitch, + nextBtn: nextBtn, + todayBtn: todayBtn, + clearBtn: clearBtn + }; + this.main = main; + this.controls = controls; + var elementClass = datepicker.inline ? 'inline' : 'dropdown'; + element.classList.add("datepicker-".concat(elementClass)); + elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null; + processPickerOptions(this, datepicker.config); + this.viewDate = computeResetViewDate(datepicker); + + // set up event listeners + registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), { + capture: true + }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]); + + // set up views + this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, { + id: 2, + name: 'years', + cellClass: 'year', + step: 1 + }), new YearsView(this, { + id: 3, + name: 'decades', + cellClass: 'decade', + step: 10 + })]; + this.currentView = this.views[datepicker.config.startView]; + this.currentView.render(); + this.main.appendChild(this.currentView.element); + datepicker.config.container.appendChild(this.element); + } + return _createClass(Picker, [{ + key: "setOptions", + value: function setOptions(options) { + processPickerOptions(this, options); + this.views.forEach(function (view) { + view.init(options, false); + }); + this.currentView.render(); + } + }, { + key: "detach", + value: function detach() { + this.datepicker.config.container.removeChild(this.element); + } + }, { + key: "show", + value: function show() { + if (this.active) { + return; + } + this.element.classList.add('active', 'block'); + this.element.classList.remove('hidden'); + this.active = true; + var datepicker = this.datepicker; + if (!datepicker.inline) { + // ensure picker's direction matches input's + var inputDirection = getTextDirection(datepicker.inputField); + if (inputDirection !== getTextDirection(datepicker.config.container)) { + this.element.dir = inputDirection; + } else if (this.element.dir) { + this.element.removeAttribute('dir'); + } + this.place(); + if (datepicker.config.disableTouchKeyboard) { + datepicker.inputField.blur(); + } + } + triggerDatepickerEvent(datepicker, 'show'); + } + }, { + key: "hide", + value: function hide() { + if (!this.active) { + return; + } + this.datepicker.exitEditMode(); + this.element.classList.remove('active', 'block'); + this.element.classList.add('active', 'block', 'hidden'); + this.active = false; + triggerDatepickerEvent(this.datepicker, 'hide'); + } + }, { + key: "place", + value: function place() { + var _this$element = this.element, + classList = _this$element.classList, + style = _this$element.style; + var _this$datepicker = this.datepicker, + config = _this$datepicker.config, + inputField = _this$datepicker.inputField; + var container = config.container; + var _this$element$getBoun = this.element.getBoundingClientRect(), + calendarWidth = _this$element$getBoun.width, + calendarHeight = _this$element$getBoun.height; + var _container$getBoundin = container.getBoundingClientRect(), + containerLeft = _container$getBoundin.left, + containerTop = _container$getBoundin.top, + containerWidth = _container$getBoundin.width; + var _inputField$getBoundi = inputField.getBoundingClientRect(), + inputLeft = _inputField$getBoundi.left, + inputTop = _inputField$getBoundi.top, + inputWidth = _inputField$getBoundi.width, + inputHeight = _inputField$getBoundi.height; + var _config$orientation = config.orientation, + orientX = _config$orientation.x, + orientY = _config$orientation.y; + var scrollTop; + var left; + var top; + if (container === document.body) { + scrollTop = window.scrollY; + left = inputLeft + window.scrollX; + top = inputTop + scrollTop; + } else { + scrollTop = container.scrollTop; + left = inputLeft - containerLeft; + top = inputTop - containerTop + scrollTop; + } + if (orientX === 'auto') { + if (left < 0) { + // align to the left and move into visible area if input's left edge < window's + orientX = 'left'; + left = 10; + } else if (left + calendarWidth > containerWidth) { + // align to the right if canlendar's right edge > container's + orientX = 'right'; + } else { + orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left'; + } + } + if (orientX === 'right') { + left -= calendarWidth - inputWidth; + } + if (orientY === 'auto') { + orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top'; + } + if (orientY === 'top') { + top -= calendarHeight; + } else { + top += inputHeight; + } + classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left'); + classList.add("datepicker-orient-".concat(orientY), "datepicker-orient-".concat(orientX)); + style.top = top ? "".concat(top, "px") : top; + style.left = left ? "".concat(left, "px") : left; + } + }, { + key: "setViewSwitchLabel", + value: function setViewSwitchLabel(labelText) { + this.controls.viewSwitch.textContent = labelText; + } + }, { + key: "setPrevBtnDisabled", + value: function setPrevBtnDisabled(disabled) { + this.controls.prevBtn.disabled = disabled; + } + }, { + key: "setNextBtnDisabled", + value: function setNextBtnDisabled(disabled) { + this.controls.nextBtn.disabled = disabled; + } + }, { + key: "changeView", + value: function changeView(viewId) { + var oldView = this.currentView; + var newView = this.views[viewId]; + if (newView.id !== oldView.id) { + this.currentView = newView; + this._renderMethod = 'render'; + triggerDatepickerEvent(this.datepicker, 'changeView'); + this.main.replaceChild(newView.element, oldView.element); + } + return this; + } + + // Change the focused date (view date) + }, { + key: "changeFocus", + value: function changeFocus(newViewDate) { + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus'; + this.views.forEach(function (view) { + view.updateFocus(); + }); + return this; + } + + // Apply the change of the selected dates + }, { + key: "update", + value: function update() { + var newViewDate = computeResetViewDate(this.datepicker); + this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh'; + this.views.forEach(function (view) { + view.updateFocus(); + view.updateSelection(); + }); + return this; + } + + // Refresh the picker UI + }, { + key: "render", + value: function render() { + var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var renderMethod = quickRender && this._renderMethod || 'render'; + delete this._renderMethod; + this.currentView[renderMethod](); + } + }]); +}(); + +// Find the closest date that doesn't meet the condition for unavailable date +// Returns undefined if no available date is found +// addFn: function to calculate the next date +// - args: time value, amount +// increase: amount to pass to addFn +// testFn: function to test the unavailablity of the date +// - args: time value; retun: true if unavailable +function findNextAvailableOne(date, addFn, increase, testFn, min, max) { + if (!isInRange(date, min, max)) { + return; + } + if (testFn(date)) { + var newDate = addFn(date, increase); + return findNextAvailableOne(newDate, addFn, increase, testFn, min, max); + } + return date; +} + +// direction: -1 (left/up), 1 (right/down) +// vertical: true for up/down, false for left/right +function moveByArrowKey(datepicker, ev, direction, vertical) { + var picker = datepicker.picker; + var currentView = picker.currentView; + var step = currentView.step || 1; + var viewDate = picker.viewDate; + var addFn; + var testFn; + switch (currentView.id) { + case 0: + if (vertical) { + viewDate = addDays(viewDate, direction * 7); + } else if (ev.ctrlKey || ev.metaKey) { + viewDate = addYears(viewDate, direction); + } else { + viewDate = addDays(viewDate, direction); + } + addFn = addDays; + testFn = function testFn(date) { + return currentView.disabled.includes(date); + }; + break; + case 1: + viewDate = addMonths(viewDate, vertical ? direction * 4 : direction); + addFn = addMonths; + testFn = function testFn(date) { + var dt = new Date(date); + var year = currentView.year, + disabled = currentView.disabled; + return dt.getFullYear() === year && disabled.includes(dt.getMonth()); + }; + break; + default: + viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step); + addFn = addYears; + testFn = function testFn(date) { + return currentView.disabled.includes(startOfYearPeriod(date, step)); + }; + } + viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate); + if (viewDate !== undefined) { + picker.changeFocus(viewDate).render(); + } +} +function onKeydown(datepicker, ev) { + if (ev.key === 'Tab') { + unfocus(datepicker); + return; + } + var picker = datepicker.picker; + var _picker$currentView = picker.currentView, + id = _picker$currentView.id, + isMinView = _picker$currentView.isMinView; + if (!picker.active) { + switch (ev.key) { + case 'ArrowDown': + case 'Escape': + picker.show(); + break; + case 'Enter': + datepicker.update(); + break; + default: + return; + } + } else if (datepicker.editMode) { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'Enter': + datepicker.exitEditMode({ + update: true, + autohide: datepicker.config.autohide + }); + break; + default: + return; + } + } else { + switch (ev.key) { + case 'Escape': + picker.hide(); + break; + case 'ArrowLeft': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, -1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, false); + } + break; + case 'ArrowRight': + if (ev.ctrlKey || ev.metaKey) { + goToPrevOrNext(datepicker, 1); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, 1, false); + } + break; + case 'ArrowUp': + if (ev.ctrlKey || ev.metaKey) { + switchView(datepicker); + } else if (ev.shiftKey) { + datepicker.enterEditMode(); + return; + } else { + moveByArrowKey(datepicker, ev, -1, true); + } + break; + case 'ArrowDown': + if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + return; + } + moveByArrowKey(datepicker, ev, 1, true); + break; + case 'Enter': + if (isMinView) { + datepicker.setDate(picker.viewDate); + } else { + picker.changeView(id - 1).render(); + } + break; + case 'Backspace': + case 'Delete': + datepicker.enterEditMode(); + return; + default: + if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) { + datepicker.enterEditMode(); + } + return; + } + } + ev.preventDefault(); + ev.stopPropagation(); +} +function onFocus(datepicker) { + if (datepicker.config.showOnFocus && !datepicker._showing) { + datepicker.show(); + } +} + +// for the prevention for entering edit mode while getting focus on click +function onMousedown(datepicker, ev) { + var el = ev.target; + if (datepicker.picker.active || datepicker.config.showOnClick) { + el._active = el === document.activeElement; + el._clicking = setTimeout(function () { + delete el._active; + delete el._clicking; + }, 2000); + } +} +function onClickInput(datepicker, ev) { + var el = ev.target; + if (!el._clicking) { + return; + } + clearTimeout(el._clicking); + delete el._clicking; + if (el._active) { + datepicker.enterEditMode(); + } + delete el._active; + if (datepicker.config.showOnClick) { + datepicker.show(); + } +} +function onPaste(datepicker, ev) { + if (ev.clipboardData.types.includes('text/plain')) { + datepicker.enterEditMode(); + } +} + +// for the `document` to delegate the events from outside the picker/input field +function onClickOutside(datepicker, ev) { + var element = datepicker.element; + if (element !== document.activeElement) { + return; + } + var pickerElem = datepicker.picker.element; + if (findElementInEventPath(ev, function (el) { + return el === element || el === pickerElem; + })) { + return; + } + unfocus(datepicker); +} + +function stringifyDates(dates, config) { + return dates.map(function (dt) { + return formatDate(dt, config.format, config.locale); + }).join(config.dateDelimiter); +} + +// parse input dates and create an array of time values for selection +// returns undefined if there are no valid dates in inputDates +// when origDates (current selection) is passed, the function works to mix +// the input dates into the current selection +function processInputDates(datepicker, inputDates) { + var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var config = datepicker.config, + origDates = datepicker.dates, + rangepicker = datepicker.rangepicker; + if (inputDates.length === 0) { + // empty input is considered valid unless origiDates is passed + return clear ? [] : undefined; + } + var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1]; + var newDates = inputDates.reduce(function (dates, dt) { + var date = parseDate(dt, config.format, config.locale); + if (date === undefined) { + return dates; + } + if (config.pickLevel > 0) { + // adjust to 1st of the month/Jan 1st of the year + // or to the last day of the monh/Dec 31st of the year if the datepicker + // is the range-end picker of a rangepicker + var _dt = new Date(date); + if (config.pickLevel === 1) { + date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1); + } else { + date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1); + } + } + if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) { + dates.push(date); + } + return dates; + }, []); + if (newDates.length === 0) { + return; + } + if (config.multidate && !clear) { + // get the synmetric difference between origDates and newDates + newDates = newDates.reduce(function (dates, date) { + if (!origDates.includes(date)) { + dates.push(date); + } + return dates; + }, origDates.filter(function (date) { + return !newDates.includes(date); + })); + } + // do length check always because user can input multiple dates regardless of the mode + return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates; +} + +// refresh the UI elements +// modes: 1: input only, 2, picker only, 3 both +function refreshUI(datepicker) { + var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3; + var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var config = datepicker.config, + picker = datepicker.picker, + inputField = datepicker.inputField; + if (mode & 2) { + var newView = picker.active ? config.pickLevel : config.startView; + picker.update().changeView(newView).render(quickRender); + } + if (mode & 1 && inputField) { + inputField.value = stringifyDates(datepicker.dates, config); + } +} +function _setDate(datepicker, inputDates, options) { + var clear = options.clear, + render = options.render, + autohide = options.autohide; + if (render === undefined) { + render = true; + } + if (!render) { + autohide = false; + } else if (autohide === undefined) { + autohide = datepicker.config.autohide; + } + var newDates = processInputDates(datepicker, inputDates, clear); + if (!newDates) { + return; + } + if (newDates.toString() !== datepicker.dates.toString()) { + datepicker.dates = newDates; + refreshUI(datepicker, render ? 3 : 1); + triggerDatepickerEvent(datepicker, 'changeDate'); + } else { + refreshUI(datepicker, 1); + } + if (autohide) { + datepicker.hide(); + } +} + +/** + * Class representing a date picker + */ +var Datepicker = /*#__PURE__*/function () { + /** + * Create a date picker + * @param {Element} element - element to bind a date picker + * @param {Object} [options] - config options + * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the + * date picker belongs to. Use this only when creating date picker as a part + * of date range picker + */ + function Datepicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + _classCallCheck(this, Datepicker); + element.datepicker = this; + this.element = element; + + // set up config + var config = this.config = Object.assign({ + buttonClass: options.buttonClass && String(options.buttonClass) || 'button', + container: document.body, + defaultViewDate: today(), + maxDate: undefined, + minDate: undefined + }, processOptions(defaultOptions, this)); + this._options = options; + Object.assign(config, processOptions(options, this)); + + // configure by type + var inline = this.inline = element.tagName !== 'INPUT'; + var inputField; + var initialDates; + if (inline) { + config.container = element; + initialDates = stringToArray(element.dataset.date, config.dateDelimiter); + delete element.dataset.date; + } else { + var container = options.container ? document.querySelector(options.container) : null; + if (container) { + config.container = container; + } + inputField = this.inputField = element; + inputField.classList.add('datepicker-input'); + initialDates = stringToArray(inputField.value, config.dateDelimiter); + } + if (rangepicker) { + // check validiry + var index = rangepicker.inputs.indexOf(inputField); + var datepickers = rangepicker.datepickers; + if (index < 0 || index > 1 || !Array.isArray(datepickers)) { + throw Error('Invalid rangepicker object.'); + } + // attach itaelf to the rangepicker here so that processInputDates() can + // determine if this is the range-end picker of the rangepicker while + // setting inital values when pickLevel > 0 + datepickers[index] = this; + // add getter for rangepicker + Object.defineProperty(this, 'rangepicker', { + get: function get() { + return rangepicker; + } + }); + } + + // set initial dates + this.dates = []; + // process initial value + var inputDateValues = processInputDates(this, initialDates); + if (inputDateValues && inputDateValues.length > 0) { + this.dates = inputDateValues; + } + if (inputField) { + inputField.value = stringifyDates(this.dates, config); + } + var picker = this.picker = new Picker(this); + if (inline) { + this.show(); + } else { + // set up event listeners in other modes + var onMousedownDocument = onClickOutside.bind(null, this); + var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]]; + registerListeners(this, listeners); + } + } + + /** + * Format Date object or time value in given format and language + * @param {Date|Number} date - date or time value to format + * @param {String|Object} format - format string or object that contains + * toDisplay() custom formatter, whose signature is + * - args: + * - date: {Date} - Date instance of the date passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {String} formatted date + * @param {String} [lang=en] - language code for the locale to use + * @return {String} formatted date + */ + return _createClass(Datepicker, [{ + key: "active", + get: + /** + * @type {Boolean} - Whether the picker element is shown. `true` whne shown + */ + function get() { + return !!(this.picker && this.picker.active); + } + + /** + * @type {HTMLDivElement} - DOM object of picker element + */ + }, { + key: "pickerElement", + get: function get() { + return this.picker ? this.picker.element : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + var picker = this.picker; + var newOptions = processOptions(options, this); + Object.assign(this._options, options); + Object.assign(this.config, newOptions); + picker.setOptions(newOptions); + refreshUI(this, 3); + } + + /** + * Show the picker element + */ + }, { + key: "show", + value: function show() { + if (this.inputField) { + if (this.inputField.disabled) { + return; + } + if (this.inputField !== document.activeElement) { + this._showing = true; + this.inputField.focus(); + delete this._showing; + } + } + this.picker.show(); + } + + /** + * Hide the picker element + * Not available on inline picker + */ + }, { + key: "hide", + value: function hide() { + if (this.inline) { + return; + } + this.picker.hide(); + this.picker.update().changeView(this.config.startView).render(); + } + + /** + * Destroy the Datepicker instance + * @return {Detepicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.hide(); + unregisterListeners(this); + this.picker.detach(); + if (!this.inline) { + this.inputField.classList.remove('datepicker-input'); + } + delete this.element.datepicker; + return this; + } + + /** + * Get the selected date(s) + * + * The method returns a Date object of selected date by default, and returns + * an array of selected dates in multidate mode. If format string is passed, + * it returns date string(s) formatted in given format. + * + * @param {String} [format] - Format string to stringify the date(s) + * @return {Date|String|Date[]|String[]} - selected date(s), or if none is + * selected, empty array in multidate mode and untitled in sigledate mode + */ + }, { + key: "getDate", + value: function getDate() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.config.locale); + } : function (date) { + return new Date(date); + }; + if (this.config.multidate) { + return this.dates.map(callback); + } + if (this.dates.length > 0) { + return callback(this.dates[0]); + } + } + + /** + * Set selected date(s) + * + * In multidate mode, you can pass multiple dates as a series of arguments + * or an array. (Since each date is parsed individually, the type of the + * dates doesn't have to be the same.) + * The given dates are used to toggle the select status of each date. The + * number of selected dates is kept from exceeding the length set to + * maxNumberOfDates. + * + * With clear: true option, the method can be used to clear the selection + * and to replace the selection instead of toggling in multidate mode. + * If the option is passed with no date arguments or an empty dates array, + * it works as "clear" (clear the selection then set nothing), and if the + * option is passed with new dates to select, it works as "replace" (clear + * the selection then set the given dates) + * + * When render: false option is used, the method omits re-rendering the + * picker element. In this case, you need to call refresh() method later in + * order for the picker element to reflect the changes. The input field is + * refreshed always regardless of this option. + * + * When invalid (unparsable, repeated, disabled or out-of-range) dates are + * passed, the method ignores them and applies only valid ones. In the case + * that all the given dates are invalid, which is distinguished from passing + * no dates, the method considers it as an error and leaves the selection + * untouched. + * + * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date + * objects, time values or mix of those for new selection + * @param {Object} [options] - function options + * - clear: {boolean} - Whether to clear the existing selection + * defualt: false + * - render: {boolean} - Whether to re-render the picker element + * default: true + * - autohide: {boolean} - Whether to hide the picker element after re-render + * Ignored when used with render: false + * default: config.autohide + */ + }, { + key: "setDate", + value: function setDate() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + var dates = [].concat(args); + var opts = {}; + var lastArg = lastItemOf(args); + if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) { + Object.assign(opts, dates.pop()); + } + var inputDates = Array.isArray(dates[0]) ? dates[0] : dates; + _setDate(this, inputDates, opts); + } + + /** + * Update the selected date(s) with input field's value + * Not available on inline picker + * + * The input field will be refreshed with properly formatted date string. + * + * @param {Object} [options] - function options + * - autohide: {boolean} - whether to hide the picker element after refresh + * default: false + */ + }, { + key: "update", + value: function update() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline) { + return; + } + var opts = { + clear: true, + autohide: !!(options && options.autohide) + }; + var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter); + _setDate(this, inputDates, opts); + } + + /** + * Refresh the picker element and the associated input field + * @param {String} [target] - target item when refreshing one item only + * 'picker' or 'input' + * @param {Boolean} [forceRender] - whether to re-render the picker element + * regardless of its state instead of optimized refresh + */ + }, { + key: "refresh", + value: function refresh() { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + if (target && typeof target !== 'string') { + forceRender = target; + target = undefined; + } + var mode; + if (target === 'picker') { + mode = 2; + } else if (target === 'input') { + mode = 1; + } else { + mode = 3; + } + refreshUI(this, mode, !forceRender); + } + + /** + * Enter edit mode + * Not available on inline picker or when the picker element is hidden + */ + }, { + key: "enterEditMode", + value: function enterEditMode() { + if (this.inline || !this.picker.active || this.editMode) { + return; + } + this.editMode = true; + this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700'); + } + + /** + * Exit from edit mode + * Not available on inline picker + * @param {Object} [options] - function options + * - update: {boolean} - whether to call update() after exiting + * If false, input field is revert to the existing selection + * default: false + */ + }, { + key: "exitEditMode", + value: function exitEditMode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (this.inline || !this.editMode) { + return; + } + var opts = Object.assign({ + update: false + }, options); + delete this.editMode; + this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700'); + if (opts.update) { + this.update(opts); + } + } + }], [{ + key: "formatDate", + value: function formatDate$1(date, format, lang) { + return formatDate(date, format, lang && locales[lang] || locales.en); + } + + /** + * Parse date string + * @param {String|Date|Number} dateStr - date string, Date object or time + * value to parse + * @param {String|Object} format - format string or object that contains + * toValue() custom parser, whose signature is + * - args: + * - dateStr: {String|Date|Number} - the dateStr passed to the method + * - format: {Object} - the format object passed to the method + * - locale: {Object} - locale for the language specified by `lang` + * - return: + * {Date|Number} parsed date or its time value + * @param {String} [lang=en] - language code for the locale to use + * @return {Number} time value of parsed date + */ + }, { + key: "parseDate", + value: function parseDate$1(dateStr, format, lang) { + return parseDate(dateStr, format, lang && locales[lang] || locales.en); + } + + /** + * @type {Object} - Installed locales in `[languageCode]: localeObject` format + * en`:_English (US)_ is pre-installed. + */ + }, { + key: "locales", + get: function get() { + return locales; + } + }]); +}(); + +// filter out the config options inapproprite to pass to Datepicker +function filterOptions(options) { + var newOpts = Object.assign({}, options); + delete newOpts.inputs; + delete newOpts.allowOneSidedRange; + delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date + + return newOpts; +} +function setupDatepicker(rangepicker, changeDateListener, el, options) { + registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]); + new Datepicker(el, options, rangepicker); +} +function onChangeDate(rangepicker, ev) { + // to prevent both datepickers trigger the other side's update each other + if (rangepicker._updating) { + return; + } + rangepicker._updating = true; + var target = ev.target; + if (target.datepicker === undefined) { + return; + } + var datepickers = rangepicker.datepickers; + var setDateOptions = { + render: false + }; + var changedSide = rangepicker.inputs.indexOf(target); + var otherSide = changedSide === 0 ? 1 : 0; + var changedDate = datepickers[changedSide].dates[0]; + var otherDate = datepickers[otherSide].dates[0]; + if (changedDate !== undefined && otherDate !== undefined) { + // if the start of the range > the end, swap them + if (changedSide === 0 && changedDate > otherDate) { + datepickers[0].setDate(otherDate, setDateOptions); + datepickers[1].setDate(changedDate, setDateOptions); + } else if (changedSide === 1 && changedDate < otherDate) { + datepickers[0].setDate(changedDate, setDateOptions); + datepickers[1].setDate(otherDate, setDateOptions); + } + } else if (!rangepicker.allowOneSidedRange) { + // to prevent the range from becoming one-sided, copy changed side's + // selection (no matter if it's empty) to the other side + if (changedDate !== undefined || otherDate !== undefined) { + setDateOptions.clear = true; + datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions); + } + } + datepickers[0].picker.update().render(); + datepickers[1].picker.update().render(); + delete rangepicker._updating; +} + +/** + * Class representing a date range picker + */ +var DateRangePicker = /*#__PURE__*/function () { + /** + * Create a date range picker + * @param {Element} element - element to bind a date range picker + * @param {Object} [options] - config options + */ + function DateRangePicker(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + _classCallCheck(this, DateRangePicker); + var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input')); + if (inputs.length < 2) { + return; + } + element.rangepicker = this; + this.element = element; + this.inputs = inputs.slice(0, 2); + this.allowOneSidedRange = !!options.allowOneSidedRange; + var changeDateListener = onChangeDate.bind(null, this); + var cleanOptions = filterOptions(options); + // in order for initial date setup to work right when pcicLvel > 0, + // let Datepicker constructor add the instance to the rangepicker + var datepickers = []; + Object.defineProperty(this, 'datepickers', { + get: function get() { + return datepickers; + } + }); + setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions); + setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions); + Object.freeze(datepickers); + // normalize the range if inital dates are given + if (datepickers[0].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[0] + }); + } else if (datepickers[1].dates.length > 0) { + onChangeDate(this, { + target: this.inputs[1] + }); + } + } + + /** + * @type {Array} - selected date of the linked date pickers + */ + return _createClass(DateRangePicker, [{ + key: "dates", + get: function get() { + return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined; + } + + /** + * Set new values to the config options + * @param {Object} options - config options to update + */ + }, { + key: "setOptions", + value: function setOptions(options) { + this.allowOneSidedRange = !!options.allowOneSidedRange; + var cleanOptions = filterOptions(options); + this.datepickers[0].setOptions(cleanOptions); + this.datepickers[1].setOptions(cleanOptions); + } + + /** + * Destroy the DateRangePicker instance + * @return {DateRangePicker} - the instance destroyed + */ + }, { + key: "destroy", + value: function destroy() { + this.datepickers[0].destroy(); + this.datepickers[1].destroy(); + unregisterListeners(this); + delete this.element.rangepicker; + } + + /** + * Get the start and end dates of the date range + * + * The method returns Date objects by default. If format string is passed, + * it returns date strings formatted in given format. + * The result array always contains 2 items (start date/end date) and + * undefined is used for unselected side. (e.g. If none is selected, + * the result will be [undefined, undefined]. If only the end date is set + * when allowOneSidedRange config option is true, [undefined, endDate] will + * be returned.) + * + * @param {String} [format] - Format string to stringify the dates + * @return {Array} - Start and end dates + */ + }, { + key: "getDates", + value: function getDates() { + var _this = this; + var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var callback = format ? function (date) { + return formatDate(date, format, _this.datepickers[0].config.locale); + } : function (date) { + return new Date(date); + }; + return this.dates.map(function (date) { + return date === undefined ? date : callback(date); + }); + } + + /** + * Set the start and end dates of the date range + * + * The method calls datepicker.setDate() internally using each of the + * arguments in start→end order. + * + * When a clear: true option object is passed instead of a date, the method + * clears the date. + * + * If an invalid date, the same date as the current one or an option object + * without clear: true is passed, the method considers that argument as an + * "ineffective" argument because calling datepicker.setDate() with those + * values makes no changes to the date selection. + * + * When the allowOneSidedRange config option is false, passing {clear: true} + * to clear the range works only when it is done to the last effective + * argument (in other words, passed to rangeEnd or to rangeStart along with + * ineffective rangeEnd). This is because when the date range is changed, + * it gets normalized based on the last change at the end of the changing + * process. + * + * @param {Date|Number|String|Object} rangeStart - Start date of the range + * or {clear: true} to clear the date + * @param {Date|Number|String|Object} rangeEnd - End date of the range + * or {clear: true} to clear the date + */ + }, { + key: "setDates", + value: function setDates(rangeStart, rangeEnd) { + var _this$datepickers = _slicedToArray(this.datepickers, 2), + datepicker0 = _this$datepickers[0], + datepicker1 = _this$datepickers[1]; + var origDates = this.dates; + + // If range normalization runs on every change, we can't set a new range + // that starts after the end of the current range correctly because the + // normalization process swaps start↔︎end right after setting the new start + // date. To prevent this, the normalization process needs to run once after + // both of the new dates are set. + this._updating = true; + datepicker0.setDate(rangeStart); + datepicker1.setDate(rangeEnd); + delete this._updating; + if (datepicker1.dates[0] !== origDates[1]) { + onChangeDate(this, { + target: this.inputs[1] + }); + } else if (datepicker0.dates[0] !== origDates[0]) { + onChangeDate(this, { + target: this.inputs[0] + }); + } + } + }]); +}(); + +exports.DateRangePicker = DateRangePicker; +exports.Datepicker = Datepicker; + + +/***/ }), + +/***/ 902: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initAccordions = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + alwaysOpen: false, + activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white', + inactiveClasses: 'text-gray-500 dark:text-gray-400', + onOpen: function () { }, + onClose: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Accordion = /** @class */ (function () { + function Accordion(accordionEl, items, options, instanceOptions) { + if (accordionEl === void 0) { accordionEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : accordionEl.id; + this._accordionEl = accordionEl; + this._items = items; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Accordion', this, this._instanceId, instanceOptions.override); + } + Accordion.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + // show accordion item based on click + this._items.forEach(function (item) { + if (item.active) { + _this.open(item.id); + } + var clickHandler = function () { + _this.toggle(item.id); + }; + item.triggerEl.addEventListener('click', clickHandler); + // Store the clickHandler in a property of the item for removal later + item.clickHandler = clickHandler; + }); + this._initialized = true; + } + }; + Accordion.prototype.destroy = function () { + if (this._items.length && this._initialized) { + this._items.forEach(function (item) { + item.triggerEl.removeEventListener('click', item.clickHandler); + // Clean up by deleting the clickHandler property from the item + delete item.clickHandler; + }); + this._initialized = false; + } + }; + Accordion.prototype.removeInstance = function () { + instances_1.default.removeInstance('Accordion', this._instanceId); + }; + Accordion.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Accordion.prototype.getItem = function (id) { + return this._items.filter(function (item) { return item.id === id; })[0]; + }; + Accordion.prototype.open = function (id) { + var _a, _b; + var _this = this; + var item = this.getItem(id); + // don't hide other accordions if always open + if (!this._options.alwaysOpen) { + this._items.map(function (i) { + var _a, _b; + if (i !== item) { + (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + i.targetEl.classList.add('hidden'); + i.triggerEl.setAttribute('aria-expanded', 'false'); + i.active = false; + // rotate icon if set + if (i.iconEl) { + i.iconEl.classList.add('rotate-180'); + } + } + }); + } + // show active item + (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + item.triggerEl.setAttribute('aria-expanded', 'true'); + item.targetEl.classList.remove('hidden'); + item.active = true; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.remove('rotate-180'); + } + // callback function + this._options.onOpen(this, item); + }; + Accordion.prototype.toggle = function (id) { + var item = this.getItem(id); + if (item.active) { + this.close(id); + } + else { + this.open(id); + } + // callback function + this._options.onToggle(this, item); + }; + Accordion.prototype.close = function (id) { + var _a, _b; + var item = this.getItem(id); + (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' ')); + item.targetEl.classList.add('hidden'); + item.triggerEl.setAttribute('aria-expanded', 'false'); + item.active = false; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.add('rotate-180'); + } + // callback function + this._options.onClose(this, item); + }; + Accordion.prototype.updateOnOpen = function (callback) { + this._options.onOpen = callback; + }; + Accordion.prototype.updateOnClose = function (callback) { + this._options.onClose = callback; + }; + Accordion.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Accordion; +}()); +function initAccordions() { + document.querySelectorAll('[data-accordion]').forEach(function ($accordionEl) { + var alwaysOpen = $accordionEl.getAttribute('data-accordion'); + var activeClasses = $accordionEl.getAttribute('data-active-classes'); + var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes'); + var items = []; + $accordionEl + .querySelectorAll('[data-accordion-target]') + .forEach(function ($triggerEl) { + // Consider only items that directly belong to $accordionEl + // (to make nested accordions work). + if ($triggerEl.closest('[data-accordion]') === $accordionEl) { + var item = { + id: $triggerEl.getAttribute('data-accordion-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')), + iconEl: $triggerEl.querySelector('[data-accordion-icon]'), + active: $triggerEl.getAttribute('aria-expanded') === 'true' + ? true + : false, + }; + items.push(item); + } + }); + new Accordion($accordionEl, items, { + alwaysOpen: alwaysOpen === 'open' ? true : false, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initAccordions = initAccordions; +if (typeof window !== 'undefined') { + window.Accordion = Accordion; + window.initAccordions = initAccordions; +} +exports["default"] = Accordion; + + +/***/ }), + +/***/ 33: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCarousels = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + defaultPosition: 0, + indicators: { + items: [], + activeClasses: 'bg-white dark:bg-gray-800', + inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800', + }, + interval: 3000, + onNext: function () { }, + onPrev: function () { }, + onChange: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Carousel = /** @class */ (function () { + function Carousel(carouselEl, items, options, instanceOptions) { + if (carouselEl === void 0) { carouselEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : carouselEl.id; + this._carouselEl = carouselEl; + this._items = items; + this._options = __assign(__assign(__assign({}, Default), options), { indicators: __assign(__assign({}, Default.indicators), options.indicators) }); + this._activeItem = this.getItem(this._options.defaultPosition); + this._indicators = this._options.indicators.items; + this._intervalDuration = this._options.interval; + this._intervalInstance = null; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Carousel', this, this._instanceId, instanceOptions.override); + } + /** + * initialize carousel and items based on active one + */ + Carousel.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + this._items.map(function (item) { + item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform'); + }); + // if no active item is set then first position is default + if (this.getActiveItem()) { + this.slideTo(this.getActiveItem().position); + } + else { + this.slideTo(0); + } + this._indicators.map(function (indicator, position) { + indicator.el.addEventListener('click', function () { + _this.slideTo(position); + }); + }); + this._initialized = true; + } + }; + Carousel.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + } + }; + Carousel.prototype.removeInstance = function () { + instances_1.default.removeInstance('Carousel', this._instanceId); + }; + Carousel.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Carousel.prototype.getItem = function (position) { + return this._items[position]; + }; + /** + * Slide to the element based on id + * @param {*} position + */ + Carousel.prototype.slideTo = function (position) { + var nextItem = this._items[position]; + var rotationItems = { + left: nextItem.position === 0 + ? this._items[this._items.length - 1] + : this._items[nextItem.position - 1], + middle: nextItem, + right: nextItem.position === this._items.length - 1 + ? this._items[0] + : this._items[nextItem.position + 1], + }; + this._rotate(rotationItems); + this._setActiveItem(nextItem); + if (this._intervalInstance) { + this.pause(); + this.cycle(); + } + this._options.onChange(this); + }; + /** + * Based on the currently active item it will go to the next position + */ + Carousel.prototype.next = function () { + var activeItem = this.getActiveItem(); + var nextItem = null; + // check if last item + if (activeItem.position === this._items.length - 1) { + nextItem = this._items[0]; + } + else { + nextItem = this._items[activeItem.position + 1]; + } + this.slideTo(nextItem.position); + // callback function + this._options.onNext(this); + }; + /** + * Based on the currently active item it will go to the previous position + */ + Carousel.prototype.prev = function () { + var activeItem = this.getActiveItem(); + var prevItem = null; + // check if first item + if (activeItem.position === 0) { + prevItem = this._items[this._items.length - 1]; + } + else { + prevItem = this._items[activeItem.position - 1]; + } + this.slideTo(prevItem.position); + // callback function + this._options.onPrev(this); + }; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + Carousel.prototype._rotate = function (rotationItems) { + // reset + this._items.map(function (item) { + item.el.classList.add('hidden'); + }); + // Handling the case when there is only one item + if (this._items.length === 1) { + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-20'); + return; + } + // left item (previously active) + rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.left.el.classList.add('-translate-x-full', 'z-10'); + // currently active item + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-30'); + // right item (upcoming active) + rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-30'); + rotationItems.right.el.classList.add('translate-x-full', 'z-20'); + }; + /** + * Set an interval to cycle through the carousel items + */ + Carousel.prototype.cycle = function () { + var _this = this; + if (typeof window !== 'undefined') { + this._intervalInstance = window.setInterval(function () { + _this.next(); + }, this._intervalDuration); + } + }; + /** + * Clears the cycling interval + */ + Carousel.prototype.pause = function () { + clearInterval(this._intervalInstance); + }; + /** + * Get the currently active item + */ + Carousel.prototype.getActiveItem = function () { + return this._activeItem; + }; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + Carousel.prototype._setActiveItem = function (item) { + var _a, _b; + var _this = this; + this._activeItem = item; + var position = item.position; + // update the indicators if available + if (this._indicators.length) { + this._indicators.map(function (indicator) { + var _a, _b; + indicator.el.setAttribute('aria-current', 'false'); + (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' ')); + (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' ')); + }); + (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' ')); + (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' ')); + this._indicators[position].el.setAttribute('aria-current', 'true'); + } + }; + Carousel.prototype.updateOnNext = function (callback) { + this._options.onNext = callback; + }; + Carousel.prototype.updateOnPrev = function (callback) { + this._options.onPrev = callback; + }; + Carousel.prototype.updateOnChange = function (callback) { + this._options.onChange = callback; + }; + return Carousel; +}()); +function initCarousels() { + document.querySelectorAll('[data-carousel]').forEach(function ($carouselEl) { + var interval = $carouselEl.getAttribute('data-carousel-interval'); + var slide = $carouselEl.getAttribute('data-carousel') === 'slide' + ? true + : false; + var items = []; + var defaultPosition = 0; + if ($carouselEl.querySelectorAll('[data-carousel-item]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function ($carouselItemEl, position) { + items.push({ + position: position, + el: $carouselItemEl, + }); + if ($carouselItemEl.getAttribute('data-carousel-item') === + 'active') { + defaultPosition = position; + } + }); + } + var indicators = []; + if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function ($indicatorEl) { + indicators.push({ + position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')), + el: $indicatorEl, + }); + }); + } + var carousel = new Carousel($carouselEl, items, { + defaultPosition: defaultPosition, + indicators: { + items: indicators, + }, + interval: interval ? interval : Default.interval, + }); + if (slide) { + carousel.cycle(); + } + // check for controls + var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]'); + var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]'); + if (carouselNextEl) { + carouselNextEl.addEventListener('click', function () { + carousel.next(); + }); + } + if (carouselPrevEl) { + carouselPrevEl.addEventListener('click', function () { + carousel.prev(); + }); + } + }); +} +exports.initCarousels = initCarousels; +if (typeof window !== 'undefined') { + window.Carousel = Carousel; + window.initCarousels = initCarousels; +} +exports["default"] = Carousel; + + +/***/ }), + +/***/ 673: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCopyClipboards = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + htmlEntities: false, + contentType: 'input', + onCopy: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var CopyClipboard = /** @class */ (function () { + function CopyClipboard(triggerEl, targetEl, options, instanceOptions) { + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('CopyClipboard', this, this._instanceId, instanceOptions.override); + } + CopyClipboard.prototype.init = function () { + var _this = this; + if (this._targetEl && this._triggerEl && !this._initialized) { + this._triggerElClickHandler = function () { + _this.copy(); + }; + // clicking on the trigger element should copy the value of the target element + if (this._triggerEl) { + this._triggerEl.addEventListener('click', this._triggerElClickHandler); + } + this._initialized = true; + } + }; + CopyClipboard.prototype.destroy = function () { + if (this._triggerEl && this._targetEl && this._initialized) { + if (this._triggerEl) { + this._triggerEl.removeEventListener('click', this._triggerElClickHandler); + } + this._initialized = false; + } + }; + CopyClipboard.prototype.removeInstance = function () { + instances_1.default.removeInstance('CopyClipboard', this._instanceId); + }; + CopyClipboard.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + CopyClipboard.prototype.getTargetValue = function () { + if (this._options.contentType === 'input') { + return this._targetEl.value; + } + if (this._options.contentType === 'innerHTML') { + return this._targetEl.innerHTML; + } + if (this._options.contentType === 'textContent') { + return this._targetEl.textContent.replace(/\s+/g, ' ').trim(); + } + }; + CopyClipboard.prototype.copy = function () { + var textToCopy = this.getTargetValue(); + // Check if HTMLEntities option is enabled + if (this._options.htmlEntities) { + // Encode the text using HTML entities + textToCopy = this.decodeHTML(textToCopy); + } + // Create a temporary textarea element + var tempTextArea = document.createElement('textarea'); + tempTextArea.value = textToCopy; + document.body.appendChild(tempTextArea); + // Select the text inside the textarea and copy it to the clipboard + tempTextArea.select(); + document.execCommand('copy'); + // Remove the temporary textarea + document.body.removeChild(tempTextArea); + // Callback function + this._options.onCopy(this); + return textToCopy; + }; + // Function to encode text into HTML entities + CopyClipboard.prototype.decodeHTML = function (html) { + var textarea = document.createElement('textarea'); + textarea.innerHTML = html; + return textarea.textContent; + }; + CopyClipboard.prototype.updateOnCopyCallback = function (callback) { + this._options.onCopy = callback; + }; + return CopyClipboard; +}()); +function initCopyClipboards() { + document + .querySelectorAll('[data-copy-to-clipboard-target]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-copy-to-clipboard-target'); + var $targetEl = document.getElementById(targetId); + var contentType = $triggerEl.getAttribute('data-copy-to-clipboard-content-type'); + var htmlEntities = $triggerEl.getAttribute('data-copy-to-clipboard-html-entities'); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('CopyClipboard', $targetEl.getAttribute('id'))) { + new CopyClipboard($triggerEl, $targetEl, { + htmlEntities: htmlEntities && htmlEntities === 'true' + ? true + : Default.htmlEntities, + contentType: contentType + ? contentType + : Default.contentType, + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-copy-to-clipboard-target attribute.")); + } + }); +} +exports.initCopyClipboards = initCopyClipboards; +if (typeof window !== 'undefined') { + window.CopyClipboard = CopyClipboard; + window.initClipboards = initCopyClipboards; +} +exports["default"] = CopyClipboard; + + +/***/ }), + +/***/ 922: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initCollapses = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + onCollapse: function () { }, + onExpand: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Collapse = /** @class */ (function () { + function Collapse(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Collapse', this, this._instanceId, instanceOptions.override); + } + Collapse.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + if (this._triggerEl.hasAttribute('aria-expanded')) { + this._visible = + this._triggerEl.getAttribute('aria-expanded') === 'true'; + } + else { + // fix until v2 not to break previous single collapses which became dismiss + this._visible = !this._targetEl.classList.contains('hidden'); + } + this._clickHandler = function () { + _this.toggle(); + }; + this._triggerEl.addEventListener('click', this._clickHandler); + this._initialized = true; + } + }; + Collapse.prototype.destroy = function () { + if (this._triggerEl && this._initialized) { + this._triggerEl.removeEventListener('click', this._clickHandler); + this._initialized = false; + } + }; + Collapse.prototype.removeInstance = function () { + instances_1.default.removeInstance('Collapse', this._instanceId); + }; + Collapse.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Collapse.prototype.collapse = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onCollapse(this); + }; + Collapse.prototype.expand = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onExpand(this); + }; + Collapse.prototype.toggle = function () { + if (this._visible) { + this.collapse(); + } + else { + this.expand(); + } + // callback function + this._options.onToggle(this); + }; + Collapse.prototype.updateOnCollapse = function (callback) { + this._options.onCollapse = callback; + }; + Collapse.prototype.updateOnExpand = function (callback) { + this._options.onExpand = callback; + }; + Collapse.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Collapse; +}()); +function initCollapses() { + document + .querySelectorAll('[data-collapse-toggle]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-collapse-toggle'); + var $targetEl = document.getElementById(targetId); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('Collapse', $targetEl.getAttribute('id'))) { + new Collapse($targetEl, $triggerEl); + } + else { + // if instance exists already for the same target element then create a new one with a different trigger element + new Collapse($targetEl, $triggerEl, {}, { + id: $targetEl.getAttribute('id') + + '_' + + instances_1.default._generateRandomId(), + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-collapse-toggle attribute.")); + } + }); +} +exports.initCollapses = initCollapses; +if (typeof window !== 'undefined') { + window.Collapse = Collapse; + window.initCollapses = initCollapses; +} +exports["default"] = Collapse; + + +/***/ }), + +/***/ 132: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDatepickers = void 0; +var instances_1 = __webpack_require__(423); +var flowbite_datepicker_1 = __webpack_require__(554); +var Default = { + defaultDatepickerId: null, + autohide: false, + format: 'mm/dd/yyyy', + maxDate: null, + minDate: null, + orientation: 'bottom', + buttons: false, + autoSelectToday: 0, + title: null, + language: 'en', + rangePicker: false, + onShow: function () { }, + onHide: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Datepicker = /** @class */ (function () { + function Datepicker(datepickerEl, options, instanceOptions) { + if (datepickerEl === void 0) { datepickerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : datepickerEl.id; + this._datepickerEl = datepickerEl; + this._datepickerInstance = null; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Datepicker', this, this._instanceId, instanceOptions.override); + } + Datepicker.prototype.init = function () { + if (this._datepickerEl && !this._initialized) { + if (this._options.rangePicker) { + this._datepickerInstance = new flowbite_datepicker_1.DateRangePicker(this._datepickerEl, this._getDatepickerOptions(this._options)); + } + else { + this._datepickerInstance = new flowbite_datepicker_1.Datepicker(this._datepickerEl, this._getDatepickerOptions(this._options)); + } + this._initialized = true; + } + }; + Datepicker.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + this._datepickerInstance.destroy(); + } + }; + Datepicker.prototype.removeInstance = function () { + this.destroy(); + instances_1.default.removeInstance('Datepicker', this._instanceId); + }; + Datepicker.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Datepicker.prototype.getDatepickerInstance = function () { + return this._datepickerInstance; + }; + Datepicker.prototype.getDate = function () { + if (this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.DateRangePicker) { + return this._datepickerInstance.getDates(); + } + if (!this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.Datepicker) { + return this._datepickerInstance.getDate(); + } + }; + Datepicker.prototype.setDate = function (date) { + if (this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.DateRangePicker) { + return this._datepickerInstance.setDates(date); + } + if (!this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.Datepicker) { + return this._datepickerInstance.setDate(date); + } + }; + Datepicker.prototype.show = function () { + this._datepickerInstance.show(); + this._options.onShow(this); + }; + Datepicker.prototype.hide = function () { + this._datepickerInstance.hide(); + this._options.onHide(this); + }; + Datepicker.prototype._getDatepickerOptions = function (options) { + var datepickerOptions = {}; + if (options.buttons) { + datepickerOptions.todayBtn = true; + datepickerOptions.clearBtn = true; + if (options.autoSelectToday) { + datepickerOptions.todayBtnMode = 1; + } + } + if (options.autohide) { + datepickerOptions.autohide = true; + } + if (options.format) { + datepickerOptions.format = options.format; + } + if (options.maxDate) { + datepickerOptions.maxDate = options.maxDate; + } + if (options.minDate) { + datepickerOptions.minDate = options.minDate; + } + if (options.orientation) { + datepickerOptions.orientation = options.orientation; + } + if (options.title) { + datepickerOptions.title = options.title; + } + if (options.language) { + datepickerOptions.language = options.language; + } + return datepickerOptions; + }; + Datepicker.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Datepicker.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + return Datepicker; +}()); +function initDatepickers() { + document + .querySelectorAll('[datepicker], [inline-datepicker], [date-rangepicker]') + .forEach(function ($datepickerEl) { + if ($datepickerEl) { + var buttons = $datepickerEl.hasAttribute('datepicker-buttons'); + var autoselectToday = $datepickerEl.hasAttribute('datepicker-autoselect-today'); + var autohide = $datepickerEl.hasAttribute('datepicker-autohide'); + var format = $datepickerEl.getAttribute('datepicker-format'); + var maxDate = $datepickerEl.getAttribute('datepicker-max-date'); + var minDate = $datepickerEl.getAttribute('datepicker-min-date'); + var orientation = $datepickerEl.getAttribute('datepicker-orientation'); + var title = $datepickerEl.getAttribute('datepicker-title'); + var language = $datepickerEl.getAttribute('datepicker-language'); + var rangePicker = $datepickerEl.hasAttribute('date-rangepicker'); + new Datepicker($datepickerEl, { + buttons: buttons ? buttons : Default.buttons, + autoSelectToday: autoselectToday + ? autoselectToday + : Default.autoSelectToday, + autohide: autohide ? autohide : Default.autohide, + format: format ? format : Default.format, + maxDate: maxDate ? maxDate : Default.maxDate, + minDate: minDate ? minDate : Default.minDate, + orientation: orientation + ? orientation + : Default.orientation, + title: title ? title : Default.title, + language: language ? language : Default.language, + rangePicker: rangePicker + ? rangePicker + : Default.rangePicker, + }); + } + else { + console.error("The datepicker element does not exist. Please check the datepicker attribute."); + } + }); +} +exports.initDatepickers = initDatepickers; +if (typeof window !== 'undefined') { + window.Datepicker = Datepicker; + window.initDatepickers = initDatepickers; +} +exports["default"] = Datepicker; + + +/***/ }), + +/***/ 556: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDials = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dial = /** @class */ (function () { + function Dial(parentEl, triggerEl, targetEl, options, instanceOptions) { + if (parentEl === void 0) { parentEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._parentEl = parentEl; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dial', this, this._instanceId, instanceOptions.override); + } + Dial.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + this._showEventHandler = function () { + _this.show(); + }; + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showEventHandler); + _this._targetEl.addEventListener(ev, _this._showEventHandler); + }); + this._hideEventHandler = function () { + if (!_this._parentEl.matches(':hover')) { + _this.hide(); + } + }; + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.addEventListener(ev, _this._hideEventHandler); + }); + this._initialized = true; + } + }; + Dial.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showEventHandler); + _this._targetEl.removeEventListener(ev, _this._showEventHandler); + }); + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.removeEventListener(ev, _this._hideEventHandler); + }); + this._initialized = false; + } + }; + Dial.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dial', this._instanceId); + }; + Dial.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dial.prototype.hide = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Dial.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dial.prototype.toggle = function () { + if (this._visible) { + this.hide(); + } + else { + this.show(); + } + }; + Dial.prototype.isHidden = function () { + return !this._visible; + }; + Dial.prototype.isVisible = function () { + return this._visible; + }; + Dial.prototype._getTriggerEventTypes = function (triggerType) { + switch (triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Dial.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Dial.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Dial.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Dial; +}()); +function initDials() { + document.querySelectorAll('[data-dial-init]').forEach(function ($parentEl) { + var $triggerEl = $parentEl.querySelector('[data-dial-toggle]'); + if ($triggerEl) { + var dialId = $triggerEl.getAttribute('data-dial-toggle'); + var $dialEl = document.getElementById(dialId); + if ($dialEl) { + var triggerType = $triggerEl.getAttribute('data-dial-trigger'); + new Dial($parentEl, $triggerEl, $dialEl, { + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("Dial with id ".concat(dialId, " does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?")); + } + } + else { + console.error("Dial with id ".concat($parentEl.id, " does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?")); + } + }); +} +exports.initDials = initDials; +if (typeof window !== 'undefined') { + window.Dial = Dial; + window.initDials = initDials; +} +exports["default"] = Dial; + + +/***/ }), + +/***/ 791: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDismisses = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + transition: 'transition-opacity', + duration: 300, + timing: 'ease-out', + onHide: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dismiss = /** @class */ (function () { + function Dismiss(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dismiss', this, this._instanceId, instanceOptions.override); + } + Dismiss.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + this._clickHandler = function () { + _this.hide(); + }; + this._triggerEl.addEventListener('click', this._clickHandler); + this._initialized = true; + } + }; + Dismiss.prototype.destroy = function () { + if (this._triggerEl && this._initialized) { + this._triggerEl.removeEventListener('click', this._clickHandler); + this._initialized = false; + } + }; + Dismiss.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dismiss', this._instanceId); + }; + Dismiss.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dismiss.prototype.hide = function () { + var _this = this; + this._targetEl.classList.add(this._options.transition, "duration-".concat(this._options.duration), this._options.timing, 'opacity-0'); + setTimeout(function () { + _this._targetEl.classList.add('hidden'); + }, this._options.duration); + // callback function + this._options.onHide(this, this._targetEl); + }; + Dismiss.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + return Dismiss; +}()); +function initDismisses() { + document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-dismiss-target'); + var $dismissEl = document.querySelector(targetId); + if ($dismissEl) { + new Dismiss($dismissEl, $triggerEl); + } + else { + console.error("The dismiss element with id \"".concat(targetId, "\" does not exist. Please check the data-dismiss-target attribute.")); + } + }); +} +exports.initDismisses = initDismisses; +if (typeof window !== 'undefined') { + window.Dismiss = Dismiss; + window.initDismisses = initDismisses; +} +exports["default"] = Dismiss; + + +/***/ }), + +/***/ 340: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDrawers = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'left', + bodyScrolling: false, + backdrop: true, + edge: false, + edgeOffset: 'bottom-[60px]', + backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Drawer = /** @class */ (function () { + function Drawer(targetEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._eventListenerInstances = []; + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Drawer', this, this._instanceId, instanceOptions.override); + } + Drawer.prototype.init = function () { + var _this = this; + // set initial accessibility attributes + if (this._targetEl && !this._initialized) { + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.classList.add('transition-transform'); + // set base placement classes + this._getPlacementClasses(this._options.placement).base.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._handleEscapeKey = function (event) { + if (event.key === 'Escape') { + // if 'Escape' key is pressed + if (_this.isVisible()) { + // if the Drawer is visible + _this.hide(); // hide the Drawer + } + } + }; + // add keyboard event listener to document + document.addEventListener('keydown', this._handleEscapeKey); + this._initialized = true; + } + }; + Drawer.prototype.destroy = function () { + if (this._initialized) { + this.removeAllEventListenerInstances(); + this._destroyBackdropEl(); + // Remove the keyboard event listener + document.removeEventListener('keydown', this._handleEscapeKey); + this._initialized = false; + } + }; + Drawer.prototype.removeInstance = function () { + instances_1.default.removeInstance('Drawer', this._instanceId); + }; + Drawer.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Drawer.prototype.hide = function () { + var _this = this; + // based on the edge option show placement classes + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + // enable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.remove('overflow-hidden'); + } + // destroy backdrop + if (this._options.backdrop) { + this._destroyBackdropEl(); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Drawer.prototype.show = function () { + var _this = this; + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + // disable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.add('overflow-hidden'); + } + // show backdrop + if (this._options.backdrop) { + this._createBackdrop(); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Drawer.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Drawer.prototype._createBackdrop = function () { + var _a; + var _this = this; + if (!this._visible) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('drawer-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + backdropEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Drawer.prototype._destroyBackdropEl = function () { + if (this._visible && + document.querySelector('[drawer-backdrop]') !== null) { + document.querySelector('[drawer-backdrop]').remove(); + } + }; + Drawer.prototype._getPlacementClasses = function (placement) { + switch (placement) { + case 'top': + return { + base: ['top-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['-translate-y-full'], + }; + case 'right': + return { + base: ['right-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-x-full'], + }; + case 'bottom': + return { + base: ['bottom-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['translate-y-full'], + }; + case 'left': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + case 'bottom-edge': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-y-full', this._options.edgeOffset], + }; + default: + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + } + }; + Drawer.prototype.isHidden = function () { + return !this._visible; + }; + Drawer.prototype.isVisible = function () { + return this._visible; + }; + Drawer.prototype.addEventListenerInstance = function (element, type, handler) { + this._eventListenerInstances.push({ + element: element, + type: type, + handler: handler, + }); + }; + Drawer.prototype.removeAllEventListenerInstances = function () { + this._eventListenerInstances.map(function (eventListenerInstance) { + eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler); + }); + this._eventListenerInstances = []; + }; + Drawer.prototype.getAllEventListenerInstances = function () { + return this._eventListenerInstances; + }; + Drawer.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Drawer.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Drawer.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Drawer; +}()); +function initDrawers() { + document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) { + // mandatory + var drawerId = $triggerEl.getAttribute('data-drawer-target'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var placement = $triggerEl.getAttribute('data-drawer-placement'); + var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling'); + var backdrop = $triggerEl.getAttribute('data-drawer-backdrop'); + var edge = $triggerEl.getAttribute('data-drawer-edge'); + var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset'); + new Drawer($drawerEl, { + placement: placement ? placement : Default.placement, + bodyScrolling: bodyScrolling + ? bodyScrolling === 'true' + ? true + : false + : Default.bodyScrolling, + backdrop: backdrop + ? backdrop === 'true' + ? true + : false + : Default.backdrop, + edge: edge ? (edge === 'true' ? true : false) : Default.edge, + edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset, + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-toggle'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_1 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_1) { + var toggleDrawer = function () { + drawer_1.toggle(); + }; + $triggerEl.addEventListener('click', toggleDrawer); + drawer_1.addEventListenerInstance($triggerEl, 'click', toggleDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document + .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]') + .forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-dismiss') + ? $triggerEl.getAttribute('data-drawer-dismiss') + : $triggerEl.getAttribute('data-drawer-hide'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_2 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_2) { + var hideDrawer = function () { + drawer_2.hide(); + }; + $triggerEl.addEventListener('click', hideDrawer); + drawer_2.addEventListenerInstance($triggerEl, 'click', hideDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id")); + } + }); + document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-show'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_3 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_3) { + var showDrawer = function () { + drawer_3.show(); + }; + $triggerEl.addEventListener('click', showDrawer); + drawer_3.addEventListenerInstance($triggerEl, 'click', showDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); +} +exports.initDrawers = initDrawers; +if (typeof window !== 'undefined') { + window.Drawer = Drawer; + window.initDrawers = initDrawers; +} +exports["default"] = Drawer; + + +/***/ }), + +/***/ 316: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initDropdowns = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'bottom', + triggerType: 'click', + offsetSkidding: 0, + offsetDistance: 10, + delay: 300, + ignoreClickOutsideClass: false, + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dropdown = /** @class */ (function () { + function Dropdown(targetElement, triggerElement, options, instanceOptions) { + if (targetElement === void 0) { targetElement = null; } + if (triggerElement === void 0) { triggerElement = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetElement.id; + this._targetEl = targetElement; + this._triggerEl = triggerElement; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dropdown', this, this._instanceId, instanceOptions.override); + } + Dropdown.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._popperInstance = this._createPopperInstance(); + this._setupEventListeners(); + this._initialized = true; + } + }; + Dropdown.prototype.destroy = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + // Remove click event listeners for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._clickHandler); + }); + } + // Remove hover event listeners for trigger and target elements + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hoverShowTriggerElHandler); + _this._targetEl.removeEventListener(ev, _this._hoverShowTargetElHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hoverHideHandler); + _this._targetEl.removeEventListener(ev, _this._hoverHideHandler); + }); + } + this._popperInstance.destroy(); + this._initialized = false; + }; + Dropdown.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dropdown', this._instanceId); + }; + Dropdown.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dropdown.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._clickHandler = function () { + _this.toggle(); + }; + // click event handling for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._clickHandler); + }); + } + this._hoverShowTriggerElHandler = function (ev) { + if (ev.type === 'click') { + _this.toggle(); + } + else { + setTimeout(function () { + _this.show(); + }, _this._options.delay); + } + }; + this._hoverShowTargetElHandler = function () { + _this.show(); + }; + this._hoverHideHandler = function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }; + // hover event handling for trigger element + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hoverShowTriggerElHandler); + _this._targetEl.addEventListener(ev, _this._hoverShowTargetElHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hoverHideHandler); + _this._targetEl.addEventListener(ev, _this._hoverHideHandler); + }); + } + }; + Dropdown.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [ + this._options.offsetSkidding, + this._options.offsetDistance, + ], + }, + }, + ], + }); + }; + Dropdown.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + // Ignore clicks on the trigger element (ie. a datepicker input) + var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass; + var isIgnored = false; + if (ignoreClickOutsideClass) { + var ignoredClickOutsideEls = document.querySelectorAll(".".concat(ignoreClickOutsideClass)); + ignoredClickOutsideEls.forEach(function (el) { + if (el.contains(clickedEl)) { + isIgnored = true; + return; + } + }); + } + // Ignore clicks on the target element (ie. dropdown itself) + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + !isIgnored && + this.isVisible()) { + this.hide(); + } + }; + Dropdown.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'click'], + hideEvents: ['mouseleave'], + }; + case 'click': + return { + showEvents: ['click'], + hideEvents: [], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['click'], + hideEvents: [], + }; + } + }; + Dropdown.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Dropdown.prototype.isVisible = function () { + return this._visible; + }; + Dropdown.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + this._targetEl.classList.add('block'); + this._targetEl.removeAttribute('aria-hidden'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + this._setupClickOutsideListener(); + // Update its position + this._popperInstance.update(); + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dropdown.prototype.hide = function () { + this._targetEl.classList.remove('block'); + this._targetEl.classList.add('hidden'); + this._targetEl.setAttribute('aria-hidden', 'true'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + this._visible = false; + this._removeClickOutsideListener(); + // callback function + this._options.onHide(this); + }; + Dropdown.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Dropdown.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Dropdown.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Dropdown; +}()); +function initDropdowns() { + document + .querySelectorAll('[data-dropdown-toggle]') + .forEach(function ($triggerEl) { + var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle'); + var $dropdownEl = document.getElementById(dropdownId); + if ($dropdownEl) { + var placement = $triggerEl.getAttribute('data-dropdown-placement'); + var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding'); + var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance'); + var triggerType = $triggerEl.getAttribute('data-dropdown-trigger'); + var delay = $triggerEl.getAttribute('data-dropdown-delay'); + var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class'); + new Dropdown($dropdownEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + offsetSkidding: offsetSkidding + ? parseInt(offsetSkidding) + : Default.offsetSkidding, + offsetDistance: offsetDistance + ? parseInt(offsetDistance) + : Default.offsetDistance, + delay: delay ? parseInt(delay) : Default.delay, + ignoreClickOutsideClass: ignoreClickOutsideClass + ? ignoreClickOutsideClass + : Default.ignoreClickOutsideClass, + }); + } + else { + console.error("The dropdown element with id \"".concat(dropdownId, "\" does not exist. Please check the data-dropdown-toggle attribute.")); + } + }); +} +exports.initDropdowns = initDropdowns; +if (typeof window !== 'undefined') { + window.Dropdown = Dropdown; + window.initDropdowns = initDropdowns; +} +exports["default"] = Dropdown; + + +/***/ }), + +/***/ 311: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initFlowbite = void 0; +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var clipboard_1 = __webpack_require__(673); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var input_counter_1 = __webpack_require__(656); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +var datepicker_1 = __webpack_require__(132); +function initFlowbite() { + (0, accordion_1.initAccordions)(); + (0, collapse_1.initCollapses)(); + (0, carousel_1.initCarousels)(); + (0, dismiss_1.initDismisses)(); + (0, dropdown_1.initDropdowns)(); + (0, modal_1.initModals)(); + (0, drawer_1.initDrawers)(); + (0, tabs_1.initTabs)(); + (0, tooltip_1.initTooltips)(); + (0, popover_1.initPopovers)(); + (0, dial_1.initDials)(); + (0, input_counter_1.initInputCounters)(); + (0, clipboard_1.initCopyClipboards)(); + (0, datepicker_1.initDatepickers)(); +} +exports.initFlowbite = initFlowbite; +if (typeof window !== 'undefined') { + window.initFlowbite = initFlowbite; +} + + +/***/ }), + +/***/ 656: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initInputCounters = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + minValue: null, + maxValue: null, + onIncrement: function () { }, + onDecrement: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var InputCounter = /** @class */ (function () { + function InputCounter(targetEl, incrementEl, decrementEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (incrementEl === void 0) { incrementEl = null; } + if (decrementEl === void 0) { decrementEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._incrementEl = incrementEl; + this._decrementEl = decrementEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('InputCounter', this, this._instanceId, instanceOptions.override); + } + InputCounter.prototype.init = function () { + var _this = this; + if (this._targetEl && !this._initialized) { + this._inputHandler = function (event) { + { + var target = event.target; + // check if the value is numeric + if (!/^\d*$/.test(target.value)) { + // Regex to check if the value is numeric + target.value = target.value.replace(/[^\d]/g, ''); // Remove non-numeric characters + } + // check for max value + if (_this._options.maxValue !== null && + parseInt(target.value) > _this._options.maxValue) { + target.value = _this._options.maxValue.toString(); + } + // check for min value + if (_this._options.minValue !== null && + parseInt(target.value) < _this._options.minValue) { + target.value = _this._options.minValue.toString(); + } + } + }; + this._incrementClickHandler = function () { + _this.increment(); + }; + this._decrementClickHandler = function () { + _this.decrement(); + }; + // Add event listener to restrict input to numeric values only + this._targetEl.addEventListener('input', this._inputHandler); + if (this._incrementEl) { + this._incrementEl.addEventListener('click', this._incrementClickHandler); + } + if (this._decrementEl) { + this._decrementEl.addEventListener('click', this._decrementClickHandler); + } + this._initialized = true; + } + }; + InputCounter.prototype.destroy = function () { + if (this._targetEl && this._initialized) { + this._targetEl.removeEventListener('input', this._inputHandler); + if (this._incrementEl) { + this._incrementEl.removeEventListener('click', this._incrementClickHandler); + } + if (this._decrementEl) { + this._decrementEl.removeEventListener('click', this._decrementClickHandler); + } + this._initialized = false; + } + }; + InputCounter.prototype.removeInstance = function () { + instances_1.default.removeInstance('InputCounter', this._instanceId); + }; + InputCounter.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + InputCounter.prototype.getCurrentValue = function () { + return parseInt(this._targetEl.value) || 0; + }; + InputCounter.prototype.increment = function () { + // don't increment if the value is already at the maximum value + if (this._options.maxValue !== null && + this.getCurrentValue() >= this._options.maxValue) { + return; + } + this._targetEl.value = (this.getCurrentValue() + 1).toString(); + this._options.onIncrement(this); + }; + InputCounter.prototype.decrement = function () { + // don't decrement if the value is already at the minimum value + if (this._options.minValue !== null && + this.getCurrentValue() <= this._options.minValue) { + return; + } + this._targetEl.value = (this.getCurrentValue() - 1).toString(); + this._options.onDecrement(this); + }; + InputCounter.prototype.updateOnIncrement = function (callback) { + this._options.onIncrement = callback; + }; + InputCounter.prototype.updateOnDecrement = function (callback) { + this._options.onDecrement = callback; + }; + return InputCounter; +}()); +function initInputCounters() { + document.querySelectorAll('[data-input-counter]').forEach(function ($targetEl) { + var targetId = $targetEl.id; + var $incrementEl = document.querySelector('[data-input-counter-increment="' + targetId + '"]'); + var $decrementEl = document.querySelector('[data-input-counter-decrement="' + targetId + '"]'); + var minValue = $targetEl.getAttribute('data-input-counter-min'); + var maxValue = $targetEl.getAttribute('data-input-counter-max'); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('InputCounter', $targetEl.getAttribute('id'))) { + new InputCounter($targetEl, $incrementEl ? $incrementEl : null, $decrementEl ? $decrementEl : null, { + minValue: minValue ? parseInt(minValue) : null, + maxValue: maxValue ? parseInt(maxValue) : null, + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-input-counter attribute.")); + } + }); +} +exports.initInputCounters = initInputCounters; +if (typeof window !== 'undefined') { + window.InputCounter = InputCounter; + window.initInputCounters = initInputCounters; +} +exports["default"] = InputCounter; + + +/***/ }), + +/***/ 16: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initModals = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'center', + backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40', + backdrop: 'dynamic', + closable: true, + onHide: function () { }, + onShow: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Modal = /** @class */ (function () { + function Modal(targetEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._eventListenerInstances = []; + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._isHidden = true; + this._backdropEl = null; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Modal', this, this._instanceId, instanceOptions.override); + } + Modal.prototype.init = function () { + var _this = this; + if (this._targetEl && !this._initialized) { + this._getPlacementClasses().map(function (c) { + _this._targetEl.classList.add(c); + }); + this._initialized = true; + } + }; + Modal.prototype.destroy = function () { + if (this._initialized) { + this.removeAllEventListenerInstances(); + this._destroyBackdropEl(); + this._initialized = false; + } + }; + Modal.prototype.removeInstance = function () { + instances_1.default.removeInstance('Modal', this._instanceId); + }; + Modal.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Modal.prototype._createBackdrop = function () { + var _a; + if (this._isHidden) { + var backdropEl = document.createElement('div'); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + this._backdropEl = backdropEl; + } + }; + Modal.prototype._destroyBackdropEl = function () { + if (!this._isHidden && this._backdropEl) { + this._backdropEl.remove(); + this._backdropEl = null; + } + }; + Modal.prototype._setupModalCloseEventListeners = function () { + var _this = this; + if (this._options.backdrop === 'dynamic') { + this._clickOutsideEventListener = function (ev) { + _this._handleOutsideClick(ev.target); + }; + this._targetEl.addEventListener('click', this._clickOutsideEventListener, true); + } + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._removeModalCloseEventListeners = function () { + if (this._options.backdrop === 'dynamic') { + this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true); + } + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._handleOutsideClick = function (target) { + if (target === this._targetEl || + (target === this._backdropEl && this.isVisible())) { + this.hide(); + } + }; + Modal.prototype._getPlacementClasses = function () { + switch (this._options.placement) { + // top + case 'top-left': + return ['justify-start', 'items-start']; + case 'top-center': + return ['justify-center', 'items-start']; + case 'top-right': + return ['justify-end', 'items-start']; + // center + case 'center-left': + return ['justify-start', 'items-center']; + case 'center': + return ['justify-center', 'items-center']; + case 'center-right': + return ['justify-end', 'items-center']; + // bottom + case 'bottom-left': + return ['justify-start', 'items-end']; + case 'bottom-center': + return ['justify-center', 'items-end']; + case 'bottom-right': + return ['justify-end', 'items-end']; + default: + return ['justify-center', 'items-center']; + } + }; + Modal.prototype.toggle = function () { + if (this._isHidden) { + this.show(); + } + else { + this.hide(); + } + // callback function + this._options.onToggle(this); + }; + Modal.prototype.show = function () { + if (this.isHidden) { + this._targetEl.classList.add('flex'); + this._targetEl.classList.remove('hidden'); + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + this._createBackdrop(); + this._isHidden = false; + // Add keyboard event listener to the document + if (this._options.closable) { + this._setupModalCloseEventListeners(); + } + // prevent body scroll + document.body.classList.add('overflow-hidden'); + // callback function + this._options.onShow(this); + } + }; + Modal.prototype.hide = function () { + if (this.isVisible) { + this._targetEl.classList.add('hidden'); + this._targetEl.classList.remove('flex'); + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + this._destroyBackdropEl(); + this._isHidden = true; + // re-apply body scroll + document.body.classList.remove('overflow-hidden'); + if (this._options.closable) { + this._removeModalCloseEventListeners(); + } + // callback function + this._options.onHide(this); + } + }; + Modal.prototype.isVisible = function () { + return !this._isHidden; + }; + Modal.prototype.isHidden = function () { + return this._isHidden; + }; + Modal.prototype.addEventListenerInstance = function (element, type, handler) { + this._eventListenerInstances.push({ + element: element, + type: type, + handler: handler, + }); + }; + Modal.prototype.removeAllEventListenerInstances = function () { + this._eventListenerInstances.map(function (eventListenerInstance) { + eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler); + }); + this._eventListenerInstances = []; + }; + Modal.prototype.getAllEventListenerInstances = function () { + return this._eventListenerInstances; + }; + Modal.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Modal.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Modal.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Modal; +}()); +function initModals() { + // initiate modal based on data-modal-target + document.querySelectorAll('[data-modal-target]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-target'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + new Modal($modalEl, { + placement: placement ? placement : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }); + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.")); + } + }); + // toggle modal visibility + document.querySelectorAll('[data-modal-toggle]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-toggle'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_1 = instances_1.default.getInstance('Modal', modalId); + if (modal_1) { + var toggleModal = function () { + modal_1.toggle(); + }; + $triggerEl.addEventListener('click', toggleModal); + modal_1.addEventListenerInstance($triggerEl, 'click', toggleModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?")); + } + }); + // show modal on click if exists based on id + document.querySelectorAll('[data-modal-show]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-show'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_2 = instances_1.default.getInstance('Modal', modalId); + if (modal_2) { + var showModal = function () { + modal_2.show(); + }; + $triggerEl.addEventListener('click', showModal); + modal_2.addEventListenerInstance($triggerEl, 'click', showModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?")); + } + }); + // hide modal on click if exists based on id + document.querySelectorAll('[data-modal-hide]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-hide'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_3 = instances_1.default.getInstance('Modal', modalId); + if (modal_3) { + var hideModal = function () { + modal_3.hide(); + }; + $triggerEl.addEventListener('click', hideModal); + modal_3.addEventListenerInstance($triggerEl, 'click', hideModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?")); + } + }); +} +exports.initModals = initModals; +if (typeof window !== 'undefined') { + window.Modal = Modal; + window.initModals = initModals; +} +exports["default"] = Modal; + + +/***/ }), + +/***/ 903: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initPopovers = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'top', + offset: 10, + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Popover = /** @class */ (function () { + function Popover(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Popover', this, instanceOptions.id ? instanceOptions.id : this._targetEl.id, instanceOptions.override); + } + Popover.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._setupEventListeners(); + this._popperInstance = this._createPopperInstance(); + this._initialized = true; + } + }; + Popover.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + // remove event listeners associated with the trigger element and target element + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showHandler); + _this._targetEl.removeEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hideHandler); + _this._targetEl.removeEventListener(ev, _this._hideHandler); + }); + // remove event listeners for keydown + this._removeKeydownListener(); + // remove event listeners for click outside + this._removeClickOutsideListener(); + // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance) + if (this._popperInstance) { + this._popperInstance.destroy(); + } + this._initialized = false; + } + }; + Popover.prototype.removeInstance = function () { + instances_1.default.removeInstance('Popover', this._instanceId); + }; + Popover.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Popover.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._showHandler = function () { + _this.show(); + }; + this._hideHandler = function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }; + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showHandler); + _this._targetEl.addEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hideHandler); + _this._targetEl.addEventListener(ev, _this._hideHandler); + }); + }; + Popover.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, this._options.offset], + }, + }, + ], + }); + }; + Popover.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Popover.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Popover.prototype.isVisible = function () { + return this._visible; + }; + Popover.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Popover.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility to true + this._visible = true; + // callback function + this._options.onShow(this); + }; + Popover.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility to false + this._visible = false; + // callback function + this._options.onHide(this); + }; + Popover.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Popover.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Popover.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Popover; +}()); +function initPopovers() { + document.querySelectorAll('[data-popover-target]').forEach(function ($triggerEl) { + var popoverID = $triggerEl.getAttribute('data-popover-target'); + var $popoverEl = document.getElementById(popoverID); + if ($popoverEl) { + var triggerType = $triggerEl.getAttribute('data-popover-trigger'); + var placement = $triggerEl.getAttribute('data-popover-placement'); + var offset = $triggerEl.getAttribute('data-popover-offset'); + new Popover($popoverEl, $triggerEl, { + placement: placement ? placement : Default.placement, + offset: offset ? parseInt(offset) : Default.offset, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The popover element with id \"".concat(popoverID, "\" does not exist. Please check the data-popover-target attribute.")); + } + }); +} +exports.initPopovers = initPopovers; +if (typeof window !== 'undefined') { + window.Popover = Popover; + window.initPopovers = initPopovers; +} +exports["default"] = Popover; + + +/***/ }), + +/***/ 247: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTabs = void 0; +var instances_1 = __webpack_require__(423); +var Default = { + defaultTabId: null, + activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500', + inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300', + onShow: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Tabs = /** @class */ (function () { + function Tabs(tabsEl, items, options, instanceOptions) { + if (tabsEl === void 0) { tabsEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id; + this._tabsEl = tabsEl; + this._items = items; + this._activeTab = options ? this.getTab(options.defaultTabId) : null; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Tabs', this, this._instanceId, instanceOptions.override); + } + Tabs.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + // set the first tab as active if not set by explicitly + if (!this._activeTab) { + this.setActiveTab(this._items[0]); + } + // force show the first default tab + this.show(this._activeTab.id, true); + // show tab content based on click + this._items.map(function (tab) { + tab.triggerEl.addEventListener('click', function (event) { + event.preventDefault(); + _this.show(tab.id); + }); + }); + } + }; + Tabs.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + } + }; + Tabs.prototype.removeInstance = function () { + this.destroy(); + instances_1.default.removeInstance('Tabs', this._instanceId); + }; + Tabs.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Tabs.prototype.getActiveTab = function () { + return this._activeTab; + }; + Tabs.prototype.setActiveTab = function (tab) { + this._activeTab = tab; + }; + Tabs.prototype.getTab = function (id) { + return this._items.filter(function (t) { return t.id === id; })[0]; + }; + Tabs.prototype.show = function (id, forceShow) { + var _a, _b; + var _this = this; + if (forceShow === void 0) { forceShow = false; } + var tab = this.getTab(id); + // don't do anything if already active + if (tab === this._activeTab && !forceShow) { + return; + } + // hide other tabs + this._items.map(function (t) { + var _a, _b; + if (t !== tab) { + (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + t.targetEl.classList.add('hidden'); + t.triggerEl.setAttribute('aria-selected', 'false'); + } + }); + // show active tab + (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + tab.triggerEl.setAttribute('aria-selected', 'true'); + tab.targetEl.classList.remove('hidden'); + this.setActiveTab(tab); + // callback function + this._options.onShow(this, tab); + }; + Tabs.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + return Tabs; +}()); +function initTabs() { + document.querySelectorAll('[data-tabs-toggle]').forEach(function ($parentEl) { + var tabItems = []; + var activeClasses = $parentEl.getAttribute('data-tabs-active-classes'); + var inactiveClasses = $parentEl.getAttribute('data-tabs-inactive-classes'); + var defaultTabId = null; + $parentEl + .querySelectorAll('[role="tab"]') + .forEach(function ($triggerEl) { + var isActive = $triggerEl.getAttribute('aria-selected') === 'true'; + var tab = { + id: $triggerEl.getAttribute('data-tabs-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target')), + }; + tabItems.push(tab); + if (isActive) { + defaultTabId = tab.id; + } + }); + new Tabs($parentEl, tabItems, { + defaultTabId: defaultTabId, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initTabs = initTabs; +if (typeof window !== 'undefined') { + window.Tabs = Tabs; + window.initTabs = initTabs; +} +exports["default"] = Tabs; + + +/***/ }), + +/***/ 671: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initTooltips = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = __webpack_require__(853); +var instances_1 = __webpack_require__(423); +var Default = { + placement: 'top', + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Tooltip = /** @class */ (function () { + function Tooltip(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Tooltip', this, this._instanceId, instanceOptions.override); + } + Tooltip.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._setupEventListeners(); + this._popperInstance = this._createPopperInstance(); + this._initialized = true; + } + }; + Tooltip.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + // remove event listeners associated with the trigger element + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hideHandler); + }); + // remove event listeners for keydown + this._removeKeydownListener(); + // remove event listeners for click outside + this._removeClickOutsideListener(); + // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance) + if (this._popperInstance) { + this._popperInstance.destroy(); + } + this._initialized = false; + } + }; + Tooltip.prototype.removeInstance = function () { + instances_1.default.removeInstance('Tooltip', this._instanceId); + }; + Tooltip.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Tooltip.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._showHandler = function () { + _this.show(); + }; + this._hideHandler = function () { + _this.hide(); + }; + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hideHandler); + }); + }; + Tooltip.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, 8], + }, + }, + ], + }); + }; + Tooltip.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Tooltip.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Tooltip.prototype.isVisible = function () { + return this._visible; + }; + Tooltip.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Tooltip.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility + this._visible = true; + // callback function + this._options.onShow(this); + }; + Tooltip.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility + this._visible = false; + // callback function + this._options.onHide(this); + }; + Tooltip.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Tooltip.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Tooltip.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Tooltip; +}()); +function initTooltips() { + document.querySelectorAll('[data-tooltip-target]').forEach(function ($triggerEl) { + var tooltipId = $triggerEl.getAttribute('data-tooltip-target'); + var $tooltipEl = document.getElementById(tooltipId); + if ($tooltipEl) { + var triggerType = $triggerEl.getAttribute('data-tooltip-trigger'); + var placement = $triggerEl.getAttribute('data-tooltip-placement'); + new Tooltip($tooltipEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The tooltip element with id \"".concat(tooltipId, "\" does not exist. Please check the data-tooltip-target attribute.")); + } + }); +} +exports.initTooltips = initTooltips; +if (typeof window !== 'undefined') { + window.Tooltip = Tooltip; + window.initTooltips = initTooltips; +} +exports["default"] = Tooltip; + + +/***/ }), + +/***/ 947: +/***/ (function(__unused_webpack_module, exports) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Events = /** @class */ (function () { + function Events(eventType, eventFunctions) { + if (eventFunctions === void 0) { eventFunctions = []; } + this._eventType = eventType; + this._eventFunctions = eventFunctions; + } + Events.prototype.init = function () { + var _this = this; + this._eventFunctions.forEach(function (eventFunction) { + if (typeof window !== 'undefined') { + window.addEventListener(_this._eventType, eventFunction); + } + }); + }; + return Events; +}()); +exports["default"] = Events; + + +/***/ }), + +/***/ 423: +/***/ (function(__unused_webpack_module, exports) { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Instances = /** @class */ (function () { + function Instances() { + this._instances = { + Accordion: {}, + Carousel: {}, + Collapse: {}, + Dial: {}, + Dismiss: {}, + Drawer: {}, + Dropdown: {}, + Modal: {}, + Popover: {}, + Tabs: {}, + Tooltip: {}, + InputCounter: {}, + CopyClipboard: {}, + Datepicker: {}, + }; + } + Instances.prototype.addInstance = function (component, instance, id, override) { + if (override === void 0) { override = false; } + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + if (this._instances[component][id] && !override) { + console.warn("Flowbite: Instance with ID ".concat(id, " already exists.")); + return; + } + if (override && this._instances[component][id]) { + this._instances[component][id].destroyAndRemoveInstance(); + } + this._instances[component][id ? id : this._generateRandomId()] = + instance; + }; + Instances.prototype.getAllInstances = function () { + return this._instances; + }; + Instances.prototype.getInstances = function (component) { + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + return this._instances[component]; + }; + Instances.prototype.getInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + if (!this._instances[component][id]) { + console.warn("Flowbite: Instance with ID ".concat(id, " does not exist.")); + return; + } + return this._instances[component][id]; + }; + Instances.prototype.destroyAndRemoveInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + this.destroyInstanceObject(component, id); + this.removeInstance(component, id); + }; + Instances.prototype.removeInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + delete this._instances[component][id]; + }; + Instances.prototype.destroyInstanceObject = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + this._instances[component][id].destroy(); + }; + Instances.prototype.instanceExists = function (component, id) { + if (!this._instances[component]) { + return false; + } + if (!this._instances[component][id]) { + return false; + } + return true; + }; + Instances.prototype._generateRandomId = function () { + return Math.random().toString(36).substr(2, 9); + }; + Instances.prototype._componentAndInstanceCheck = function (component, id) { + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + if (!this._instances[component][id]) { + console.warn("Flowbite: Instance with ID ".concat(id, " does not exist.")); + return false; + } + return true; + }; + return Instances; +}()); +var instances = new Instances(); +exports["default"] = instances; +if (typeof window !== 'undefined') { + window.FlowbiteInstances = instances; +} + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ !function() { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +var exports = __webpack_exports__; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +// core components +var accordion_1 = __webpack_require__(902); +var carousel_1 = __webpack_require__(33); +var collapse_1 = __webpack_require__(922); +var dial_1 = __webpack_require__(556); +var dismiss_1 = __webpack_require__(791); +var drawer_1 = __webpack_require__(340); +var dropdown_1 = __webpack_require__(316); +var modal_1 = __webpack_require__(16); +var popover_1 = __webpack_require__(903); +var tabs_1 = __webpack_require__(247); +var tooltip_1 = __webpack_require__(671); +var input_counter_1 = __webpack_require__(656); +var clipboard_1 = __webpack_require__(673); +var datepicker_1 = __webpack_require__(132); +var index_1 = __webpack_require__(311); +var events_1 = __webpack_require__(947); +// Since turbo maintainers refuse to add this event, we'll add it ourselves +// https://discuss.hotwired.dev/t/event-to-know-a-turbo-stream-has-been-rendered/1554/10 +var afterRenderEvent = new Event('turbo:after-stream-render'); +addEventListener('turbo:before-stream-render', function (event) { + var originalRender = event.detail.render; + event.detail.render = function (streamElement) { + originalRender(streamElement); + window.dispatchEvent(afterRenderEvent); + }; +}); +var turboLoadEvents = new events_1.default('turbo:load', [index_1.initFlowbite]); +turboLoadEvents.init(); +var turboFrameLoadEvents = new events_1.default('turbo:frame-load', [index_1.initFlowbite]); +turboFrameLoadEvents.init(); +var turboStreamLoadEvents = new events_1.default('turbo:after-stream-render', [ + index_1.initFlowbite, +]); +turboStreamLoadEvents.init(); +exports["default"] = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + InputCounter: input_counter_1.default, + CopyClipboard: clipboard_1.default, + Datepicker: datepicker_1.default, + Events: events_1.default, +}; + +}(); +/******/ return __webpack_exports__; +/******/ })() +; +}); +//# sourceMappingURL=flowbite.turbo.js.map \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.turbo.js.map b/node_modules/flowbite/dist/flowbite.turbo.js.map new file mode 100644 index 0000000..548a564 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.turbo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flowbite.turbo.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVO,IAAI,SAAG;AACP;AACA;AACA;AACA;AACA,sBAAsB,SAAG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACP;AACA,CAAC;AACM,IAAI,gBAAU;AACrB;AACA,CAAC,OAAO;;AAED;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;;AC9BQ;AACf;AACA;;ACFe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;ACXuC;;AAEvC;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;;;ACpBsD;AACK,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,SAAS,aAAa,cAAc,WAAW;AAC/C;AACA,MAAM;AACN;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uHAAuH;;AAEvH;AACA;AACA;AACA,OAAO,IAAI,GAAG;;AAEd,WAAW,aAAa,cAAc,WAAW;AACjD;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,EAAE;;;AAGF,0DAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;ACnFkC;AACpB;AACf;AACA;;ACHO,IAAI,QAAG;AACP,IAAI,QAAG;AACP;;ACFQ;AACf;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;ACVgD;AACjC;AACf,gDAAgD,WAAW;AAC3D;;ACH2D;AAClB;AACF;AACc;AACtC;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,aAAa;AACnC,uCAAuC,KAAK;AAC5C,wCAAwC,KAAK;AAC7C;;AAEA,aAAa,SAAS,YAAY,SAAS;AAC3C;;AAEA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxC+D,CAAC;AAChE;;AAEe;AACf,mBAAmB,qBAAqB,WAAW;AACnD;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxB+C;AAChC;AACf,2DAA2D;;AAE3D;AACA;AACA,IAAI;AACJ,uBAAuB,YAAY;AACnC;;AAEA;AACA;AACA;AACA,UAAU;;;AAGV;AACA,QAAQ;AACR,MAAM;;;AAGN;AACA;;ACtBuC;AACxB;AACf,SAAS,SAAS;AAClB;;ACH2C;AAC5B;AACf,uCAAuC,WAAW;AAClD;;ACH4C;AAC7B;AACf;AACA,W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KAAK;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,2BAA2B,oCAAoC;AAC/D;;AAEA,yBAAyB,qCAAqC;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,KAAqC,EAAE,2BAQ1C;;AAEH;AACA,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,mDAAmD;AAC7F;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,yCAAyC,kDAAkD;AAC3F;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,4CAA4C;AAC5C;AACA,GAAG;AACH,EAAE;;;AAGF,4DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACpLiD,CAAC;;AAEnD;AACA;AACA;;AAEA,SAAS,qBAAM;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA,sBAAsB;AACtB,UAAU,qBAAM;AAChB;AACA,CAAC;;AChDD;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA,GAAG;AACH;;ACVA,IAAI,kCAAI;AACR;AACA;AACA;AACe;AACf;AACA,WAAW,kCAAI;AACf,GAAG;AACH;;ACRuC;AACxB;AACf,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;ACT+D;AACN;AACN;AACpC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,kBAAkB,kBAAkB,eAAe;AAClF;;ACZuC;AACkB;AACE;AACN;AACtC;AACf,Y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ACA;AACA;AACA,KAAK;AACL,4DAA4D,KAAK,GAAG,IAAI,sBAAsB,MAAM,GAAG,SAAG;;AAE1G;AACA,0BAA0B,oBAAoB;AAC9C;;AAEA,2BAA2B,oBAAoB;AAC/C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,QAAQ;AAC1C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AClJsD;AACC;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,SAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI;AAClC;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH,0BAA0B,cAAc;AACxC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,mDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AC5D2D;AACD,CAAC;;AAErD;AACP,sBAAsB,gBAAgB;AACtC,wBAAwB,IAAI,EAAE,SAAG;;AAEjC,mEAAmE;AACnE;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,UAAU,IAAI,EAAE,KAAK;AACrB;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAiB;AAC9B;AACA;AACA,GAAG,IAAI;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF,qDAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACrDuD;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;;AAGF,4DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;ACxBc;AACf;AACA;;ACF8D;AACF;AACgB;AAC5B;AACY;AACF;AACI;AACN;AACJ;AACY;AACE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,gBAAgB;AACtC,kBAAkB,YAAY;AAC9B;AACA,iBAAiB,wBAAwB;AACzC,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA,4FAA4F;AAC5F;AACA,GAAG;AACH;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,sCAAsC,SAAG,GAAG,IAAI;AAChD,qCAAqC,MAAM,GAAG,KAAK;AACnD;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC,+BAA+B,KAAK,2CAA2C;AAC/E;;AAEA;AACA,6CAA6C,aAAa;AAC1D;AACA;AACA;AACA,yHAAyH,kBAAkB;AAC3I;AACA,uDAAuD;AACvD;AACA;AACA;AACA;;AAEA,mBAAmB,MAAM;AACzB;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;AACA;AACA,0BAA0B,MAAM,UAAU,QAAO,yCAAyC,QAAO;AACjG;AACA;AACA;;AAEA;AACA;;AAEA,uCAAuC,SAAG,GAAG,IAAI;;AAEjD,sCAAsC,MAAM,GAAG,KAAK;;AAEpD;;AAEA;;AAEA;;AAEA;;AAEA,wBAAwB,SAAG,EAAE,IAAI;;AAEjC;;AAEA;;AAEA;;AAEA,oDAAoD,cAAc,oCAAoC,MAAM;;AAE5G;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF,8DAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AC7IyD;AACZ;AACgB;AACE;AACpB;AACA;AACI;AACc;;;ACP/C;AACf;AACA;AACA;AACA;AACA;;ACLmD;AACZ;AACS;AACa;AAC9C;AACf,eAAe,SAAS,WAAW,aAAa;AAChD,WAAW,eAAe;AAC1B,IAAI;AACJ,WAAW,oBAAoB;AAC/B;AACA;;ACV+D;AAChB;AACJ;AACK;AACW;AACF;AACR;AACR;;AAEzC;AACA;AACA,eAAe,KAAK;AACpB,eAAe,KAAK;AACpB;AACA,EAAE;AACF;;;AAGe;AACf;AACA;AACA;;AAEA,gCAAgC,aAAa;AAC7C,6BAA6B,aAAa;AAC1C,wBAAwB,kBAAkB;AAC1C,aAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,WAAW;AACnB,IAAI,cAAc;AAClB,eAAe,aAAa;AAC5B;;AAEA,QAAQ,aAAa;AACrB,gBAAgB,qBAAqB;AACrC;AACA;AACA,MAAM;AACN,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzD6C,CAAC;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEe;AACf;AACA,2CAA2C;;AAE3C,SAAS,qBAAqB;AAC9B;AACA;AACA,KAAK;AACL,GAAG;AACH;;AC3Ce;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;;ACde;AACf;AACA;AACA,sDAAsD;AACtD,+BAA+B;AAC/B,4BAA4B;AAC5B,KAAK;AACL;AACA,GAAG,IAAI,GAAG;;AAEV;AACA;AACA,GAAG;AACH;;ACb+D;AACN;AACQ;AACJ;AACE;AACR;AACZ;AACkB;AAClB;AACgB;AACV;AACM;AACD;AACpB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sEAAsE,aAAa;AACnF;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B;AAC/B,uBAAuB;AACvB;AACA;AACA;AACA,OAAO;AACP,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qBAAqB,SAAS,cAAc,iBAAiB,yCAAyC,iBAAiB;AACvH,kBAAkB,iBAAiB;AACnC,WAAW;AACX;;AAEA,+BAA+B,cAAc,CAAC,WAAW,yDAAyD;;AAElH;AACA;AACA,SAAS,GAAG;AACZ;;AAEA,YAAY,KAAqC,EAAE,qGA+B1C;;AAET;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C;AAC7C;;AAEA;AACA,cAAc,KAAqC,EAAE,EAE1C;;AAEX;AACA,UAAU;;;AAGV;AACA,qBAAqB,gBAAgB,YAAY,eAAe;AAChE,kBAAkB,aAAa;AAC/B,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;AACA,6CAA6C,KAAK;;AAElD;AACA,sEAAsE;AACtE,SAAS;AACT;;AAEA,4BAA4B,uCAAuC;AACnE,cAAc,KAAqC,EAAE,EAO1C;;AAEX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gEAAgE;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,OAAO;AACP;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,KAAqC,EAAE,EAE1C;;AAEP;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACO,mDAAmD;;;;AChQU;AACT;AACF;AACA;AACJ;AACV;AACJ;AACsB;AACpB;AACF;AACvC,wBAAwB,cAAc,EAAE,uBAAa,EAAE,uBAAa,EAAE,qBAAW,EAAE,gBAAM,EAAE,cAAI,EAAE,yBAAe,EAAE,eAAK,EAAE,cAAI;AAC7H,IAAI,mBAAY,gBAAgB,eAAe;AAC/C;AACA,CAAC,GAAG;;AAEuE,CAAC;;AAER,CAAC;;;;ACjBD;AACT;AACF;AACA;AACJ;AACrD,IAAI,4BAAgB,IAAI,cAAc,EAAE,uBAAa,EAAE,uBAAa,EAAE,qBAAW;AACjF,IAAI,wBAAY,gBAAgB,eAAe;AAC/C,oBAAoB,4BAAgB;AACpC,CAAC,GAAG;;;;ACRuB;AACU,CAAC;;AAEgE,CAAC;;AAE5D,CAAC;;;;;;;;;ACL/B;;AAEb,8CAA6C,EAAE,aAAa,EAAC;;AAE7D;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,yFAAyF;AACzF,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,kEAAkE;AACtF,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,SAAS,GAAG,gEAAgE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0FAA0F,aAAa;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,OAAO,IAAI;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA,CAAC;AACD;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO,IAAI;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B;AACA;AACA,gBAAgB,MAAM;AACtB,kBAAkB,QAAQ;AAC1B,kBAAkB,QAAQ;AAC1B;AACA,UAAU,QAAQ;AAClB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;;AAEA;AACA,cAAc,gBAAgB;AAC9B;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,6BAA6B;AAC7C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,eAAe,QAAQ;AACvB,iBAAiB,SAAS;AAC1B;AACA,kBAAkB,SAAS;AAC3B;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,0EAA0E,aAAa;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,oBAAoB,SAAS;AAC7B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,SAAS;AACxB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA,qBAAqB,oBAAoB;AACzC,oBAAoB,QAAQ;AAC5B,oBAAoB,QAAQ;AAC5B;AACA,YAAY,aAAa;AACzB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA,gCAAgC;AAChC;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,OAAO;AACvB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C,WAAW,aAAa;AACxB,eAAe,2BAA2B;AAC1C,WAAW,aAAa;AACxB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH,CAAC;;AA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CAAC,CAAC;AACH,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAE7B,qBAAe;IACX,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK;IACL,OAAO;IACP,IAAI;IACJ,OAAO;IACP,YAAY;IACZ,aAAa;IACb,UAAU;IACV,MAAM;CACT,CAAC","sources":["webpack:///webpack/universalModuleDefinition","webpack:///./node_modules/@popperjs/core/lib/enums.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack:///./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/math.js","webpack:///./node_modules/@popperjs/core/lib/utils/userAgent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack:///./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/within.js","webpack:///./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack:///./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack:///./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack:///./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/index.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack:///./node_modules/@popperjs/core/lib/utils/debounce.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack:///./node_modules/@popperjs/core/lib/createPopper.js","webpack:///./node_modules/@popperjs/core/lib/popper.js","webpack:///./node_modules/@popperjs/core/lib/popper-lite.js","webpack:///./node_modules/@popperjs/core/lib/index.js","webpack:///./node_modules/flowbite-datepicker/dist/main.cjs.js","webpack:///./src/components/accordion/index.ts","webpack:///./src/components/carousel/index.ts","webpack:///./src/components/clipboard/index.ts","webpack:///./src/components/collapse/index.ts","webpack:///./src/components/datepicker/index.ts","webpack:///./src/components/dial/index.ts","webpack:///./src/components/dismiss/index.ts","webpack:///./src/components/drawer/index.ts","webpack:///./src/components/dropdown/index.ts","webpack:///./src/components/index.ts","webpack:///./src/components/input-counter/index.ts","webpack:///./src/components/modal/index.ts","webpack:///./src/components/popover/index.ts","webpack:///./src/components/tabs/index.ts","webpack:///./src/components/tooltip/index.ts","webpack:///./src/dom/events.ts","webpack:///./src/dom/instances.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/index.turbo.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Flowbite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Flowbite\"] = factory();\n\telse\n\t\troot[\"Flowbite\"] = factory();\n})(self, function() {\nreturn ","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export { default as applyStyles } from \"./applyStyles.js\";\nexport { default as arrow } from \"./arrow.js\";\nexport { default as computeStyles } from \"./computeStyles.js\";\nexport { default as eventListeners } from \"./eventListeners.js\";\nexport { default as flip } from \"./flip.js\";\nexport { default as hide } from \"./hide.js\";\nexport { default as offset } from \"./offset.js\";\nexport { default as popperOffsets } from \"./popperOffsets.js\";\nexport { default as preventOverflow } from \"./preventOverflow.js\";","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nfunction _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nfunction _callSuper(t, o, e) {\n return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));\n}\nfunction _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nfunction _get() {\n return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {\n var p = _superPropBase(e, t);\n if (p) {\n var n = Object.getOwnPropertyDescriptor(p, t);\n return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;\n }\n }, _get.apply(null, arguments);\n}\nfunction _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && _setPrototypeOf(t, e);\n}\nfunction _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function () {\n return !!t;\n })();\n}\nfunction _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return _assertThisInitialized(t);\n}\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nfunction _slicedToArray(r, e) {\n return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _superPropBase(t, o) {\n for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););\n return t;\n}\nfunction _toConsumableArray(r) {\n return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n}\n\nfunction hasProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction lastItemOf(arr) {\n return arr[arr.length - 1];\n}\n\n// push only the items not included in the array\nfunction pushUnique(arr) {\n for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n items[_key - 1] = arguments[_key];\n }\n items.forEach(function (item) {\n if (arr.includes(item)) {\n return;\n }\n arr.push(item);\n });\n return arr;\n}\nfunction stringToArray(str, separator) {\n // convert empty string to an empty array\n return str ? str.split(separator) : [];\n}\nfunction isInRange(testVal, min, max) {\n var minOK = min === undefined || testVal >= min;\n var maxOK = max === undefined || testVal <= max;\n return minOK && maxOK;\n}\nfunction limitToRange(val, min, max) {\n if (val < min) {\n return min;\n }\n if (val > max) {\n return max;\n }\n return val;\n}\nfunction createTagRepeat(tagName, repeat) {\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';\n var openTagSrc = Object.keys(attributes).reduce(function (src, attr) {\n var val = attributes[attr];\n if (typeof val === 'function') {\n val = val(index);\n }\n return \"\".concat(src, \" \").concat(attr, \"=\\\"\").concat(val, \"\\\"\");\n }, tagName);\n html += \"<\".concat(openTagSrc, \">\");\n var next = index + 1;\n return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html;\n}\n\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nfunction optimizeTemplateHTML(html) {\n return html.replace(/>\\s+/g, '>').replace(/\\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var baseDay = new Date(baseDate).getDay();\n return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n}\n\n// Get the ISO week of a date\nfunction getWeek(date) {\n // start of ISO week is Monday\n var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n // 1st week == the week where the 4th of January is in\n var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nfunction startOfYearPeriod(date, years) {\n /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n var year = new Date(date).getFullYear();\n return Math.floor(year / years) * years;\n}\n\n// pattern for format parts\nvar reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nvar reNonDateParts = /[\\s!-/:-@[-`{-~年月日]+/;\n// cache for persed formats\nvar knownFormats = {};\n// parse funtions for date parts\nvar parseFns = {\n y: function y(date, year) {\n return new Date(date).setFullYear(parseInt(year, 10));\n },\n m: function m(date, month, locale) {\n var newDate = new Date(date);\n var monthIndex = parseInt(month, 10) - 1;\n if (isNaN(monthIndex)) {\n if (!month) {\n return NaN;\n }\n var monthName = month.toLowerCase();\n var compareNames = function compareNames(name) {\n return name.toLowerCase().startsWith(monthName);\n };\n // compare with both short and full names because some locales have periods\n // in the short names (not equal to the first X letters of the full names)\n monthIndex = locale.monthsShort.findIndex(compareNames);\n if (monthIndex < 0) {\n monthIndex = locale.months.findIndex(compareNames);\n }\n if (monthIndex < 0) {\n return NaN;\n }\n }\n newDate.setMonth(monthIndex);\n return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime();\n },\n d: function d(date, day) {\n return new Date(date).setDate(parseInt(day, 10));\n }\n};\n// format functions for date parts\nvar formatFns = {\n d: function d(date) {\n return date.getDate();\n },\n dd: function dd(date) {\n return padZero(date.getDate(), 2);\n },\n D: function D(date, locale) {\n return locale.daysShort[date.getDay()];\n },\n DD: function DD(date, locale) {\n return locale.days[date.getDay()];\n },\n m: function m(date) {\n return date.getMonth() + 1;\n },\n mm: function mm(date) {\n return padZero(date.getMonth() + 1, 2);\n },\n M: function M(date, locale) {\n return locale.monthsShort[date.getMonth()];\n },\n MM: function MM(date, locale) {\n return locale.months[date.getMonth()];\n },\n y: function y(date) {\n return date.getFullYear();\n },\n yy: function yy(date) {\n return padZero(date.getFullYear(), 2).slice(-2);\n },\n yyyy: function yyyy(date) {\n return padZero(date.getFullYear(), 4);\n }\n};\n\n// get month index in normal range (0 - 11) from any number\nfunction normalizeMonth(monthIndex) {\n return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n}\nfunction padZero(num, length) {\n return num.toString().padStart(length, '0');\n}\nfunction parseFormatString(format) {\n if (typeof format !== 'string') {\n throw new Error(\"Invalid date format.\");\n }\n if (format in knownFormats) {\n return knownFormats[format];\n }\n\n // sprit the format string into parts and seprators\n var separators = format.split(reFormatTokens);\n var parts = format.match(new RegExp(reFormatTokens, 'g'));\n if (separators.length === 0 || !parts) {\n throw new Error(\"Invalid date format.\");\n }\n\n // collect format functions used in the format\n var partFormatters = parts.map(function (token) {\n return formatFns[token];\n });\n\n // collect parse function keys used in the format\n // iterate over parseFns' keys in order to keep the order of the keys.\n var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) {\n var token = parts.find(function (part) {\n return part[0] !== 'D' && part[0].toLowerCase() === key;\n });\n if (token) {\n keys.push(key);\n }\n return keys;\n }, []);\n return knownFormats[format] = {\n parser: function parser(dateStr, locale) {\n var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) {\n if (part.length > 0 && parts[index]) {\n var token = parts[index][0];\n if (token === 'M') {\n dtParts.m = part;\n } else if (token !== 'D') {\n dtParts[token] = part;\n }\n }\n return dtParts;\n }, {});\n\n // iterate over partParserkeys so that the parsing is made in the oder\n // of year, month and day to prevent the day parser from correcting last\n // day of month wrongly\n return partParserKeys.reduce(function (origDate, key) {\n var newDate = parseFns[key](origDate, dateParts[key], locale);\n // ingnore the part failed to parse\n return isNaN(newDate) ? origDate : newDate;\n }, today());\n },\n formatter: function formatter(date, locale) {\n var dateStr = partFormatters.reduce(function (str, fn, index) {\n return str += \"\".concat(separators[index]).concat(fn(date, locale));\n }, '');\n // separators' length is always parts' length + 1,\n return dateStr += lastItemOf(separators);\n }\n };\n}\nfunction parseDate(dateStr, format, locale) {\n if (dateStr instanceof Date || typeof dateStr === 'number') {\n var date = stripTime(dateStr);\n return isNaN(date) ? undefined : date;\n }\n if (!dateStr) {\n return undefined;\n }\n if (dateStr === 'today') {\n return today();\n }\n if (format && format.toValue) {\n var _date = format.toValue(dateStr, format, locale);\n return isNaN(_date) ? undefined : stripTime(_date);\n }\n return parseFormatString(format).parser(dateStr, locale);\n}\nfunction formatDate(date, format, locale) {\n if (isNaN(date) || !date && date !== 0) {\n return '';\n }\n var dateObj = typeof date === 'number' ? new Date(date) : date;\n if (format.toDisplay) {\n return format.toDisplay(dateObj, format, locale);\n }\n return parseFormatString(format).formatter(dateObj, locale);\n}\n\nvar listenerRegistry = new WeakMap();\nvar _EventTarget$prototyp = EventTarget.prototype,\n addEventListener = _EventTarget$prototyp.addEventListener,\n removeEventListener = _EventTarget$prototyp.removeEventListener;\n\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n// - each definition must be a flat array of event target and the arguments\n// used to call addEventListener() on the target\nfunction registerListeners(keyObj, listeners) {\n var registered = listenerRegistry.get(keyObj);\n if (!registered) {\n registered = [];\n listenerRegistry.set(keyObj, registered);\n }\n listeners.forEach(function (listener) {\n addEventListener.call.apply(addEventListener, _toConsumableArray(listener));\n registered.push(listener);\n });\n}\nfunction unregisterListeners(keyObj) {\n var listeners = listenerRegistry.get(keyObj);\n if (!listeners) {\n return;\n }\n listeners.forEach(function (listener) {\n removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener));\n });\n listenerRegistry[\"delete\"](keyObj);\n}\n\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n var getComposedPath = function getComposedPath(node) {\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n path.push(node);\n var parent;\n if (node.parentNode) {\n parent = node.parentNode;\n } else if (node.host) {\n // ShadowRoot\n parent = node.host;\n } else if (node.defaultView) {\n // Document\n parent = node.defaultView;\n }\n return parent ? getComposedPath(parent, path) : path;\n };\n Event.prototype.composedPath = function () {\n return getComposedPath(this.target);\n };\n}\nfunction findFromPath(path, criteria, currentTarget) {\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var el = path[index];\n if (criteria(el)) {\n return el;\n } else if (el === currentTarget || !el.parentElement) {\n // stop when reaching currentTarget or \n return;\n }\n return findFromPath(path, criteria, currentTarget, index + 1);\n}\n\n// Search for the actual target of a delegated event\nfunction findElementInEventPath(ev, selector) {\n var criteria = typeof selector === 'function' ? selector : function (el) {\n return el.matches(selector);\n };\n return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n\n// default locales\nvar locales = {\n en: {\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n today: \"Today\",\n clear: \"Clear\",\n titleFormat: \"MM y\"\n }\n};\n\n// config options updatable by setOptions() and their default values\nvar defaultOptions = {\n autohide: false,\n beforeShowDay: null,\n beforeShowDecade: null,\n beforeShowMonth: null,\n beforeShowYear: null,\n calendarWeeks: false,\n clearBtn: false,\n dateDelimiter: ',',\n datesDisabled: [],\n daysOfWeekDisabled: [],\n daysOfWeekHighlighted: [],\n defaultViewDate: undefined,\n // placeholder, defaults to today() by the program\n disableTouchKeyboard: false,\n format: 'mm/dd/yyyy',\n language: 'en',\n maxDate: null,\n maxNumberOfDates: 1,\n maxView: 3,\n minDate: null,\n nextArrow: '',\n orientation: 'auto',\n pickLevel: 0,\n prevArrow: '',\n showDaysOfWeek: true,\n showOnClick: true,\n showOnFocus: true,\n startView: 0,\n title: '',\n todayBtn: false,\n todayBtnMode: 0,\n todayHighlight: false,\n updateOnBlur: true,\n weekStart: 0\n};\n\nvar range = document.createRange();\nfunction parseHTML(html) {\n return range.createContextualFragment(html);\n}\nfunction hideElement(el) {\n if (el.style.display === 'none') {\n return;\n }\n // back up the existing display setting in data-style-display\n if (el.style.display) {\n el.dataset.styleDisplay = el.style.display;\n }\n el.style.display = 'none';\n}\nfunction showElement(el) {\n if (el.style.display !== 'none') {\n return;\n }\n if (el.dataset.styleDisplay) {\n // restore backed-up dispay property\n el.style.display = el.dataset.styleDisplay;\n delete el.dataset.styleDisplay;\n } else {\n el.style.display = '';\n }\n}\nfunction emptyChildNodes(el) {\n if (el.firstChild) {\n el.removeChild(el.firstChild);\n emptyChildNodes(el);\n }\n}\nfunction replaceChildNodes(el, newChildNodes) {\n emptyChildNodes(el);\n if (newChildNodes instanceof DocumentFragment) {\n el.appendChild(newChildNodes);\n } else if (typeof newChildNodes === 'string') {\n el.appendChild(parseHTML(newChildNodes));\n } else if (typeof newChildNodes.forEach === 'function') {\n newChildNodes.forEach(function (node) {\n el.appendChild(node);\n });\n }\n}\n\nvar defaultLang = defaultOptions.language,\n defaultFormat = defaultOptions.format,\n defaultWeekStart = defaultOptions.weekStart;\n\n// Reducer function to filter out invalid day-of-week from the input\nfunction sanitizeDOW(dow, day) {\n return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow;\n}\nfunction calcEndOfWeek(startOfWeek) {\n return (startOfWeek + 6) % 7;\n}\n\n// validate input date. if invalid, fallback to the original value\nfunction validateDate(value, format, locale, origValue) {\n var date = parseDate(value, format, locale);\n return date !== undefined ? date : origValue;\n}\n\n// Validate viewId. if invalid, fallback to the original value\nfunction validateViewId(value, origValue) {\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;\n var viewId = parseInt(value, 10);\n return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n\n// Create Datepicker configuration to set\nfunction processOptions(options, datepicker) {\n var inOpts = Object.assign({}, options);\n var config = {};\n var locales = datepicker.constructor.locales;\n var _ref = datepicker.config || {},\n format = _ref.format,\n language = _ref.language,\n locale = _ref.locale,\n maxDate = _ref.maxDate,\n maxView = _ref.maxView,\n minDate = _ref.minDate,\n pickLevel = _ref.pickLevel,\n startView = _ref.startView,\n weekStart = _ref.weekStart;\n if (inOpts.language) {\n var lang;\n if (inOpts.language !== language) {\n if (locales[inOpts.language]) {\n lang = inOpts.language;\n } else {\n // Check if langauge + region tag can fallback to the one without\n // region (e.g. fr-CA → fr)\n lang = inOpts.language.split('-')[0];\n if (locales[lang] === undefined) {\n lang = false;\n }\n }\n }\n delete inOpts.language;\n if (lang) {\n language = config.language = lang;\n\n // update locale as well when updating language\n var origLocale = locale || locales[defaultLang];\n // use default language's properties for the fallback\n locale = Object.assign({\n format: defaultFormat,\n weekStart: defaultWeekStart\n }, locales[defaultLang]);\n if (language !== defaultLang) {\n Object.assign(locale, locales[language]);\n }\n config.locale = locale;\n // if format and/or weekStart are the same as old locale's defaults,\n // update them to new locale's defaults\n if (format === origLocale.format) {\n format = config.format = locale.format;\n }\n if (weekStart === origLocale.weekStart) {\n weekStart = config.weekStart = locale.weekStart;\n config.weekEnd = calcEndOfWeek(locale.weekStart);\n }\n }\n }\n if (inOpts.format) {\n var hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n var hasToValue = typeof inOpts.format.toValue === 'function';\n var validFormatString = reFormatTokens.test(inOpts.format);\n if (hasToDisplay && hasToValue || validFormatString) {\n format = config.format = inOpts.format;\n }\n delete inOpts.format;\n }\n\n //*** dates ***//\n // while min and maxDate for \"no limit\" in the options are better to be null\n // (especially when updating), the ones in the config have to be undefined\n // because null is treated as 0 (= unix epoch) when comparing with time value\n var minDt = minDate;\n var maxDt = maxDate;\n if (inOpts.minDate !== undefined) {\n minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n : validateDate(inOpts.minDate, format, locale, minDt);\n delete inOpts.minDate;\n }\n if (inOpts.maxDate !== undefined) {\n maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt);\n delete inOpts.maxDate;\n }\n if (maxDt < minDt) {\n minDate = config.minDate = maxDt;\n maxDate = config.maxDate = minDt;\n } else {\n if (minDate !== minDt) {\n minDate = config.minDate = minDt;\n }\n if (maxDate !== maxDt) {\n maxDate = config.maxDate = maxDt;\n }\n }\n if (inOpts.datesDisabled) {\n config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) {\n var date = parseDate(dt, format, locale);\n return date !== undefined ? pushUnique(dates, date) : dates;\n }, []);\n delete inOpts.datesDisabled;\n }\n if (inOpts.defaultViewDate !== undefined) {\n var viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n if (viewDate !== undefined) {\n config.defaultViewDate = viewDate;\n }\n delete inOpts.defaultViewDate;\n }\n\n //*** days of week ***//\n if (inOpts.weekStart !== undefined) {\n var wkStart = Number(inOpts.weekStart) % 7;\n if (!isNaN(wkStart)) {\n weekStart = config.weekStart = wkStart;\n config.weekEnd = calcEndOfWeek(wkStart);\n }\n delete inOpts.weekStart;\n }\n if (inOpts.daysOfWeekDisabled) {\n config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekDisabled;\n }\n if (inOpts.daysOfWeekHighlighted) {\n config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekHighlighted;\n }\n\n //*** multi date ***//\n if (inOpts.maxNumberOfDates !== undefined) {\n var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n if (maxNumberOfDates >= 0) {\n config.maxNumberOfDates = maxNumberOfDates;\n config.multidate = maxNumberOfDates !== 1;\n }\n delete inOpts.maxNumberOfDates;\n }\n if (inOpts.dateDelimiter) {\n config.dateDelimiter = String(inOpts.dateDelimiter);\n delete inOpts.dateDelimiter;\n }\n\n //*** pick level & view ***//\n var newPickLevel = pickLevel;\n if (inOpts.pickLevel !== undefined) {\n newPickLevel = validateViewId(inOpts.pickLevel, 2);\n delete inOpts.pickLevel;\n }\n if (newPickLevel !== pickLevel) {\n pickLevel = config.pickLevel = newPickLevel;\n }\n var newMaxView = maxView;\n if (inOpts.maxView !== undefined) {\n newMaxView = validateViewId(inOpts.maxView, maxView);\n delete inOpts.maxView;\n }\n // ensure max view >= pick level\n newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n if (newMaxView !== maxView) {\n maxView = config.maxView = newMaxView;\n }\n var newStartView = startView;\n if (inOpts.startView !== undefined) {\n newStartView = validateViewId(inOpts.startView, newStartView);\n delete inOpts.startView;\n }\n // ensure pick level <= start view <= max view\n if (newStartView < pickLevel) {\n newStartView = pickLevel;\n } else if (newStartView > maxView) {\n newStartView = maxView;\n }\n if (newStartView !== startView) {\n config.startView = newStartView;\n }\n\n //*** template ***//\n if (inOpts.prevArrow) {\n var prevArrow = parseHTML(inOpts.prevArrow);\n if (prevArrow.childNodes.length > 0) {\n config.prevArrow = prevArrow.childNodes;\n }\n delete inOpts.prevArrow;\n }\n if (inOpts.nextArrow) {\n var nextArrow = parseHTML(inOpts.nextArrow);\n if (nextArrow.childNodes.length > 0) {\n config.nextArrow = nextArrow.childNodes;\n }\n delete inOpts.nextArrow;\n }\n\n //*** misc ***//\n if (inOpts.disableTouchKeyboard !== undefined) {\n config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n delete inOpts.disableTouchKeyboard;\n }\n if (inOpts.orientation) {\n var orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n config.orientation = {\n x: orientation.find(function (x) {\n return x === 'left' || x === 'right';\n }) || 'auto',\n y: orientation.find(function (y) {\n return y === 'top' || y === 'bottom';\n }) || 'auto'\n };\n delete inOpts.orientation;\n }\n if (inOpts.todayBtnMode !== undefined) {\n switch (inOpts.todayBtnMode) {\n case 0:\n case 1:\n config.todayBtnMode = inOpts.todayBtnMode;\n }\n delete inOpts.todayBtnMode;\n }\n\n //*** copy the rest ***//\n Object.keys(inOpts).forEach(function (key) {\n if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) {\n config[key] = inOpts[key];\n }\n });\n return config;\n}\n\nvar pickerTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n \\n
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \");\n\nvar daysTemplate = optimizeTemplateHTML(\"
    \\n
    \".concat(createTagRepeat('span', 7, {\n \"class\": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \").concat(createTagRepeat('span', 42, {\n \"class\": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'\n}), \"
    \\n
    \"));\n\nvar calendarWeeksTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \".concat(createTagRepeat('span', 6, {\n \"class\": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \"));\n\n// Base class of the view classes\nvar View = /*#__PURE__*/function () {\n function View(picker, config) {\n _classCallCheck(this, View);\n Object.assign(this, config, {\n picker: picker,\n element: parseHTML(\"
    \").firstChild,\n selected: []\n });\n this.init(this.picker.datepicker.config);\n }\n return _createClass(View, [{\n key: \"init\",\n value: function init(options) {\n if (options.pickLevel !== undefined) {\n this.isMinView = this.id === options.pickLevel;\n }\n this.setOptions(options);\n this.updateFocus();\n this.updateSelection();\n }\n\n // Execute beforeShow() callback and apply the result to the element\n // args:\n // - current - current value on the iteration on view rendering\n // - timeValue - time value of the date to pass to beforeShow()\n }, {\n key: \"performBeforeHook\",\n value: function performBeforeHook(el, current, timeValue) {\n var result = this.beforeShow(new Date(timeValue));\n switch (_typeof(result)) {\n case 'boolean':\n result = {\n enabled: result\n };\n break;\n case 'string':\n result = {\n classes: result\n };\n }\n if (result) {\n if (result.enabled === false) {\n el.classList.add('disabled');\n pushUnique(this.disabled, current);\n }\n if (result.classes) {\n var _el$classList;\n var extraClasses = result.classes.split(/\\s+/);\n (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses));\n if (extraClasses.includes('disabled')) {\n pushUnique(this.disabled, current);\n }\n }\n if (result.content) {\n replaceChildNodes(el, result.content);\n }\n }\n }\n }]);\n}();\n\nvar DaysView = /*#__PURE__*/function (_View) {\n function DaysView(picker) {\n _classCallCheck(this, DaysView);\n return _callSuper(this, DaysView, [picker, {\n id: 0,\n name: 'days',\n cellClass: 'day'\n }]);\n }\n _inherits(DaysView, _View);\n return _createClass(DaysView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n var inner = parseHTML(daysTemplate).firstChild;\n this.dow = inner.firstChild;\n this.grid = inner.lastChild;\n this.element.appendChild(inner);\n }\n _get(_getPrototypeOf(DaysView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var _this = this;\n var updateDOW;\n if (hasProperty(options, 'minDate')) {\n this.minDate = options.minDate;\n }\n if (hasProperty(options, 'maxDate')) {\n this.maxDate = options.maxDate;\n }\n if (options.datesDisabled) {\n this.datesDisabled = options.datesDisabled;\n }\n if (options.daysOfWeekDisabled) {\n this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n updateDOW = true;\n }\n if (options.daysOfWeekHighlighted) {\n this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n }\n if (options.todayHighlight !== undefined) {\n this.todayHighlight = options.todayHighlight;\n }\n if (options.weekStart !== undefined) {\n this.weekStart = options.weekStart;\n this.weekEnd = options.weekEnd;\n updateDOW = true;\n }\n if (options.locale) {\n var locale = this.locale = options.locale;\n this.dayNames = locale.daysMin;\n this.switchLabelFormat = locale.titleFormat;\n updateDOW = true;\n }\n if (options.beforeShowDay !== undefined) {\n this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined;\n }\n if (options.calendarWeeks !== undefined) {\n if (options.calendarWeeks && !this.calendarWeeks) {\n var weeksElem = parseHTML(calendarWeeksTemplate).firstChild;\n this.calendarWeeks = {\n element: weeksElem,\n dow: weeksElem.firstChild,\n weeks: weeksElem.lastChild\n };\n this.element.insertBefore(weeksElem, this.element.firstChild);\n } else if (this.calendarWeeks && !options.calendarWeeks) {\n this.element.removeChild(this.calendarWeeks.element);\n this.calendarWeeks = null;\n }\n }\n if (options.showDaysOfWeek !== undefined) {\n if (options.showDaysOfWeek) {\n showElement(this.dow);\n if (this.calendarWeeks) {\n showElement(this.calendarWeeks.dow);\n }\n } else {\n hideElement(this.dow);\n if (this.calendarWeeks) {\n hideElement(this.calendarWeeks.dow);\n }\n }\n }\n\n // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n if (updateDOW) {\n Array.from(this.dow.children).forEach(function (el, index) {\n var dow = (_this.weekStart + index) % 7;\n el.textContent = _this.dayNames[dow];\n el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n });\n }\n }\n\n // Apply update on the focused date to view's settings\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var viewYear = viewDate.getFullYear();\n var viewMonth = viewDate.getMonth();\n var firstOfMonth = dateValue(viewYear, viewMonth, 1);\n var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n this.first = firstOfMonth;\n this.last = dateValue(viewYear, viewMonth + 1, 0);\n this.start = start;\n this.focused = this.picker.viewDate;\n }\n\n // Apply update on the selected dates to view's settings\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates;\n if (rangepicker) {\n this.range = rangepicker.dates;\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // update today marker on ever render\n this.today = this.todayHighlight ? today() : undefined;\n // refresh disabled dates on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = _toConsumableArray(this.datesDisabled);\n var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale);\n this.picker.setViewSwitchLabel(switchLabel);\n this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n if (this.calendarWeeks) {\n // start of the UTC week (Monday) of the 1st of the month\n var startOfWeek = dayOfTheWeekOf(this.first, 1, 1);\n Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) {\n el.textContent = getWeek(addWeeks(startOfWeek, index));\n });\n }\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = addDays(_this2.start, index);\n var date = new Date(current);\n var day = date.getDay();\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n el.dataset.date = current;\n el.textContent = date.getDate();\n if (current < _this2.first) {\n classList.add('prev', 'text-gray-500', 'dark:text-white');\n } else if (current > _this2.last) {\n classList.add('next', 'text-gray-500', 'dark:text-white');\n }\n if (_this2.today === current) {\n classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n }\n if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n }\n if (_this2.daysOfWeekDisabled.includes(day)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n pushUnique(_this2.disabled, current);\n }\n if (_this2.daysOfWeekHighlighted.includes(day)) {\n classList.add('highlighted');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg', 'rounded-r-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg', 'rounded-l-lg');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, current);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused');\n el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.dataset.date);\n var classList = el.classList;\n classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg');\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / 86400000);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction computeMonthRange(range, thisYear) {\n if (!range || !range[0] || !range[1]) {\n return;\n }\n var _range = _slicedToArray(range, 2),\n _range$ = _slicedToArray(_range[0], 2),\n startY = _range$[0],\n startM = _range$[1],\n _range$2 = _slicedToArray(_range[1], 2),\n endY = _range$2[0],\n endM = _range$2[1];\n if (startY > thisYear || endY < thisYear) {\n return;\n }\n return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12];\n}\nvar MonthsView = /*#__PURE__*/function (_View) {\n function MonthsView(picker) {\n _classCallCheck(this, MonthsView);\n return _callSuper(this, MonthsView, [picker, {\n id: 1,\n name: 'months',\n cellClass: 'month'\n }]);\n }\n _inherits(MonthsView, _View);\n return _createClass(MonthsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.grid = this.element;\n this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {\n 'data-month': function dataMonth(ix) {\n return ix;\n }\n })));\n }\n _get(_getPrototypeOf(MonthsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options.locale) {\n this.monthNames = options.locale.monthsShort;\n }\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minMonth = this.minDate = undefined;\n } else {\n var minDateObj = new Date(options.minDate);\n this.minYear = minDateObj.getFullYear();\n this.minMonth = minDateObj.getMonth();\n this.minDate = minDateObj.setDate(1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxMonth = this.maxDate = undefined;\n } else {\n var maxDateObj = new Date(options.maxDate);\n this.maxYear = maxDateObj.getFullYear();\n this.maxMonth = maxDateObj.getMonth();\n this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n }\n }\n if (options.beforeShowMonth !== undefined) {\n this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n this.year = viewDate.getFullYear();\n this.focused = viewDate.getMonth();\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (selected, timeValue) {\n var date = new Date(timeValue);\n var year = date.getFullYear();\n var month = date.getMonth();\n if (selected[year] === undefined) {\n selected[year] = [month];\n } else {\n pushUnique(selected[year], month);\n }\n return selected;\n }, {});\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n var date = new Date(timeValue);\n return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n // refresh disabled months on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(this.year);\n this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n var selected = this.selected[this.year] || [];\n var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n var isMinYear = this.year === this.minYear;\n var isMaxYear = this.year === this.maxYear;\n var range = computeMonthRange(this.range, this.year);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var date = dateValue(_this.year, index, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this.cellClass);\n if (_this.isMinView) {\n el.dataset.date = date;\n }\n // reset text on every render to clear the custom content set\n // by beforeShow hook at previous render\n el.textContent = _this.monthNames[index];\n if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) {\n classList.add('disabled');\n }\n if (range) {\n var _range2 = _slicedToArray(range, 2),\n rangeStart = _range2[0],\n rangeEnd = _range2[1];\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this.focused) {\n classList.add('focused');\n }\n if (_this.beforeShow) {\n _this.performBeforeHook(el, index, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this2 = this;\n var selected = this.selected[this.year] || [];\n var _ref = computeMonthRange(this.range, this.year) || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused');\n el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n });\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this2.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[this.focused].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction toTitleCase(word) {\n return _toConsumableArray(word).reduce(function (str, ch, ix) {\n return str += ix ? ch : ch.toUpperCase();\n }, '');\n}\n\n// Class representing the years and decades view elements\nvar YearsView = /*#__PURE__*/function (_View) {\n function YearsView(picker, config) {\n _classCallCheck(this, YearsView);\n return _callSuper(this, YearsView, [picker, config]);\n }\n _inherits(YearsView, _View);\n return _createClass(YearsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.navStep = this.step * 10;\n this.beforeShowOption = \"beforeShow\".concat(toTitleCase(this.cellClass));\n this.grid = this.element;\n this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n }\n _get(_getPrototypeOf(YearsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minDate = undefined;\n } else {\n this.minYear = startOfYearPeriod(options.minDate, this.step);\n this.minDate = dateValue(this.minYear, 0, 1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxDate = undefined;\n } else {\n this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n this.maxDate = dateValue(this.maxYear, 11, 31);\n }\n }\n if (options[this.beforeShowOption] !== undefined) {\n var beforeShow = options[this.beforeShowOption];\n this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var first = startOfYearPeriod(viewDate, this.navStep);\n var last = first + 9 * this.step;\n this.first = first;\n this.last = last;\n this.start = first - this.step;\n this.focused = startOfYearPeriod(viewDate, this.step);\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this = this;\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (years, timeValue) {\n return pushUnique(years, startOfYearPeriod(timeValue, _this.step));\n }, []);\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n if (timeValue !== undefined) {\n return startOfYearPeriod(timeValue, _this.step);\n }\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // refresh disabled years on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(\"\".concat(this.first, \"-\").concat(this.last));\n this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = _this2.start + index * _this2.step;\n var date = dateValue(current, 0, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n if (_this2.isMinView) {\n el.dataset.date = date;\n }\n el.textContent = el.dataset.year = current;\n if (index === 0) {\n classList.add('prev');\n } else if (index === 11) {\n classList.add('next');\n }\n if (current < _this2.minYear || current > _this2.maxYear) {\n classList.add('disabled');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.textContent);\n var classList = el.classList;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / this.step);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction triggerDatepickerEvent(datepicker, type) {\n var detail = {\n date: datepicker.getDate(),\n viewDate: new Date(datepicker.picker.viewDate),\n viewId: datepicker.picker.currentView.id,\n datepicker: datepicker\n };\n datepicker.element.dispatchEvent(new CustomEvent(type, {\n detail: detail\n }));\n}\n\n// direction: -1 (to previous), 1 (to next)\nfunction goToPrevOrNext(datepicker, direction) {\n var _datepicker$config = datepicker.config,\n minDate = _datepicker$config.minDate,\n maxDate = _datepicker$config.maxDate;\n var _datepicker$picker = datepicker.picker,\n currentView = _datepicker$picker.currentView,\n viewDate = _datepicker$picker.viewDate;\n var newViewDate;\n switch (currentView.id) {\n case 0:\n newViewDate = addMonths(viewDate, direction);\n break;\n case 1:\n newViewDate = addYears(viewDate, direction);\n break;\n default:\n newViewDate = addYears(viewDate, direction * currentView.navStep);\n }\n newViewDate = limitToRange(newViewDate, minDate, maxDate);\n datepicker.picker.changeFocus(newViewDate).render();\n}\nfunction switchView(datepicker) {\n var viewId = datepicker.picker.currentView.id;\n if (viewId === datepicker.config.maxView) {\n return;\n }\n datepicker.picker.changeView(viewId + 1).render();\n}\nfunction unfocus(datepicker) {\n if (datepicker.config.updateOnBlur) {\n datepicker.update({\n autohide: true\n });\n } else {\n datepicker.refresh('input');\n datepicker.hide();\n }\n}\n\nfunction goToSelectedMonthOrYear(datepicker, selection) {\n var picker = datepicker.picker;\n var viewDate = new Date(picker.viewDate);\n var viewId = picker.currentView.id;\n var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear());\n picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\nfunction onClickTodayBtn(datepicker) {\n var picker = datepicker.picker;\n var currentDate = today();\n if (datepicker.config.todayBtnMode === 1) {\n if (datepicker.config.autohide) {\n datepicker.setDate(currentDate);\n return;\n }\n datepicker.setDate(currentDate, {\n render: false\n });\n picker.update();\n }\n if (picker.viewDate !== currentDate) {\n picker.changeFocus(currentDate);\n }\n picker.changeView(0).render();\n}\nfunction onClickClearBtn(datepicker) {\n datepicker.setDate({\n clear: true\n });\n}\nfunction onClickViewSwitch(datepicker) {\n switchView(datepicker);\n}\nfunction onClickPrevBtn(datepicker) {\n goToPrevOrNext(datepicker, -1);\n}\nfunction onClickNextBtn(datepicker) {\n goToPrevOrNext(datepicker, 1);\n}\n\n// For the picker's main block to delegete the events from `datepicker-cell`s\nfunction onClickView(datepicker, ev) {\n var target = findElementInEventPath(ev, '.datepicker-cell');\n if (!target || target.classList.contains('disabled')) {\n return;\n }\n var _datepicker$picker$cu = datepicker.picker.currentView,\n id = _datepicker$picker$cu.id,\n isMinView = _datepicker$picker$cu.isMinView;\n if (isMinView) {\n datepicker.setDate(Number(target.dataset.date));\n } else if (id === 1) {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n } else {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n }\n}\nfunction onClickPicker(datepicker) {\n if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.focus();\n }\n}\n\nfunction processPickerOptions(picker, options) {\n if (options.title !== undefined) {\n if (options.title) {\n picker.controls.title.textContent = options.title;\n showElement(picker.controls.title);\n } else {\n picker.controls.title.textContent = '';\n hideElement(picker.controls.title);\n }\n }\n if (options.prevArrow) {\n var prevBtn = picker.controls.prevBtn;\n emptyChildNodes(prevBtn);\n options.prevArrow.forEach(function (node) {\n prevBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.nextArrow) {\n var nextBtn = picker.controls.nextBtn;\n emptyChildNodes(nextBtn);\n options.nextArrow.forEach(function (node) {\n nextBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.locale) {\n picker.controls.todayBtn.textContent = options.locale.today;\n picker.controls.clearBtn.textContent = options.locale.clear;\n }\n if (options.todayBtn !== undefined) {\n if (options.todayBtn) {\n showElement(picker.controls.todayBtn);\n } else {\n hideElement(picker.controls.todayBtn);\n }\n }\n if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) {\n var _picker$datepicker$co = picker.datepicker.config,\n minDate = _picker$datepicker$co.minDate,\n maxDate = _picker$datepicker$co.maxDate;\n picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate);\n }\n if (options.clearBtn !== undefined) {\n if (options.clearBtn) {\n showElement(picker.controls.clearBtn);\n } else {\n hideElement(picker.controls.clearBtn);\n }\n }\n}\n\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction computeResetViewDate(datepicker) {\n var dates = datepicker.dates,\n config = datepicker.config;\n var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate;\n return limitToRange(viewDate, config.minDate, config.maxDate);\n}\n\n// Change current view's view date\nfunction setViewDate(picker, newDate) {\n var oldViewDate = new Date(picker.viewDate);\n var newViewDate = new Date(newDate);\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n year = _picker$currentView.year,\n first = _picker$currentView.first,\n last = _picker$currentView.last;\n var viewYear = newViewDate.getFullYear();\n picker.viewDate = newDate;\n if (viewYear !== oldViewDate.getFullYear()) {\n triggerDatepickerEvent(picker.datepicker, 'changeYear');\n }\n if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n }\n\n // return whether the new date is in different period on time from the one\n // displayed in the current view\n // when true, the view needs to be re-rendered on the next UI refresh.\n switch (id) {\n case 0:\n return newDate < first || newDate > last;\n case 1:\n return viewYear !== year;\n default:\n return viewYear < first || viewYear > last;\n }\n}\nfunction getTextDirection(el) {\n return window.getComputedStyle(el).direction;\n}\n\n// Class representing the picker UI\nvar Picker = /*#__PURE__*/function () {\n function Picker(datepicker) {\n _classCallCheck(this, Picker);\n this.datepicker = datepicker;\n var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n var element = this.element = parseHTML(template).firstChild;\n var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3),\n header = _element$firstChild$c[0],\n main = _element$firstChild$c[1],\n footer = _element$firstChild$c[2];\n var title = header.firstElementChild;\n var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3),\n prevBtn = _header$lastElementCh[0],\n viewSwitch = _header$lastElementCh[1],\n nextBtn = _header$lastElementCh[2];\n var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2),\n todayBtn = _footer$firstChild$ch[0],\n clearBtn = _footer$firstChild$ch[1];\n var controls = {\n title: title,\n prevBtn: prevBtn,\n viewSwitch: viewSwitch,\n nextBtn: nextBtn,\n todayBtn: todayBtn,\n clearBtn: clearBtn\n };\n this.main = main;\n this.controls = controls;\n var elementClass = datepicker.inline ? 'inline' : 'dropdown';\n element.classList.add(\"datepicker-\".concat(elementClass));\n elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null;\n processPickerOptions(this, datepicker.config);\n this.viewDate = computeResetViewDate(datepicker);\n\n // set up event listeners\n registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), {\n capture: true\n }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]);\n\n // set up views\n this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {\n id: 2,\n name: 'years',\n cellClass: 'year',\n step: 1\n }), new YearsView(this, {\n id: 3,\n name: 'decades',\n cellClass: 'decade',\n step: 10\n })];\n this.currentView = this.views[datepicker.config.startView];\n this.currentView.render();\n this.main.appendChild(this.currentView.element);\n datepicker.config.container.appendChild(this.element);\n }\n return _createClass(Picker, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n processPickerOptions(this, options);\n this.views.forEach(function (view) {\n view.init(options, false);\n });\n this.currentView.render();\n }\n }, {\n key: \"detach\",\n value: function detach() {\n this.datepicker.config.container.removeChild(this.element);\n }\n }, {\n key: \"show\",\n value: function show() {\n if (this.active) {\n return;\n }\n this.element.classList.add('active', 'block');\n this.element.classList.remove('hidden');\n this.active = true;\n var datepicker = this.datepicker;\n if (!datepicker.inline) {\n // ensure picker's direction matches input's\n var inputDirection = getTextDirection(datepicker.inputField);\n if (inputDirection !== getTextDirection(datepicker.config.container)) {\n this.element.dir = inputDirection;\n } else if (this.element.dir) {\n this.element.removeAttribute('dir');\n }\n this.place();\n if (datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.blur();\n }\n }\n triggerDatepickerEvent(datepicker, 'show');\n }\n }, {\n key: \"hide\",\n value: function hide() {\n if (!this.active) {\n return;\n }\n this.datepicker.exitEditMode();\n this.element.classList.remove('active', 'block');\n this.element.classList.add('active', 'block', 'hidden');\n this.active = false;\n triggerDatepickerEvent(this.datepicker, 'hide');\n }\n }, {\n key: \"place\",\n value: function place() {\n var _this$element = this.element,\n classList = _this$element.classList,\n style = _this$element.style;\n var _this$datepicker = this.datepicker,\n config = _this$datepicker.config,\n inputField = _this$datepicker.inputField;\n var container = config.container;\n var _this$element$getBoun = this.element.getBoundingClientRect(),\n calendarWidth = _this$element$getBoun.width,\n calendarHeight = _this$element$getBoun.height;\n var _container$getBoundin = container.getBoundingClientRect(),\n containerLeft = _container$getBoundin.left,\n containerTop = _container$getBoundin.top,\n containerWidth = _container$getBoundin.width;\n var _inputField$getBoundi = inputField.getBoundingClientRect(),\n inputLeft = _inputField$getBoundi.left,\n inputTop = _inputField$getBoundi.top,\n inputWidth = _inputField$getBoundi.width,\n inputHeight = _inputField$getBoundi.height;\n var _config$orientation = config.orientation,\n orientX = _config$orientation.x,\n orientY = _config$orientation.y;\n var scrollTop;\n var left;\n var top;\n if (container === document.body) {\n scrollTop = window.scrollY;\n left = inputLeft + window.scrollX;\n top = inputTop + scrollTop;\n } else {\n scrollTop = container.scrollTop;\n left = inputLeft - containerLeft;\n top = inputTop - containerTop + scrollTop;\n }\n if (orientX === 'auto') {\n if (left < 0) {\n // align to the left and move into visible area if input's left edge < window's\n orientX = 'left';\n left = 10;\n } else if (left + calendarWidth > containerWidth) {\n // align to the right if canlendar's right edge > container's\n orientX = 'right';\n } else {\n orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n }\n }\n if (orientX === 'right') {\n left -= calendarWidth - inputWidth;\n }\n if (orientY === 'auto') {\n orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n }\n if (orientY === 'top') {\n top -= calendarHeight;\n } else {\n top += inputHeight;\n }\n classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left');\n classList.add(\"datepicker-orient-\".concat(orientY), \"datepicker-orient-\".concat(orientX));\n style.top = top ? \"\".concat(top, \"px\") : top;\n style.left = left ? \"\".concat(left, \"px\") : left;\n }\n }, {\n key: \"setViewSwitchLabel\",\n value: function setViewSwitchLabel(labelText) {\n this.controls.viewSwitch.textContent = labelText;\n }\n }, {\n key: \"setPrevBtnDisabled\",\n value: function setPrevBtnDisabled(disabled) {\n this.controls.prevBtn.disabled = disabled;\n }\n }, {\n key: \"setNextBtnDisabled\",\n value: function setNextBtnDisabled(disabled) {\n this.controls.nextBtn.disabled = disabled;\n }\n }, {\n key: \"changeView\",\n value: function changeView(viewId) {\n var oldView = this.currentView;\n var newView = this.views[viewId];\n if (newView.id !== oldView.id) {\n this.currentView = newView;\n this._renderMethod = 'render';\n triggerDatepickerEvent(this.datepicker, 'changeView');\n this.main.replaceChild(newView.element, oldView.element);\n }\n return this;\n }\n\n // Change the focused date (view date)\n }, {\n key: \"changeFocus\",\n value: function changeFocus(newViewDate) {\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n this.views.forEach(function (view) {\n view.updateFocus();\n });\n return this;\n }\n\n // Apply the change of the selected dates\n }, {\n key: \"update\",\n value: function update() {\n var newViewDate = computeResetViewDate(this.datepicker);\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n this.views.forEach(function (view) {\n view.updateFocus();\n view.updateSelection();\n });\n return this;\n }\n\n // Refresh the picker UI\n }, {\n key: \"render\",\n value: function render() {\n var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var renderMethod = quickRender && this._renderMethod || 'render';\n delete this._renderMethod;\n this.currentView[renderMethod]();\n }\n }]);\n}();\n\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n// - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n// - args: time value; retun: true if unavailable\nfunction findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n if (!isInRange(date, min, max)) {\n return;\n }\n if (testFn(date)) {\n var newDate = addFn(date, increase);\n return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n }\n return date;\n}\n\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction moveByArrowKey(datepicker, ev, direction, vertical) {\n var picker = datepicker.picker;\n var currentView = picker.currentView;\n var step = currentView.step || 1;\n var viewDate = picker.viewDate;\n var addFn;\n var testFn;\n switch (currentView.id) {\n case 0:\n if (vertical) {\n viewDate = addDays(viewDate, direction * 7);\n } else if (ev.ctrlKey || ev.metaKey) {\n viewDate = addYears(viewDate, direction);\n } else {\n viewDate = addDays(viewDate, direction);\n }\n addFn = addDays;\n testFn = function testFn(date) {\n return currentView.disabled.includes(date);\n };\n break;\n case 1:\n viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n addFn = addMonths;\n testFn = function testFn(date) {\n var dt = new Date(date);\n var year = currentView.year,\n disabled = currentView.disabled;\n return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n };\n break;\n default:\n viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n addFn = addYears;\n testFn = function testFn(date) {\n return currentView.disabled.includes(startOfYearPeriod(date, step));\n };\n }\n viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate);\n if (viewDate !== undefined) {\n picker.changeFocus(viewDate).render();\n }\n}\nfunction onKeydown(datepicker, ev) {\n if (ev.key === 'Tab') {\n unfocus(datepicker);\n return;\n }\n var picker = datepicker.picker;\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n isMinView = _picker$currentView.isMinView;\n if (!picker.active) {\n switch (ev.key) {\n case 'ArrowDown':\n case 'Escape':\n picker.show();\n break;\n case 'Enter':\n datepicker.update();\n break;\n default:\n return;\n }\n } else if (datepicker.editMode) {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'Enter':\n datepicker.exitEditMode({\n update: true,\n autohide: datepicker.config.autohide\n });\n break;\n default:\n return;\n }\n } else {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'ArrowLeft':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, -1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, false);\n }\n break;\n case 'ArrowRight':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, 1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, 1, false);\n }\n break;\n case 'ArrowUp':\n if (ev.ctrlKey || ev.metaKey) {\n switchView(datepicker);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, true);\n }\n break;\n case 'ArrowDown':\n if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n return;\n }\n moveByArrowKey(datepicker, ev, 1, true);\n break;\n case 'Enter':\n if (isMinView) {\n datepicker.setDate(picker.viewDate);\n } else {\n picker.changeView(id - 1).render();\n }\n break;\n case 'Backspace':\n case 'Delete':\n datepicker.enterEditMode();\n return;\n default:\n if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n }\n return;\n }\n }\n ev.preventDefault();\n ev.stopPropagation();\n}\nfunction onFocus(datepicker) {\n if (datepicker.config.showOnFocus && !datepicker._showing) {\n datepicker.show();\n }\n}\n\n// for the prevention for entering edit mode while getting focus on click\nfunction onMousedown(datepicker, ev) {\n var el = ev.target;\n if (datepicker.picker.active || datepicker.config.showOnClick) {\n el._active = el === document.activeElement;\n el._clicking = setTimeout(function () {\n delete el._active;\n delete el._clicking;\n }, 2000);\n }\n}\nfunction onClickInput(datepicker, ev) {\n var el = ev.target;\n if (!el._clicking) {\n return;\n }\n clearTimeout(el._clicking);\n delete el._clicking;\n if (el._active) {\n datepicker.enterEditMode();\n }\n delete el._active;\n if (datepicker.config.showOnClick) {\n datepicker.show();\n }\n}\nfunction onPaste(datepicker, ev) {\n if (ev.clipboardData.types.includes('text/plain')) {\n datepicker.enterEditMode();\n }\n}\n\n// for the `document` to delegate the events from outside the picker/input field\nfunction onClickOutside(datepicker, ev) {\n var element = datepicker.element;\n if (element !== document.activeElement) {\n return;\n }\n var pickerElem = datepicker.picker.element;\n if (findElementInEventPath(ev, function (el) {\n return el === element || el === pickerElem;\n })) {\n return;\n }\n unfocus(datepicker);\n}\n\nfunction stringifyDates(dates, config) {\n return dates.map(function (dt) {\n return formatDate(dt, config.format, config.locale);\n }).join(config.dateDelimiter);\n}\n\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction processInputDates(datepicker, inputDates) {\n var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var config = datepicker.config,\n origDates = datepicker.dates,\n rangepicker = datepicker.rangepicker;\n if (inputDates.length === 0) {\n // empty input is considered valid unless origiDates is passed\n return clear ? [] : undefined;\n }\n var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n var newDates = inputDates.reduce(function (dates, dt) {\n var date = parseDate(dt, config.format, config.locale);\n if (date === undefined) {\n return dates;\n }\n if (config.pickLevel > 0) {\n // adjust to 1st of the month/Jan 1st of the year\n // or to the last day of the monh/Dec 31st of the year if the datepicker\n // is the range-end picker of a rangepicker\n var _dt = new Date(date);\n if (config.pickLevel === 1) {\n date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1);\n } else {\n date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1);\n }\n }\n if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) {\n dates.push(date);\n }\n return dates;\n }, []);\n if (newDates.length === 0) {\n return;\n }\n if (config.multidate && !clear) {\n // get the synmetric difference between origDates and newDates\n newDates = newDates.reduce(function (dates, date) {\n if (!origDates.includes(date)) {\n dates.push(date);\n }\n return dates;\n }, origDates.filter(function (date) {\n return !newDates.includes(date);\n }));\n }\n // do length check always because user can input multiple dates regardless of the mode\n return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates;\n}\n\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction refreshUI(datepicker) {\n var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var config = datepicker.config,\n picker = datepicker.picker,\n inputField = datepicker.inputField;\n if (mode & 2) {\n var newView = picker.active ? config.pickLevel : config.startView;\n picker.update().changeView(newView).render(quickRender);\n }\n if (mode & 1 && inputField) {\n inputField.value = stringifyDates(datepicker.dates, config);\n }\n}\nfunction _setDate(datepicker, inputDates, options) {\n var clear = options.clear,\n render = options.render,\n autohide = options.autohide;\n if (render === undefined) {\n render = true;\n }\n if (!render) {\n autohide = false;\n } else if (autohide === undefined) {\n autohide = datepicker.config.autohide;\n }\n var newDates = processInputDates(datepicker, inputDates, clear);\n if (!newDates) {\n return;\n }\n if (newDates.toString() !== datepicker.dates.toString()) {\n datepicker.dates = newDates;\n refreshUI(datepicker, render ? 3 : 1);\n triggerDatepickerEvent(datepicker, 'changeDate');\n } else {\n refreshUI(datepicker, 1);\n }\n if (autohide) {\n datepicker.hide();\n }\n}\n\n/**\n * Class representing a date picker\n */\nvar Datepicker = /*#__PURE__*/function () {\n /**\n * Create a date picker\n * @param {Element} element - element to bind a date picker\n * @param {Object} [options] - config options\n * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the\n * date picker belongs to. Use this only when creating date picker as a part\n * of date range picker\n */\n function Datepicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n _classCallCheck(this, Datepicker);\n element.datepicker = this;\n this.element = element;\n\n // set up config\n var config = this.config = Object.assign({\n buttonClass: options.buttonClass && String(options.buttonClass) || 'button',\n container: document.body,\n defaultViewDate: today(),\n maxDate: undefined,\n minDate: undefined\n }, processOptions(defaultOptions, this));\n this._options = options;\n Object.assign(config, processOptions(options, this));\n\n // configure by type\n var inline = this.inline = element.tagName !== 'INPUT';\n var inputField;\n var initialDates;\n if (inline) {\n config.container = element;\n initialDates = stringToArray(element.dataset.date, config.dateDelimiter);\n delete element.dataset.date;\n } else {\n var container = options.container ? document.querySelector(options.container) : null;\n if (container) {\n config.container = container;\n }\n inputField = this.inputField = element;\n inputField.classList.add('datepicker-input');\n initialDates = stringToArray(inputField.value, config.dateDelimiter);\n }\n if (rangepicker) {\n // check validiry\n var index = rangepicker.inputs.indexOf(inputField);\n var datepickers = rangepicker.datepickers;\n if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n throw Error('Invalid rangepicker object.');\n }\n // attach itaelf to the rangepicker here so that processInputDates() can\n // determine if this is the range-end picker of the rangepicker while\n // setting inital values when pickLevel > 0\n datepickers[index] = this;\n // add getter for rangepicker\n Object.defineProperty(this, 'rangepicker', {\n get: function get() {\n return rangepicker;\n }\n });\n }\n\n // set initial dates\n this.dates = [];\n // process initial value\n var inputDateValues = processInputDates(this, initialDates);\n if (inputDateValues && inputDateValues.length > 0) {\n this.dates = inputDateValues;\n }\n if (inputField) {\n inputField.value = stringifyDates(this.dates, config);\n }\n var picker = this.picker = new Picker(this);\n if (inline) {\n this.show();\n } else {\n // set up event listeners in other modes\n var onMousedownDocument = onClickOutside.bind(null, this);\n var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]];\n registerListeners(this, listeners);\n }\n }\n\n /**\n * Format Date object or time value in given format and language\n * @param {Date|Number} date - date or time value to format\n * @param {String|Object} format - format string or object that contains\n * toDisplay() custom formatter, whose signature is\n * - args:\n * - date: {Date} - Date instance of the date passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {String} formatted date\n * @param {String} [lang=en] - language code for the locale to use\n * @return {String} formatted date\n */\n return _createClass(Datepicker, [{\n key: \"active\",\n get:\n /**\n * @type {Boolean} - Whether the picker element is shown. `true` whne shown\n */\n function get() {\n return !!(this.picker && this.picker.active);\n }\n\n /**\n * @type {HTMLDivElement} - DOM object of picker element\n */\n }, {\n key: \"pickerElement\",\n get: function get() {\n return this.picker ? this.picker.element : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var picker = this.picker;\n var newOptions = processOptions(options, this);\n Object.assign(this._options, options);\n Object.assign(this.config, newOptions);\n picker.setOptions(newOptions);\n refreshUI(this, 3);\n }\n\n /**\n * Show the picker element\n */\n }, {\n key: \"show\",\n value: function show() {\n if (this.inputField) {\n if (this.inputField.disabled) {\n return;\n }\n if (this.inputField !== document.activeElement) {\n this._showing = true;\n this.inputField.focus();\n delete this._showing;\n }\n }\n this.picker.show();\n }\n\n /**\n * Hide the picker element\n * Not available on inline picker\n */\n }, {\n key: \"hide\",\n value: function hide() {\n if (this.inline) {\n return;\n }\n this.picker.hide();\n this.picker.update().changeView(this.config.startView).render();\n }\n\n /**\n * Destroy the Datepicker instance\n * @return {Detepicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hide();\n unregisterListeners(this);\n this.picker.detach();\n if (!this.inline) {\n this.inputField.classList.remove('datepicker-input');\n }\n delete this.element.datepicker;\n return this;\n }\n\n /**\n * Get the selected date(s)\n *\n * The method returns a Date object of selected date by default, and returns\n * an array of selected dates in multidate mode. If format string is passed,\n * it returns date string(s) formatted in given format.\n *\n * @param {String} [format] - Format string to stringify the date(s)\n * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\n * selected, empty array in multidate mode and untitled in sigledate mode\n */\n }, {\n key: \"getDate\",\n value: function getDate() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.config.locale);\n } : function (date) {\n return new Date(date);\n };\n if (this.config.multidate) {\n return this.dates.map(callback);\n }\n if (this.dates.length > 0) {\n return callback(this.dates[0]);\n }\n }\n\n /**\n * Set selected date(s)\n *\n * In multidate mode, you can pass multiple dates as a series of arguments\n * or an array. (Since each date is parsed individually, the type of the\n * dates doesn't have to be the same.)\n * The given dates are used to toggle the select status of each date. The\n * number of selected dates is kept from exceeding the length set to\n * maxNumberOfDates.\n *\n * With clear: true option, the method can be used to clear the selection\n * and to replace the selection instead of toggling in multidate mode.\n * If the option is passed with no date arguments or an empty dates array,\n * it works as \"clear\" (clear the selection then set nothing), and if the\n * option is passed with new dates to select, it works as \"replace\" (clear\n * the selection then set the given dates)\n *\n * When render: false option is used, the method omits re-rendering the\n * picker element. In this case, you need to call refresh() method later in\n * order for the picker element to reflect the changes. The input field is\n * refreshed always regardless of this option.\n *\n * When invalid (unparsable, repeated, disabled or out-of-range) dates are\n * passed, the method ignores them and applies only valid ones. In the case\n * that all the given dates are invalid, which is distinguished from passing\n * no dates, the method considers it as an error and leaves the selection\n * untouched.\n *\n * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\n * objects, time values or mix of those for new selection\n * @param {Object} [options] - function options\n * - clear: {boolean} - Whether to clear the existing selection\n * defualt: false\n * - render: {boolean} - Whether to re-render the picker element\n * default: true\n * - autohide: {boolean} - Whether to hide the picker element after re-render\n * Ignored when used with render: false\n * default: config.autohide\n */\n }, {\n key: \"setDate\",\n value: function setDate() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var dates = [].concat(args);\n var opts = {};\n var lastArg = lastItemOf(args);\n if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) {\n Object.assign(opts, dates.pop());\n }\n var inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Update the selected date(s) with input field's value\n * Not available on inline picker\n *\n * The input field will be refreshed with properly formatted date string.\n *\n * @param {Object} [options] - function options\n * - autohide: {boolean} - whether to hide the picker element after refresh\n * default: false\n */\n }, {\n key: \"update\",\n value: function update() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline) {\n return;\n }\n var opts = {\n clear: true,\n autohide: !!(options && options.autohide)\n };\n var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Refresh the picker element and the associated input field\n * @param {String} [target] - target item when refreshing one item only\n * 'picker' or 'input'\n * @param {Boolean} [forceRender] - whether to re-render the picker element\n * regardless of its state instead of optimized refresh\n */\n }, {\n key: \"refresh\",\n value: function refresh() {\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (target && typeof target !== 'string') {\n forceRender = target;\n target = undefined;\n }\n var mode;\n if (target === 'picker') {\n mode = 2;\n } else if (target === 'input') {\n mode = 1;\n } else {\n mode = 3;\n }\n refreshUI(this, mode, !forceRender);\n }\n\n /**\n * Enter edit mode\n * Not available on inline picker or when the picker element is hidden\n */\n }, {\n key: \"enterEditMode\",\n value: function enterEditMode() {\n if (this.inline || !this.picker.active || this.editMode) {\n return;\n }\n this.editMode = true;\n this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700');\n }\n\n /**\n * Exit from edit mode\n * Not available on inline picker\n * @param {Object} [options] - function options\n * - update: {boolean} - whether to call update() after exiting\n * If false, input field is revert to the existing selection\n * default: false\n */\n }, {\n key: \"exitEditMode\",\n value: function exitEditMode() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline || !this.editMode) {\n return;\n }\n var opts = Object.assign({\n update: false\n }, options);\n delete this.editMode;\n this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700');\n if (opts.update) {\n this.update(opts);\n }\n }\n }], [{\n key: \"formatDate\",\n value: function formatDate$1(date, format, lang) {\n return formatDate(date, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * Parse date string\n * @param {String|Date|Number} dateStr - date string, Date object or time\n * value to parse\n * @param {String|Object} format - format string or object that contains\n * toValue() custom parser, whose signature is\n * - args:\n * - dateStr: {String|Date|Number} - the dateStr passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {Date|Number} parsed date or its time value\n * @param {String} [lang=en] - language code for the locale to use\n * @return {Number} time value of parsed date\n */\n }, {\n key: \"parseDate\",\n value: function parseDate$1(dateStr, format, lang) {\n return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * @type {Object} - Installed locales in `[languageCode]: localeObject` format\n * en`:_English (US)_ is pre-installed.\n */\n }, {\n key: \"locales\",\n get: function get() {\n return locales;\n }\n }]);\n}();\n\n// filter out the config options inapproprite to pass to Datepicker\nfunction filterOptions(options) {\n var newOpts = Object.assign({}, options);\n delete newOpts.inputs;\n delete newOpts.allowOneSidedRange;\n delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n\n return newOpts;\n}\nfunction setupDatepicker(rangepicker, changeDateListener, el, options) {\n registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]);\n new Datepicker(el, options, rangepicker);\n}\nfunction onChangeDate(rangepicker, ev) {\n // to prevent both datepickers trigger the other side's update each other\n if (rangepicker._updating) {\n return;\n }\n rangepicker._updating = true;\n var target = ev.target;\n if (target.datepicker === undefined) {\n return;\n }\n var datepickers = rangepicker.datepickers;\n var setDateOptions = {\n render: false\n };\n var changedSide = rangepicker.inputs.indexOf(target);\n var otherSide = changedSide === 0 ? 1 : 0;\n var changedDate = datepickers[changedSide].dates[0];\n var otherDate = datepickers[otherSide].dates[0];\n if (changedDate !== undefined && otherDate !== undefined) {\n // if the start of the range > the end, swap them\n if (changedSide === 0 && changedDate > otherDate) {\n datepickers[0].setDate(otherDate, setDateOptions);\n datepickers[1].setDate(changedDate, setDateOptions);\n } else if (changedSide === 1 && changedDate < otherDate) {\n datepickers[0].setDate(changedDate, setDateOptions);\n datepickers[1].setDate(otherDate, setDateOptions);\n }\n } else if (!rangepicker.allowOneSidedRange) {\n // to prevent the range from becoming one-sided, copy changed side's\n // selection (no matter if it's empty) to the other side\n if (changedDate !== undefined || otherDate !== undefined) {\n setDateOptions.clear = true;\n datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n }\n }\n datepickers[0].picker.update().render();\n datepickers[1].picker.update().render();\n delete rangepicker._updating;\n}\n\n/**\n * Class representing a date range picker\n */\nvar DateRangePicker = /*#__PURE__*/function () {\n /**\n * Create a date range picker\n * @param {Element} element - element to bind a date range picker\n * @param {Object} [options] - config options\n */\n function DateRangePicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, DateRangePicker);\n var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input'));\n if (inputs.length < 2) {\n return;\n }\n element.rangepicker = this;\n this.element = element;\n this.inputs = inputs.slice(0, 2);\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var changeDateListener = onChangeDate.bind(null, this);\n var cleanOptions = filterOptions(options);\n // in order for initial date setup to work right when pcicLvel > 0,\n // let Datepicker constructor add the instance to the rangepicker\n var datepickers = [];\n Object.defineProperty(this, 'datepickers', {\n get: function get() {\n return datepickers;\n }\n });\n setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n Object.freeze(datepickers);\n // normalize the range if inital dates are given\n if (datepickers[0].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n } else if (datepickers[1].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n }\n }\n\n /**\n * @type {Array} - selected date of the linked date pickers\n */\n return _createClass(DateRangePicker, [{\n key: \"dates\",\n get: function get() {\n return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var cleanOptions = filterOptions(options);\n this.datepickers[0].setOptions(cleanOptions);\n this.datepickers[1].setOptions(cleanOptions);\n }\n\n /**\n * Destroy the DateRangePicker instance\n * @return {DateRangePicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.datepickers[0].destroy();\n this.datepickers[1].destroy();\n unregisterListeners(this);\n delete this.element.rangepicker;\n }\n\n /**\n * Get the start and end dates of the date range\n *\n * The method returns Date objects by default. If format string is passed,\n * it returns date strings formatted in given format.\n * The result array always contains 2 items (start date/end date) and\n * undefined is used for unselected side. (e.g. If none is selected,\n * the result will be [undefined, undefined]. If only the end date is set\n * when allowOneSidedRange config option is true, [undefined, endDate] will\n * be returned.)\n *\n * @param {String} [format] - Format string to stringify the dates\n * @return {Array} - Start and end dates\n */\n }, {\n key: \"getDates\",\n value: function getDates() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.datepickers[0].config.locale);\n } : function (date) {\n return new Date(date);\n };\n return this.dates.map(function (date) {\n return date === undefined ? date : callback(date);\n });\n }\n\n /**\n * Set the start and end dates of the date range\n *\n * The method calls datepicker.setDate() internally using each of the\n * arguments in start→end order.\n *\n * When a clear: true option object is passed instead of a date, the method\n * clears the date.\n *\n * If an invalid date, the same date as the current one or an option object\n * without clear: true is passed, the method considers that argument as an\n * \"ineffective\" argument because calling datepicker.setDate() with those\n * values makes no changes to the date selection.\n *\n * When the allowOneSidedRange config option is false, passing {clear: true}\n * to clear the range works only when it is done to the last effective\n * argument (in other words, passed to rangeEnd or to rangeStart along with\n * ineffective rangeEnd). This is because when the date range is changed,\n * it gets normalized based on the last change at the end of the changing\n * process.\n *\n * @param {Date|Number|String|Object} rangeStart - Start date of the range\n * or {clear: true} to clear the date\n * @param {Date|Number|String|Object} rangeEnd - End date of the range\n * or {clear: true} to clear the date\n */\n }, {\n key: \"setDates\",\n value: function setDates(rangeStart, rangeEnd) {\n var _this$datepickers = _slicedToArray(this.datepickers, 2),\n datepicker0 = _this$datepickers[0],\n datepicker1 = _this$datepickers[1];\n var origDates = this.dates;\n\n // If range normalization runs on every change, we can't set a new range\n // that starts after the end of the current range correctly because the\n // normalization process swaps start↔︎end right after setting the new start\n // date. To prevent this, the normalization process needs to run once after\n // both of the new dates are set.\n this._updating = true;\n datepicker0.setDate(rangeStart);\n datepicker1.setDate(rangeEnd);\n delete this._updating;\n if (datepicker1.dates[0] !== origDates[1]) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n } else if (datepicker0.dates[0] !== origDates[0]) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n }\n }\n }]);\n}();\n\nexports.DateRangePicker = DateRangePicker;\nexports.Datepicker = Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { AccordionInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Accordion implements AccordionInterface {\n _instanceId: string;\n _accordionEl: HTMLElement;\n _items: AccordionItem[];\n _options: AccordionOptions;\n _clickHandler: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n accordionEl: HTMLElement | null = null,\n items: AccordionItem[] = [],\n options: AccordionOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : accordionEl.id;\n this._accordionEl = accordionEl;\n this._items = items;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Accordion',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // show accordion item based on click\n this._items.forEach((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n const clickHandler = () => {\n this.toggle(item.id);\n };\n\n item.triggerEl.addEventListener('click', clickHandler);\n\n // Store the clickHandler in a property of the item for removal later\n item.clickHandler = clickHandler;\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._items.length && this._initialized) {\n this._items.forEach((item) => {\n item.triggerEl.removeEventListener('click', item.clickHandler);\n\n // Clean up by deleting the clickHandler property from the item\n delete item.clickHandler;\n });\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Accordion', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.add('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n\n updateOnOpen(callback: () => void) {\n this._options.onOpen = callback;\n }\n\n updateOnClose(callback: () => void) {\n this._options.onClose = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion($accordionEl as HTMLElement, items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CarouselInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Carousel implements CarouselInterface {\n _instanceId: string;\n _carouselEl: HTMLElement;\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n _initialized: boolean;\n\n constructor(\n carouselEl: HTMLElement | null = null,\n items: CarouselItem[] = [],\n options: CarouselOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : carouselEl.id;\n this._carouselEl = carouselEl;\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Carousel',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n /**\n * initialize carousel and items based on active one\n */\n init() {\n if (this._items.length && !this._initialized) {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this.getActiveItem()) {\n this.slideTo(this.getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Carousel', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this.getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this.getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // Handling the case when there is only one item\n if (this._items.length === 1) {\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n return;\n }\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-30');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-30'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-20');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n\n updateOnNext(callback: () => void) {\n this._options.onNext = callback;\n }\n\n updateOnPrev(callback: () => void) {\n this._options.onPrev = callback;\n }\n\n updateOnChange(callback: () => void) {\n this._options.onChange = callback;\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel($carouselEl as HTMLElement, items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CopyClipboardOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CopyClipboardInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CopyClipboardOptions = {\n htmlEntities: false,\n contentType: 'input',\n onCopy: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass CopyClipboard implements CopyClipboardInterface {\n _instanceId: string;\n _triggerEl: HTMLElement | null;\n _targetEl: HTMLInputElement | null;\n _options: CopyClipboardOptions;\n _initialized: boolean;\n _triggerElClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLInputElement | null = null,\n options: CopyClipboardOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'CopyClipboard',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && this._triggerEl && !this._initialized) {\n this._triggerElClickHandler = () => {\n this.copy();\n };\n\n // clicking on the trigger element should copy the value of the target element\n if (this._triggerEl) {\n this._triggerEl.addEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._targetEl && this._initialized) {\n if (this._triggerEl) {\n this._triggerEl.removeEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('CopyClipboard', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getTargetValue() {\n if (this._options.contentType === 'input') {\n return this._targetEl.value;\n }\n\n if (this._options.contentType === 'innerHTML') {\n return this._targetEl.innerHTML;\n }\n\n if (this._options.contentType === 'textContent') {\n return this._targetEl.textContent.replace(/\\s+/g, ' ').trim();\n }\n }\n\n copy() {\n let textToCopy = this.getTargetValue();\n\n // Check if HTMLEntities option is enabled\n if (this._options.htmlEntities) {\n // Encode the text using HTML entities\n textToCopy = this.decodeHTML(textToCopy);\n }\n\n // Create a temporary textarea element\n const tempTextArea = document.createElement('textarea');\n tempTextArea.value = textToCopy;\n document.body.appendChild(tempTextArea);\n\n // Select the text inside the textarea and copy it to the clipboard\n tempTextArea.select();\n document.execCommand('copy');\n\n // Remove the temporary textarea\n document.body.removeChild(tempTextArea);\n\n // Callback function\n this._options.onCopy(this);\n\n return textToCopy;\n }\n\n // Function to encode text into HTML entities\n decodeHTML(html: string) {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = html;\n return textarea.textContent;\n }\n\n updateOnCopyCallback(callback: () => void) {\n this._options.onCopy = callback;\n }\n}\n\nexport function initCopyClipboards() {\n document\n .querySelectorAll('[data-copy-to-clipboard-target]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-target'\n );\n const $targetEl = document.getElementById(targetId);\n const contentType = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-content-type'\n );\n const htmlEntities = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-html-entities'\n );\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'CopyClipboard',\n $targetEl.getAttribute('id')\n )\n ) {\n new CopyClipboard(\n $triggerEl as HTMLElement,\n $targetEl as HTMLInputElement,\n {\n htmlEntities:\n htmlEntities && htmlEntities === 'true'\n ? true\n : Default.htmlEntities,\n contentType: contentType\n ? contentType\n : Default.contentType,\n } as CopyClipboardOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-copy-to-clipboard-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.CopyClipboard = CopyClipboard;\n window.initClipboards = initCopyClipboards;\n}\n\nexport default CopyClipboard;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CollapseInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Collapse implements CollapseInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Collapse',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Collapse', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n\n updateOnCollapse(callback: () => void) {\n this._options.onCollapse = callback;\n }\n\n updateOnExpand(callback: () => void) {\n this._options.onExpand = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'Collapse',\n $targetEl.getAttribute('id')\n )\n ) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n // if instance exists already for the same target element then create a new one with a different trigger element\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement,\n {},\n {\n id:\n $targetEl.getAttribute('id') +\n '_' +\n instances._generateRandomId(),\n }\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DatepickerOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DatepickerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nimport {\n Datepicker as FlowbiteDatepicker,\n DateRangePicker as FlowbiteDateRangePicker,\n} from 'flowbite-datepicker';\n\nconst Default: DatepickerOptions = {\n defaultDatepickerId: null,\n autohide: false,\n format: 'mm/dd/yyyy',\n maxDate: null,\n minDate: null,\n orientation: 'bottom',\n buttons: false,\n autoSelectToday: 0,\n title: null,\n language: 'en',\n rangePicker: false,\n onShow: () => {},\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Datepicker implements DatepickerInterface {\n _instanceId: string;\n _datepickerEl: HTMLElement;\n _datepickerInstance: FlowbiteDatepicker | FlowbiteDateRangePicker | null;\n _options: DatepickerOptions;\n _initialized: boolean;\n\n constructor(\n datepickerEl: HTMLElement | null = null,\n options: DatepickerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : datepickerEl.id;\n this._datepickerEl = datepickerEl;\n this._datepickerInstance = null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Datepicker',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._datepickerEl && !this._initialized) {\n if (this._options.rangePicker) {\n this._datepickerInstance = new FlowbiteDateRangePicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n } else {\n this._datepickerInstance = new FlowbiteDatepicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n this._datepickerInstance.destroy();\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Datepicker', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getDatepickerInstance() {\n return this._datepickerInstance;\n }\n\n getDate() {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.getDates();\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.getDate();\n }\n }\n\n setDate(date: any) {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.setDates(date);\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.setDate(date);\n }\n }\n\n show() {\n this._datepickerInstance.show();\n this._options.onShow(this);\n }\n\n hide() {\n this._datepickerInstance.hide();\n this._options.onHide(this);\n }\n\n _getDatepickerOptions(options: DatepickerOptions) {\n const datepickerOptions = {} as any;\n\n if (options.buttons) {\n datepickerOptions.todayBtn = true;\n datepickerOptions.clearBtn = true;\n\n if (options.autoSelectToday) {\n datepickerOptions.todayBtnMode = 1;\n }\n }\n\n if (options.autohide) {\n datepickerOptions.autohide = true;\n }\n\n if (options.format) {\n datepickerOptions.format = options.format;\n }\n\n if (options.maxDate) {\n datepickerOptions.maxDate = options.maxDate;\n }\n\n if (options.minDate) {\n datepickerOptions.minDate = options.minDate;\n }\n\n if (options.orientation) {\n datepickerOptions.orientation = options.orientation;\n }\n\n if (options.title) {\n datepickerOptions.title = options.title;\n }\n\n if (options.language) {\n datepickerOptions.language = options.language;\n }\n\n return datepickerOptions;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDatepickers() {\n document\n .querySelectorAll(\n '[datepicker], [inline-datepicker], [date-rangepicker]'\n )\n .forEach(($datepickerEl) => {\n if ($datepickerEl) {\n const buttons =\n $datepickerEl.hasAttribute('datepicker-buttons');\n const autoselectToday = $datepickerEl.hasAttribute(\n 'datepicker-autoselect-today'\n );\n const autohide = $datepickerEl.hasAttribute(\n 'datepicker-autohide'\n );\n const format = $datepickerEl.getAttribute('datepicker-format');\n const maxDate = $datepickerEl.getAttribute(\n 'datepicker-max-date'\n );\n const minDate = $datepickerEl.getAttribute(\n 'datepicker-min-date'\n );\n const orientation = $datepickerEl.getAttribute(\n 'datepicker-orientation'\n );\n const title = $datepickerEl.getAttribute('datepicker-title');\n const language = $datepickerEl.getAttribute(\n 'datepicker-language'\n );\n const rangePicker =\n $datepickerEl.hasAttribute('date-rangepicker');\n new Datepicker(\n $datepickerEl as HTMLElement,\n {\n buttons: buttons ? buttons : Default.buttons,\n autoSelectToday: autoselectToday\n ? autoselectToday\n : Default.autoSelectToday,\n autohide: autohide ? autohide : Default.autohide,\n format: format ? format : Default.format,\n maxDate: maxDate ? maxDate : Default.maxDate,\n minDate: minDate ? minDate : Default.minDate,\n orientation: orientation\n ? orientation\n : Default.orientation,\n title: title ? title : Default.title,\n language: language ? language : Default.language,\n rangePicker: rangePicker\n ? rangePicker\n : Default.rangePicker,\n } as DatepickerOptions\n );\n } else {\n console.error(\n `The datepicker element does not exist. Please check the datepicker attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Datepicker = Datepicker;\n window.initDatepickers = initDatepickers;\n}\n\nexport default Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DialInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dial implements DialInterface {\n _instanceId: string;\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n _initialized: boolean;\n _showEventHandler: EventListenerOrEventListenerObject;\n _hideEventHandler: EventListenerOrEventListenerObject;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dial',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n this._showEventHandler = () => {\n this.show();\n };\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, this._showEventHandler);\n this._targetEl.addEventListener(ev, this._showEventHandler);\n });\n\n this._hideEventHandler = () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n };\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, this._hideEventHandler);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.removeEventListener(ev, this._showEventHandler);\n this._targetEl.removeEventListener(ev, this._showEventHandler);\n });\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.removeEventListener(ev, this._hideEventHandler);\n });\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dial', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DismissInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dismiss implements DismissInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dismiss',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._clickHandler = () => {\n this.hide();\n };\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dismiss', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerOptions, PlacementClasses } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { DrawerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Drawer implements DrawerInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n _eventListenerInstances: EventListenerInstance[] = [];\n _handleEscapeKey: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Drawer',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n // set initial accessibility attributes\n if (this._targetEl && !this._initialized) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n this._handleEscapeKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n };\n\n // add keyboard event listener to document\n document.addEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n\n // Remove the keyboard event listener\n document.removeEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Drawer', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (\n this._visible &&\n document.querySelector('[drawer-backdrop]') !== null\n ) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDrawers() {\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge ? (edge === 'true' ? true : false) : Default.edge,\n edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset,\n } as DrawerOptions);\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const toggleDrawer = () => {\n drawer.toggle();\n };\n $triggerEl.addEventListener('click', toggleDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const hideDrawer = () => {\n drawer.hide();\n };\n $triggerEl.addEventListener('click', hideDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const showDrawer = () => {\n drawer.show();\n };\n $triggerEl.addEventListener('click', showDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DropdownInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dropdown implements DropdownInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _initialized: boolean;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _hoverShowTriggerElHandler: EventListenerOrEventListenerObject;\n _hoverShowTargetElHandler: EventListenerOrEventListenerObject;\n _hoverHideHandler: EventListenerOrEventListenerObject;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetElement.id;\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dropdown',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._popperInstance = this._createPopperInstance();\n this._setupEventListeners();\n this._initialized = true;\n }\n }\n\n destroy() {\n const triggerEvents = this._getTriggerEvents();\n\n // Remove click event listeners for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._clickHandler);\n });\n }\n\n // Remove hover event listeners for trigger and target elements\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.removeEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hoverHideHandler);\n this._targetEl.removeEventListener(ev, this._hoverHideHandler);\n });\n }\n\n this._popperInstance.destroy();\n this._initialized = false;\n }\n\n removeInstance() {\n instances.removeInstance('Dropdown', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._clickHandler);\n });\n }\n\n this._hoverShowTriggerElHandler = (ev) => {\n if (ev.type === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n };\n this._hoverShowTargetElHandler = () => {\n this.show();\n };\n\n this._hoverHideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n };\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.addEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hoverHideHandler);\n this._targetEl.addEventListener(ev, this._hoverHideHandler);\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n this._targetEl.removeAttribute('aria-hidden');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n this._targetEl.setAttribute('aria-hidden', 'true');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCopyClipboards } from './clipboard';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initInputCounters } from './input-counter';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\nimport { initDatepickers } from './datepicker';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n initInputCounters();\n initCopyClipboards();\n initDatepickers();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { InputCounterOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { InputCounterInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: InputCounterOptions = {\n minValue: null,\n maxValue: null,\n onIncrement: () => {},\n onDecrement: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass InputCounter implements InputCounterInterface {\n _instanceId: string;\n _targetEl: HTMLInputElement | null;\n _incrementEl: HTMLElement | null;\n _decrementEl: HTMLElement | null;\n _options: InputCounterOptions;\n _initialized: boolean;\n _incrementClickHandler: EventListenerOrEventListenerObject;\n _decrementClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLInputElement | null = null,\n incrementEl: HTMLElement | null = null,\n decrementEl: HTMLElement | null = null,\n options: InputCounterOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._targetEl = targetEl;\n this._incrementEl = incrementEl;\n this._decrementEl = decrementEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'InputCounter',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._inputHandler = (event) => {\n {\n const target = event.target as HTMLInputElement;\n\n // check if the value is numeric\n if (!/^\\d*$/.test(target.value)) {\n // Regex to check if the value is numeric\n target.value = target.value.replace(/[^\\d]/g, ''); // Remove non-numeric characters\n }\n\n // check for max value\n if (\n this._options.maxValue !== null &&\n parseInt(target.value) > this._options.maxValue\n ) {\n target.value = this._options.maxValue.toString();\n }\n\n // check for min value\n if (\n this._options.minValue !== null &&\n parseInt(target.value) < this._options.minValue\n ) {\n target.value = this._options.minValue.toString();\n }\n }\n };\n\n this._incrementClickHandler = () => {\n this.increment();\n };\n\n this._decrementClickHandler = () => {\n this.decrement();\n };\n\n // Add event listener to restrict input to numeric values only\n this._targetEl.addEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.addEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n\n if (this._decrementEl) {\n this._decrementEl.addEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._targetEl && this._initialized) {\n this._targetEl.removeEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.removeEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n if (this._decrementEl) {\n this._decrementEl.removeEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('InputCounter', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getCurrentValue() {\n return parseInt(this._targetEl.value) || 0;\n }\n\n increment() {\n // don't increment if the value is already at the maximum value\n if (\n this._options.maxValue !== null &&\n this.getCurrentValue() >= this._options.maxValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() + 1).toString();\n this._options.onIncrement(this);\n }\n\n decrement() {\n // don't decrement if the value is already at the minimum value\n if (\n this._options.minValue !== null &&\n this.getCurrentValue() <= this._options.minValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() - 1).toString();\n this._options.onDecrement(this);\n }\n\n updateOnIncrement(callback: () => void) {\n this._options.onIncrement = callback;\n }\n\n updateOnDecrement(callback: () => void) {\n this._options.onDecrement = callback;\n }\n}\n\nexport function initInputCounters() {\n document.querySelectorAll('[data-input-counter]').forEach(($targetEl) => {\n const targetId = $targetEl.id;\n\n const $incrementEl = document.querySelector(\n '[data-input-counter-increment=\"' + targetId + '\"]'\n );\n\n const $decrementEl = document.querySelector(\n '[data-input-counter-decrement=\"' + targetId + '\"]'\n );\n\n const minValue = $targetEl.getAttribute('data-input-counter-min');\n const maxValue = $targetEl.getAttribute('data-input-counter-max');\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'InputCounter',\n $targetEl.getAttribute('id')\n )\n ) {\n new InputCounter(\n $targetEl as HTMLInputElement,\n $incrementEl ? ($incrementEl as HTMLElement) : null,\n $decrementEl ? ($decrementEl as HTMLElement) : null,\n {\n minValue: minValue ? parseInt(minValue) : null,\n maxValue: maxValue ? parseInt(maxValue) : null,\n } as InputCounterOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-input-counter attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.InputCounter = InputCounter;\n window.initInputCounters = initInputCounters;\n}\n\nexport default InputCounter;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalOptions } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { ModalInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Modal implements ModalInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _eventListenerInstances: EventListenerInstance[] = [];\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Modal',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Modal', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden && this._backdropEl) {\n this._backdropEl.remove();\n this._backdropEl = null;\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initModals() {\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n );\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // toggle modal visibility\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const toggleModal = () => {\n modal.toggle();\n };\n $triggerEl.addEventListener('click', toggleModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const showModal = () => {\n modal.show();\n };\n $triggerEl.addEventListener('click', showModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const hideModal = () => {\n modal.hide();\n };\n $triggerEl.addEventListener('click', hideModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { PopoverInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Popover implements PopoverInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Popover',\n this,\n instanceOptions.id ? instanceOptions.id : this._targetEl.id,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element and target element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n this._targetEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n this._targetEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Popover', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n this._targetEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n this._targetEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TabsInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tabs implements TabsInterface {\n _instanceId: string;\n _tabsEl: HTMLElement;\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n _initialized: boolean;\n\n constructor(\n tabsEl: HTMLElement | null = null,\n items: TabItem[] = [],\n options: TabsOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id;\n this._tabsEl = tabsEl;\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tabs',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this.setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', (event) => {\n event.preventDefault();\n this.show(tab.id);\n });\n });\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Tabs', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this.setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($parentEl) => {\n const tabItems: TabItem[] = [];\n const activeClasses = $parentEl.getAttribute(\n 'data-tabs-active-classes'\n );\n const inactiveClasses = $parentEl.getAttribute(\n 'data-tabs-inactive-classes'\n );\n let defaultTabId = null;\n $parentEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n\n new Tabs($parentEl as HTMLElement, tabItems, {\n defaultTabId: defaultTabId,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TooltipInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tooltip implements TooltipInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tooltip',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Tooltip', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n this.hide();\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","import { AccordionInterface } from '../components/accordion/interface';\nimport { CarouselInterface } from '../components/carousel/interface';\nimport { CollapseInterface } from '../components/collapse/interface';\nimport { DialInterface } from '../components/dial/interface';\nimport { DismissInterface } from '../components/dismiss/interface';\nimport { DrawerInterface } from '../components/drawer/interface';\nimport { DropdownInterface } from '../components/dropdown/interface';\nimport { ModalInterface } from '../components/modal/interface';\nimport { PopoverInterface } from '../components/popover/interface';\nimport { TabsInterface } from '../components/tabs/interface';\nimport { TooltipInterface } from '../components/tooltip/interface';\nimport { InputCounterInterface } from '../components/input-counter/interface';\nimport { CopyClipboardInterface } from '../components/clipboard/interface';\nimport { DatepickerInterface } from '../components/datepicker/interface';\n\nclass Instances {\n private _instances: {\n Accordion: { [id: string]: AccordionInterface };\n Carousel: { [id: string]: CarouselInterface };\n Collapse: { [id: string]: CollapseInterface };\n Dial: { [id: string]: DialInterface };\n Dismiss: { [id: string]: DismissInterface };\n Drawer: { [id: string]: DrawerInterface };\n Dropdown: { [id: string]: DropdownInterface };\n Modal: { [id: string]: ModalInterface };\n Popover: { [id: string]: PopoverInterface };\n Tabs: { [id: string]: TabsInterface };\n Tooltip: { [id: string]: TooltipInterface };\n InputCounter: { [id: string]: InputCounterInterface };\n CopyClipboard: { [id: string]: CopyClipboardInterface };\n Datepicker: { [id: string]: DatepickerInterface };\n };\n\n constructor() {\n this._instances = {\n Accordion: {},\n Carousel: {},\n Collapse: {},\n Dial: {},\n Dismiss: {},\n Drawer: {},\n Dropdown: {},\n Modal: {},\n Popover: {},\n Tabs: {},\n Tooltip: {},\n InputCounter: {},\n CopyClipboard: {},\n Datepicker: {},\n };\n }\n\n addInstance(\n component: keyof Instances['_instances'],\n instance: any,\n id?: string,\n override = false\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (this._instances[component][id] && !override) {\n console.warn(`Flowbite: Instance with ID ${id} already exists.`);\n return;\n }\n\n if (override && this._instances[component][id]) {\n this._instances[component][id].destroyAndRemoveInstance();\n }\n\n this._instances[component][id ? id : this._generateRandomId()] =\n instance;\n }\n\n getAllInstances() {\n return this._instances;\n }\n\n getInstances(component: keyof Instances['_instances']) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n return this._instances[component];\n }\n\n getInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return;\n }\n return this._instances[component][id] as any;\n }\n\n destroyAndRemoveInstance(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this.destroyInstanceObject(component, id);\n this.removeInstance(component, id);\n }\n\n removeInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n delete this._instances[component][id];\n }\n\n destroyInstanceObject(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this._instances[component][id].destroy();\n }\n\n instanceExists(component: keyof Instances['_instances'], id: string) {\n if (!this._instances[component]) {\n return false;\n }\n\n if (!this._instances[component][id]) {\n return false;\n }\n\n return true;\n }\n\n _generateRandomId() {\n return Math.random().toString(36).substr(2, 9);\n }\n\n private _componentAndInstanceCheck(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return false;\n }\n\n return true;\n }\n}\n\nconst instances = new Instances();\n\nexport default instances;\n\nif (typeof window !== 'undefined') {\n window.FlowbiteInstances = instances;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// core components\nimport Accordion from './components/accordion';\nimport Carousel from './components/carousel';\nimport Collapse from './components/collapse';\nimport Dial from './components/dial';\nimport Dismiss from './components/dismiss';\nimport Drawer from './components/drawer';\nimport Dropdown from './components/dropdown';\nimport Modal from './components/modal';\nimport Popover from './components/popover';\nimport Tabs from './components/tabs';\nimport Tooltip from './components/tooltip';\nimport InputCounter from './components/input-counter';\nimport CopyClipboard from './components/clipboard';\nimport Datepicker from './components/datepicker';\nimport { initFlowbite } from './components/index';\nimport Events from './dom/events';\n\n// Since turbo maintainers refuse to add this event, we'll add it ourselves\n// https://discuss.hotwired.dev/t/event-to-know-a-turbo-stream-has-been-rendered/1554/10\nconst afterRenderEvent = new Event('turbo:after-stream-render');\naddEventListener('turbo:before-stream-render', (event: CustomEvent) => {\n const originalRender = event.detail.render;\n\n event.detail.render = function (streamElement: Element) {\n originalRender(streamElement);\n window.dispatchEvent(afterRenderEvent);\n };\n});\n\nconst turboLoadEvents = new Events('turbo:load', [initFlowbite]);\nturboLoadEvents.init();\n\nconst turboFrameLoadEvents = new Events('turbo:frame-load', [initFlowbite]);\nturboFrameLoadEvents.init();\n\nconst turboStreamLoadEvents = new Events('turbo:after-stream-render', [\n initFlowbite,\n]);\nturboStreamLoadEvents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n InputCounter,\n CopyClipboard,\n Datepicker,\n Events,\n};\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/dist/flowbite.turbo.min.js b/node_modules/flowbite/dist/flowbite.turbo.min.js new file mode 100644 index 0000000..792f696 --- /dev/null +++ b/node_modules/flowbite/dist/flowbite.turbo.min.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Flowbite",[],e):"object"==typeof exports?exports.Flowbite=e():t.Flowbite=e()}(self,(function(){return function(){"use strict";var t={853:function(t,e,i){i.r(e),i.d(e,{afterMain:function(){return k},afterRead:function(){return b},afterWrite:function(){return D},applyStyles:function(){return T},arrow:function(){return Q},auto:function(){return s},basePlacements:function(){return d},beforeMain:function(){return _},beforeRead:function(){return y},beforeWrite:function(){return E},bottom:function(){return r},clippingParents:function(){return u},computeStyles:function(){return it},createPopper:function(){return Tt},createPopperBase:function(){return St},createPopperLite:function(){return Mt},detectOverflow:function(){return mt},end:function(){return l},eventListeners:function(){return rt},flip:function(){return bt},hide:function(){return kt},left:function(){return a},main:function(){return w},modifierPhases:function(){return O},offset:function(){return Et},placements:function(){return v},popper:function(){return p},popperGenerator:function(){return Ct},popperOffsets:function(){return xt},preventOverflow:function(){return Dt},read:function(){return m},reference:function(){return f},right:function(){return o},start:function(){return c},top:function(){return n},variationPlacements:function(){return g},viewport:function(){return h},write:function(){return x}});var n="top",r="bottom",o="right",a="left",s="auto",d=[n,r,o,a],c="start",l="end",u="clippingParents",h="viewport",p="popper",f="reference",g=d.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+l])}),[]),v=[].concat(d,[s]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+l])}),[]),y="beforeRead",m="read",b="afterRead",_="beforeMain",w="main",k="afterMain",E="beforeWrite",x="write",D="afterWrite",O=[y,m,b,_,w,k,E,x,D];function L(t){return t?(t.nodeName||"").toLowerCase():null}function I(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function A(t){return t instanceof I(t).Element||t instanceof Element}function C(t){return t instanceof I(t).HTMLElement||t instanceof HTMLElement}function S(t){return"undefined"!=typeof ShadowRoot&&(t instanceof I(t).ShadowRoot||t instanceof ShadowRoot)}var T={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];C(r)&&L(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});C(n)&&L(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function M(t){return t.split("-")[0]}var H=Math.max,P=Math.min,j=Math.round;function V(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function B(){return!/^((?!chrome|android).)*safari/i.test(V())}function z(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),r=1,o=1;e&&C(t)&&(r=t.offsetWidth>0&&j(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&j(n.height)/t.offsetHeight||1);var a=(A(t)?I(t):window).visualViewport,s=!B()&&i,d=(n.left+(s&&a?a.offsetLeft:0))/r,c=(n.top+(s&&a?a.offsetTop:0))/o,l=n.width/r,u=n.height/o;return{width:l,height:u,top:c,right:d+l,bottom:c+u,left:d,x:d,y:c}}function F(t){var e=z(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function N(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&S(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function W(t){return I(t).getComputedStyle(t)}function q(t){return["table","td","th"].indexOf(L(t))>=0}function R(t){return((A(t)?t.ownerDocument:t.document)||window.document).documentElement}function Y(t){return"html"===L(t)?t:t.assignedSlot||t.parentNode||(S(t)?t.host:null)||R(t)}function K(t){return C(t)&&"fixed"!==W(t).position?t.offsetParent:null}function U(t){for(var e=I(t),i=K(t);i&&q(i)&&"static"===W(i).position;)i=K(i);return i&&("html"===L(i)||"body"===L(i)&&"static"===W(i).position)?e:i||function(t){var e=/firefox/i.test(V());if(/Trident/i.test(V())&&C(t)&&"fixed"===W(t).position)return null;var i=Y(t);for(S(i)&&(i=i.host);C(i)&&["html","body"].indexOf(L(i))<0;){var n=W(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function J(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function X(t,e,i){return H(t,P(e,i))}function $(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function G(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,s=t.name,c=t.options,l=i.elements.arrow,u=i.modifiersData.popperOffsets,h=M(i.placement),p=J(h),f=[a,o].indexOf(h)>=0?"height":"width";if(l&&u){var g=function(t,e){return $("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:G(t,d))}(c.padding,i),v=F(l),y="y"===p?n:a,m="y"===p?r:o,b=i.rects.reference[f]+i.rects.reference[p]-u[p]-i.rects.popper[f],_=u[p]-i.rects.reference[p],w=U(l),k=w?"y"===p?w.clientHeight||0:w.clientWidth||0:0,E=b/2-_/2,x=g[y],D=k-v[f]-g[m],O=k/2-v[f]/2+E,L=X(x,O,D),I=p;i.modifiersData[s]=((e={})[I]=L,e.centerOffset=L-O,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&N(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,i=t.popper,s=t.popperRect,d=t.placement,c=t.variation,u=t.offsets,h=t.position,p=t.gpuAcceleration,f=t.adaptive,g=t.roundOffsets,v=t.isFixed,y=u.x,m=void 0===y?0:y,b=u.y,_=void 0===b?0:b,w="function"==typeof g?g({x:m,y:_}):{x:m,y:_};m=w.x,_=w.y;var k=u.hasOwnProperty("x"),E=u.hasOwnProperty("y"),x=a,D=n,O=window;if(f){var L=U(i),A="clientHeight",C="clientWidth";if(L===I(i)&&"static"!==W(L=R(i)).position&&"absolute"===h&&(A="scrollHeight",C="scrollWidth"),d===n||(d===a||d===o)&&c===l)D=r,_-=(v&&L===O&&O.visualViewport?O.visualViewport.height:L[A])-s.height,_*=p?1:-1;if(d===a||(d===n||d===r)&&c===l)x=o,m-=(v&&L===O&&O.visualViewport?O.visualViewport.width:L[C])-s.width,m*=p?1:-1}var S,T=Object.assign({position:h},f&&tt),M=!0===g?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:j(e*n)/n||0,y:j(i*n)/n||0}}({x:m,y:_}):{x:m,y:_};return m=M.x,_=M.y,p?Object.assign({},T,((S={})[D]=E?"0":"",S[x]=k?"0":"",S.transform=(O.devicePixelRatio||1)<=1?"translate("+m+"px, "+_+"px)":"translate3d("+m+"px, "+_+"px, 0)",S)):Object.assign({},T,((e={})[D]=E?_+"px":"",e[x]=k?m+"px":"",e.transform="",e))}var it={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,a=void 0===o||o,s=i.roundOffsets,d=void 0===s||s,c={placement:M(e.placement),variation:Z(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:d})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},nt={passive:!0};var rt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,o=void 0===r||r,a=n.resize,s=void 0===a||a,d=I(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,nt)})),s&&d.addEventListener("resize",i.update,nt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,nt)})),s&&d.removeEventListener("resize",i.update,nt)}},data:{}},ot={left:"right",right:"left",bottom:"top",top:"bottom"};function at(t){return t.replace(/left|right|bottom|top/g,(function(t){return ot[t]}))}var st={start:"end",end:"start"};function dt(t){return t.replace(/start|end/g,(function(t){return st[t]}))}function ct(t){var e=I(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lt(t){return z(R(t)).left+ct(t).scrollLeft}function ut(t){var e=W(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function ht(t){return["html","body","#document"].indexOf(L(t))>=0?t.ownerDocument.body:C(t)&&ut(t)?t:ht(Y(t))}function pt(t,e){var i;void 0===e&&(e=[]);var n=ht(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=I(n),a=r?[o].concat(o.visualViewport||[],ut(n)?n:[]):n,s=e.concat(a);return r?s:s.concat(pt(Y(a)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gt(t,e,i){return e===h?ft(function(t,e){var i=I(t),n=R(t),r=i.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,d=0;if(r){o=r.width,a=r.height;var c=B();(c||!c&&"fixed"===e)&&(s=r.offsetLeft,d=r.offsetTop)}return{width:o,height:a,x:s+lt(t),y:d}}(t,i)):A(e)?function(t,e){var i=z(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ft(function(t){var e,i=R(t),n=ct(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=H(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=H(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-n.scrollLeft+lt(t),d=-n.scrollTop;return"rtl"===W(r||i).direction&&(s+=H(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:d}}(R(t)))}function vt(t,e,i,n){var r="clippingParents"===e?function(t){var e=pt(Y(t)),i=["absolute","fixed"].indexOf(W(t).position)>=0&&C(t)?U(t):t;return A(i)?e.filter((function(t){return A(t)&&N(t,i)&&"body"!==L(t)})):[]}(t):[].concat(e),o=[].concat(r,[i]),a=o[0],s=o.reduce((function(e,i){var r=gt(t,i,n);return e.top=H(r.top,e.top),e.right=P(r.right,e.right),e.bottom=P(r.bottom,e.bottom),e.left=H(r.left,e.left),e}),gt(t,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function yt(t){var e,i=t.reference,s=t.element,d=t.placement,u=d?M(d):null,h=d?Z(d):null,p=i.x+i.width/2-s.width/2,f=i.y+i.height/2-s.height/2;switch(u){case n:e={x:p,y:i.y-s.height};break;case r:e={x:p,y:i.y+i.height};break;case o:e={x:i.x+i.width,y:f};break;case a:e={x:i.x-s.width,y:f};break;default:e={x:i.x,y:i.y}}var g=u?J(u):null;if(null!=g){var v="y"===g?"height":"width";switch(h){case c:e[g]=e[g]-(i[v]/2-s[v]/2);break;case l:e[g]=e[g]+(i[v]/2-s[v]/2)}}return e}function mt(t,e){void 0===e&&(e={});var i=e,a=i.placement,s=void 0===a?t.placement:a,c=i.strategy,l=void 0===c?t.strategy:c,g=i.boundary,v=void 0===g?u:g,y=i.rootBoundary,m=void 0===y?h:y,b=i.elementContext,_=void 0===b?p:b,w=i.altBoundary,k=void 0!==w&&w,E=i.padding,x=void 0===E?0:E,D=$("number"!=typeof x?x:G(x,d)),O=_===p?f:p,L=t.rects.popper,I=t.elements[k?O:_],C=vt(A(I)?I:I.contextElement||R(t.elements.popper),v,m,l),S=z(t.elements.reference),T=yt({reference:S,element:L,strategy:"absolute",placement:s}),M=ft(Object.assign({},L,T)),H=_===p?M:S,P={top:C.top-H.top+D.top,bottom:H.bottom-C.bottom+D.bottom,left:C.left-H.left+D.left,right:H.right-C.right+D.right},j=t.modifiersData.offset;if(_===p&&j){var V=j[s];Object.keys(P).forEach((function(t){var e=[o,r].indexOf(t)>=0?1:-1,i=[n,r].indexOf(t)>=0?"y":"x";P[t]+=V[i]*e}))}return P}var bt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,l=t.name;if(!e.modifiersData[l]._skip){for(var u=i.mainAxis,h=void 0===u||u,p=i.altAxis,f=void 0===p||p,y=i.fallbackPlacements,m=i.padding,b=i.boundary,_=i.rootBoundary,w=i.altBoundary,k=i.flipVariations,E=void 0===k||k,x=i.allowedAutoPlacements,D=e.options.placement,O=M(D),L=y||(O===D||!E?[at(D)]:function(t){if(M(t)===s)return[];var e=at(t);return[dt(t),e,dt(e)]}(D)),I=[D].concat(L).reduce((function(t,i){return t.concat(M(i)===s?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,a=i.padding,s=i.flipVariations,c=i.allowedAutoPlacements,l=void 0===c?v:c,u=Z(n),h=u?s?g:g.filter((function(t){return Z(t)===u})):d,p=h.filter((function(t){return l.indexOf(t)>=0}));0===p.length&&(p=h);var f=p.reduce((function(e,i){return e[i]=mt(t,{placement:i,boundary:r,rootBoundary:o,padding:a})[M(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:b,rootBoundary:_,padding:m,flipVariations:E,allowedAutoPlacements:x}):i)}),[]),A=e.rects.reference,C=e.rects.popper,S=new Map,T=!0,H=I[0],P=0;P=0,F=z?"width":"height",N=mt(e,{placement:j,boundary:b,rootBoundary:_,altBoundary:w,padding:m}),W=z?B?o:a:B?r:n;A[F]>C[F]&&(W=at(W));var q=at(W),R=[];if(h&&R.push(N[V]<=0),f&&R.push(N[W]<=0,N[q]<=0),R.every((function(t){return t}))){H=j,T=!1;break}S.set(j,R)}if(T)for(var Y=function(t){var e=I.find((function(e){var i=S.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return H=e,"break"},K=E?3:1;K>0;K--){if("break"===Y(K))break}e.placement!==H&&(e.modifiersData[l]._skip=!0,e.placement=H,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function _t(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function wt(t){return[n,o,r,a].some((function(e){return t[e]>=0}))}var kt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,a=mt(e,{elementContext:"reference"}),s=mt(e,{altBoundary:!0}),d=_t(a,n),c=_t(s,r,o),l=wt(d),u=wt(c);e.modifiersData[i]={referenceClippingOffsets:d,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":u})}};var Et={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,r=t.name,s=i.offset,d=void 0===s?[0,0]:s,c=v.reduce((function(t,i){return t[i]=function(t,e,i){var r=M(t),s=[a,n].indexOf(r)>=0?-1:1,d="function"==typeof i?i(Object.assign({},e,{placement:t})):i,c=d[0],l=d[1];return c=c||0,l=(l||0)*s,[a,o].indexOf(r)>=0?{x:l,y:c}:{x:c,y:l}}(i,e.rects,d),t}),{}),l=c[e.placement],u=l.x,h=l.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=h),e.modifiersData[r]=c}};var xt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=yt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var Dt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,s=t.name,d=i.mainAxis,l=void 0===d||d,u=i.altAxis,h=void 0!==u&&u,p=i.boundary,f=i.rootBoundary,g=i.altBoundary,v=i.padding,y=i.tether,m=void 0===y||y,b=i.tetherOffset,_=void 0===b?0:b,w=mt(e,{boundary:p,rootBoundary:f,padding:v,altBoundary:g}),k=M(e.placement),E=Z(e.placement),x=!E,D=J(k),O="x"===D?"y":"x",L=e.modifiersData.popperOffsets,I=e.rects.reference,A=e.rects.popper,C="function"==typeof _?_(Object.assign({},e.rects,{placement:e.placement})):_,S="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(L){if(l){var V,B="y"===D?n:a,z="y"===D?r:o,N="y"===D?"height":"width",W=L[D],q=W+w[B],R=W-w[z],Y=m?-A[N]/2:0,K=E===c?I[N]:A[N],$=E===c?-A[N]:-I[N],G=e.elements.arrow,Q=m&&G?F(G):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[B],it=tt[z],nt=X(0,I[N],Q[N]),rt=x?I[N]/2-Y-nt-et-S.mainAxis:K-nt-et-S.mainAxis,ot=x?-I[N]/2+Y+nt+it+S.mainAxis:$+nt+it+S.mainAxis,at=e.elements.arrow&&U(e.elements.arrow),st=at?"y"===D?at.clientTop||0:at.clientLeft||0:0,dt=null!=(V=null==T?void 0:T[D])?V:0,ct=W+ot-dt,lt=X(m?P(q,W+rt-dt-st):q,W,m?H(R,ct):R);L[D]=lt,j[D]=lt-W}if(h){var ut,ht="x"===D?n:a,pt="x"===D?r:o,ft=L[O],gt="y"===O?"height":"width",vt=ft+w[ht],yt=ft-w[pt],bt=-1!==[n,a].indexOf(k),_t=null!=(ut=null==T?void 0:T[O])?ut:0,wt=bt?vt:ft-I[gt]-A[gt]-_t+S.altAxis,kt=bt?ft+I[gt]+A[gt]-_t-S.altAxis:yt,Et=m&&bt?function(t,e,i){var n=X(t,e,i);return n>i?i:n}(wt,ft,kt):X(m?wt:vt,ft,m?kt:yt);L[O]=Et,j[O]=Et-ft}e.modifiersData[s]=j}},requiresIfExists:["offset"]};function Ot(t,e,i){void 0===i&&(i=!1);var n,r,o=C(e),a=C(e)&&function(t){var e=t.getBoundingClientRect(),i=j(e.width)/t.offsetWidth||1,n=j(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),s=R(e),d=z(t,a,i),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!i)&&(("body"!==L(e)||ut(s))&&(c=(n=e)!==I(n)&&C(n)?{scrollLeft:(r=n).scrollLeft,scrollTop:r.scrollTop}:ct(n)),C(e)?((l=z(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=lt(s))),{x:d.left+c.scrollLeft-l.x,y:d.top+c.scrollTop-l.y,width:d.width,height:d.height}}function Lt(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var It={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var t=arguments.length,e=new Array(t),i=0;it.length)&&(e=t.length);for(var i=0,n=Array(e);i1?e-1:0),n=1;n=e)&&(void 0===i||t<=i)}function E(t,e,i){return ti?i:t}function x(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=Object.keys(i).reduce((function(t,e){var r=i[e];return"function"==typeof r&&(r=r(n)),"".concat(t," ").concat(e,'="').concat(r,'"')}),t);r+="<".concat(o,">");var a=n+1;return a\s+/g,">").replace(/\s+2&&void 0!==arguments[2]?arguments[2]:0,n=new Date(t).getDay();return A(t,T(e,i)-T(n,i))}function H(t,e){var i=new Date(t).getFullYear();return Math.floor(i/e)*e}Object.defineProperty(e,"__esModule",{value:!0});var P=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,j=/[\s!-/:-@[-`{-~年月日]+/,V={},B={y:function(t,e){return new Date(t).setFullYear(parseInt(e,10))},m:function(t,e,i){var n=new Date(t),r=parseInt(e,10)-1;if(isNaN(r)){if(!e)return NaN;var o=e.toLowerCase(),a=function(t){return t.toLowerCase().startsWith(o)};if((r=i.monthsShort.findIndex(a))<0&&(r=i.months.findIndex(a)),r<0)return NaN}return n.setMonth(r),n.getMonth()!==F(r)?n.setDate(0):n.getTime()},d:function(t,e){return new Date(t).setDate(parseInt(e,10))}},z={d:function(t){return t.getDate()},dd:function(t){return N(t.getDate(),2)},D:function(t,e){return e.daysShort[t.getDay()]},DD:function(t,e){return e.days[t.getDay()]},m:function(t){return t.getMonth()+1},mm:function(t){return N(t.getMonth()+1,2)},M:function(t,e){return e.monthsShort[t.getMonth()]},MM:function(t,e){return e.months[t.getMonth()]},y:function(t){return t.getFullYear()},yy:function(t){return N(t.getFullYear(),2).slice(-2)},yyyy:function(t){return N(t.getFullYear(),4)}};function F(t){return t>-1?t%12:F(t+12)}function N(t,e){return t.toString().padStart(e,"0")}function W(t){if("string"!=typeof t)throw new Error("Invalid date format.");if(t in V)return V[t];var e=t.split(P),i=t.match(new RegExp(P,"g"));if(0===e.length||!i)throw new Error("Invalid date format.");var n=i.map((function(t){return z[t]})),r=Object.keys(B).reduce((function(t,e){return i.find((function(t){return"D"!==t[0]&&t[0].toLowerCase()===e}))&&t.push(e),t}),[]);return V[t]={parser:function(t,e){var n=t.split(j).reduce((function(t,e,n){if(e.length>0&&i[n]){var r=i[n][0];"M"===r?t.m=e:"D"!==r&&(t[r]=e)}return t}),{});return r.reduce((function(t,i){var r=B[i](t,n[i],e);return isNaN(r)?t:r}),L())},formatter:function(t,i){return n.reduce((function(n,r,o){return n+"".concat(e[o]).concat(r(t,i))}),"")+b(e)}}}function q(t,e,i){if(t instanceof Date||"number"==typeof t){var n=O(t);return isNaN(n)?void 0:n}if(t){if("today"===t)return L();if(e&&e.toValue){var r=e.toValue(t,e,i);return isNaN(r)?void 0:O(r)}return W(e).parser(t,i)}}function R(t,e,i){if(isNaN(t)||!t&&0!==t)return"";var n="number"==typeof t?new Date(t):t;return e.toDisplay?e.toDisplay(n,e,i):W(e).formatter(n,i)}var Y=new WeakMap,K=EventTarget.prototype,U=K.addEventListener,J=K.removeEventListener;function X(t,e){var i=Y.get(t);i||(i=[],Y.set(t,i)),e.forEach((function(t){U.call.apply(U,f(t)),i.push(t)}))}function $(t){var e=Y.get(t);e&&(e.forEach((function(t){J.call.apply(J,f(t))})),Y.delete(t))}if(!Event.prototype.composedPath){var G=function t(e){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.push(e),e.parentNode?i=e.parentNode:e.host?i=e.host:e.defaultView&&(i=e.defaultView),i?t(i,n):n};Event.prototype.composedPath=function(){return G(this.target)}}function Q(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=t[n];return e(r)?r:r!==i&&r.parentElement?Q(t,e,i,n+1):void 0}function Z(t,e){var i="function"==typeof e?e:function(t){return t.matches(e)};return Q(t.composedPath(),i,t.currentTarget)}var tt={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}},et={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:'',orientation:"auto",pickLevel:0,prevArrow:'',showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},it=document.createRange();function nt(t){return it.createContextualFragment(t)}function rt(t){"none"!==t.style.display&&(t.style.display&&(t.dataset.styleDisplay=t.style.display),t.style.display="none")}function ot(t){"none"===t.style.display&&(t.dataset.styleDisplay?(t.style.display=t.dataset.styleDisplay,delete t.dataset.styleDisplay):t.style.display="")}function at(t){t.firstChild&&(t.removeChild(t.firstChild),at(t))}var st=et.language,dt=et.format,ct=et.weekStart;function lt(t,e){return t.length<6&&e>=0&&e<7?_(t,e):t}function ut(t){return(t+6)%7}function ht(t,e,i,n){var r=q(t,e,i);return void 0!==r?r:n}function pt(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=parseInt(t,10);return n>=0&&n<=i?n:e}function ft(t,e){var i,n=Object.assign({},t),r={},o=e.constructor.locales,a=e.config||{},s=a.format,d=a.language,c=a.locale,l=a.maxDate,u=a.maxView,h=a.minDate,p=a.pickLevel,f=a.startView,g=a.weekStart;if(n.language&&(n.language!==d&&(o[n.language]?i=n.language:void 0===o[i=n.language.split("-")[0]]&&(i=!1)),delete n.language,i)){d=r.language=i;var v=c||o[st];c=Object.assign({format:dt,weekStart:ct},o[st]),d!==st&&Object.assign(c,o[d]),r.locale=c,s===v.format&&(s=r.format=c.format),g===v.weekStart&&(g=r.weekStart=c.weekStart,r.weekEnd=ut(c.weekStart))}if(n.format){var y="function"==typeof n.format.toDisplay,b="function"==typeof n.format.toValue,w=P.test(n.format);(y&&b||w)&&(s=r.format=n.format),delete n.format}var k=h,E=l;if(void 0!==n.minDate&&(k=null===n.minDate?I(0,0,1):ht(n.minDate,s,c,k),delete n.minDate),void 0!==n.maxDate&&(E=null===n.maxDate?void 0:ht(n.maxDate,s,c,E),delete n.maxDate),E=0&&(r.maxNumberOfDates=O,r.multidate=1!==O),delete n.maxNumberOfDates}n.dateDelimiter&&(r.dateDelimiter=String(n.dateDelimiter),delete n.dateDelimiter);var L=p;void 0!==n.pickLevel&&(L=pt(n.pickLevel,2),delete n.pickLevel),L!==p&&(p=r.pickLevel=L);var A=u;void 0!==n.maxView&&(A=pt(n.maxView,u),delete n.maxView),(A=p>A?p:A)!==u&&(u=r.maxView=A);var C=f;if(void 0!==n.startView&&(C=pt(n.startView,C),delete n.startView),Cu&&(C=u),C!==f&&(r.startView=C),n.prevArrow){var S=nt(n.prevArrow);S.childNodes.length>0&&(r.prevArrow=S.childNodes),delete n.prevArrow}if(n.nextArrow){var T=nt(n.nextArrow);T.childNodes.length>0&&(r.nextArrow=T.childNodes),delete n.nextArrow}if(void 0!==n.disableTouchKeyboard&&(r.disableTouchKeyboard="ontouchstart"in document&&!!n.disableTouchKeyboard,delete n.disableTouchKeyboard),n.orientation){var M=n.orientation.toLowerCase().split(/\s+/g);r.orientation={x:M.find((function(t){return"left"===t||"right"===t}))||"auto",y:M.find((function(t){return"top"===t||"bottom"===t}))||"auto"},delete n.orientation}if(void 0!==n.todayBtnMode){switch(n.todayBtnMode){case 0:case 1:r.todayBtnMode=n.todayBtnMode}delete n.todayBtnMode}return Object.keys(n).forEach((function(t){void 0!==n[t]&&m(et,t)&&(r[t]=n[t])})),r}var gt=D(''),vt=D('
    \n
    '.concat(x("span",7,{class:"dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"}),'
    \n
    ').concat(x("span",42,{class:"block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"}),"
    \n
    ")),yt=D('
    \n
    \n
    '.concat(x("span",6,{class:"week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"}),"
    \n
    ")),mt=function(){return a((function t(e,i){r(this,t),Object.assign(this,i,{picker:e,element:nt('
    ').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}),[{key:"init",value:function(t){void 0!==t.pickLevel&&(this.isMinView=this.id===t.pickLevel),this.setOptions(t),this.updateFocus(),this.updateSelection()}},{key:"performBeforeHook",value:function(t,e,i){var n=this.beforeShow(new Date(i));switch(v(n)){case"boolean":n={enabled:n};break;case"string":n={classes:n}}if(n){if(!1===n.enabled&&(t.classList.add("disabled"),_(this.disabled,e)),n.classes){var r,o=n.classes.split(/\s+/);(r=t.classList).add.apply(r,f(o)),o.includes("disabled")&&_(this.disabled,e)}n.content&&function(t,e){at(t),e instanceof DocumentFragment?t.appendChild(e):"string"==typeof e?t.appendChild(nt(e)):"function"==typeof e.forEach&&e.forEach((function(e){t.appendChild(e)}))}(t,n.content)}}}])}(),bt=function(t){function e(t){return r(this,e),n(this,e,[t,{id:0,name:"days",cellClass:"day"}])}return c(e,t),a(e,[{key:"init",value:function(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(i){var n=nt(vt).firstChild;this.dow=n.firstChild,this.grid=n.lastChild,this.element.appendChild(n)}s(d(e.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function(t){var e,i=this;if(m(t,"minDate")&&(this.minDate=t.minDate),m(t,"maxDate")&&(this.maxDate=t.maxDate),t.datesDisabled&&(this.datesDisabled=t.datesDisabled),t.daysOfWeekDisabled&&(this.daysOfWeekDisabled=t.daysOfWeekDisabled,e=!0),t.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=t.daysOfWeekHighlighted),void 0!==t.todayHighlight&&(this.todayHighlight=t.todayHighlight),void 0!==t.weekStart&&(this.weekStart=t.weekStart,this.weekEnd=t.weekEnd,e=!0),t.locale){var n=this.locale=t.locale;this.dayNames=n.daysMin,this.switchLabelFormat=n.titleFormat,e=!0}if(void 0!==t.beforeShowDay&&(this.beforeShow="function"==typeof t.beforeShowDay?t.beforeShowDay:void 0),void 0!==t.calendarWeeks)if(t.calendarWeeks&&!this.calendarWeeks){var r=nt(yt).firstChild;this.calendarWeeks={element:r,dow:r.firstChild,weeks:r.lastChild},this.element.insertBefore(r,this.element.firstChild)}else this.calendarWeeks&&!t.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==t.showDaysOfWeek&&(t.showDaysOfWeek?(ot(this.dow),this.calendarWeeks&&ot(this.calendarWeeks.dow)):(rt(this.dow),this.calendarWeeks&&rt(this.calendarWeeks.dow))),e&&Array.from(this.dow.children).forEach((function(t,e){var n=(i.weekStart+e)%7;t.textContent=i.dayNames[n],t.className=i.daysOfWeekDisabled.includes(n)?"dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed":"dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"}))}},{key:"updateFocus",value:function(){var t=new Date(this.picker.viewDate),e=t.getFullYear(),i=t.getMonth(),n=I(e,i,1),r=M(n,this.weekStart,this.weekStart);this.first=n,this.last=I(e,i+1,0),this.start=r,this.focused=this.picker.viewDate}},{key:"updateSelection",value:function(){var t=this.picker.datepicker,e=t.dates,i=t.rangepicker;this.selected=e,i&&(this.range=i.dates)}},{key:"render",value:function(){var t=this;this.today=this.todayHighlight?L():void 0,this.disabled=f(this.datesDisabled);var e=R(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(e),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){var i=M(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((function(t,e){t.textContent=function(t){var e=M(t,4,1),i=M(new Date(e).setMonth(0,4),4,1);return Math.round((e-i)/6048e5)+1}(A(i,7*e))}))}Array.from(this.grid.children).forEach((function(e,i){var n=e.classList,r=A(t.start,i),o=new Date(r),a=o.getDay();if(e.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(t.cellClass),e.dataset.date=r,e.textContent=o.getDate(),rt.last&&n.add("next","text-gray-500","dark:text-white"),t.today===r&&n.add("today","bg-gray-100","dark:bg-gray-600"),(rt.maxDate||t.disabled.includes(r))&&(n.add("disabled","cursor-not-allowed","text-gray-400","dark:text-gray-500"),n.remove("hover:bg-gray-100","dark:hover:bg-gray-600","text-gray-900","dark:text-white","cursor-pointer")),t.daysOfWeekDisabled.includes(a)&&(n.add("disabled","cursor-not-allowed","text-gray-400","dark:text-gray-500"),n.remove("hover:bg-gray-100","dark:hover:bg-gray-600","text-gray-900","dark:text-white","cursor-pointer"),_(t.disabled,r)),t.daysOfWeekHighlighted.includes(a)&&n.add("highlighted"),t.range){var s=h(t.range,2),d=s[0],c=s[1];r>d&&ri&&re||s1&&void 0!==arguments[1])||arguments[1];i&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(nt(x("span",12,{"data-month":function(t){return t}})))),s(d(e.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function(t){if(t.locale&&(this.monthNames=t.locale.monthsShort),m(t,"minDate"))if(void 0===t.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{var e=new Date(t.minDate);this.minYear=e.getFullYear(),this.minMonth=e.getMonth(),this.minDate=e.setDate(1)}if(m(t,"maxDate"))if(void 0===t.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{var i=new Date(t.maxDate);this.maxYear=i.getFullYear(),this.maxMonth=i.getMonth(),this.maxDate=I(this.maxYear,this.maxMonth+1,0)}void 0!==t.beforeShowMonth&&(this.beforeShow="function"==typeof t.beforeShowMonth?t.beforeShowMonth:void 0)}},{key:"updateFocus",value:function(){var t=new Date(this.picker.viewDate);this.year=t.getFullYear(),this.focused=t.getMonth()}},{key:"updateSelection",value:function(){var t=this.picker.datepicker,e=t.dates,i=t.rangepicker;this.selected=e.reduce((function(t,e){var i=new Date(e),n=i.getFullYear(),r=i.getMonth();return void 0===t[n]?t[n]=[r]:_(t[n],r),t}),{}),i&&i.dates&&(this.range=i.dates.map((function(t){var e=new Date(t);return isNaN(e)?void 0:[e.getFullYear(),e.getMonth()]})))}},{key:"render",value:function(){var t=this;this.disabled=[],this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);var e=this.selected[this.year]||[],i=this.yearthis.maxYear,n=this.year===this.minYear,r=this.year===this.maxYear,o=_t(this.range,this.year);Array.from(this.grid.children).forEach((function(a,s){var d=a.classList,c=I(t.year,s,1);if(a.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(t.cellClass),t.isMinView&&(a.dataset.date=c),a.textContent=t.monthNames[s],(i||n&&st.maxMonth)&&d.add("disabled"),o){var l=h(o,2),u=l[0],p=l[1];s>u&&sn&&o1&&void 0!==arguments[1])||arguments[1];i&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow".concat(kt(this.cellClass)),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(nt(x("span",12)))),s(d(e.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function(t){if(m(t,"minDate")&&(void 0===t.minDate?this.minYear=this.minDate=void 0:(this.minYear=H(t.minDate,this.step),this.minDate=I(this.minYear,0,1))),m(t,"maxDate")&&(void 0===t.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=H(t.maxDate,this.step),this.maxDate=I(this.maxYear,11,31))),void 0!==t[this.beforeShowOption]){var e=t[this.beforeShowOption];this.beforeShow="function"==typeof e?e:void 0}}},{key:"updateFocus",value:function(){var t=new Date(this.picker.viewDate),e=H(t,this.navStep),i=e+9*this.step;this.first=e,this.last=i,this.start=e-this.step,this.focused=H(t,this.step)}},{key:"updateSelection",value:function(){var t=this,e=this.picker.datepicker,i=e.dates,n=e.rangepicker;this.selected=i.reduce((function(e,i){return _(e,H(i,t.step))}),[]),n&&n.dates&&(this.range=n.dates.map((function(e){if(void 0!==e)return H(e,t.step)})))}},{key:"render",value:function(){var t=this;this.disabled=[],this.picker.setViewSwitchLabel("".concat(this.first,"-").concat(this.last)),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((function(e,i){var n=e.classList,r=t.start+i*t.step,o=I(r,0,1);if(e.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(t.cellClass),t.isMinView&&(e.dataset.date=o),e.textContent=e.dataset.year=r,0===i?n.add("prev"):11===i&&n.add("next"),(rt.maxYear)&&n.add("disabled"),t.range){var a=h(t.range,2),s=a[0],d=a[1];r>s&&ri&&r0?b(e):i.defaultViewDate,i.minDate,i.maxDate)}function Bt(t,e){var i=new Date(t.viewDate),n=new Date(e),r=t.currentView,o=r.id,a=r.year,s=r.first,d=r.last,c=n.getFullYear();switch(t.viewDate=e,c!==i.getFullYear()&&xt(t.datepicker,"changeYear"),n.getMonth()!==i.getMonth()&&xt(t.datepicker,"changeMonth"),o){case 0:return ed;case 1:return c!==a;default:return cd}}function zt(t){return window.getComputedStyle(t).direction}var Ft=function(){return a((function t(e){r(this,t),this.datepicker=e;var i=gt.replace(/%buttonClass%/g,e.config.buttonClass),n=this.element=nt(i).firstChild,o=h(n.firstChild.children,3),a=o[0],s=o[1],d=o[2],c=a.firstElementChild,l=h(a.lastElementChild.children,3),u=l[0],p=l[1],f=l[2],g=h(d.firstChild.children,2),v={title:c,prevBtn:u,viewSwitch:p,nextBtn:f,todayBtn:g[0],clearBtn:g[1]};this.main=s,this.controls=v;var y=e.inline?"inline":"dropdown";n.classList.add("datepicker-".concat(y)),"dropdown"===y&&n.classList.add("dropdown","absolute","top-0","left-0","z-50","pt-2"),jt(this,e.config),this.viewDate=Vt(e),X(e,[[n,"click",Pt.bind(null,e),{capture:!0}],[s,"click",Ht.bind(null,e)],[v.viewSwitch,"click",St.bind(null,e)],[v.prevBtn,"click",Tt.bind(null,e)],[v.nextBtn,"click",Mt.bind(null,e)],[v.todayBtn,"click",At.bind(null,e)],[v.clearBtn,"click",Ct.bind(null,e)]]),this.views=[new bt(this),new wt(this),new Et(this,{id:2,name:"years",cellClass:"year",step:1}),new Et(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[e.config.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),e.config.container.appendChild(this.element)}),[{key:"setOptions",value:function(t){jt(this,t),this.views.forEach((function(e){e.init(t,!1)})),this.currentView.render()}},{key:"detach",value:function(){this.datepicker.config.container.removeChild(this.element)}},{key:"show",value:function(){if(!this.active){this.element.classList.add("active","block"),this.element.classList.remove("hidden"),this.active=!0;var t=this.datepicker;if(!t.inline){var e=zt(t.inputField);e!==zt(t.config.container)?this.element.dir=e:this.element.dir&&this.element.removeAttribute("dir"),this.place(),t.config.disableTouchKeyboard&&t.inputField.blur()}xt(t,"show")}}},{key:"hide",value:function(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active","block"),this.element.classList.add("active","block","hidden"),this.active=!1,xt(this.datepicker,"hide"))}},{key:"place",value:function(){var t,e,i,n=this.element,r=n.classList,o=n.style,a=this.datepicker,s=a.config,d=a.inputField,c=s.container,l=this.element.getBoundingClientRect(),u=l.width,h=l.height,p=c.getBoundingClientRect(),f=p.left,g=p.top,v=p.width,y=d.getBoundingClientRect(),m=y.left,b=y.top,_=y.width,w=y.height,k=s.orientation,E=k.x,x=k.y;c===document.body?(t=window.scrollY,e=m+window.scrollX,i=b+t):(e=m-f,i=b-g+(t=c.scrollTop)),"auto"===E&&(e<0?(E="left",e=10):E=e+u>v||"rtl"===zt(d)?"right":"left"),"right"===E&&(e-=u-_),"auto"===x&&(x=i-h0&&void 0!==arguments[0])||arguments[0],e=t&&this._renderMethod||"render";delete this._renderMethod,this.currentView[e]()}}])}();function Nt(t,e,i,n,r,o){if(k(t,r,o))return n(t)?Nt(e(t,i),e,i,n,r,o):t}function Wt(t,e,i,n){var r,o,a=t.picker,s=a.currentView,d=s.step||1,c=a.viewDate;switch(s.id){case 0:c=n?A(c,7*i):e.ctrlKey||e.metaKey?S(c,i):A(c,i),r=A,o=function(t){return s.disabled.includes(t)};break;case 1:c=C(c,n?4*i:i),r=C,o=function(t){var e=new Date(t),i=s.year,n=s.disabled;return e.getFullYear()===i&&n.includes(e.getMonth())};break;default:c=S(c,i*(n?4:1)*d),r=S,o=function(t){return s.disabled.includes(H(t,d))}}void 0!==(c=Nt(c,r,i<0?-d:d,o,s.minDate,s.maxDate))&&a.changeFocus(c).render()}function qt(t,e){if("Tab"!==e.key){var i=t.picker,n=i.currentView,r=n.id,o=n.isMinView;if(i.active)if(t.editMode)switch(e.key){case"Escape":i.hide();break;case"Enter":t.exitEditMode({update:!0,autohide:t.config.autohide});break;default:return}else switch(e.key){case"Escape":i.hide();break;case"ArrowLeft":if(e.ctrlKey||e.metaKey)Dt(t,-1);else{if(e.shiftKey)return void t.enterEditMode();Wt(t,e,-1,!1)}break;case"ArrowRight":if(e.ctrlKey||e.metaKey)Dt(t,1);else{if(e.shiftKey)return void t.enterEditMode();Wt(t,e,1,!1)}break;case"ArrowUp":if(e.ctrlKey||e.metaKey)Ot(t);else{if(e.shiftKey)return void t.enterEditMode();Wt(t,e,-1,!0)}break;case"ArrowDown":if(e.shiftKey&&!e.ctrlKey&&!e.metaKey)return void t.enterEditMode();Wt(t,e,1,!0);break;case"Enter":o?t.setDate(i.viewDate):i.changeView(r-1).render();break;case"Backspace":case"Delete":return void t.enterEditMode();default:return void(1!==e.key.length||e.ctrlKey||e.metaKey||t.enterEditMode())}else switch(e.key){case"ArrowDown":case"Escape":i.show();break;case"Enter":t.update();break;default:return}e.preventDefault(),e.stopPropagation()}else Lt(t)}function Rt(t){t.config.showOnFocus&&!t._showing&&t.show()}function Yt(t,e){var i=e.target;(t.picker.active||t.config.showOnClick)&&(i._active=i===document.activeElement,i._clicking=setTimeout((function(){delete i._active,delete i._clicking}),2e3))}function Kt(t,e){var i=e.target;i._clicking&&(clearTimeout(i._clicking),delete i._clicking,i._active&&t.enterEditMode(),delete i._active,t.config.showOnClick&&t.show())}function Ut(t,e){e.clipboardData.types.includes("text/plain")&&t.enterEditMode()}function Jt(t,e){var i=t.element;if(i===document.activeElement){var n=t.picker.element;Z(e,(function(t){return t===i||t===n}))||Lt(t)}}function Xt(t,e){return t.map((function(t){return R(t,e.format,e.locale)})).join(e.dateDelimiter)}function $t(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.config,r=t.dates,o=t.rangepicker;if(0===e.length)return i?[]:void 0;var a=o&&t===o.datepickers[1],s=e.reduce((function(t,e){var i=q(e,n.format,n.locale);if(void 0===i)return t;if(n.pickLevel>0){var r=new Date(i);i=1===n.pickLevel?a?r.setMonth(r.getMonth()+1,0):r.setDate(1):a?r.setFullYear(r.getFullYear()+1,0,0):r.setMonth(0,1)}return!k(i,n.minDate,n.maxDate)||t.includes(i)||n.datesDisabled.includes(i)||n.daysOfWeekDisabled.includes(new Date(i).getDay())||t.push(i),t}),[]);return 0!==s.length?(n.multidate&&!i&&(s=s.reduce((function(t,e){return r.includes(e)||t.push(e),t}),r.filter((function(t){return!s.includes(t)})))),n.maxNumberOfDates&&s.length>n.maxNumberOfDates?s.slice(-1*n.maxNumberOfDates):s):void 0}function Gt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.config,r=t.picker,o=t.inputField;if(2&e){var a=r.active?n.pickLevel:n.startView;r.update().changeView(a).render(i)}1&e&&o&&(o.value=Xt(t.dates,n))}function Qt(t,e,i){var n=i.clear,r=i.render,o=i.autohide;void 0===r&&(r=!0),r?void 0===o&&(o=t.config.autohide):o=!1;var a=$t(t,e,n);a&&(a.toString()!==t.dates.toString()?(t.dates=a,Gt(t,r?3:1),xt(t,"changeDate")):Gt(t,1),o&&t.hide())}var Zt=function(){return a((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;r(this,t),e.datepicker=this,this.element=e;var o=this.config=Object.assign({buttonClass:i.buttonClass&&String(i.buttonClass)||"button",container:document.body,defaultViewDate:L(),maxDate:void 0,minDate:void 0},ft(et,this));this._options=i,Object.assign(o,ft(i,this));var a,s,d=this.inline="INPUT"!==e.tagName;if(d)o.container=e,s=w(e.dataset.date,o.dateDelimiter),delete e.dataset.date;else{var c=i.container?document.querySelector(i.container):null;c&&(o.container=c),(a=this.inputField=e).classList.add("datepicker-input"),s=w(a.value,o.dateDelimiter)}if(n){var l=n.inputs.indexOf(a),u=n.datepickers;if(l<0||l>1||!Array.isArray(u))throw Error("Invalid rangepicker object.");u[l]=this,Object.defineProperty(this,"rangepicker",{get:function(){return n}})}this.dates=[];var h=$t(this,s);h&&h.length>0&&(this.dates=h),a&&(a.value=Xt(this.dates,o));var p=this.picker=new Ft(this);if(d)this.show();else{var f=Jt.bind(null,this),g=[[a,"keydown",qt.bind(null,this)],[a,"focus",Rt.bind(null,this)],[a,"mousedown",Yt.bind(null,this)],[a,"click",Kt.bind(null,this)],[a,"paste",Ut.bind(null,this)],[document,"mousedown",f],[document,"touchstart",f],[window,"resize",p.place.bind(p)]];X(this,g)}}),[{key:"active",get:function(){return!(!this.picker||!this.picker.active)}},{key:"pickerElement",get:function(){return this.picker?this.picker.element:void 0}},{key:"setOptions",value:function(t){var e=this.picker,i=ft(t,this);Object.assign(this._options,t),Object.assign(this.config,i),e.setOptions(i),Gt(this,3)}},{key:"show",value:function(){if(this.inputField){if(this.inputField.disabled)return;this.inputField!==document.activeElement&&(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}},{key:"hide",value:function(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}},{key:"destroy",value:function(){return this.hide(),$(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}},{key:"getDate",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,i=e?function(i){return R(i,e,t.config.locale)}:function(t){return new Date(t)};return this.config.multidate?this.dates.map(i):this.dates.length>0?i(this.dates[0]):void 0}},{key:"setDate",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline){var e={clear:!0,autohide:!(!t||!t.autohide)},i=w(this.inputField.value,this.config.dateDelimiter);Qt(this,i,e)}}},{key:"refresh",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&"string"!=typeof t&&(e=t,t=void 0),Gt(this,"picker"===t?2:"input"===t?1:3,!e)}},{key:"enterEditMode",value:function(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit","border-blue-700","!border-primary-700"))}},{key:"exitEditMode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline&&this.editMode){var e=Object.assign({update:!1},t);delete this.editMode,this.inputField.classList.remove("in-edit","border-blue-700","!border-primary-700"),e.update&&this.update(e)}}}],[{key:"formatDate",value:function(t,e,i){return R(t,e,i&&tt[i]||tt.en)}},{key:"parseDate",value:function(t,e,i){return q(t,e,i&&tt[i]||tt.en)}},{key:"locales",get:function(){return tt}}])}();function te(t){var e=Object.assign({},t);return delete e.inputs,delete e.allowOneSidedRange,delete e.maxNumberOfDates,e}function ee(t,e,i,n){X(t,[[i,"changeDate",e]]),new Zt(i,n,t)}function ie(t,e){if(!t._updating){t._updating=!0;var i=e.target;if(void 0!==i.datepicker){var n=t.datepickers,r={render:!1},o=t.inputs.indexOf(i),a=0===o?1:0,s=n[o].dates[0],d=n[a].dates[0];void 0!==s&&void 0!==d?0===o&&s>d?(n[0].setDate(d,r),n[1].setDate(s,r)):1===o&&s1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var n=Array.isArray(i.inputs)?i.inputs:Array.from(e.querySelectorAll("input"));if(!(n.length<2)){e.rangepicker=this,this.element=e,this.inputs=n.slice(0,2),this.allowOneSidedRange=!!i.allowOneSidedRange;var o=ie.bind(null,this),a=te(i),s=[];Object.defineProperty(this,"datepickers",{get:function(){return s}}),ee(this,o,this.inputs[0],a),ee(this,o,this.inputs[1],a),Object.freeze(s),s[0].dates.length>0?ie(this,{target:this.inputs[0]}):s[1].dates.length>0&&ie(this,{target:this.inputs[1]})}}),[{key:"dates",get:function(){return 2===this.datepickers.length?[this.datepickers[0].dates[0],this.datepickers[1].dates[0]]:void 0}},{key:"setOptions",value:function(t){this.allowOneSidedRange=!!t.allowOneSidedRange;var e=te(t);this.datepickers[0].setOptions(e),this.datepickers[1].setOptions(e)}},{key:"destroy",value:function(){this.datepickers[0].destroy(),this.datepickers[1].destroy(),$(this),delete this.element.rangepicker}},{key:"getDates",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,i=e?function(i){return R(i,e,t.datepickers[0].config.locale)}:function(t){return new Date(t)};return this.dates.map((function(t){return void 0===t?t:i(t)}))}},{key:"setDates",value:function(t,e){var i=h(this.datepickers,2),n=i[0],r=i[1],o=this.dates;this._updating=!0,n.setDate(t),r.setDate(e),delete this._updating,r.dates[0]!==o[1]?ie(this,{target:this.inputs[1]}):n.dates[0]!==o[0]&&ie(this,{target:this.inputs[0]})}}])}();e.DateRangePicker=ne,e.Datepicker=Zt},902:function(t,e,i){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;it._options.maxValue&&(i.value=t._options.maxValue.toString()),null!==t._options.minValue&&parseInt(i.value)=this._options.maxValue||(this._targetEl.value=(this.getCurrentValue()+1).toString(),this._options.onIncrement(this))},t.prototype.decrement=function(){null!==this._options.minValue&&this.getCurrentValue()<=this._options.minValue||(this._targetEl.value=(this.getCurrentValue()-1).toString(),this._options.onDecrement(this))},t.prototype.updateOnIncrement=function(t){this._options.onIncrement=t},t.prototype.updateOnDecrement=function(t){this._options.onDecrement=t},t}();function d(){document.querySelectorAll("[data-input-counter]").forEach((function(t){var e=t.id,i=document.querySelector('[data-input-counter-increment="'+e+'"]'),n=document.querySelector('[data-input-counter-decrement="'+e+'"]'),o=t.getAttribute("data-input-counter-min"),a=t.getAttribute("data-input-counter-max");t?r.default.instanceExists("InputCounter",t.getAttribute("id"))||new s(t,i||null,n||null,{minValue:o?parseInt(o):null,maxValue:a?parseInt(a):null}):console.error('The target element with id "'.concat(e,'" does not exist. Please check the data-input-counter attribute.'))}))}e.initInputCounters=d,"undefined"!=typeof window&&(window.InputCounter=s,window.initInputCounters=d),e.default=s},16:function(t,e,i){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nfunction _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nfunction _callSuper(t, o, e) {\n return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));\n}\nfunction _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nfunction _get() {\n return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {\n var p = _superPropBase(e, t);\n if (p) {\n var n = Object.getOwnPropertyDescriptor(p, t);\n return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;\n }\n }, _get.apply(null, arguments);\n}\nfunction _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && _setPrototypeOf(t, e);\n}\nfunction _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function () {\n return !!t;\n })();\n}\nfunction _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return _assertThisInitialized(t);\n}\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nfunction _slicedToArray(r, e) {\n return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _superPropBase(t, o) {\n for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););\n return t;\n}\nfunction _toConsumableArray(r) {\n return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n}\n\nfunction hasProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction lastItemOf(arr) {\n return arr[arr.length - 1];\n}\n\n// push only the items not included in the array\nfunction pushUnique(arr) {\n for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n items[_key - 1] = arguments[_key];\n }\n items.forEach(function (item) {\n if (arr.includes(item)) {\n return;\n }\n arr.push(item);\n });\n return arr;\n}\nfunction stringToArray(str, separator) {\n // convert empty string to an empty array\n return str ? str.split(separator) : [];\n}\nfunction isInRange(testVal, min, max) {\n var minOK = min === undefined || testVal >= min;\n var maxOK = max === undefined || testVal <= max;\n return minOK && maxOK;\n}\nfunction limitToRange(val, min, max) {\n if (val < min) {\n return min;\n }\n if (val > max) {\n return max;\n }\n return val;\n}\nfunction createTagRepeat(tagName, repeat) {\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';\n var openTagSrc = Object.keys(attributes).reduce(function (src, attr) {\n var val = attributes[attr];\n if (typeof val === 'function') {\n val = val(index);\n }\n return \"\".concat(src, \" \").concat(attr, \"=\\\"\").concat(val, \"\\\"\");\n }, tagName);\n html += \"<\".concat(openTagSrc, \">\");\n var next = index + 1;\n return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html;\n}\n\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nfunction optimizeTemplateHTML(html) {\n return html.replace(/>\\s+/g, '>').replace(/\\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var baseDay = new Date(baseDate).getDay();\n return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n}\n\n// Get the ISO week of a date\nfunction getWeek(date) {\n // start of ISO week is Monday\n var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n // 1st week == the week where the 4th of January is in\n var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nfunction startOfYearPeriod(date, years) {\n /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n var year = new Date(date).getFullYear();\n return Math.floor(year / years) * years;\n}\n\n// pattern for format parts\nvar reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nvar reNonDateParts = /[\\s!-/:-@[-`{-~年月日]+/;\n// cache for persed formats\nvar knownFormats = {};\n// parse funtions for date parts\nvar parseFns = {\n y: function y(date, year) {\n return new Date(date).setFullYear(parseInt(year, 10));\n },\n m: function m(date, month, locale) {\n var newDate = new Date(date);\n var monthIndex = parseInt(month, 10) - 1;\n if (isNaN(monthIndex)) {\n if (!month) {\n return NaN;\n }\n var monthName = month.toLowerCase();\n var compareNames = function compareNames(name) {\n return name.toLowerCase().startsWith(monthName);\n };\n // compare with both short and full names because some locales have periods\n // in the short names (not equal to the first X letters of the full names)\n monthIndex = locale.monthsShort.findIndex(compareNames);\n if (monthIndex < 0) {\n monthIndex = locale.months.findIndex(compareNames);\n }\n if (monthIndex < 0) {\n return NaN;\n }\n }\n newDate.setMonth(monthIndex);\n return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime();\n },\n d: function d(date, day) {\n return new Date(date).setDate(parseInt(day, 10));\n }\n};\n// format functions for date parts\nvar formatFns = {\n d: function d(date) {\n return date.getDate();\n },\n dd: function dd(date) {\n return padZero(date.getDate(), 2);\n },\n D: function D(date, locale) {\n return locale.daysShort[date.getDay()];\n },\n DD: function DD(date, locale) {\n return locale.days[date.getDay()];\n },\n m: function m(date) {\n return date.getMonth() + 1;\n },\n mm: function mm(date) {\n return padZero(date.getMonth() + 1, 2);\n },\n M: function M(date, locale) {\n return locale.monthsShort[date.getMonth()];\n },\n MM: function MM(date, locale) {\n return locale.months[date.getMonth()];\n },\n y: function y(date) {\n return date.getFullYear();\n },\n yy: function yy(date) {\n return padZero(date.getFullYear(), 2).slice(-2);\n },\n yyyy: function yyyy(date) {\n return padZero(date.getFullYear(), 4);\n }\n};\n\n// get month index in normal range (0 - 11) from any number\nfunction normalizeMonth(monthIndex) {\n return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n}\nfunction padZero(num, length) {\n return num.toString().padStart(length, '0');\n}\nfunction parseFormatString(format) {\n if (typeof format !== 'string') {\n throw new Error(\"Invalid date format.\");\n }\n if (format in knownFormats) {\n return knownFormats[format];\n }\n\n // sprit the format string into parts and seprators\n var separators = format.split(reFormatTokens);\n var parts = format.match(new RegExp(reFormatTokens, 'g'));\n if (separators.length === 0 || !parts) {\n throw new Error(\"Invalid date format.\");\n }\n\n // collect format functions used in the format\n var partFormatters = parts.map(function (token) {\n return formatFns[token];\n });\n\n // collect parse function keys used in the format\n // iterate over parseFns' keys in order to keep the order of the keys.\n var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) {\n var token = parts.find(function (part) {\n return part[0] !== 'D' && part[0].toLowerCase() === key;\n });\n if (token) {\n keys.push(key);\n }\n return keys;\n }, []);\n return knownFormats[format] = {\n parser: function parser(dateStr, locale) {\n var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) {\n if (part.length > 0 && parts[index]) {\n var token = parts[index][0];\n if (token === 'M') {\n dtParts.m = part;\n } else if (token !== 'D') {\n dtParts[token] = part;\n }\n }\n return dtParts;\n }, {});\n\n // iterate over partParserkeys so that the parsing is made in the oder\n // of year, month and day to prevent the day parser from correcting last\n // day of month wrongly\n return partParserKeys.reduce(function (origDate, key) {\n var newDate = parseFns[key](origDate, dateParts[key], locale);\n // ingnore the part failed to parse\n return isNaN(newDate) ? origDate : newDate;\n }, today());\n },\n formatter: function formatter(date, locale) {\n var dateStr = partFormatters.reduce(function (str, fn, index) {\n return str += \"\".concat(separators[index]).concat(fn(date, locale));\n }, '');\n // separators' length is always parts' length + 1,\n return dateStr += lastItemOf(separators);\n }\n };\n}\nfunction parseDate(dateStr, format, locale) {\n if (dateStr instanceof Date || typeof dateStr === 'number') {\n var date = stripTime(dateStr);\n return isNaN(date) ? undefined : date;\n }\n if (!dateStr) {\n return undefined;\n }\n if (dateStr === 'today') {\n return today();\n }\n if (format && format.toValue) {\n var _date = format.toValue(dateStr, format, locale);\n return isNaN(_date) ? undefined : stripTime(_date);\n }\n return parseFormatString(format).parser(dateStr, locale);\n}\nfunction formatDate(date, format, locale) {\n if (isNaN(date) || !date && date !== 0) {\n return '';\n }\n var dateObj = typeof date === 'number' ? new Date(date) : date;\n if (format.toDisplay) {\n return format.toDisplay(dateObj, format, locale);\n }\n return parseFormatString(format).formatter(dateObj, locale);\n}\n\nvar listenerRegistry = new WeakMap();\nvar _EventTarget$prototyp = EventTarget.prototype,\n addEventListener = _EventTarget$prototyp.addEventListener,\n removeEventListener = _EventTarget$prototyp.removeEventListener;\n\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n// - each definition must be a flat array of event target and the arguments\n// used to call addEventListener() on the target\nfunction registerListeners(keyObj, listeners) {\n var registered = listenerRegistry.get(keyObj);\n if (!registered) {\n registered = [];\n listenerRegistry.set(keyObj, registered);\n }\n listeners.forEach(function (listener) {\n addEventListener.call.apply(addEventListener, _toConsumableArray(listener));\n registered.push(listener);\n });\n}\nfunction unregisterListeners(keyObj) {\n var listeners = listenerRegistry.get(keyObj);\n if (!listeners) {\n return;\n }\n listeners.forEach(function (listener) {\n removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener));\n });\n listenerRegistry[\"delete\"](keyObj);\n}\n\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n var getComposedPath = function getComposedPath(node) {\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n path.push(node);\n var parent;\n if (node.parentNode) {\n parent = node.parentNode;\n } else if (node.host) {\n // ShadowRoot\n parent = node.host;\n } else if (node.defaultView) {\n // Document\n parent = node.defaultView;\n }\n return parent ? getComposedPath(parent, path) : path;\n };\n Event.prototype.composedPath = function () {\n return getComposedPath(this.target);\n };\n}\nfunction findFromPath(path, criteria, currentTarget) {\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var el = path[index];\n if (criteria(el)) {\n return el;\n } else if (el === currentTarget || !el.parentElement) {\n // stop when reaching currentTarget or \n return;\n }\n return findFromPath(path, criteria, currentTarget, index + 1);\n}\n\n// Search for the actual target of a delegated event\nfunction findElementInEventPath(ev, selector) {\n var criteria = typeof selector === 'function' ? selector : function (el) {\n return el.matches(selector);\n };\n return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n\n// default locales\nvar locales = {\n en: {\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n today: \"Today\",\n clear: \"Clear\",\n titleFormat: \"MM y\"\n }\n};\n\n// config options updatable by setOptions() and their default values\nvar defaultOptions = {\n autohide: false,\n beforeShowDay: null,\n beforeShowDecade: null,\n beforeShowMonth: null,\n beforeShowYear: null,\n calendarWeeks: false,\n clearBtn: false,\n dateDelimiter: ',',\n datesDisabled: [],\n daysOfWeekDisabled: [],\n daysOfWeekHighlighted: [],\n defaultViewDate: undefined,\n // placeholder, defaults to today() by the program\n disableTouchKeyboard: false,\n format: 'mm/dd/yyyy',\n language: 'en',\n maxDate: null,\n maxNumberOfDates: 1,\n maxView: 3,\n minDate: null,\n nextArrow: '',\n orientation: 'auto',\n pickLevel: 0,\n prevArrow: '',\n showDaysOfWeek: true,\n showOnClick: true,\n showOnFocus: true,\n startView: 0,\n title: '',\n todayBtn: false,\n todayBtnMode: 0,\n todayHighlight: false,\n updateOnBlur: true,\n weekStart: 0\n};\n\nvar range = document.createRange();\nfunction parseHTML(html) {\n return range.createContextualFragment(html);\n}\nfunction hideElement(el) {\n if (el.style.display === 'none') {\n return;\n }\n // back up the existing display setting in data-style-display\n if (el.style.display) {\n el.dataset.styleDisplay = el.style.display;\n }\n el.style.display = 'none';\n}\nfunction showElement(el) {\n if (el.style.display !== 'none') {\n return;\n }\n if (el.dataset.styleDisplay) {\n // restore backed-up dispay property\n el.style.display = el.dataset.styleDisplay;\n delete el.dataset.styleDisplay;\n } else {\n el.style.display = '';\n }\n}\nfunction emptyChildNodes(el) {\n if (el.firstChild) {\n el.removeChild(el.firstChild);\n emptyChildNodes(el);\n }\n}\nfunction replaceChildNodes(el, newChildNodes) {\n emptyChildNodes(el);\n if (newChildNodes instanceof DocumentFragment) {\n el.appendChild(newChildNodes);\n } else if (typeof newChildNodes === 'string') {\n el.appendChild(parseHTML(newChildNodes));\n } else if (typeof newChildNodes.forEach === 'function') {\n newChildNodes.forEach(function (node) {\n el.appendChild(node);\n });\n }\n}\n\nvar defaultLang = defaultOptions.language,\n defaultFormat = defaultOptions.format,\n defaultWeekStart = defaultOptions.weekStart;\n\n// Reducer function to filter out invalid day-of-week from the input\nfunction sanitizeDOW(dow, day) {\n return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow;\n}\nfunction calcEndOfWeek(startOfWeek) {\n return (startOfWeek + 6) % 7;\n}\n\n// validate input date. if invalid, fallback to the original value\nfunction validateDate(value, format, locale, origValue) {\n var date = parseDate(value, format, locale);\n return date !== undefined ? date : origValue;\n}\n\n// Validate viewId. if invalid, fallback to the original value\nfunction validateViewId(value, origValue) {\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;\n var viewId = parseInt(value, 10);\n return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n\n// Create Datepicker configuration to set\nfunction processOptions(options, datepicker) {\n var inOpts = Object.assign({}, options);\n var config = {};\n var locales = datepicker.constructor.locales;\n var _ref = datepicker.config || {},\n format = _ref.format,\n language = _ref.language,\n locale = _ref.locale,\n maxDate = _ref.maxDate,\n maxView = _ref.maxView,\n minDate = _ref.minDate,\n pickLevel = _ref.pickLevel,\n startView = _ref.startView,\n weekStart = _ref.weekStart;\n if (inOpts.language) {\n var lang;\n if (inOpts.language !== language) {\n if (locales[inOpts.language]) {\n lang = inOpts.language;\n } else {\n // Check if langauge + region tag can fallback to the one without\n // region (e.g. fr-CA → fr)\n lang = inOpts.language.split('-')[0];\n if (locales[lang] === undefined) {\n lang = false;\n }\n }\n }\n delete inOpts.language;\n if (lang) {\n language = config.language = lang;\n\n // update locale as well when updating language\n var origLocale = locale || locales[defaultLang];\n // use default language's properties for the fallback\n locale = Object.assign({\n format: defaultFormat,\n weekStart: defaultWeekStart\n }, locales[defaultLang]);\n if (language !== defaultLang) {\n Object.assign(locale, locales[language]);\n }\n config.locale = locale;\n // if format and/or weekStart are the same as old locale's defaults,\n // update them to new locale's defaults\n if (format === origLocale.format) {\n format = config.format = locale.format;\n }\n if (weekStart === origLocale.weekStart) {\n weekStart = config.weekStart = locale.weekStart;\n config.weekEnd = calcEndOfWeek(locale.weekStart);\n }\n }\n }\n if (inOpts.format) {\n var hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n var hasToValue = typeof inOpts.format.toValue === 'function';\n var validFormatString = reFormatTokens.test(inOpts.format);\n if (hasToDisplay && hasToValue || validFormatString) {\n format = config.format = inOpts.format;\n }\n delete inOpts.format;\n }\n\n //*** dates ***//\n // while min and maxDate for \"no limit\" in the options are better to be null\n // (especially when updating), the ones in the config have to be undefined\n // because null is treated as 0 (= unix epoch) when comparing with time value\n var minDt = minDate;\n var maxDt = maxDate;\n if (inOpts.minDate !== undefined) {\n minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n : validateDate(inOpts.minDate, format, locale, minDt);\n delete inOpts.minDate;\n }\n if (inOpts.maxDate !== undefined) {\n maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt);\n delete inOpts.maxDate;\n }\n if (maxDt < minDt) {\n minDate = config.minDate = maxDt;\n maxDate = config.maxDate = minDt;\n } else {\n if (minDate !== minDt) {\n minDate = config.minDate = minDt;\n }\n if (maxDate !== maxDt) {\n maxDate = config.maxDate = maxDt;\n }\n }\n if (inOpts.datesDisabled) {\n config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) {\n var date = parseDate(dt, format, locale);\n return date !== undefined ? pushUnique(dates, date) : dates;\n }, []);\n delete inOpts.datesDisabled;\n }\n if (inOpts.defaultViewDate !== undefined) {\n var viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n if (viewDate !== undefined) {\n config.defaultViewDate = viewDate;\n }\n delete inOpts.defaultViewDate;\n }\n\n //*** days of week ***//\n if (inOpts.weekStart !== undefined) {\n var wkStart = Number(inOpts.weekStart) % 7;\n if (!isNaN(wkStart)) {\n weekStart = config.weekStart = wkStart;\n config.weekEnd = calcEndOfWeek(wkStart);\n }\n delete inOpts.weekStart;\n }\n if (inOpts.daysOfWeekDisabled) {\n config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekDisabled;\n }\n if (inOpts.daysOfWeekHighlighted) {\n config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekHighlighted;\n }\n\n //*** multi date ***//\n if (inOpts.maxNumberOfDates !== undefined) {\n var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n if (maxNumberOfDates >= 0) {\n config.maxNumberOfDates = maxNumberOfDates;\n config.multidate = maxNumberOfDates !== 1;\n }\n delete inOpts.maxNumberOfDates;\n }\n if (inOpts.dateDelimiter) {\n config.dateDelimiter = String(inOpts.dateDelimiter);\n delete inOpts.dateDelimiter;\n }\n\n //*** pick level & view ***//\n var newPickLevel = pickLevel;\n if (inOpts.pickLevel !== undefined) {\n newPickLevel = validateViewId(inOpts.pickLevel, 2);\n delete inOpts.pickLevel;\n }\n if (newPickLevel !== pickLevel) {\n pickLevel = config.pickLevel = newPickLevel;\n }\n var newMaxView = maxView;\n if (inOpts.maxView !== undefined) {\n newMaxView = validateViewId(inOpts.maxView, maxView);\n delete inOpts.maxView;\n }\n // ensure max view >= pick level\n newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n if (newMaxView !== maxView) {\n maxView = config.maxView = newMaxView;\n }\n var newStartView = startView;\n if (inOpts.startView !== undefined) {\n newStartView = validateViewId(inOpts.startView, newStartView);\n delete inOpts.startView;\n }\n // ensure pick level <= start view <= max view\n if (newStartView < pickLevel) {\n newStartView = pickLevel;\n } else if (newStartView > maxView) {\n newStartView = maxView;\n }\n if (newStartView !== startView) {\n config.startView = newStartView;\n }\n\n //*** template ***//\n if (inOpts.prevArrow) {\n var prevArrow = parseHTML(inOpts.prevArrow);\n if (prevArrow.childNodes.length > 0) {\n config.prevArrow = prevArrow.childNodes;\n }\n delete inOpts.prevArrow;\n }\n if (inOpts.nextArrow) {\n var nextArrow = parseHTML(inOpts.nextArrow);\n if (nextArrow.childNodes.length > 0) {\n config.nextArrow = nextArrow.childNodes;\n }\n delete inOpts.nextArrow;\n }\n\n //*** misc ***//\n if (inOpts.disableTouchKeyboard !== undefined) {\n config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n delete inOpts.disableTouchKeyboard;\n }\n if (inOpts.orientation) {\n var orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n config.orientation = {\n x: orientation.find(function (x) {\n return x === 'left' || x === 'right';\n }) || 'auto',\n y: orientation.find(function (y) {\n return y === 'top' || y === 'bottom';\n }) || 'auto'\n };\n delete inOpts.orientation;\n }\n if (inOpts.todayBtnMode !== undefined) {\n switch (inOpts.todayBtnMode) {\n case 0:\n case 1:\n config.todayBtnMode = inOpts.todayBtnMode;\n }\n delete inOpts.todayBtnMode;\n }\n\n //*** copy the rest ***//\n Object.keys(inOpts).forEach(function (key) {\n if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) {\n config[key] = inOpts[key];\n }\n });\n return config;\n}\n\nvar pickerTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n \\n
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \");\n\nvar daysTemplate = optimizeTemplateHTML(\"
    \\n
    \".concat(createTagRepeat('span', 7, {\n \"class\": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \").concat(createTagRepeat('span', 42, {\n \"class\": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'\n}), \"
    \\n
    \"));\n\nvar calendarWeeksTemplate = optimizeTemplateHTML(\"
    \\n
    \\n
    \".concat(createTagRepeat('span', 6, {\n \"class\": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
    \\n
    \"));\n\n// Base class of the view classes\nvar View = /*#__PURE__*/function () {\n function View(picker, config) {\n _classCallCheck(this, View);\n Object.assign(this, config, {\n picker: picker,\n element: parseHTML(\"
    \").firstChild,\n selected: []\n });\n this.init(this.picker.datepicker.config);\n }\n return _createClass(View, [{\n key: \"init\",\n value: function init(options) {\n if (options.pickLevel !== undefined) {\n this.isMinView = this.id === options.pickLevel;\n }\n this.setOptions(options);\n this.updateFocus();\n this.updateSelection();\n }\n\n // Execute beforeShow() callback and apply the result to the element\n // args:\n // - current - current value on the iteration on view rendering\n // - timeValue - time value of the date to pass to beforeShow()\n }, {\n key: \"performBeforeHook\",\n value: function performBeforeHook(el, current, timeValue) {\n var result = this.beforeShow(new Date(timeValue));\n switch (_typeof(result)) {\n case 'boolean':\n result = {\n enabled: result\n };\n break;\n case 'string':\n result = {\n classes: result\n };\n }\n if (result) {\n if (result.enabled === false) {\n el.classList.add('disabled');\n pushUnique(this.disabled, current);\n }\n if (result.classes) {\n var _el$classList;\n var extraClasses = result.classes.split(/\\s+/);\n (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses));\n if (extraClasses.includes('disabled')) {\n pushUnique(this.disabled, current);\n }\n }\n if (result.content) {\n replaceChildNodes(el, result.content);\n }\n }\n }\n }]);\n}();\n\nvar DaysView = /*#__PURE__*/function (_View) {\n function DaysView(picker) {\n _classCallCheck(this, DaysView);\n return _callSuper(this, DaysView, [picker, {\n id: 0,\n name: 'days',\n cellClass: 'day'\n }]);\n }\n _inherits(DaysView, _View);\n return _createClass(DaysView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n var inner = parseHTML(daysTemplate).firstChild;\n this.dow = inner.firstChild;\n this.grid = inner.lastChild;\n this.element.appendChild(inner);\n }\n _get(_getPrototypeOf(DaysView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var _this = this;\n var updateDOW;\n if (hasProperty(options, 'minDate')) {\n this.minDate = options.minDate;\n }\n if (hasProperty(options, 'maxDate')) {\n this.maxDate = options.maxDate;\n }\n if (options.datesDisabled) {\n this.datesDisabled = options.datesDisabled;\n }\n if (options.daysOfWeekDisabled) {\n this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n updateDOW = true;\n }\n if (options.daysOfWeekHighlighted) {\n this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n }\n if (options.todayHighlight !== undefined) {\n this.todayHighlight = options.todayHighlight;\n }\n if (options.weekStart !== undefined) {\n this.weekStart = options.weekStart;\n this.weekEnd = options.weekEnd;\n updateDOW = true;\n }\n if (options.locale) {\n var locale = this.locale = options.locale;\n this.dayNames = locale.daysMin;\n this.switchLabelFormat = locale.titleFormat;\n updateDOW = true;\n }\n if (options.beforeShowDay !== undefined) {\n this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined;\n }\n if (options.calendarWeeks !== undefined) {\n if (options.calendarWeeks && !this.calendarWeeks) {\n var weeksElem = parseHTML(calendarWeeksTemplate).firstChild;\n this.calendarWeeks = {\n element: weeksElem,\n dow: weeksElem.firstChild,\n weeks: weeksElem.lastChild\n };\n this.element.insertBefore(weeksElem, this.element.firstChild);\n } else if (this.calendarWeeks && !options.calendarWeeks) {\n this.element.removeChild(this.calendarWeeks.element);\n this.calendarWeeks = null;\n }\n }\n if (options.showDaysOfWeek !== undefined) {\n if (options.showDaysOfWeek) {\n showElement(this.dow);\n if (this.calendarWeeks) {\n showElement(this.calendarWeeks.dow);\n }\n } else {\n hideElement(this.dow);\n if (this.calendarWeeks) {\n hideElement(this.calendarWeeks.dow);\n }\n }\n }\n\n // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n if (updateDOW) {\n Array.from(this.dow.children).forEach(function (el, index) {\n var dow = (_this.weekStart + index) % 7;\n el.textContent = _this.dayNames[dow];\n el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n });\n }\n }\n\n // Apply update on the focused date to view's settings\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var viewYear = viewDate.getFullYear();\n var viewMonth = viewDate.getMonth();\n var firstOfMonth = dateValue(viewYear, viewMonth, 1);\n var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n this.first = firstOfMonth;\n this.last = dateValue(viewYear, viewMonth + 1, 0);\n this.start = start;\n this.focused = this.picker.viewDate;\n }\n\n // Apply update on the selected dates to view's settings\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates;\n if (rangepicker) {\n this.range = rangepicker.dates;\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // update today marker on ever render\n this.today = this.todayHighlight ? today() : undefined;\n // refresh disabled dates on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = _toConsumableArray(this.datesDisabled);\n var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale);\n this.picker.setViewSwitchLabel(switchLabel);\n this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n if (this.calendarWeeks) {\n // start of the UTC week (Monday) of the 1st of the month\n var startOfWeek = dayOfTheWeekOf(this.first, 1, 1);\n Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) {\n el.textContent = getWeek(addWeeks(startOfWeek, index));\n });\n }\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = addDays(_this2.start, index);\n var date = new Date(current);\n var day = date.getDay();\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n el.dataset.date = current;\n el.textContent = date.getDate();\n if (current < _this2.first) {\n classList.add('prev', 'text-gray-500', 'dark:text-white');\n } else if (current > _this2.last) {\n classList.add('next', 'text-gray-500', 'dark:text-white');\n }\n if (_this2.today === current) {\n classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n }\n if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n }\n if (_this2.daysOfWeekDisabled.includes(day)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n pushUnique(_this2.disabled, current);\n }\n if (_this2.daysOfWeekHighlighted.includes(day)) {\n classList.add('highlighted');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg', 'rounded-r-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg', 'rounded-l-lg');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, current);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused');\n el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.dataset.date);\n var classList = el.classList;\n classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg');\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / 86400000);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction computeMonthRange(range, thisYear) {\n if (!range || !range[0] || !range[1]) {\n return;\n }\n var _range = _slicedToArray(range, 2),\n _range$ = _slicedToArray(_range[0], 2),\n startY = _range$[0],\n startM = _range$[1],\n _range$2 = _slicedToArray(_range[1], 2),\n endY = _range$2[0],\n endM = _range$2[1];\n if (startY > thisYear || endY < thisYear) {\n return;\n }\n return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12];\n}\nvar MonthsView = /*#__PURE__*/function (_View) {\n function MonthsView(picker) {\n _classCallCheck(this, MonthsView);\n return _callSuper(this, MonthsView, [picker, {\n id: 1,\n name: 'months',\n cellClass: 'month'\n }]);\n }\n _inherits(MonthsView, _View);\n return _createClass(MonthsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.grid = this.element;\n this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {\n 'data-month': function dataMonth(ix) {\n return ix;\n }\n })));\n }\n _get(_getPrototypeOf(MonthsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options.locale) {\n this.monthNames = options.locale.monthsShort;\n }\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minMonth = this.minDate = undefined;\n } else {\n var minDateObj = new Date(options.minDate);\n this.minYear = minDateObj.getFullYear();\n this.minMonth = minDateObj.getMonth();\n this.minDate = minDateObj.setDate(1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxMonth = this.maxDate = undefined;\n } else {\n var maxDateObj = new Date(options.maxDate);\n this.maxYear = maxDateObj.getFullYear();\n this.maxMonth = maxDateObj.getMonth();\n this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n }\n }\n if (options.beforeShowMonth !== undefined) {\n this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n this.year = viewDate.getFullYear();\n this.focused = viewDate.getMonth();\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (selected, timeValue) {\n var date = new Date(timeValue);\n var year = date.getFullYear();\n var month = date.getMonth();\n if (selected[year] === undefined) {\n selected[year] = [month];\n } else {\n pushUnique(selected[year], month);\n }\n return selected;\n }, {});\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n var date = new Date(timeValue);\n return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n // refresh disabled months on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(this.year);\n this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n var selected = this.selected[this.year] || [];\n var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n var isMinYear = this.year === this.minYear;\n var isMaxYear = this.year === this.maxYear;\n var range = computeMonthRange(this.range, this.year);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var date = dateValue(_this.year, index, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this.cellClass);\n if (_this.isMinView) {\n el.dataset.date = date;\n }\n // reset text on every render to clear the custom content set\n // by beforeShow hook at previous render\n el.textContent = _this.monthNames[index];\n if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) {\n classList.add('disabled');\n }\n if (range) {\n var _range2 = _slicedToArray(range, 2),\n rangeStart = _range2[0],\n rangeEnd = _range2[1];\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this.focused) {\n classList.add('focused');\n }\n if (_this.beforeShow) {\n _this.performBeforeHook(el, index, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this2 = this;\n var selected = this.selected[this.year] || [];\n var _ref = computeMonthRange(this.range, this.year) || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused');\n el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n });\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this2.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[this.focused].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction toTitleCase(word) {\n return _toConsumableArray(word).reduce(function (str, ch, ix) {\n return str += ix ? ch : ch.toUpperCase();\n }, '');\n}\n\n// Class representing the years and decades view elements\nvar YearsView = /*#__PURE__*/function (_View) {\n function YearsView(picker, config) {\n _classCallCheck(this, YearsView);\n return _callSuper(this, YearsView, [picker, config]);\n }\n _inherits(YearsView, _View);\n return _createClass(YearsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.navStep = this.step * 10;\n this.beforeShowOption = \"beforeShow\".concat(toTitleCase(this.cellClass));\n this.grid = this.element;\n this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n }\n _get(_getPrototypeOf(YearsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minDate = undefined;\n } else {\n this.minYear = startOfYearPeriod(options.minDate, this.step);\n this.minDate = dateValue(this.minYear, 0, 1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxDate = undefined;\n } else {\n this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n this.maxDate = dateValue(this.maxYear, 11, 31);\n }\n }\n if (options[this.beforeShowOption] !== undefined) {\n var beforeShow = options[this.beforeShowOption];\n this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var first = startOfYearPeriod(viewDate, this.navStep);\n var last = first + 9 * this.step;\n this.first = first;\n this.last = last;\n this.start = first - this.step;\n this.focused = startOfYearPeriod(viewDate, this.step);\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this = this;\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (years, timeValue) {\n return pushUnique(years, startOfYearPeriod(timeValue, _this.step));\n }, []);\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n if (timeValue !== undefined) {\n return startOfYearPeriod(timeValue, _this.step);\n }\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // refresh disabled years on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(\"\".concat(this.first, \"-\").concat(this.last));\n this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = _this2.start + index * _this2.step;\n var date = dateValue(current, 0, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n if (_this2.isMinView) {\n el.dataset.date = date;\n }\n el.textContent = el.dataset.year = current;\n if (index === 0) {\n classList.add('prev');\n } else if (index === 11) {\n classList.add('next');\n }\n if (current < _this2.minYear || current > _this2.maxYear) {\n classList.add('disabled');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.textContent);\n var classList = el.classList;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / this.step);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction triggerDatepickerEvent(datepicker, type) {\n var detail = {\n date: datepicker.getDate(),\n viewDate: new Date(datepicker.picker.viewDate),\n viewId: datepicker.picker.currentView.id,\n datepicker: datepicker\n };\n datepicker.element.dispatchEvent(new CustomEvent(type, {\n detail: detail\n }));\n}\n\n// direction: -1 (to previous), 1 (to next)\nfunction goToPrevOrNext(datepicker, direction) {\n var _datepicker$config = datepicker.config,\n minDate = _datepicker$config.minDate,\n maxDate = _datepicker$config.maxDate;\n var _datepicker$picker = datepicker.picker,\n currentView = _datepicker$picker.currentView,\n viewDate = _datepicker$picker.viewDate;\n var newViewDate;\n switch (currentView.id) {\n case 0:\n newViewDate = addMonths(viewDate, direction);\n break;\n case 1:\n newViewDate = addYears(viewDate, direction);\n break;\n default:\n newViewDate = addYears(viewDate, direction * currentView.navStep);\n }\n newViewDate = limitToRange(newViewDate, minDate, maxDate);\n datepicker.picker.changeFocus(newViewDate).render();\n}\nfunction switchView(datepicker) {\n var viewId = datepicker.picker.currentView.id;\n if (viewId === datepicker.config.maxView) {\n return;\n }\n datepicker.picker.changeView(viewId + 1).render();\n}\nfunction unfocus(datepicker) {\n if (datepicker.config.updateOnBlur) {\n datepicker.update({\n autohide: true\n });\n } else {\n datepicker.refresh('input');\n datepicker.hide();\n }\n}\n\nfunction goToSelectedMonthOrYear(datepicker, selection) {\n var picker = datepicker.picker;\n var viewDate = new Date(picker.viewDate);\n var viewId = picker.currentView.id;\n var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear());\n picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\nfunction onClickTodayBtn(datepicker) {\n var picker = datepicker.picker;\n var currentDate = today();\n if (datepicker.config.todayBtnMode === 1) {\n if (datepicker.config.autohide) {\n datepicker.setDate(currentDate);\n return;\n }\n datepicker.setDate(currentDate, {\n render: false\n });\n picker.update();\n }\n if (picker.viewDate !== currentDate) {\n picker.changeFocus(currentDate);\n }\n picker.changeView(0).render();\n}\nfunction onClickClearBtn(datepicker) {\n datepicker.setDate({\n clear: true\n });\n}\nfunction onClickViewSwitch(datepicker) {\n switchView(datepicker);\n}\nfunction onClickPrevBtn(datepicker) {\n goToPrevOrNext(datepicker, -1);\n}\nfunction onClickNextBtn(datepicker) {\n goToPrevOrNext(datepicker, 1);\n}\n\n// For the picker's main block to delegete the events from `datepicker-cell`s\nfunction onClickView(datepicker, ev) {\n var target = findElementInEventPath(ev, '.datepicker-cell');\n if (!target || target.classList.contains('disabled')) {\n return;\n }\n var _datepicker$picker$cu = datepicker.picker.currentView,\n id = _datepicker$picker$cu.id,\n isMinView = _datepicker$picker$cu.isMinView;\n if (isMinView) {\n datepicker.setDate(Number(target.dataset.date));\n } else if (id === 1) {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n } else {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n }\n}\nfunction onClickPicker(datepicker) {\n if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.focus();\n }\n}\n\nfunction processPickerOptions(picker, options) {\n if (options.title !== undefined) {\n if (options.title) {\n picker.controls.title.textContent = options.title;\n showElement(picker.controls.title);\n } else {\n picker.controls.title.textContent = '';\n hideElement(picker.controls.title);\n }\n }\n if (options.prevArrow) {\n var prevBtn = picker.controls.prevBtn;\n emptyChildNodes(prevBtn);\n options.prevArrow.forEach(function (node) {\n prevBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.nextArrow) {\n var nextBtn = picker.controls.nextBtn;\n emptyChildNodes(nextBtn);\n options.nextArrow.forEach(function (node) {\n nextBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.locale) {\n picker.controls.todayBtn.textContent = options.locale.today;\n picker.controls.clearBtn.textContent = options.locale.clear;\n }\n if (options.todayBtn !== undefined) {\n if (options.todayBtn) {\n showElement(picker.controls.todayBtn);\n } else {\n hideElement(picker.controls.todayBtn);\n }\n }\n if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) {\n var _picker$datepicker$co = picker.datepicker.config,\n minDate = _picker$datepicker$co.minDate,\n maxDate = _picker$datepicker$co.maxDate;\n picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate);\n }\n if (options.clearBtn !== undefined) {\n if (options.clearBtn) {\n showElement(picker.controls.clearBtn);\n } else {\n hideElement(picker.controls.clearBtn);\n }\n }\n}\n\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction computeResetViewDate(datepicker) {\n var dates = datepicker.dates,\n config = datepicker.config;\n var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate;\n return limitToRange(viewDate, config.minDate, config.maxDate);\n}\n\n// Change current view's view date\nfunction setViewDate(picker, newDate) {\n var oldViewDate = new Date(picker.viewDate);\n var newViewDate = new Date(newDate);\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n year = _picker$currentView.year,\n first = _picker$currentView.first,\n last = _picker$currentView.last;\n var viewYear = newViewDate.getFullYear();\n picker.viewDate = newDate;\n if (viewYear !== oldViewDate.getFullYear()) {\n triggerDatepickerEvent(picker.datepicker, 'changeYear');\n }\n if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n }\n\n // return whether the new date is in different period on time from the one\n // displayed in the current view\n // when true, the view needs to be re-rendered on the next UI refresh.\n switch (id) {\n case 0:\n return newDate < first || newDate > last;\n case 1:\n return viewYear !== year;\n default:\n return viewYear < first || viewYear > last;\n }\n}\nfunction getTextDirection(el) {\n return window.getComputedStyle(el).direction;\n}\n\n// Class representing the picker UI\nvar Picker = /*#__PURE__*/function () {\n function Picker(datepicker) {\n _classCallCheck(this, Picker);\n this.datepicker = datepicker;\n var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n var element = this.element = parseHTML(template).firstChild;\n var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3),\n header = _element$firstChild$c[0],\n main = _element$firstChild$c[1],\n footer = _element$firstChild$c[2];\n var title = header.firstElementChild;\n var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3),\n prevBtn = _header$lastElementCh[0],\n viewSwitch = _header$lastElementCh[1],\n nextBtn = _header$lastElementCh[2];\n var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2),\n todayBtn = _footer$firstChild$ch[0],\n clearBtn = _footer$firstChild$ch[1];\n var controls = {\n title: title,\n prevBtn: prevBtn,\n viewSwitch: viewSwitch,\n nextBtn: nextBtn,\n todayBtn: todayBtn,\n clearBtn: clearBtn\n };\n this.main = main;\n this.controls = controls;\n var elementClass = datepicker.inline ? 'inline' : 'dropdown';\n element.classList.add(\"datepicker-\".concat(elementClass));\n elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null;\n processPickerOptions(this, datepicker.config);\n this.viewDate = computeResetViewDate(datepicker);\n\n // set up event listeners\n registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), {\n capture: true\n }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]);\n\n // set up views\n this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {\n id: 2,\n name: 'years',\n cellClass: 'year',\n step: 1\n }), new YearsView(this, {\n id: 3,\n name: 'decades',\n cellClass: 'decade',\n step: 10\n })];\n this.currentView = this.views[datepicker.config.startView];\n this.currentView.render();\n this.main.appendChild(this.currentView.element);\n datepicker.config.container.appendChild(this.element);\n }\n return _createClass(Picker, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n processPickerOptions(this, options);\n this.views.forEach(function (view) {\n view.init(options, false);\n });\n this.currentView.render();\n }\n }, {\n key: \"detach\",\n value: function detach() {\n this.datepicker.config.container.removeChild(this.element);\n }\n }, {\n key: \"show\",\n value: function show() {\n if (this.active) {\n return;\n }\n this.element.classList.add('active', 'block');\n this.element.classList.remove('hidden');\n this.active = true;\n var datepicker = this.datepicker;\n if (!datepicker.inline) {\n // ensure picker's direction matches input's\n var inputDirection = getTextDirection(datepicker.inputField);\n if (inputDirection !== getTextDirection(datepicker.config.container)) {\n this.element.dir = inputDirection;\n } else if (this.element.dir) {\n this.element.removeAttribute('dir');\n }\n this.place();\n if (datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.blur();\n }\n }\n triggerDatepickerEvent(datepicker, 'show');\n }\n }, {\n key: \"hide\",\n value: function hide() {\n if (!this.active) {\n return;\n }\n this.datepicker.exitEditMode();\n this.element.classList.remove('active', 'block');\n this.element.classList.add('active', 'block', 'hidden');\n this.active = false;\n triggerDatepickerEvent(this.datepicker, 'hide');\n }\n }, {\n key: \"place\",\n value: function place() {\n var _this$element = this.element,\n classList = _this$element.classList,\n style = _this$element.style;\n var _this$datepicker = this.datepicker,\n config = _this$datepicker.config,\n inputField = _this$datepicker.inputField;\n var container = config.container;\n var _this$element$getBoun = this.element.getBoundingClientRect(),\n calendarWidth = _this$element$getBoun.width,\n calendarHeight = _this$element$getBoun.height;\n var _container$getBoundin = container.getBoundingClientRect(),\n containerLeft = _container$getBoundin.left,\n containerTop = _container$getBoundin.top,\n containerWidth = _container$getBoundin.width;\n var _inputField$getBoundi = inputField.getBoundingClientRect(),\n inputLeft = _inputField$getBoundi.left,\n inputTop = _inputField$getBoundi.top,\n inputWidth = _inputField$getBoundi.width,\n inputHeight = _inputField$getBoundi.height;\n var _config$orientation = config.orientation,\n orientX = _config$orientation.x,\n orientY = _config$orientation.y;\n var scrollTop;\n var left;\n var top;\n if (container === document.body) {\n scrollTop = window.scrollY;\n left = inputLeft + window.scrollX;\n top = inputTop + scrollTop;\n } else {\n scrollTop = container.scrollTop;\n left = inputLeft - containerLeft;\n top = inputTop - containerTop + scrollTop;\n }\n if (orientX === 'auto') {\n if (left < 0) {\n // align to the left and move into visible area if input's left edge < window's\n orientX = 'left';\n left = 10;\n } else if (left + calendarWidth > containerWidth) {\n // align to the right if canlendar's right edge > container's\n orientX = 'right';\n } else {\n orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n }\n }\n if (orientX === 'right') {\n left -= calendarWidth - inputWidth;\n }\n if (orientY === 'auto') {\n orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n }\n if (orientY === 'top') {\n top -= calendarHeight;\n } else {\n top += inputHeight;\n }\n classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left');\n classList.add(\"datepicker-orient-\".concat(orientY), \"datepicker-orient-\".concat(orientX));\n style.top = top ? \"\".concat(top, \"px\") : top;\n style.left = left ? \"\".concat(left, \"px\") : left;\n }\n }, {\n key: \"setViewSwitchLabel\",\n value: function setViewSwitchLabel(labelText) {\n this.controls.viewSwitch.textContent = labelText;\n }\n }, {\n key: \"setPrevBtnDisabled\",\n value: function setPrevBtnDisabled(disabled) {\n this.controls.prevBtn.disabled = disabled;\n }\n }, {\n key: \"setNextBtnDisabled\",\n value: function setNextBtnDisabled(disabled) {\n this.controls.nextBtn.disabled = disabled;\n }\n }, {\n key: \"changeView\",\n value: function changeView(viewId) {\n var oldView = this.currentView;\n var newView = this.views[viewId];\n if (newView.id !== oldView.id) {\n this.currentView = newView;\n this._renderMethod = 'render';\n triggerDatepickerEvent(this.datepicker, 'changeView');\n this.main.replaceChild(newView.element, oldView.element);\n }\n return this;\n }\n\n // Change the focused date (view date)\n }, {\n key: \"changeFocus\",\n value: function changeFocus(newViewDate) {\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n this.views.forEach(function (view) {\n view.updateFocus();\n });\n return this;\n }\n\n // Apply the change of the selected dates\n }, {\n key: \"update\",\n value: function update() {\n var newViewDate = computeResetViewDate(this.datepicker);\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n this.views.forEach(function (view) {\n view.updateFocus();\n view.updateSelection();\n });\n return this;\n }\n\n // Refresh the picker UI\n }, {\n key: \"render\",\n value: function render() {\n var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var renderMethod = quickRender && this._renderMethod || 'render';\n delete this._renderMethod;\n this.currentView[renderMethod]();\n }\n }]);\n}();\n\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n// - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n// - args: time value; retun: true if unavailable\nfunction findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n if (!isInRange(date, min, max)) {\n return;\n }\n if (testFn(date)) {\n var newDate = addFn(date, increase);\n return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n }\n return date;\n}\n\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction moveByArrowKey(datepicker, ev, direction, vertical) {\n var picker = datepicker.picker;\n var currentView = picker.currentView;\n var step = currentView.step || 1;\n var viewDate = picker.viewDate;\n var addFn;\n var testFn;\n switch (currentView.id) {\n case 0:\n if (vertical) {\n viewDate = addDays(viewDate, direction * 7);\n } else if (ev.ctrlKey || ev.metaKey) {\n viewDate = addYears(viewDate, direction);\n } else {\n viewDate = addDays(viewDate, direction);\n }\n addFn = addDays;\n testFn = function testFn(date) {\n return currentView.disabled.includes(date);\n };\n break;\n case 1:\n viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n addFn = addMonths;\n testFn = function testFn(date) {\n var dt = new Date(date);\n var year = currentView.year,\n disabled = currentView.disabled;\n return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n };\n break;\n default:\n viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n addFn = addYears;\n testFn = function testFn(date) {\n return currentView.disabled.includes(startOfYearPeriod(date, step));\n };\n }\n viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate);\n if (viewDate !== undefined) {\n picker.changeFocus(viewDate).render();\n }\n}\nfunction onKeydown(datepicker, ev) {\n if (ev.key === 'Tab') {\n unfocus(datepicker);\n return;\n }\n var picker = datepicker.picker;\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n isMinView = _picker$currentView.isMinView;\n if (!picker.active) {\n switch (ev.key) {\n case 'ArrowDown':\n case 'Escape':\n picker.show();\n break;\n case 'Enter':\n datepicker.update();\n break;\n default:\n return;\n }\n } else if (datepicker.editMode) {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'Enter':\n datepicker.exitEditMode({\n update: true,\n autohide: datepicker.config.autohide\n });\n break;\n default:\n return;\n }\n } else {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'ArrowLeft':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, -1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, false);\n }\n break;\n case 'ArrowRight':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, 1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, 1, false);\n }\n break;\n case 'ArrowUp':\n if (ev.ctrlKey || ev.metaKey) {\n switchView(datepicker);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, true);\n }\n break;\n case 'ArrowDown':\n if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n return;\n }\n moveByArrowKey(datepicker, ev, 1, true);\n break;\n case 'Enter':\n if (isMinView) {\n datepicker.setDate(picker.viewDate);\n } else {\n picker.changeView(id - 1).render();\n }\n break;\n case 'Backspace':\n case 'Delete':\n datepicker.enterEditMode();\n return;\n default:\n if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n }\n return;\n }\n }\n ev.preventDefault();\n ev.stopPropagation();\n}\nfunction onFocus(datepicker) {\n if (datepicker.config.showOnFocus && !datepicker._showing) {\n datepicker.show();\n }\n}\n\n// for the prevention for entering edit mode while getting focus on click\nfunction onMousedown(datepicker, ev) {\n var el = ev.target;\n if (datepicker.picker.active || datepicker.config.showOnClick) {\n el._active = el === document.activeElement;\n el._clicking = setTimeout(function () {\n delete el._active;\n delete el._clicking;\n }, 2000);\n }\n}\nfunction onClickInput(datepicker, ev) {\n var el = ev.target;\n if (!el._clicking) {\n return;\n }\n clearTimeout(el._clicking);\n delete el._clicking;\n if (el._active) {\n datepicker.enterEditMode();\n }\n delete el._active;\n if (datepicker.config.showOnClick) {\n datepicker.show();\n }\n}\nfunction onPaste(datepicker, ev) {\n if (ev.clipboardData.types.includes('text/plain')) {\n datepicker.enterEditMode();\n }\n}\n\n// for the `document` to delegate the events from outside the picker/input field\nfunction onClickOutside(datepicker, ev) {\n var element = datepicker.element;\n if (element !== document.activeElement) {\n return;\n }\n var pickerElem = datepicker.picker.element;\n if (findElementInEventPath(ev, function (el) {\n return el === element || el === pickerElem;\n })) {\n return;\n }\n unfocus(datepicker);\n}\n\nfunction stringifyDates(dates, config) {\n return dates.map(function (dt) {\n return formatDate(dt, config.format, config.locale);\n }).join(config.dateDelimiter);\n}\n\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction processInputDates(datepicker, inputDates) {\n var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var config = datepicker.config,\n origDates = datepicker.dates,\n rangepicker = datepicker.rangepicker;\n if (inputDates.length === 0) {\n // empty input is considered valid unless origiDates is passed\n return clear ? [] : undefined;\n }\n var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n var newDates = inputDates.reduce(function (dates, dt) {\n var date = parseDate(dt, config.format, config.locale);\n if (date === undefined) {\n return dates;\n }\n if (config.pickLevel > 0) {\n // adjust to 1st of the month/Jan 1st of the year\n // or to the last day of the monh/Dec 31st of the year if the datepicker\n // is the range-end picker of a rangepicker\n var _dt = new Date(date);\n if (config.pickLevel === 1) {\n date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1);\n } else {\n date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1);\n }\n }\n if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) {\n dates.push(date);\n }\n return dates;\n }, []);\n if (newDates.length === 0) {\n return;\n }\n if (config.multidate && !clear) {\n // get the synmetric difference between origDates and newDates\n newDates = newDates.reduce(function (dates, date) {\n if (!origDates.includes(date)) {\n dates.push(date);\n }\n return dates;\n }, origDates.filter(function (date) {\n return !newDates.includes(date);\n }));\n }\n // do length check always because user can input multiple dates regardless of the mode\n return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates;\n}\n\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction refreshUI(datepicker) {\n var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var config = datepicker.config,\n picker = datepicker.picker,\n inputField = datepicker.inputField;\n if (mode & 2) {\n var newView = picker.active ? config.pickLevel : config.startView;\n picker.update().changeView(newView).render(quickRender);\n }\n if (mode & 1 && inputField) {\n inputField.value = stringifyDates(datepicker.dates, config);\n }\n}\nfunction _setDate(datepicker, inputDates, options) {\n var clear = options.clear,\n render = options.render,\n autohide = options.autohide;\n if (render === undefined) {\n render = true;\n }\n if (!render) {\n autohide = false;\n } else if (autohide === undefined) {\n autohide = datepicker.config.autohide;\n }\n var newDates = processInputDates(datepicker, inputDates, clear);\n if (!newDates) {\n return;\n }\n if (newDates.toString() !== datepicker.dates.toString()) {\n datepicker.dates = newDates;\n refreshUI(datepicker, render ? 3 : 1);\n triggerDatepickerEvent(datepicker, 'changeDate');\n } else {\n refreshUI(datepicker, 1);\n }\n if (autohide) {\n datepicker.hide();\n }\n}\n\n/**\n * Class representing a date picker\n */\nvar Datepicker = /*#__PURE__*/function () {\n /**\n * Create a date picker\n * @param {Element} element - element to bind a date picker\n * @param {Object} [options] - config options\n * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the\n * date picker belongs to. Use this only when creating date picker as a part\n * of date range picker\n */\n function Datepicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n _classCallCheck(this, Datepicker);\n element.datepicker = this;\n this.element = element;\n\n // set up config\n var config = this.config = Object.assign({\n buttonClass: options.buttonClass && String(options.buttonClass) || 'button',\n container: document.body,\n defaultViewDate: today(),\n maxDate: undefined,\n minDate: undefined\n }, processOptions(defaultOptions, this));\n this._options = options;\n Object.assign(config, processOptions(options, this));\n\n // configure by type\n var inline = this.inline = element.tagName !== 'INPUT';\n var inputField;\n var initialDates;\n if (inline) {\n config.container = element;\n initialDates = stringToArray(element.dataset.date, config.dateDelimiter);\n delete element.dataset.date;\n } else {\n var container = options.container ? document.querySelector(options.container) : null;\n if (container) {\n config.container = container;\n }\n inputField = this.inputField = element;\n inputField.classList.add('datepicker-input');\n initialDates = stringToArray(inputField.value, config.dateDelimiter);\n }\n if (rangepicker) {\n // check validiry\n var index = rangepicker.inputs.indexOf(inputField);\n var datepickers = rangepicker.datepickers;\n if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n throw Error('Invalid rangepicker object.');\n }\n // attach itaelf to the rangepicker here so that processInputDates() can\n // determine if this is the range-end picker of the rangepicker while\n // setting inital values when pickLevel > 0\n datepickers[index] = this;\n // add getter for rangepicker\n Object.defineProperty(this, 'rangepicker', {\n get: function get() {\n return rangepicker;\n }\n });\n }\n\n // set initial dates\n this.dates = [];\n // process initial value\n var inputDateValues = processInputDates(this, initialDates);\n if (inputDateValues && inputDateValues.length > 0) {\n this.dates = inputDateValues;\n }\n if (inputField) {\n inputField.value = stringifyDates(this.dates, config);\n }\n var picker = this.picker = new Picker(this);\n if (inline) {\n this.show();\n } else {\n // set up event listeners in other modes\n var onMousedownDocument = onClickOutside.bind(null, this);\n var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]];\n registerListeners(this, listeners);\n }\n }\n\n /**\n * Format Date object or time value in given format and language\n * @param {Date|Number} date - date or time value to format\n * @param {String|Object} format - format string or object that contains\n * toDisplay() custom formatter, whose signature is\n * - args:\n * - date: {Date} - Date instance of the date passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {String} formatted date\n * @param {String} [lang=en] - language code for the locale to use\n * @return {String} formatted date\n */\n return _createClass(Datepicker, [{\n key: \"active\",\n get:\n /**\n * @type {Boolean} - Whether the picker element is shown. `true` whne shown\n */\n function get() {\n return !!(this.picker && this.picker.active);\n }\n\n /**\n * @type {HTMLDivElement} - DOM object of picker element\n */\n }, {\n key: \"pickerElement\",\n get: function get() {\n return this.picker ? this.picker.element : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var picker = this.picker;\n var newOptions = processOptions(options, this);\n Object.assign(this._options, options);\n Object.assign(this.config, newOptions);\n picker.setOptions(newOptions);\n refreshUI(this, 3);\n }\n\n /**\n * Show the picker element\n */\n }, {\n key: \"show\",\n value: function show() {\n if (this.inputField) {\n if (this.inputField.disabled) {\n return;\n }\n if (this.inputField !== document.activeElement) {\n this._showing = true;\n this.inputField.focus();\n delete this._showing;\n }\n }\n this.picker.show();\n }\n\n /**\n * Hide the picker element\n * Not available on inline picker\n */\n }, {\n key: \"hide\",\n value: function hide() {\n if (this.inline) {\n return;\n }\n this.picker.hide();\n this.picker.update().changeView(this.config.startView).render();\n }\n\n /**\n * Destroy the Datepicker instance\n * @return {Detepicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hide();\n unregisterListeners(this);\n this.picker.detach();\n if (!this.inline) {\n this.inputField.classList.remove('datepicker-input');\n }\n delete this.element.datepicker;\n return this;\n }\n\n /**\n * Get the selected date(s)\n *\n * The method returns a Date object of selected date by default, and returns\n * an array of selected dates in multidate mode. If format string is passed,\n * it returns date string(s) formatted in given format.\n *\n * @param {String} [format] - Format string to stringify the date(s)\n * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\n * selected, empty array in multidate mode and untitled in sigledate mode\n */\n }, {\n key: \"getDate\",\n value: function getDate() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.config.locale);\n } : function (date) {\n return new Date(date);\n };\n if (this.config.multidate) {\n return this.dates.map(callback);\n }\n if (this.dates.length > 0) {\n return callback(this.dates[0]);\n }\n }\n\n /**\n * Set selected date(s)\n *\n * In multidate mode, you can pass multiple dates as a series of arguments\n * or an array. (Since each date is parsed individually, the type of the\n * dates doesn't have to be the same.)\n * The given dates are used to toggle the select status of each date. The\n * number of selected dates is kept from exceeding the length set to\n * maxNumberOfDates.\n *\n * With clear: true option, the method can be used to clear the selection\n * and to replace the selection instead of toggling in multidate mode.\n * If the option is passed with no date arguments or an empty dates array,\n * it works as \"clear\" (clear the selection then set nothing), and if the\n * option is passed with new dates to select, it works as \"replace\" (clear\n * the selection then set the given dates)\n *\n * When render: false option is used, the method omits re-rendering the\n * picker element. In this case, you need to call refresh() method later in\n * order for the picker element to reflect the changes. The input field is\n * refreshed always regardless of this option.\n *\n * When invalid (unparsable, repeated, disabled or out-of-range) dates are\n * passed, the method ignores them and applies only valid ones. In the case\n * that all the given dates are invalid, which is distinguished from passing\n * no dates, the method considers it as an error and leaves the selection\n * untouched.\n *\n * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\n * objects, time values or mix of those for new selection\n * @param {Object} [options] - function options\n * - clear: {boolean} - Whether to clear the existing selection\n * defualt: false\n * - render: {boolean} - Whether to re-render the picker element\n * default: true\n * - autohide: {boolean} - Whether to hide the picker element after re-render\n * Ignored when used with render: false\n * default: config.autohide\n */\n }, {\n key: \"setDate\",\n value: function setDate() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var dates = [].concat(args);\n var opts = {};\n var lastArg = lastItemOf(args);\n if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) {\n Object.assign(opts, dates.pop());\n }\n var inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Update the selected date(s) with input field's value\n * Not available on inline picker\n *\n * The input field will be refreshed with properly formatted date string.\n *\n * @param {Object} [options] - function options\n * - autohide: {boolean} - whether to hide the picker element after refresh\n * default: false\n */\n }, {\n key: \"update\",\n value: function update() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline) {\n return;\n }\n var opts = {\n clear: true,\n autohide: !!(options && options.autohide)\n };\n var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n _setDate(this, inputDates, opts);\n }\n\n /**\n * Refresh the picker element and the associated input field\n * @param {String} [target] - target item when refreshing one item only\n * 'picker' or 'input'\n * @param {Boolean} [forceRender] - whether to re-render the picker element\n * regardless of its state instead of optimized refresh\n */\n }, {\n key: \"refresh\",\n value: function refresh() {\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (target && typeof target !== 'string') {\n forceRender = target;\n target = undefined;\n }\n var mode;\n if (target === 'picker') {\n mode = 2;\n } else if (target === 'input') {\n mode = 1;\n } else {\n mode = 3;\n }\n refreshUI(this, mode, !forceRender);\n }\n\n /**\n * Enter edit mode\n * Not available on inline picker or when the picker element is hidden\n */\n }, {\n key: \"enterEditMode\",\n value: function enterEditMode() {\n if (this.inline || !this.picker.active || this.editMode) {\n return;\n }\n this.editMode = true;\n this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700');\n }\n\n /**\n * Exit from edit mode\n * Not available on inline picker\n * @param {Object} [options] - function options\n * - update: {boolean} - whether to call update() after exiting\n * If false, input field is revert to the existing selection\n * default: false\n */\n }, {\n key: \"exitEditMode\",\n value: function exitEditMode() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline || !this.editMode) {\n return;\n }\n var opts = Object.assign({\n update: false\n }, options);\n delete this.editMode;\n this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700');\n if (opts.update) {\n this.update(opts);\n }\n }\n }], [{\n key: \"formatDate\",\n value: function formatDate$1(date, format, lang) {\n return formatDate(date, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * Parse date string\n * @param {String|Date|Number} dateStr - date string, Date object or time\n * value to parse\n * @param {String|Object} format - format string or object that contains\n * toValue() custom parser, whose signature is\n * - args:\n * - dateStr: {String|Date|Number} - the dateStr passed to the method\n * - format: {Object} - the format object passed to the method\n * - locale: {Object} - locale for the language specified by `lang`\n * - return:\n * {Date|Number} parsed date or its time value\n * @param {String} [lang=en] - language code for the locale to use\n * @return {Number} time value of parsed date\n */\n }, {\n key: \"parseDate\",\n value: function parseDate$1(dateStr, format, lang) {\n return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n }\n\n /**\n * @type {Object} - Installed locales in `[languageCode]: localeObject` format\n * en`:_English (US)_ is pre-installed.\n */\n }, {\n key: \"locales\",\n get: function get() {\n return locales;\n }\n }]);\n}();\n\n// filter out the config options inapproprite to pass to Datepicker\nfunction filterOptions(options) {\n var newOpts = Object.assign({}, options);\n delete newOpts.inputs;\n delete newOpts.allowOneSidedRange;\n delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n\n return newOpts;\n}\nfunction setupDatepicker(rangepicker, changeDateListener, el, options) {\n registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]);\n new Datepicker(el, options, rangepicker);\n}\nfunction onChangeDate(rangepicker, ev) {\n // to prevent both datepickers trigger the other side's update each other\n if (rangepicker._updating) {\n return;\n }\n rangepicker._updating = true;\n var target = ev.target;\n if (target.datepicker === undefined) {\n return;\n }\n var datepickers = rangepicker.datepickers;\n var setDateOptions = {\n render: false\n };\n var changedSide = rangepicker.inputs.indexOf(target);\n var otherSide = changedSide === 0 ? 1 : 0;\n var changedDate = datepickers[changedSide].dates[0];\n var otherDate = datepickers[otherSide].dates[0];\n if (changedDate !== undefined && otherDate !== undefined) {\n // if the start of the range > the end, swap them\n if (changedSide === 0 && changedDate > otherDate) {\n datepickers[0].setDate(otherDate, setDateOptions);\n datepickers[1].setDate(changedDate, setDateOptions);\n } else if (changedSide === 1 && changedDate < otherDate) {\n datepickers[0].setDate(changedDate, setDateOptions);\n datepickers[1].setDate(otherDate, setDateOptions);\n }\n } else if (!rangepicker.allowOneSidedRange) {\n // to prevent the range from becoming one-sided, copy changed side's\n // selection (no matter if it's empty) to the other side\n if (changedDate !== undefined || otherDate !== undefined) {\n setDateOptions.clear = true;\n datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n }\n }\n datepickers[0].picker.update().render();\n datepickers[1].picker.update().render();\n delete rangepicker._updating;\n}\n\n/**\n * Class representing a date range picker\n */\nvar DateRangePicker = /*#__PURE__*/function () {\n /**\n * Create a date range picker\n * @param {Element} element - element to bind a date range picker\n * @param {Object} [options] - config options\n */\n function DateRangePicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, DateRangePicker);\n var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input'));\n if (inputs.length < 2) {\n return;\n }\n element.rangepicker = this;\n this.element = element;\n this.inputs = inputs.slice(0, 2);\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var changeDateListener = onChangeDate.bind(null, this);\n var cleanOptions = filterOptions(options);\n // in order for initial date setup to work right when pcicLvel > 0,\n // let Datepicker constructor add the instance to the rangepicker\n var datepickers = [];\n Object.defineProperty(this, 'datepickers', {\n get: function get() {\n return datepickers;\n }\n });\n setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n Object.freeze(datepickers);\n // normalize the range if inital dates are given\n if (datepickers[0].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n } else if (datepickers[1].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n }\n }\n\n /**\n * @type {Array} - selected date of the linked date pickers\n */\n return _createClass(DateRangePicker, [{\n key: \"dates\",\n get: function get() {\n return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined;\n }\n\n /**\n * Set new values to the config options\n * @param {Object} options - config options to update\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var cleanOptions = filterOptions(options);\n this.datepickers[0].setOptions(cleanOptions);\n this.datepickers[1].setOptions(cleanOptions);\n }\n\n /**\n * Destroy the DateRangePicker instance\n * @return {DateRangePicker} - the instance destroyed\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.datepickers[0].destroy();\n this.datepickers[1].destroy();\n unregisterListeners(this);\n delete this.element.rangepicker;\n }\n\n /**\n * Get the start and end dates of the date range\n *\n * The method returns Date objects by default. If format string is passed,\n * it returns date strings formatted in given format.\n * The result array always contains 2 items (start date/end date) and\n * undefined is used for unselected side. (e.g. If none is selected,\n * the result will be [undefined, undefined]. If only the end date is set\n * when allowOneSidedRange config option is true, [undefined, endDate] will\n * be returned.)\n *\n * @param {String} [format] - Format string to stringify the dates\n * @return {Array} - Start and end dates\n */\n }, {\n key: \"getDates\",\n value: function getDates() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.datepickers[0].config.locale);\n } : function (date) {\n return new Date(date);\n };\n return this.dates.map(function (date) {\n return date === undefined ? date : callback(date);\n });\n }\n\n /**\n * Set the start and end dates of the date range\n *\n * The method calls datepicker.setDate() internally using each of the\n * arguments in start→end order.\n *\n * When a clear: true option object is passed instead of a date, the method\n * clears the date.\n *\n * If an invalid date, the same date as the current one or an option object\n * without clear: true is passed, the method considers that argument as an\n * \"ineffective\" argument because calling datepicker.setDate() with those\n * values makes no changes to the date selection.\n *\n * When the allowOneSidedRange config option is false, passing {clear: true}\n * to clear the range works only when it is done to the last effective\n * argument (in other words, passed to rangeEnd or to rangeStart along with\n * ineffective rangeEnd). This is because when the date range is changed,\n * it gets normalized based on the last change at the end of the changing\n * process.\n *\n * @param {Date|Number|String|Object} rangeStart - Start date of the range\n * or {clear: true} to clear the date\n * @param {Date|Number|String|Object} rangeEnd - End date of the range\n * or {clear: true} to clear the date\n */\n }, {\n key: \"setDates\",\n value: function setDates(rangeStart, rangeEnd) {\n var _this$datepickers = _slicedToArray(this.datepickers, 2),\n datepicker0 = _this$datepickers[0],\n datepicker1 = _this$datepickers[1];\n var origDates = this.dates;\n\n // If range normalization runs on every change, we can't set a new range\n // that starts after the end of the current range correctly because the\n // normalization process swaps start↔︎end right after setting the new start\n // date. To prevent this, the normalization process needs to run once after\n // both of the new dates are set.\n this._updating = true;\n datepicker0.setDate(rangeStart);\n datepicker1.setDate(rangeEnd);\n delete this._updating;\n if (datepicker1.dates[0] !== origDates[1]) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n } else if (datepicker0.dates[0] !== origDates[0]) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n }\n }\n }]);\n}();\n\nexports.DateRangePicker = DateRangePicker;\nexports.Datepicker = Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { AccordionInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Accordion implements AccordionInterface {\n _instanceId: string;\n _accordionEl: HTMLElement;\n _items: AccordionItem[];\n _options: AccordionOptions;\n _clickHandler: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n accordionEl: HTMLElement | null = null,\n items: AccordionItem[] = [],\n options: AccordionOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : accordionEl.id;\n this._accordionEl = accordionEl;\n this._items = items;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Accordion',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // show accordion item based on click\n this._items.forEach((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n const clickHandler = () => {\n this.toggle(item.id);\n };\n\n item.triggerEl.addEventListener('click', clickHandler);\n\n // Store the clickHandler in a property of the item for removal later\n item.clickHandler = clickHandler;\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._items.length && this._initialized) {\n this._items.forEach((item) => {\n item.triggerEl.removeEventListener('click', item.clickHandler);\n\n // Clean up by deleting the clickHandler property from the item\n delete item.clickHandler;\n });\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Accordion', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.add('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n\n updateOnOpen(callback: () => void) {\n this._options.onOpen = callback;\n }\n\n updateOnClose(callback: () => void) {\n this._options.onClose = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion($accordionEl as HTMLElement, items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CarouselInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Carousel implements CarouselInterface {\n _instanceId: string;\n _carouselEl: HTMLElement;\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n _initialized: boolean;\n\n constructor(\n carouselEl: HTMLElement | null = null,\n items: CarouselItem[] = [],\n options: CarouselOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : carouselEl.id;\n this._carouselEl = carouselEl;\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Carousel',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n /**\n * initialize carousel and items based on active one\n */\n init() {\n if (this._items.length && !this._initialized) {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this.getActiveItem()) {\n this.slideTo(this.getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Carousel', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this.getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this.getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // Handling the case when there is only one item\n if (this._items.length === 1) {\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n return;\n }\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-30');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-30'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-20');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n\n updateOnNext(callback: () => void) {\n this._options.onNext = callback;\n }\n\n updateOnPrev(callback: () => void) {\n this._options.onPrev = callback;\n }\n\n updateOnChange(callback: () => void) {\n this._options.onChange = callback;\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel($carouselEl as HTMLElement, items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CopyClipboardOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CopyClipboardInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CopyClipboardOptions = {\n htmlEntities: false,\n contentType: 'input',\n onCopy: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass CopyClipboard implements CopyClipboardInterface {\n _instanceId: string;\n _triggerEl: HTMLElement | null;\n _targetEl: HTMLInputElement | null;\n _options: CopyClipboardOptions;\n _initialized: boolean;\n _triggerElClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLInputElement | null = null,\n options: CopyClipboardOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'CopyClipboard',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && this._triggerEl && !this._initialized) {\n this._triggerElClickHandler = () => {\n this.copy();\n };\n\n // clicking on the trigger element should copy the value of the target element\n if (this._triggerEl) {\n this._triggerEl.addEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._targetEl && this._initialized) {\n if (this._triggerEl) {\n this._triggerEl.removeEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('CopyClipboard', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getTargetValue() {\n if (this._options.contentType === 'input') {\n return this._targetEl.value;\n }\n\n if (this._options.contentType === 'innerHTML') {\n return this._targetEl.innerHTML;\n }\n\n if (this._options.contentType === 'textContent') {\n return this._targetEl.textContent.replace(/\\s+/g, ' ').trim();\n }\n }\n\n copy() {\n let textToCopy = this.getTargetValue();\n\n // Check if HTMLEntities option is enabled\n if (this._options.htmlEntities) {\n // Encode the text using HTML entities\n textToCopy = this.decodeHTML(textToCopy);\n }\n\n // Create a temporary textarea element\n const tempTextArea = document.createElement('textarea');\n tempTextArea.value = textToCopy;\n document.body.appendChild(tempTextArea);\n\n // Select the text inside the textarea and copy it to the clipboard\n tempTextArea.select();\n document.execCommand('copy');\n\n // Remove the temporary textarea\n document.body.removeChild(tempTextArea);\n\n // Callback function\n this._options.onCopy(this);\n\n return textToCopy;\n }\n\n // Function to encode text into HTML entities\n decodeHTML(html: string) {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = html;\n return textarea.textContent;\n }\n\n updateOnCopyCallback(callback: () => void) {\n this._options.onCopy = callback;\n }\n}\n\nexport function initCopyClipboards() {\n document\n .querySelectorAll('[data-copy-to-clipboard-target]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-target'\n );\n const $targetEl = document.getElementById(targetId);\n const contentType = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-content-type'\n );\n const htmlEntities = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-html-entities'\n );\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'CopyClipboard',\n $targetEl.getAttribute('id')\n )\n ) {\n new CopyClipboard(\n $triggerEl as HTMLElement,\n $targetEl as HTMLInputElement,\n {\n htmlEntities:\n htmlEntities && htmlEntities === 'true'\n ? true\n : Default.htmlEntities,\n contentType: contentType\n ? contentType\n : Default.contentType,\n } as CopyClipboardOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-copy-to-clipboard-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.CopyClipboard = CopyClipboard;\n window.initClipboards = initCopyClipboards;\n}\n\nexport default CopyClipboard;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CollapseInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Collapse implements CollapseInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Collapse',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Collapse', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n\n updateOnCollapse(callback: () => void) {\n this._options.onCollapse = callback;\n }\n\n updateOnExpand(callback: () => void) {\n this._options.onExpand = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'Collapse',\n $targetEl.getAttribute('id')\n )\n ) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n // if instance exists already for the same target element then create a new one with a different trigger element\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement,\n {},\n {\n id:\n $targetEl.getAttribute('id') +\n '_' +\n instances._generateRandomId(),\n }\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DatepickerOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DatepickerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nimport {\n Datepicker as FlowbiteDatepicker,\n DateRangePicker as FlowbiteDateRangePicker,\n} from 'flowbite-datepicker';\n\nconst Default: DatepickerOptions = {\n defaultDatepickerId: null,\n autohide: false,\n format: 'mm/dd/yyyy',\n maxDate: null,\n minDate: null,\n orientation: 'bottom',\n buttons: false,\n autoSelectToday: 0,\n title: null,\n language: 'en',\n rangePicker: false,\n onShow: () => {},\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Datepicker implements DatepickerInterface {\n _instanceId: string;\n _datepickerEl: HTMLElement;\n _datepickerInstance: FlowbiteDatepicker | FlowbiteDateRangePicker | null;\n _options: DatepickerOptions;\n _initialized: boolean;\n\n constructor(\n datepickerEl: HTMLElement | null = null,\n options: DatepickerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : datepickerEl.id;\n this._datepickerEl = datepickerEl;\n this._datepickerInstance = null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Datepicker',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._datepickerEl && !this._initialized) {\n if (this._options.rangePicker) {\n this._datepickerInstance = new FlowbiteDateRangePicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n } else {\n this._datepickerInstance = new FlowbiteDatepicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n this._datepickerInstance.destroy();\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Datepicker', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getDatepickerInstance() {\n return this._datepickerInstance;\n }\n\n getDate() {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.getDates();\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.getDate();\n }\n }\n\n setDate(date: any) {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.setDates(date);\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.setDate(date);\n }\n }\n\n show() {\n this._datepickerInstance.show();\n this._options.onShow(this);\n }\n\n hide() {\n this._datepickerInstance.hide();\n this._options.onHide(this);\n }\n\n _getDatepickerOptions(options: DatepickerOptions) {\n const datepickerOptions = {} as any;\n\n if (options.buttons) {\n datepickerOptions.todayBtn = true;\n datepickerOptions.clearBtn = true;\n\n if (options.autoSelectToday) {\n datepickerOptions.todayBtnMode = 1;\n }\n }\n\n if (options.autohide) {\n datepickerOptions.autohide = true;\n }\n\n if (options.format) {\n datepickerOptions.format = options.format;\n }\n\n if (options.maxDate) {\n datepickerOptions.maxDate = options.maxDate;\n }\n\n if (options.minDate) {\n datepickerOptions.minDate = options.minDate;\n }\n\n if (options.orientation) {\n datepickerOptions.orientation = options.orientation;\n }\n\n if (options.title) {\n datepickerOptions.title = options.title;\n }\n\n if (options.language) {\n datepickerOptions.language = options.language;\n }\n\n return datepickerOptions;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDatepickers() {\n document\n .querySelectorAll(\n '[datepicker], [inline-datepicker], [date-rangepicker]'\n )\n .forEach(($datepickerEl) => {\n if ($datepickerEl) {\n const buttons =\n $datepickerEl.hasAttribute('datepicker-buttons');\n const autoselectToday = $datepickerEl.hasAttribute(\n 'datepicker-autoselect-today'\n );\n const autohide = $datepickerEl.hasAttribute(\n 'datepicker-autohide'\n );\n const format = $datepickerEl.getAttribute('datepicker-format');\n const maxDate = $datepickerEl.getAttribute(\n 'datepicker-max-date'\n );\n const minDate = $datepickerEl.getAttribute(\n 'datepicker-min-date'\n );\n const orientation = $datepickerEl.getAttribute(\n 'datepicker-orientation'\n );\n const title = $datepickerEl.getAttribute('datepicker-title');\n const language = $datepickerEl.getAttribute(\n 'datepicker-language'\n );\n const rangePicker =\n $datepickerEl.hasAttribute('date-rangepicker');\n new Datepicker(\n $datepickerEl as HTMLElement,\n {\n buttons: buttons ? buttons : Default.buttons,\n autoSelectToday: autoselectToday\n ? autoselectToday\n : Default.autoSelectToday,\n autohide: autohide ? autohide : Default.autohide,\n format: format ? format : Default.format,\n maxDate: maxDate ? maxDate : Default.maxDate,\n minDate: minDate ? minDate : Default.minDate,\n orientation: orientation\n ? orientation\n : Default.orientation,\n title: title ? title : Default.title,\n language: language ? language : Default.language,\n rangePicker: rangePicker\n ? rangePicker\n : Default.rangePicker,\n } as DatepickerOptions\n );\n } else {\n console.error(\n `The datepicker element does not exist. Please check the datepicker attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Datepicker = Datepicker;\n window.initDatepickers = initDatepickers;\n}\n\nexport default Datepicker;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DialInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dial implements DialInterface {\n _instanceId: string;\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n _initialized: boolean;\n _showEventHandler: EventListenerOrEventListenerObject;\n _hideEventHandler: EventListenerOrEventListenerObject;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dial',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n this._showEventHandler = () => {\n this.show();\n };\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, this._showEventHandler);\n this._targetEl.addEventListener(ev, this._showEventHandler);\n });\n\n this._hideEventHandler = () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n };\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, this._hideEventHandler);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.removeEventListener(ev, this._showEventHandler);\n this._targetEl.removeEventListener(ev, this._showEventHandler);\n });\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.removeEventListener(ev, this._hideEventHandler);\n });\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dial', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DismissInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dismiss implements DismissInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dismiss',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._clickHandler = () => {\n this.hide();\n };\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dismiss', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerOptions, PlacementClasses } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { DrawerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Drawer implements DrawerInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n _eventListenerInstances: EventListenerInstance[] = [];\n _handleEscapeKey: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Drawer',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n // set initial accessibility attributes\n if (this._targetEl && !this._initialized) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n this._handleEscapeKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n };\n\n // add keyboard event listener to document\n document.addEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n\n // Remove the keyboard event listener\n document.removeEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Drawer', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (\n this._visible &&\n document.querySelector('[drawer-backdrop]') !== null\n ) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDrawers() {\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge ? (edge === 'true' ? true : false) : Default.edge,\n edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset,\n } as DrawerOptions);\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const toggleDrawer = () => {\n drawer.toggle();\n };\n $triggerEl.addEventListener('click', toggleDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const hideDrawer = () => {\n drawer.hide();\n };\n $triggerEl.addEventListener('click', hideDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const showDrawer = () => {\n drawer.show();\n };\n $triggerEl.addEventListener('click', showDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DropdownInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dropdown implements DropdownInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _initialized: boolean;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _hoverShowTriggerElHandler: EventListenerOrEventListenerObject;\n _hoverShowTargetElHandler: EventListenerOrEventListenerObject;\n _hoverHideHandler: EventListenerOrEventListenerObject;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetElement.id;\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dropdown',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._popperInstance = this._createPopperInstance();\n this._setupEventListeners();\n this._initialized = true;\n }\n }\n\n destroy() {\n const triggerEvents = this._getTriggerEvents();\n\n // Remove click event listeners for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._clickHandler);\n });\n }\n\n // Remove hover event listeners for trigger and target elements\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.removeEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hoverHideHandler);\n this._targetEl.removeEventListener(ev, this._hoverHideHandler);\n });\n }\n\n this._popperInstance.destroy();\n this._initialized = false;\n }\n\n removeInstance() {\n instances.removeInstance('Dropdown', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._clickHandler);\n });\n }\n\n this._hoverShowTriggerElHandler = (ev) => {\n if (ev.type === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n };\n this._hoverShowTargetElHandler = () => {\n this.show();\n };\n\n this._hoverHideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n };\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.addEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hoverHideHandler);\n this._targetEl.addEventListener(ev, this._hoverHideHandler);\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n this._targetEl.removeAttribute('aria-hidden');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n this._targetEl.setAttribute('aria-hidden', 'true');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n","import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCopyClipboards } from './clipboard';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initInputCounters } from './input-counter';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\nimport { initDatepickers } from './datepicker';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n initInputCounters();\n initCopyClipboards();\n initDatepickers();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { InputCounterOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { InputCounterInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: InputCounterOptions = {\n minValue: null,\n maxValue: null,\n onIncrement: () => {},\n onDecrement: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass InputCounter implements InputCounterInterface {\n _instanceId: string;\n _targetEl: HTMLInputElement | null;\n _incrementEl: HTMLElement | null;\n _decrementEl: HTMLElement | null;\n _options: InputCounterOptions;\n _initialized: boolean;\n _incrementClickHandler: EventListenerOrEventListenerObject;\n _decrementClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLInputElement | null = null,\n incrementEl: HTMLElement | null = null,\n decrementEl: HTMLElement | null = null,\n options: InputCounterOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._targetEl = targetEl;\n this._incrementEl = incrementEl;\n this._decrementEl = decrementEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'InputCounter',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._inputHandler = (event) => {\n {\n const target = event.target as HTMLInputElement;\n\n // check if the value is numeric\n if (!/^\\d*$/.test(target.value)) {\n // Regex to check if the value is numeric\n target.value = target.value.replace(/[^\\d]/g, ''); // Remove non-numeric characters\n }\n\n // check for max value\n if (\n this._options.maxValue !== null &&\n parseInt(target.value) > this._options.maxValue\n ) {\n target.value = this._options.maxValue.toString();\n }\n\n // check for min value\n if (\n this._options.minValue !== null &&\n parseInt(target.value) < this._options.minValue\n ) {\n target.value = this._options.minValue.toString();\n }\n }\n };\n\n this._incrementClickHandler = () => {\n this.increment();\n };\n\n this._decrementClickHandler = () => {\n this.decrement();\n };\n\n // Add event listener to restrict input to numeric values only\n this._targetEl.addEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.addEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n\n if (this._decrementEl) {\n this._decrementEl.addEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._targetEl && this._initialized) {\n this._targetEl.removeEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.removeEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n if (this._decrementEl) {\n this._decrementEl.removeEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('InputCounter', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getCurrentValue() {\n return parseInt(this._targetEl.value) || 0;\n }\n\n increment() {\n // don't increment if the value is already at the maximum value\n if (\n this._options.maxValue !== null &&\n this.getCurrentValue() >= this._options.maxValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() + 1).toString();\n this._options.onIncrement(this);\n }\n\n decrement() {\n // don't decrement if the value is already at the minimum value\n if (\n this._options.minValue !== null &&\n this.getCurrentValue() <= this._options.minValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() - 1).toString();\n this._options.onDecrement(this);\n }\n\n updateOnIncrement(callback: () => void) {\n this._options.onIncrement = callback;\n }\n\n updateOnDecrement(callback: () => void) {\n this._options.onDecrement = callback;\n }\n}\n\nexport function initInputCounters() {\n document.querySelectorAll('[data-input-counter]').forEach(($targetEl) => {\n const targetId = $targetEl.id;\n\n const $incrementEl = document.querySelector(\n '[data-input-counter-increment=\"' + targetId + '\"]'\n );\n\n const $decrementEl = document.querySelector(\n '[data-input-counter-decrement=\"' + targetId + '\"]'\n );\n\n const minValue = $targetEl.getAttribute('data-input-counter-min');\n const maxValue = $targetEl.getAttribute('data-input-counter-max');\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'InputCounter',\n $targetEl.getAttribute('id')\n )\n ) {\n new InputCounter(\n $targetEl as HTMLInputElement,\n $incrementEl ? ($incrementEl as HTMLElement) : null,\n $decrementEl ? ($decrementEl as HTMLElement) : null,\n {\n minValue: minValue ? parseInt(minValue) : null,\n maxValue: maxValue ? parseInt(maxValue) : null,\n } as InputCounterOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-input-counter attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.InputCounter = InputCounter;\n window.initInputCounters = initInputCounters;\n}\n\nexport default InputCounter;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalOptions } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { ModalInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Modal implements ModalInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _eventListenerInstances: EventListenerInstance[] = [];\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Modal',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Modal', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden && this._backdropEl) {\n this._backdropEl.remove();\n this._backdropEl = null;\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initModals() {\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n );\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // toggle modal visibility\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const toggleModal = () => {\n modal.toggle();\n };\n $triggerEl.addEventListener('click', toggleModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const showModal = () => {\n modal.show();\n };\n $triggerEl.addEventListener('click', showModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const hideModal = () => {\n modal.hide();\n };\n $triggerEl.addEventListener('click', hideModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { PopoverInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Popover implements PopoverInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Popover',\n this,\n instanceOptions.id ? instanceOptions.id : this._targetEl.id,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element and target element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n this._targetEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n this._targetEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Popover', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n this._targetEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n this._targetEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TabsInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tabs implements TabsInterface {\n _instanceId: string;\n _tabsEl: HTMLElement;\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n _initialized: boolean;\n\n constructor(\n tabsEl: HTMLElement | null = null,\n items: TabItem[] = [],\n options: TabsOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id;\n this._tabsEl = tabsEl;\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tabs',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this.setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', (event) => {\n event.preventDefault();\n this.show(tab.id);\n });\n });\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Tabs', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this.setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($parentEl) => {\n const tabItems: TabItem[] = [];\n const activeClasses = $parentEl.getAttribute(\n 'data-tabs-active-classes'\n );\n const inactiveClasses = $parentEl.getAttribute(\n 'data-tabs-inactive-classes'\n );\n let defaultTabId = null;\n $parentEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n\n new Tabs($parentEl as HTMLElement, tabItems, {\n defaultTabId: defaultTabId,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TooltipInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tooltip implements TooltipInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tooltip',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Tooltip', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n this.hide();\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n","class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n","import { AccordionInterface } from '../components/accordion/interface';\nimport { CarouselInterface } from '../components/carousel/interface';\nimport { CollapseInterface } from '../components/collapse/interface';\nimport { DialInterface } from '../components/dial/interface';\nimport { DismissInterface } from '../components/dismiss/interface';\nimport { DrawerInterface } from '../components/drawer/interface';\nimport { DropdownInterface } from '../components/dropdown/interface';\nimport { ModalInterface } from '../components/modal/interface';\nimport { PopoverInterface } from '../components/popover/interface';\nimport { TabsInterface } from '../components/tabs/interface';\nimport { TooltipInterface } from '../components/tooltip/interface';\nimport { InputCounterInterface } from '../components/input-counter/interface';\nimport { CopyClipboardInterface } from '../components/clipboard/interface';\nimport { DatepickerInterface } from '../components/datepicker/interface';\n\nclass Instances {\n private _instances: {\n Accordion: { [id: string]: AccordionInterface };\n Carousel: { [id: string]: CarouselInterface };\n Collapse: { [id: string]: CollapseInterface };\n Dial: { [id: string]: DialInterface };\n Dismiss: { [id: string]: DismissInterface };\n Drawer: { [id: string]: DrawerInterface };\n Dropdown: { [id: string]: DropdownInterface };\n Modal: { [id: string]: ModalInterface };\n Popover: { [id: string]: PopoverInterface };\n Tabs: { [id: string]: TabsInterface };\n Tooltip: { [id: string]: TooltipInterface };\n InputCounter: { [id: string]: InputCounterInterface };\n CopyClipboard: { [id: string]: CopyClipboardInterface };\n Datepicker: { [id: string]: DatepickerInterface };\n };\n\n constructor() {\n this._instances = {\n Accordion: {},\n Carousel: {},\n Collapse: {},\n Dial: {},\n Dismiss: {},\n Drawer: {},\n Dropdown: {},\n Modal: {},\n Popover: {},\n Tabs: {},\n Tooltip: {},\n InputCounter: {},\n CopyClipboard: {},\n Datepicker: {},\n };\n }\n\n addInstance(\n component: keyof Instances['_instances'],\n instance: any,\n id?: string,\n override = false\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (this._instances[component][id] && !override) {\n console.warn(`Flowbite: Instance with ID ${id} already exists.`);\n return;\n }\n\n if (override && this._instances[component][id]) {\n this._instances[component][id].destroyAndRemoveInstance();\n }\n\n this._instances[component][id ? id : this._generateRandomId()] =\n instance;\n }\n\n getAllInstances() {\n return this._instances;\n }\n\n getInstances(component: keyof Instances['_instances']) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n return this._instances[component];\n }\n\n getInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return;\n }\n return this._instances[component][id] as any;\n }\n\n destroyAndRemoveInstance(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this.destroyInstanceObject(component, id);\n this.removeInstance(component, id);\n }\n\n removeInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n delete this._instances[component][id];\n }\n\n destroyInstanceObject(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this._instances[component][id].destroy();\n }\n\n instanceExists(component: keyof Instances['_instances'], id: string) {\n if (!this._instances[component]) {\n return false;\n }\n\n if (!this._instances[component][id]) {\n return false;\n }\n\n return true;\n }\n\n _generateRandomId() {\n return Math.random().toString(36).substr(2, 9);\n }\n\n private _componentAndInstanceCheck(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return false;\n }\n\n return true;\n }\n}\n\nconst instances = new Instances();\n\nexport default instances;\n\nif (typeof window !== 'undefined') {\n window.FlowbiteInstances = instances;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// core components\nimport Accordion from './components/accordion';\nimport Carousel from './components/carousel';\nimport Collapse from './components/collapse';\nimport Dial from './components/dial';\nimport Dismiss from './components/dismiss';\nimport Drawer from './components/drawer';\nimport Dropdown from './components/dropdown';\nimport Modal from './components/modal';\nimport Popover from './components/popover';\nimport Tabs from './components/tabs';\nimport Tooltip from './components/tooltip';\nimport InputCounter from './components/input-counter';\nimport CopyClipboard from './components/clipboard';\nimport Datepicker from './components/datepicker';\nimport { initFlowbite } from './components/index';\nimport Events from './dom/events';\n\n// Since turbo maintainers refuse to add this event, we'll add it ourselves\n// https://discuss.hotwired.dev/t/event-to-know-a-turbo-stream-has-been-rendered/1554/10\nconst afterRenderEvent = new Event('turbo:after-stream-render');\naddEventListener('turbo:before-stream-render', (event: CustomEvent) => {\n const originalRender = event.detail.render;\n\n event.detail.render = function (streamElement: Element) {\n originalRender(streamElement);\n window.dispatchEvent(afterRenderEvent);\n };\n});\n\nconst turboLoadEvents = new Events('turbo:load', [initFlowbite]);\nturboLoadEvents.init();\n\nconst turboFrameLoadEvents = new Events('turbo:frame-load', [initFlowbite]);\nturboFrameLoadEvents.init();\n\nconst turboStreamLoadEvents = new Events('turbo:after-stream-render', [\n initFlowbite,\n]);\nturboStreamLoadEvents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n InputCounter,\n CopyClipboard,\n Datepicker,\n Events,\n};\n"],"names":["root","factory","exports","module","define","amd","self","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","variationPlacements","reduce","acc","placement","concat","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","element","nodeName","toLowerCase","getWindow","node","window","toString","ownerDocument","defaultView","isElement","Element","isHTMLElement","HTMLElement","isShadowRoot","ShadowRoot","name","enabled","phase","fn","_ref","state","Object","keys","elements","forEach","style","styles","attributes","assign","value","removeAttribute","setAttribute","effect","_ref2","initialStyles","position","options","strategy","top","margin","arrow","hasOwnProperty","property","attribute","requires","getBasePlacement","split","Math","max","min","round","getUAString","uaData","navigator","userAgentData","brands","map","item","brand","version","join","userAgent","isLayoutViewport","test","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","width","offsetHeight","height","visualViewport","addVisualOffsets","x","offsetLeft","y","offsetTop","getLayoutRect","abs","contains","parent","child","rootNode","getRootNode","next","isSameNode","parentNode","host","getComputedStyle","isTableElement","indexOf","getDocumentElement","document","documentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getOffsetParent","isFirefox","currentNode","css","transform","perspective","contain","willChange","filter","getContainingBlock","getMainAxisFromPlacement","within","mergePaddingObject","paddingObject","expandToHashMap","hashMap","key","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","len","padding","rects","toPaddingObject","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","offset","axisProp","centerOffset","_options$element","querySelector","requiresIfExists","getVariation","unsetSides","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","win","heightProp","widthProp","_Object$assign","commonStyles","_ref4","dpr","devicePixelRatio","roundOffsetsByDPR","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","data","passive","instance","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","addEventListener","update","removeEventListener","hash","getOppositePlacement","replace","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","body","listScrollParents","list","_element$ownerDocumen","isBody","target","updatedList","rectToClientRect","rect","getClientRectFromMixedType","clippingParent","html","layoutViewport","getViewportRect","clientTop","clientLeft","getInnerBoundingClientRect","winScroll","scrollWidth","scrollHeight","direction","getDocumentRect","getClippingRect","boundary","rootBoundary","mainClippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","length","overflows","sort","a","b","computeAutoPlacement","referenceRect","checksMap","Map","makeFallbackChecks","firstFittingPlacement","i","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","push","every","check","set","_loop","_i","fittingPlacement","find","get","slice","reset","getSideOffsets","preventedOffsets","isAnySideFullyClipped","some","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","_options$offset","invertDistance","skidding","distance","distanceAndSkiddingToXY","_data$state$placement","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","v","withinMaxClamp","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","isElementScaled","order","modifiers","visited","Set","result","modifier","add","dep","has","depModifier","DEFAULT_OPTIONS","areValidElements","arguments","args","Array","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","pending","orderedModifiers","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","orderModifiers","merged","current","existing","mergeByName","m","_ref3$options","cleanupFn","noopFn","forceUpdate","_state$elements","index","_state$orderedModifie","_state$orderedModifie2","Promise","resolve","then","undefined","destroy","onFirstUpdate","createPopper","eventListeners","_arrayLikeToArray","r","e","n","_callSuper","t","o","_getPrototypeOf","TypeError","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","constructor","apply","_classCallCheck","_defineProperties","enumerable","configurable","writable","defineProperty","_toPropertyKey","_createClass","prototype","_get","bind","p","_superPropBase","getOwnPropertyDescriptor","call","setPrototypeOf","getPrototypeOf","__proto__","_inherits","create","_setPrototypeOf","Boolean","valueOf","_slicedToArray","isArray","_arrayWithHoles","l","Symbol","iterator","u","f","done","return","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_toConsumableArray","_arrayWithoutHoles","from","_iterableToArray","_nonIterableSpread","toPrimitive","String","Number","_toPrimitive","_typeof","hasProperty","obj","prop","lastItemOf","arr","pushUnique","items","includes","stringToArray","str","separator","isInRange","testVal","limitToRange","val","createTagRepeat","tagName","repeat","openTagSrc","src","attr","optimizeTemplateHTML","stripTime","timeValue","Date","setHours","today","dateValue","newDate","setFullYear","addDays","date","amount","setDate","getDate","addMonths","monthsToSet","getMonth","expectedMonth","time","setMonth","addYears","getFullYear","dayDiff","day","dayOfTheWeekOf","baseDate","dayOfWeek","weekStart","baseDay","getDay","startOfYearPeriod","years","year","floor","reFormatTokens","reNonDateParts","knownFormats","parseFns","parseInt","month","locale","monthIndex","isNaN","NaN","monthName","compareNames","startsWith","monthsShort","findIndex","months","normalizeMonth","getTime","d","formatFns","dd","padZero","D","daysShort","DD","days","mm","M","MM","yy","yyyy","num","padStart","parseFormatString","format","Error","separators","parts","match","RegExp","partFormatters","token","partParserKeys","part","parser","dateStr","dateParts","dtParts","origDate","formatter","parseDate","toValue","_date","formatDate","dateObj","toDisplay","listenerRegistry","WeakMap","_EventTarget$prototyp","EventTarget","registerListeners","keyObj","listeners","registered","listener","unregisterListeners","Event","composedPath","getComposedPath","path","this","findFromPath","criteria","currentTarget","el","parentElement","findElementInEventPath","ev","selector","matches","locales","en","daysMin","clear","titleFormat","autohide","beforeShowDay","beforeShowDecade","beforeShowMonth","beforeShowYear","calendarWeeks","clearBtn","dateDelimiter","datesDisabled","daysOfWeekDisabled","daysOfWeekHighlighted","defaultViewDate","disableTouchKeyboard","language","maxDate","maxNumberOfDates","maxView","minDate","nextArrow","orientation","pickLevel","prevArrow","showDaysOfWeek","showOnClick","showOnFocus","startView","title","todayBtn","todayBtnMode","todayHighlight","updateOnBlur","range","createRange","parseHTML","createContextualFragment","hideElement","display","dataset","styleDisplay","showElement","emptyChildNodes","firstChild","removeChild","defaultLang","defaultFormat","defaultWeekStart","sanitizeDOW","dow","calcEndOfWeek","startOfWeek","validateDate","origValue","validateViewId","viewId","processOptions","datepicker","lang","inOpts","config","origLocale","weekEnd","hasToDisplay","hasToValue","validFormatString","minDt","maxDt","dates","dt","viewDate","wkStart","multidate","newPickLevel","newMaxView","newStartView","childNodes","pickerTemplate","daysTemplate","calendarWeeksTemplate","View","picker","selected","init","isMinView","id","updateFocus","updateSelection","beforeShow","classes","classList","disabled","_el$classList","extraClasses","content","newChildNodes","DocumentFragment","appendChild","replaceChildNodes","DaysView","_View","cellClass","onConstruction","inner","grid","lastChild","updateDOW","_this","dayNames","switchLabelFormat","weeksElem","weeks","insertBefore","children","textContent","className","viewYear","viewMonth","firstOfMonth","first","last","focused","_this$picker$datepick","rangepicker","_this2","switchLabel","setViewSwitchLabel","setPrevBtnDisabled","setNextBtnDisabled","thuOfTheWeek","firstThu","getWeek","remove","_this2$range","rangeStart","rangeEnd","performBeforeHook","_this3","querySelectorAll","computeMonthRange","thisYear","_range","_range$","startY","startM","_range$2","endY","endM","MonthsView","ix","monthNames","minYear","minMonth","minDateObj","maxYear","maxMonth","maxDateObj","yrOutOfRange","isMinYear","isMaxYear","_range2","toTitleCase","word","ch","toUpperCase","YearsView","navStep","step","beforeShowOption","triggerDatepickerEvent","type","detail","currentView","dispatchEvent","CustomEvent","goToPrevOrNext","newViewDate","_datepicker$config","_datepicker$picker","changeFocus","render","switchView","changeView","unfocus","refresh","hide","goToSelectedMonthOrYear","selection","onClickTodayBtn","currentDate","onClickClearBtn","onClickViewSwitch","onClickPrevBtn","onClickNextBtn","onClickView","_datepicker$picker$cu","onClickPicker","inline","inputField","focus","processPickerOptions","controls","prevBtn","cloneNode","nextBtn","_picker$datepicker$co","computeResetViewDate","setViewDate","oldViewDate","_picker$currentView","getTextDirection","Picker","template","buttonClass","_element$firstChild$c","header","footer","firstElementChild","_header$lastElementCh","lastElementChild","viewSwitch","_footer$firstChild$ch","elementClass","capture","views","container","view","active","inputDirection","dir","place","blur","exitEditMode","_this$element","_this$datepicker","_this$element$getBoun","calendarWidth","calendarHeight","_container$getBoundin","containerLeft","containerTop","containerWidth","_inputField$getBoundi","inputLeft","inputTop","inputWidth","inputHeight","_config$orientation","orientX","orientY","scrollY","scrollX","labelText","oldView","newView","_renderMethod","replaceChild","quickRender","renderMethod","findNextAvailableOne","addFn","increase","testFn","moveByArrowKey","vertical","ctrlKey","metaKey","onKeydown","editMode","shiftKey","enterEditMode","show","preventDefault","stopPropagation","onFocus","_showing","onMousedown","_active","activeElement","_clicking","setTimeout","onClickInput","clearTimeout","onPaste","clipboardData","types","onClickOutside","pickerElem","stringifyDates","processInputDates","inputDates","origDates","datepickers","newDates","_dt","refreshUI","mode","_setDate","Datepicker","initialDates","inputs","inputDateValues","onMousedownDocument","newOptions","detach","callback","opts","lastArg","pop","forceRender","filterOptions","newOpts","allowOneSidedRange","setupDatepicker","changeDateListener","onChangeDate","_updating","setDateOptions","changedSide","otherSide","changedDate","otherDate","DateRangePicker","cleanOptions","freeze","_this$datepickers","datepicker0","datepicker1","Default","alwaysOpen","activeClasses","inactiveClasses","onOpen","onClose","onToggle","DefaultInstanceOptions","override","accordionEl","instanceOptions","_instanceId","_accordionEl","_items","_initialized","addInstance","open","clickHandler","toggle","triggerEl","removeInstance","destroyAndRemoveInstance","getItem","targetEl","iconEl","close","updateOnOpen","updateOnClose","updateOnToggle","initAccordions","$accordionEl","getAttribute","$triggerEl","closest","Accordion","defaultPosition","indicators","interval","onNext","onPrev","onChange","carouselEl","_carouselEl","_activeItem","_indicators","_intervalDuration","_intervalInstance","getActiveItem","slideTo","indicator","nextItem","rotationItems","middle","_rotate","_setActiveItem","pause","cycle","activeItem","prev","prevItem","setInterval","clearInterval","updateOnNext","updateOnPrev","updateOnChange","initCarousels","$carouselEl","slide","$carouselItemEl","$indicatorEl","carousel","Carousel","carouselNextEl","carouselPrevEl","htmlEntities","contentType","onCopy","_triggerEl","_targetEl","_triggerElClickHandler","copy","getTargetValue","innerHTML","trim","textToCopy","decodeHTML","tempTextArea","createElement","select","execCommand","textarea","updateOnCopyCallback","initCopyClipboards","targetId","$targetEl","getElementById","instanceExists","CopyClipboard","console","error","initClipboards","onCollapse","onExpand","_visible","hasAttribute","_clickHandler","collapse","expand","updateOnCollapse","updateOnExpand","initCollapses","Collapse","_generateRandomId","defaultDatepickerId","buttons","autoSelectToday","rangePicker","onShow","onHide","datepickerEl","_datepickerEl","_datepickerInstance","_getDatepickerOptions","getDatepickerInstance","getDates","setDates","datepickerOptions","updateOnShow","updateOnHide","initDatepickers","$datepickerEl","autoselectToday","triggerType","parentEl","_parentEl","triggerEventTypes","_getTriggerEventTypes","_showEventHandler","showEvents","_hideEventHandler","hideEvents","isHidden","isVisible","initDials","$parentEl","dialId","$dialEl","Dial","transition","duration","timing","initDismisses","$dismissEl","Dismiss","bodyScrolling","backdrop","edge","edgeOffset","backdropClasses","_eventListenerInstances","_getPlacementClasses","base","c","_handleEscapeKey","event","removeAllEventListenerInstances","_destroyBackdropEl","inactive","_createBackdrop","backdropEl","append","addEventListenerInstance","handler","eventListenerInstance","getAllEventListenerInstances","initDrawers","drawerId","$drawerEl","Drawer","getInstance","toggleDrawer","hideDrawer","showDrawer","offsetSkidding","offsetDistance","delay","ignoreClickOutsideClass","targetElement","triggerElement","_popperInstance","_createPopperInstance","_setupEventListeners","triggerEvents","_getTriggerEvents","_hoverShowTriggerElHandler","_hoverShowTargetElHandler","_hoverHideHandler","_setupClickOutsideListener","_clickOutsideEventListener","_handleClickOutside","_removeClickOutsideListener","clickedEl","isIgnored","initDropdowns","dropdownId","$dropdownEl","Dropdown","initFlowbite","initModals","initTabs","initTooltips","initPopovers","initInputCounters","minValue","maxValue","onIncrement","onDecrement","incrementEl","decrementEl","_incrementEl","_decrementEl","_inputHandler","_incrementClickHandler","increment","_decrementClickHandler","decrement","getCurrentValue","updateOnIncrement","updateOnDecrement","$incrementEl","$decrementEl","InputCounter","closable","_isHidden","_backdropEl","_setupModalCloseEventListeners","_handleOutsideClick","_keydownEventListener","_removeModalCloseEventListeners","modalId","$modalEl","Modal","toggleModal","showModal","hideModal","_showHandler","_hideHandler","_removeKeydownListener","_setupKeydownListener","popoverID","$popoverEl","Popover","defaultTabId","tabsEl","_tabsEl","_activeTab","getTab","setActiveTab","tab","getActiveTab","forceShow","tabItems","isActive","Tabs","tooltipId","$tooltipEl","Tooltip","eventType","eventFunctions","_eventType","_eventFunctions","eventFunction","Events","instances","_instances","component","warn","getAllInstances","getInstances","_componentAndInstanceCheck","destroyInstanceObject","random","substr","FlowbiteInstances","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","toStringTag","afterRenderEvent","originalRender","streamElement"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts b/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts new file mode 100644 index 0000000..c8bb6b1 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts @@ -0,0 +1,26 @@ +import type { AccordionItem, AccordionOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { AccordionInterface } from './interface'; +declare class Accordion implements AccordionInterface { + _instanceId: string; + _accordionEl: HTMLElement; + _items: AccordionItem[]; + _options: AccordionOptions; + _clickHandler: EventListenerOrEventListenerObject; + _initialized: boolean; + constructor(accordionEl?: HTMLElement | null, items?: AccordionItem[], options?: AccordionOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getItem(id: string): AccordionItem; + open(id: string): void; + toggle(id: string): void; + close(id: string): void; + updateOnOpen(callback: () => void): void; + updateOnClose(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initAccordions(): void; +export default Accordion; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts.map new file mode 100644 index 0000000..44b1de8 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAiBjD,cAAM,SAAU,YAAW,kBAAkB;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,WAAW,CAAC;IAC1B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,aAAa,EAAE,kCAAkC,CAAC;IAClD,YAAY,EAAE,OAAO,CAAC;gBAGlB,WAAW,GAAE,WAAW,GAAG,IAAW,EACtC,KAAK,GAAE,aAAa,EAAO,EAC3B,OAAO,GAAE,gBAA0B,EACnC,eAAe,GAAE,eAAwC;IAkB7D,IAAI;IAqBJ,OAAO;IAYP,cAAc;IAId,wBAAwB;IAKxB,OAAO,CAAC,EAAE,EAAE,MAAM;IAIlB,IAAI,CAAC,EAAE,EAAE,MAAM;IA2Cf,MAAM,CAAC,EAAE,EAAE,MAAM;IAajB,KAAK,CAAC,EAAE,EAAE,MAAM;IAsBhB,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,aAAa,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIlC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,cAAc,SA2C7B;AAOD,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/index.js b/node_modules/flowbite/lib/cjs/components/accordion/index.js new file mode 100644 index 0000000..bbf41e1 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/index.js @@ -0,0 +1,194 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initAccordions = void 0; +var instances_1 = require("../../dom/instances"); +var Default = { + alwaysOpen: false, + activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white', + inactiveClasses: 'text-gray-500 dark:text-gray-400', + onOpen: function () { }, + onClose: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Accordion = /** @class */ (function () { + function Accordion(accordionEl, items, options, instanceOptions) { + if (accordionEl === void 0) { accordionEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : accordionEl.id; + this._accordionEl = accordionEl; + this._items = items; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Accordion', this, this._instanceId, instanceOptions.override); + } + Accordion.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + // show accordion item based on click + this._items.forEach(function (item) { + if (item.active) { + _this.open(item.id); + } + var clickHandler = function () { + _this.toggle(item.id); + }; + item.triggerEl.addEventListener('click', clickHandler); + // Store the clickHandler in a property of the item for removal later + item.clickHandler = clickHandler; + }); + this._initialized = true; + } + }; + Accordion.prototype.destroy = function () { + if (this._items.length && this._initialized) { + this._items.forEach(function (item) { + item.triggerEl.removeEventListener('click', item.clickHandler); + // Clean up by deleting the clickHandler property from the item + delete item.clickHandler; + }); + this._initialized = false; + } + }; + Accordion.prototype.removeInstance = function () { + instances_1.default.removeInstance('Accordion', this._instanceId); + }; + Accordion.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Accordion.prototype.getItem = function (id) { + return this._items.filter(function (item) { return item.id === id; })[0]; + }; + Accordion.prototype.open = function (id) { + var _a, _b; + var _this = this; + var item = this.getItem(id); + // don't hide other accordions if always open + if (!this._options.alwaysOpen) { + this._items.map(function (i) { + var _a, _b; + if (i !== item) { + (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + i.targetEl.classList.add('hidden'); + i.triggerEl.setAttribute('aria-expanded', 'false'); + i.active = false; + // rotate icon if set + if (i.iconEl) { + i.iconEl.classList.add('rotate-180'); + } + } + }); + } + // show active item + (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + item.triggerEl.setAttribute('aria-expanded', 'true'); + item.targetEl.classList.remove('hidden'); + item.active = true; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.remove('rotate-180'); + } + // callback function + this._options.onOpen(this, item); + }; + Accordion.prototype.toggle = function (id) { + var item = this.getItem(id); + if (item.active) { + this.close(id); + } + else { + this.open(id); + } + // callback function + this._options.onToggle(this, item); + }; + Accordion.prototype.close = function (id) { + var _a, _b; + var item = this.getItem(id); + (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' ')); + item.targetEl.classList.add('hidden'); + item.triggerEl.setAttribute('aria-expanded', 'false'); + item.active = false; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.add('rotate-180'); + } + // callback function + this._options.onClose(this, item); + }; + Accordion.prototype.updateOnOpen = function (callback) { + this._options.onOpen = callback; + }; + Accordion.prototype.updateOnClose = function (callback) { + this._options.onClose = callback; + }; + Accordion.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Accordion; +}()); +function initAccordions() { + document.querySelectorAll('[data-accordion]').forEach(function ($accordionEl) { + var alwaysOpen = $accordionEl.getAttribute('data-accordion'); + var activeClasses = $accordionEl.getAttribute('data-active-classes'); + var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes'); + var items = []; + $accordionEl + .querySelectorAll('[data-accordion-target]') + .forEach(function ($triggerEl) { + // Consider only items that directly belong to $accordionEl + // (to make nested accordions work). + if ($triggerEl.closest('[data-accordion]') === $accordionEl) { + var item = { + id: $triggerEl.getAttribute('data-accordion-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')), + iconEl: $triggerEl.querySelector('[data-accordion-icon]'), + active: $triggerEl.getAttribute('aria-expanded') === 'true' + ? true + : false, + }; + items.push(item); + } + }); + new Accordion($accordionEl, items, { + alwaysOpen: alwaysOpen === 'open' ? true : false, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initAccordions = initAccordions; +if (typeof window !== 'undefined') { + window.Accordion = Accordion; + window.initAccordions = initAccordions; +} +exports.default = Accordion; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/index.js.map b/node_modules/flowbite/lib/cjs/components/accordion/index.js.map new file mode 100644 index 0000000..e266f67 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/index.js.map @@ -0,0 +1 @@ +{"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,UAAU;oBACrB,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAC5B,UAAU,CAAC,YAAY,CAAC,uBAAuB,CAAC,CACnD;oBACD,MAAM,EAAE,UAAU,CAAC,aAAa,CAC5B,uBAAuB,CAC1B;oBACD,MAAM,EACF,UAAU,CAAC,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM;wBAC/C,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,KAAK;iBACD,CAAC;gBACnB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACpB;QACL,CAAC,CAAC,CAAC;QAEP,IAAI,SAAS,CAAC,YAA2B,EAAE,KAAK,EAAE;YAC9C,UAAU,EAAE,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;YAChD,aAAa,EAAE,aAAa;gBACxB,CAAC,CAAC,aAAa;gBACf,CAAC,CAAC,OAAO,CAAC,aAAa;YAC3B,eAAe,EAAE,eAAe;gBAC5B,CAAC,CAAC,eAAe;gBACjB,CAAC,CAAC,OAAO,CAAC,eAAe;SACZ,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACP,CAAC;AA3CD,wCA2CC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,cAAc,GAAG,cAAc,CAAC;CAC1C;AAED,kBAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts b/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts new file mode 100644 index 0000000..525a332 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts @@ -0,0 +1,13 @@ +import { AccordionItem, AccordionOptions } from './types'; +export declare interface AccordionInterface { + _items: AccordionItem[]; + _options: AccordionOptions; + getItem(id: string): AccordionItem | undefined; + open(id: string): void; + toggle(id: string): void; + close(id: string): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts.map new file mode 100644 index 0000000..feb8275 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/interface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG1D,MAAM,CAAC,OAAO,WAAW,kBAAkB;IACvC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAC/C,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/interface.js b/node_modules/flowbite/lib/cjs/components/accordion/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/interface.js.map b/node_modules/flowbite/lib/cjs/components/accordion/interface.js.map new file mode 100644 index 0000000..a7ef24a --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/accordion/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts b/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts new file mode 100644 index 0000000..9c762a6 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts @@ -0,0 +1,18 @@ +import { AccordionInterface } from './interface'; +export declare type AccordionItem = { + id: string; + triggerEl: HTMLElement; + targetEl: HTMLElement; + iconEl?: HTMLElement | null; + active?: boolean; + clickHandler?: EventListenerOrEventListenerObject; +}; +export declare type AccordionOptions = { + alwaysOpen?: boolean; + activeClasses?: string; + inactiveClasses?: string; + onOpen?: (accordion: AccordionInterface, item: AccordionItem) => void; + onClose?: (accordion: AccordionInterface, item: AccordionItem) => void; + onToggle?: (accordion: AccordionInterface, item: AccordionItem) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts.map new file mode 100644 index 0000000..5b16bfa --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,kCAAkC,CAAC;CACrD,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,gBAAgB,GAAG;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACtE,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3E,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/types.js b/node_modules/flowbite/lib/cjs/components/accordion/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/accordion/types.js.map b/node_modules/flowbite/lib/cjs/components/accordion/types.js.map new file mode 100644 index 0000000..e0f0c46 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/accordion/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/accordion/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts b/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts new file mode 100644 index 0000000..6854369 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts @@ -0,0 +1,64 @@ +import type { CarouselOptions, CarouselItem, IndicatorItem, RotationItems } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { CarouselInterface } from './interface'; +declare class Carousel implements CarouselInterface { + _instanceId: string; + _carouselEl: HTMLElement; + _items: CarouselItem[]; + _indicators: IndicatorItem[]; + _activeItem: CarouselItem; + _intervalDuration: number; + _intervalInstance: number; + _options: CarouselOptions; + _initialized: boolean; + constructor(carouselEl?: HTMLElement | null, items?: CarouselItem[], options?: CarouselOptions, instanceOptions?: InstanceOptions); + /** + * initialize carousel and items based on active one + */ + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getItem(position: number): CarouselItem; + /** + * Slide to the element based on id + * @param {*} position + */ + slideTo(position: number): void; + /** + * Based on the currently active item it will go to the next position + */ + next(): void; + /** + * Based on the currently active item it will go to the previous position + */ + prev(): void; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + _rotate(rotationItems: RotationItems): void; + /** + * Set an interval to cycle through the carousel items + */ + cycle(): void; + /** + * Clears the cycling interval + */ + pause(): void; + /** + * Get the currently active item + */ + getActiveItem(): CarouselItem; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + _setActiveItem(item: CarouselItem): void; + updateOnNext(callback: () => void): void; + updateOnPrev(callback: () => void): void; + updateOnChange(callback: () => void): void; +} +export declare function initCarousels(): void; +export default Carousel; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts.map new file mode 100644 index 0000000..aa0757d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAsBhD,cAAM,QAAS,YAAW,iBAAiB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,aAAa,EAAE,CAAC;IAC7B,WAAW,EAAE,YAAY,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;gBAGlB,UAAU,GAAE,WAAW,GAAG,IAAW,EACrC,KAAK,GAAE,YAAY,EAAO,EAC1B,OAAO,GAAE,eAAyB,EAClC,eAAe,GAAE,eAAwC;IA0B7D;;OAEG;IACH,IAAI;IA4BJ,OAAO;IAMP,cAAc;IAId,wBAAwB;IAKxB,OAAO,CAAC,QAAQ,EAAE,MAAM;IAIxB;;;OAGG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM;IAuBxB;;OAEG;IACH,IAAI;IAiBJ;;OAEG;IACH,IAAI;IAiBJ;;;OAGG;IACH,OAAO,CAAC,aAAa,EAAE,aAAa;IAmDpC;;OAEG;IACH,KAAK;IAQL;;OAEG;IACH,KAAK;IAIL;;OAEG;IACH,aAAa;IAIb;;;OAGG;IACH,cAAc,CAAC,IAAI,EAAE,YAAY;IAyBjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,aAAa,SA0E5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/index.js b/node_modules/flowbite/lib/cjs/components/carousel/index.js new file mode 100644 index 0000000..8f5b302 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/index.js @@ -0,0 +1,289 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initCarousels = void 0; +var instances_1 = require("../../dom/instances"); +var Default = { + defaultPosition: 0, + indicators: { + items: [], + activeClasses: 'bg-white dark:bg-gray-800', + inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800', + }, + interval: 3000, + onNext: function () { }, + onPrev: function () { }, + onChange: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Carousel = /** @class */ (function () { + function Carousel(carouselEl, items, options, instanceOptions) { + if (carouselEl === void 0) { carouselEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : carouselEl.id; + this._carouselEl = carouselEl; + this._items = items; + this._options = __assign(__assign(__assign({}, Default), options), { indicators: __assign(__assign({}, Default.indicators), options.indicators) }); + this._activeItem = this.getItem(this._options.defaultPosition); + this._indicators = this._options.indicators.items; + this._intervalDuration = this._options.interval; + this._intervalInstance = null; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Carousel', this, this._instanceId, instanceOptions.override); + } + /** + * initialize carousel and items based on active one + */ + Carousel.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + this._items.map(function (item) { + item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform'); + }); + // if no active item is set then first position is default + if (this.getActiveItem()) { + this.slideTo(this.getActiveItem().position); + } + else { + this.slideTo(0); + } + this._indicators.map(function (indicator, position) { + indicator.el.addEventListener('click', function () { + _this.slideTo(position); + }); + }); + this._initialized = true; + } + }; + Carousel.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + } + }; + Carousel.prototype.removeInstance = function () { + instances_1.default.removeInstance('Carousel', this._instanceId); + }; + Carousel.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Carousel.prototype.getItem = function (position) { + return this._items[position]; + }; + /** + * Slide to the element based on id + * @param {*} position + */ + Carousel.prototype.slideTo = function (position) { + var nextItem = this._items[position]; + var rotationItems = { + left: nextItem.position === 0 + ? this._items[this._items.length - 1] + : this._items[nextItem.position - 1], + middle: nextItem, + right: nextItem.position === this._items.length - 1 + ? this._items[0] + : this._items[nextItem.position + 1], + }; + this._rotate(rotationItems); + this._setActiveItem(nextItem); + if (this._intervalInstance) { + this.pause(); + this.cycle(); + } + this._options.onChange(this); + }; + /** + * Based on the currently active item it will go to the next position + */ + Carousel.prototype.next = function () { + var activeItem = this.getActiveItem(); + var nextItem = null; + // check if last item + if (activeItem.position === this._items.length - 1) { + nextItem = this._items[0]; + } + else { + nextItem = this._items[activeItem.position + 1]; + } + this.slideTo(nextItem.position); + // callback function + this._options.onNext(this); + }; + /** + * Based on the currently active item it will go to the previous position + */ + Carousel.prototype.prev = function () { + var activeItem = this.getActiveItem(); + var prevItem = null; + // check if first item + if (activeItem.position === 0) { + prevItem = this._items[this._items.length - 1]; + } + else { + prevItem = this._items[activeItem.position - 1]; + } + this.slideTo(prevItem.position); + // callback function + this._options.onPrev(this); + }; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + Carousel.prototype._rotate = function (rotationItems) { + // reset + this._items.map(function (item) { + item.el.classList.add('hidden'); + }); + // Handling the case when there is only one item + if (this._items.length === 1) { + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-20'); + return; + } + // left item (previously active) + rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.left.el.classList.add('-translate-x-full', 'z-10'); + // currently active item + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-30'); + // right item (upcoming active) + rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-30'); + rotationItems.right.el.classList.add('translate-x-full', 'z-20'); + }; + /** + * Set an interval to cycle through the carousel items + */ + Carousel.prototype.cycle = function () { + var _this = this; + if (typeof window !== 'undefined') { + this._intervalInstance = window.setInterval(function () { + _this.next(); + }, this._intervalDuration); + } + }; + /** + * Clears the cycling interval + */ + Carousel.prototype.pause = function () { + clearInterval(this._intervalInstance); + }; + /** + * Get the currently active item + */ + Carousel.prototype.getActiveItem = function () { + return this._activeItem; + }; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + Carousel.prototype._setActiveItem = function (item) { + var _a, _b; + var _this = this; + this._activeItem = item; + var position = item.position; + // update the indicators if available + if (this._indicators.length) { + this._indicators.map(function (indicator) { + var _a, _b; + indicator.el.setAttribute('aria-current', 'false'); + (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' ')); + (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' ')); + }); + (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' ')); + (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' ')); + this._indicators[position].el.setAttribute('aria-current', 'true'); + } + }; + Carousel.prototype.updateOnNext = function (callback) { + this._options.onNext = callback; + }; + Carousel.prototype.updateOnPrev = function (callback) { + this._options.onPrev = callback; + }; + Carousel.prototype.updateOnChange = function (callback) { + this._options.onChange = callback; + }; + return Carousel; +}()); +function initCarousels() { + document.querySelectorAll('[data-carousel]').forEach(function ($carouselEl) { + var interval = $carouselEl.getAttribute('data-carousel-interval'); + var slide = $carouselEl.getAttribute('data-carousel') === 'slide' + ? true + : false; + var items = []; + var defaultPosition = 0; + if ($carouselEl.querySelectorAll('[data-carousel-item]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function ($carouselItemEl, position) { + items.push({ + position: position, + el: $carouselItemEl, + }); + if ($carouselItemEl.getAttribute('data-carousel-item') === + 'active') { + defaultPosition = position; + } + }); + } + var indicators = []; + if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function ($indicatorEl) { + indicators.push({ + position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')), + el: $indicatorEl, + }); + }); + } + var carousel = new Carousel($carouselEl, items, { + defaultPosition: defaultPosition, + indicators: { + items: indicators, + }, + interval: interval ? interval : Default.interval, + }); + if (slide) { + carousel.cycle(); + } + // check for controls + var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]'); + var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]'); + if (carouselNextEl) { + carouselNextEl.addEventListener('click', function () { + carousel.next(); + }); + } + if (carouselPrevEl) { + carouselPrevEl.addEventListener('click', function () { + carousel.prev(); + }); + } + }); +} +exports.initCarousels = initCarousels; +if (typeof window !== 'undefined') { + window.Carousel = Carousel; + window.initCarousels = initCarousels; +} +exports.default = Carousel; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/index.js.map b/node_modules/flowbite/lib/cjs/components/carousel/index.js.map new file mode 100644 index 0000000..79769d6 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/carousel/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AASA,iDAA4C;AAE5C,IAAM,OAAO,GAAoB;IAC7B,eAAe,EAAE,CAAC;IAClB,UAAU,EAAE;QACR,KAAK,EAAE,EAAE;QACT,aAAa,EAAE,2BAA2B;QAC1C,eAAe,EACX,uEAAuE;KAC9E;IACD,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,C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,CAAC,wBAAwB,CAAC,CACtD;oBACD,EAAE,EAAE,YAAY;iBACnB,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;SACN;QAED,IAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,WAA0B,EAAE,KAAK,EAAE;YAC7D,eAAe,EAAE,eAAe;YAChC,UAAU,EAAE;gBACR,KAAK,EAAE,UAAU;aACpB;YACD,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ;SAChC,CAAC,CAAC;QAEtB,IAAI,KAAK,EAAE;YACP,QAAQ,CAAC,KAAK,EAAE,CAAC;SACpB;QAED,qBAAqB;QACrB,IAAM,cAAc,GAAG,WAAW,CAAC,aAAa,CAC5C,sBAAsB,CACzB,CAAC;QACF,IAAM,cAAc,GAAG,WAAW,CAAC,aAAa,CAC5C,sBAAsB,CACzB,CAAC;QAEF,IAAI,cAAc,EAAE;YAChB,cAAc,CAAC,gBAAgB,CAAC,OAAO,EAAE;gBACrC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,CAAC,CAAC,CAAC;SACN;QAED,IAAI,cAAc,EAAE;YAChB,cAAc,CAAC,gBAAgB,CAAC,OAAO,EAAE;gBACrC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,CAAC,CAAC,CAAC;SACN;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AA1ED,sCA0EC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,kBAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts b/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts new file mode 100644 index 0000000..0847622 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts @@ -0,0 +1,23 @@ +import { CarouselOptions, CarouselItem, IndicatorItem, RotationItems } from './types'; +export declare interface CarouselInterface { + _items: CarouselItem[]; + _indicators: IndicatorItem[]; + _activeItem: CarouselItem; + _intervalDuration: number; + _intervalInstance: number; + _options: CarouselOptions; + init(): void; + getItem(position: number): CarouselItem; + getActiveItem(): CarouselItem; + _setActiveItem(item: CarouselItem): void; + slideTo(position: number): void; + next(): void; + prev(): void; + _rotate(rotationItems: RotationItems): void; + cycle(): void; + pause(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts.map new file mode 100644 index 0000000..5b50215 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EAChB,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,aAAa,EAAE,CAAC;IAC7B,WAAW,EAAE,YAAY,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAE1B,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAAC;IACxC,aAAa,IAAI,YAAY,CAAC;IAE9B,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAEzC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5C,KAAK,IAAI,IAAI,CAAC;IACd,KAAK,IAAI,IAAI,CAAC;IAEd,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/interface.js b/node_modules/flowbite/lib/cjs/components/carousel/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/interface.js.map b/node_modules/flowbite/lib/cjs/components/carousel/interface.js.map new file mode 100644 index 0000000..3c63595 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/carousel/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts b/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts new file mode 100644 index 0000000..8ae7d3d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts @@ -0,0 +1,27 @@ +import { CarouselInterface } from './interface'; +export declare type CarouselItem = { + position: number; + el: HTMLElement; +}; +export declare type IndicatorItem = { + position: number; + el: HTMLElement; +}; +export declare type RotationItems = { + left: CarouselItem; + middle: CarouselItem; + right: CarouselItem; +}; +export declare type CarouselOptions = { + defaultPosition?: number; + indicators?: { + items?: IndicatorItem[]; + activeClasses?: string; + inactiveClasses?: string; + }; + interval?: number; + onNext?: (carousel: CarouselInterface) => void; + onPrev?: (carousel: CarouselInterface) => void; + onChange?: (carousel: CarouselInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts.map new file mode 100644 index 0000000..8cb376d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,YAAY,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/types.js b/node_modules/flowbite/lib/cjs/components/carousel/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/carousel/types.js.map b/node_modules/flowbite/lib/cjs/components/carousel/types.js.map new file mode 100644 index 0000000..72b8fbd --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/carousel/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/carousel/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/index.d.ts b/node_modules/flowbite/lib/cjs/components/clipboard/index.d.ts new file mode 100644 index 0000000..5f42284 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/index.d.ts @@ -0,0 +1,24 @@ +import type { CopyClipboardOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { CopyClipboardInterface } from './interface'; +declare class CopyClipboard implements CopyClipboardInterface { + _instanceId: string; + _triggerEl: HTMLElement | null; + _targetEl: HTMLInputElement | null; + _options: CopyClipboardOptions; + _initialized: boolean; + _triggerElClickHandler: EventListenerOrEventListenerObject; + _inputHandler: EventListenerOrEventListenerObject; + constructor(triggerEl?: HTMLElement | null, targetEl?: HTMLInputElement | null, options?: CopyClipboardOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getTargetValue(): string; + copy(): string; + decodeHTML(html: string): string; + updateOnCopyCallback(callback: () => void): void; +} +export declare function initCopyClipboards(): void; +export default CopyClipboard; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/clipboard/index.d.ts.map new file mode 100644 index 0000000..2dc7859 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/clipboard/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAcrD,cAAM,aAAc,YAAW,sBAAsB;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACnC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,sBAAsB,EAAE,kCAAkC,CAAC;IAC3D,aAAa,EAAE,kCAAkC,CAAC;gBAG9C,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,QAAQ,GAAE,gBAAgB,GAAG,IAAW,EACxC,OAAO,GAAE,oBAA8B,EACvC,eAAe,GAAE,eAAwC;IAoB7D,IAAI;IAkBJ,OAAO;IAYP,cAAc;IAId,wBAAwB;IAKxB,cAAc;IAcd,IAAI;IA4BJ,UAAU,CAAC,IAAI,EAAE,MAAM;IAMvB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,IAAI;CAG5C;AAED,wBAAgB,kBAAkB,SA2CjC;AAOD,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/index.js b/node_modules/flowbite/lib/cjs/components/clipboard/index.js new file mode 100644 index 0000000..92ac54e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/index.js @@ -0,0 +1,143 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initCopyClipboards = void 0; +var instances_1 = require("../../dom/instances"); +var Default = { + htmlEntities: false, + contentType: 'input', + onCopy: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var CopyClipboard = /** @class */ (function () { + function CopyClipboard(triggerEl, targetEl, options, instanceOptions) { + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('CopyClipboard', this, this._instanceId, instanceOptions.override); + } + CopyClipboard.prototype.init = function () { + var _this = this; + if (this._targetEl && this._triggerEl && !this._initialized) { + this._triggerElClickHandler = function () { + _this.copy(); + }; + // clicking on the trigger element should copy the value of the target element + if (this._triggerEl) { + this._triggerEl.addEventListener('click', this._triggerElClickHandler); + } + this._initialized = true; + } + }; + CopyClipboard.prototype.destroy = function () { + if (this._triggerEl && this._targetEl && this._initialized) { + if (this._triggerEl) { + this._triggerEl.removeEventListener('click', this._triggerElClickHandler); + } + this._initialized = false; + } + }; + CopyClipboard.prototype.removeInstance = function () { + instances_1.default.removeInstance('CopyClipboard', this._instanceId); + }; + CopyClipboard.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + CopyClipboard.prototype.getTargetValue = function () { + if (this._options.contentType === 'input') { + return this._targetEl.value; + } + if (this._options.contentType === 'innerHTML') { + return this._targetEl.innerHTML; + } + if (this._options.contentType === 'textContent') { + return this._targetEl.textContent.replace(/\s+/g, ' ').trim(); + } + }; + CopyClipboard.prototype.copy = function () { + var textToCopy = this.getTargetValue(); + // Check if HTMLEntities option is enabled + if (this._options.htmlEntities) { + // Encode the text using HTML entities + textToCopy = this.decodeHTML(textToCopy); + } + // Create a temporary textarea element + var tempTextArea = document.createElement('textarea'); + tempTextArea.value = textToCopy; + document.body.appendChild(tempTextArea); + // Select the text inside the textarea and copy it to the clipboard + tempTextArea.select(); + document.execCommand('copy'); + // Remove the temporary textarea + document.body.removeChild(tempTextArea); + // Callback function + this._options.onCopy(this); + return textToCopy; + }; + // Function to encode text into HTML entities + CopyClipboard.prototype.decodeHTML = function (html) { + var textarea = document.createElement('textarea'); + textarea.innerHTML = html; + return textarea.textContent; + }; + CopyClipboard.prototype.updateOnCopyCallback = function (callback) { + this._options.onCopy = callback; + }; + return CopyClipboard; +}()); +function initCopyClipboards() { + document + .querySelectorAll('[data-copy-to-clipboard-target]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-copy-to-clipboard-target'); + var $targetEl = document.getElementById(targetId); + var contentType = $triggerEl.getAttribute('data-copy-to-clipboard-content-type'); + var htmlEntities = $triggerEl.getAttribute('data-copy-to-clipboard-html-entities'); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('CopyClipboard', $targetEl.getAttribute('id'))) { + new CopyClipboard($triggerEl, $targetEl, { + htmlEntities: htmlEntities && htmlEntities === 'true' + ? true + : Default.htmlEntities, + contentType: contentType + ? contentType + : Default.contentType, + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-copy-to-clipboard-target attribute.")); + } + }); +} +exports.initCopyClipboards = initCopyClipboards; +if (typeof window !== 'undefined') { + window.CopyClipboard = CopyClipboard; + window.initClipboards = initCopyClipboards; +} +exports.default = CopyClipboard; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/index.js.map b/node_modules/flowbite/lib/cjs/components/clipboard/index.js.map new file mode 100644 index 0000000..643dc9e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/index.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YAAY,GAAG,UAAU,CAAC,YAAY,CACxC,sCAAsC,CACzC,CAAC;QAEF,qCAAqC;QACrC,IAAI,SAAS,EAAE;YACX,IACI,CAAC,mBAAS,CAAC,cAAc,CACrB,eAAe,EACf,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAC/B,EACH;gBACE,IAAI,aAAa,CACb,UAAyB,EACzB,SAA6B,EAC7B;oBACI,YAAY,EACR,YAAY,IAAI,YAAY,KAAK,MAAM;wBACnC,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,OAAO,CAAC,YAAY;oBAC9B,WAAW,EAAE,WAAW;wBACpB,CAAC,CAAC,WAAW;wBACb,CAAC,CAAC,OAAO,CAAC,WAAW;iBACJ,CAC5B,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uCAA+B,QAAQ,iFAA6E,CACvH,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AA3CD,gDA2CC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,MAAM,CAAC,cAAc,GAAG,kBAAkB,CAAC;CAC9C;AAED,kBAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/interface.d.ts b/node_modules/flowbite/lib/cjs/components/clipboard/interface.d.ts new file mode 100644 index 0000000..b995ed3 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/interface.d.ts @@ -0,0 +1,12 @@ +import { CopyClipboardOptions } from './types'; +export declare interface CopyClipboardInterface { + _triggerEl: HTMLElement | null; + _targetEl: HTMLElement | HTMLInputElement | null; + _options: CopyClipboardOptions; + init(): void; + copy(): string; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/clipboard/interface.d.ts.map new file mode 100644 index 0000000..378c9f3 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/clipboard/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,CAAC,OAAO,WAAW,sBAAsB;IAC3C,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,WAAW,GAAG,gBAAgB,GAAG,IAAI,CAAC;IACjD,QAAQ,EAAE,oBAAoB,CAAC;IAE/B,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,MAAM,CAAC;IAEf,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/interface.js b/node_modules/flowbite/lib/cjs/components/clipboard/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/interface.js.map b/node_modules/flowbite/lib/cjs/components/clipboard/interface.js.map new file mode 100644 index 0000000..05b8440 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/clipboard/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/types.d.ts b/node_modules/flowbite/lib/cjs/components/clipboard/types.d.ts new file mode 100644 index 0000000..ae90e80 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/types.d.ts @@ -0,0 +1,7 @@ +import { CopyClipboardInterface } from './interface'; +export declare type CopyClipboardOptions = { + htmlEntities: boolean; + contentType?: string; + onCopy?: (clipboard: CopyClipboardInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/clipboard/types.d.ts.map new file mode 100644 index 0000000..b2e739f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/clipboard/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,CAAC,OAAO,MAAM,oBAAoB,GAAG;IACvC,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,sBAAsB,KAAK,IAAI,CAAC;CACxD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/types.js b/node_modules/flowbite/lib/cjs/components/clipboard/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/clipboard/types.js.map b/node_modules/flowbite/lib/cjs/components/clipboard/types.js.map new file mode 100644 index 0000000..6a3d545 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/clipboard/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/clipboard/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts b/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts new file mode 100644 index 0000000..e2d93be --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts @@ -0,0 +1,26 @@ +import type { CollapseOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { CollapseInterface } from './interface'; +declare class Collapse implements CollapseInterface { + _instanceId: string; + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: CollapseOptions; + _visible: boolean; + _initialized: boolean; + _clickHandler: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: CollapseOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + collapse(): void; + expand(): void; + toggle(): void; + updateOnCollapse(callback: () => void): void; + updateOnExpand(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initCollapses(): void; +export default Collapse; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts.map new file mode 100644 index 0000000..798b3e5 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAchD,cAAM,QAAS,YAAW,iBAAiB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,kCAAkC,CAAC;gBAG9C,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,eAAyB,EAClC,eAAe,GAAE,eAAwC;IAmB7D,IAAI;IAmBJ,OAAO;IAOP,cAAc;IAId,wBAAwB;IAKxB,QAAQ;IAWR,MAAM;IAWN,MAAM;IAUN,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIrC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;IAInC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,aAAa,SAuC5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/index.js b/node_modules/flowbite/lib/cjs/components/collapse/index.js new file mode 100644 index 0000000..8edc6fa --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/index.js @@ -0,0 +1,143 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initCollapses = void 0; +var instances_1 = require("../../dom/instances"); +var Default = { + onCollapse: function () { }, + onExpand: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Collapse = /** @class */ (function () { + function Collapse(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Collapse', this, this._instanceId, instanceOptions.override); + } + Collapse.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + if (this._triggerEl.hasAttribute('aria-expanded')) { + this._visible = + this._triggerEl.getAttribute('aria-expanded') === 'true'; + } + else { + // fix until v2 not to break previous single collapses which became dismiss + this._visible = !this._targetEl.classList.contains('hidden'); + } + this._clickHandler = function () { + _this.toggle(); + }; + this._triggerEl.addEventListener('click', this._clickHandler); + this._initialized = true; + } + }; + Collapse.prototype.destroy = function () { + if (this._triggerEl && this._initialized) { + this._triggerEl.removeEventListener('click', this._clickHandler); + this._initialized = false; + } + }; + Collapse.prototype.removeInstance = function () { + instances_1.default.removeInstance('Collapse', this._instanceId); + }; + Collapse.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Collapse.prototype.collapse = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onCollapse(this); + }; + Collapse.prototype.expand = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onExpand(this); + }; + Collapse.prototype.toggle = function () { + if (this._visible) { + this.collapse(); + } + else { + this.expand(); + } + // callback function + this._options.onToggle(this); + }; + Collapse.prototype.updateOnCollapse = function (callback) { + this._options.onCollapse = callback; + }; + Collapse.prototype.updateOnExpand = function (callback) { + this._options.onExpand = callback; + }; + Collapse.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Collapse; +}()); +function initCollapses() { + document + .querySelectorAll('[data-collapse-toggle]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-collapse-toggle'); + var $targetEl = document.getElementById(targetId); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('Collapse', $targetEl.getAttribute('id'))) { + new Collapse($targetEl, $triggerEl); + } + else { + // if instance exists already for the same target element then create a new one with a different trigger element + new Collapse($targetEl, $triggerEl, {}, { + id: $targetEl.getAttribute('id') + + '_' + + instances_1.default._generateRandomId(), + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-collapse-toggle attribute.")); + } + }); +} +exports.initCollapses = initCollapses; +if (typeof window !== 'undefined') { + window.Collapse = Collapse; + window.initCollapses = initCollapses; +} +exports.default = Collapse; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/index.js.map b/node_modules/flowbite/lib/cjs/components/collapse/index.js.map new file mode 100644 index 0000000..1b05b40 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/collapse/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,iDAA4C;AAE5C,IAAM,OAAO,GAAoB;IAC7B,UAAU,EAAE,cAAO,CAAC;IACpB,QAAQ,EAAE,cAAO,CAAC;IAClB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IASI,kBACI,QAAmC,EACnC,SAAoC,EACpC,OAAkC,EAClC,eAAyD;QAHzD,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAkC;QAClC,gCAAA,EAAA,wCAAyD;QAEzD,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE;YACjC,CAAC,CAAC,eAAe,CAAC,EAAE;YACpB,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,yBAAQ,OAAO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C;IACtC,CAAC;IAED,iCAAc,GAAd,UAAe,QAAoB;QAC/B,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACtC,CAAC;IACL,eAAC;AAAD,CAAC,AA9GD,IA8GC;AAED,SAAgB,aAAa;IACzB,QAAQ;SACH,gBAAgB,CAAC,wBAAwB,CAAC;SAC1C,OAAO,CAAC,UAAC,UAAU;QAChB,IAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;QACjE,IAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAEpD,qCAAqC;QACrC,IAAI,SAAS,EAAE;YACX,IACI,CAAC,mBAAS,CAAC,cAAc,CACrB,UAAU,EACV,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAC/B,EACH;gBACE,IAAI,QAAQ,CACR,SAAwB,EACxB,UAAyB,CAC5B,CAAC;aACL;iBAAM;gBACH,gHAAgH;gBAChH,IAAI,QAAQ,CACR,SAAwB,EACxB,UAAyB,EACzB,EAAE,EACF;oBACI,EAAE,EACE,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC;wBAC5B,GAAG;wBACH,mBAAS,CAAC,iBAAiB,EAAE;iBACpC,CACJ,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uCAA+B,QAAQ,wEAAoE,CAC9G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAvCD,sCAuCC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,kBAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts b/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts new file mode 100644 index 0000000..91e2593 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts @@ -0,0 +1,15 @@ +import { CollapseOptions } from './types'; +export declare interface CollapseInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: CollapseOptions; + _visible: boolean; + init(): void; + collapse(): void; + expand(): void; + toggle(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts.map new file mode 100644 index 0000000..c324287 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAElB,IAAI,IAAI,IAAI,CAAC;IACb,QAAQ,IAAI,IAAI,CAAC;IACjB,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,IAAI,CAAC;IAEf,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/interface.js b/node_modules/flowbite/lib/cjs/components/collapse/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/interface.js.map b/node_modules/flowbite/lib/cjs/components/collapse/interface.js.map new file mode 100644 index 0000000..b82a2f4 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/collapse/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts b/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts new file mode 100644 index 0000000..3f3094e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts @@ -0,0 +1,7 @@ +import { CollapseInterface } from './interface'; +export declare type CollapseOptions = { + onCollapse?: (collapse: CollapseInterface) => void; + onExpand?: (collapse: CollapseInterface) => void; + onToggle?: (collapse: CollapseInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts.map new file mode 100644 index 0000000..ba058f8 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/types.js b/node_modules/flowbite/lib/cjs/components/collapse/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/collapse/types.js.map b/node_modules/flowbite/lib/cjs/components/collapse/types.js.map new file mode 100644 index 0000000..c1e2361 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/collapse/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/collapse/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/datepicker/index.d.ts b/node_modules/flowbite/lib/cjs/components/datepicker/index.d.ts new file mode 100644 index 0000000..df66173 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/index.d.ts @@ -0,0 +1,27 @@ +import type { DatepickerOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { DatepickerInterface } from './interface'; +import { Datepicker as FlowbiteDatepicker, DateRangePicker as FlowbiteDateRangePicker } from 'flowbite-datepicker'; +declare class Datepicker implements DatepickerInterface { + _instanceId: string; + _datepickerEl: HTMLElement; + _datepickerInstance: FlowbiteDatepicker | FlowbiteDateRangePicker | null; + _options: DatepickerOptions; + _initialized: boolean; + constructor(datepickerEl?: HTMLElement | null, options?: DatepickerOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getDatepickerInstance(): FlowbiteDatepicker | FlowbiteDateRangePicker; + getDate(): string | string[]; + setDate(date: any): void; + show(): void; + hide(): void; + _getDatepickerOptions(options: DatepickerOptions): any; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; +} +export declare function initDatepickers(): void; +export default Datepicker; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/datepicker/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/datepicker/index.d.ts.map new file mode 100644 index 0000000..c519296 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/datepicker/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,EACH,UAAU,IAAI,kBAAkB,EAChC,eAAe,IAAI,uBAAuB,EAC7C,MAAM,qBAAqB,CAAC;AAuB7B,cAAM,UAAW,YAAW,mBAAmB;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,WAAW,CAAC;IAC3B,mBAAmB,EAAE,kBAAkB,GAAG,uBAAuB,GAAG,IAAI,CAAC;IACzE,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,YAAY,EAAE,OAAO,CAAC;gBAGlB,YAAY,GAAE,WAAW,GAAG,IAAW,EACvC,OAAO,GAAE,iBAA2B,EACpC,eAAe,GAAE,eAAwC;IAkB7D,IAAI;IAkBJ,OAAO;IAOP,cAAc;IAKd,wBAAwB;IAKxB,qBAAqB;IAIrB,OAAO;IAgBP,OAAO,CAAC,IAAI,EAAE,GAAG;IAgBjB,IAAI;IAKJ,IAAI;IAKJ,qBAAqB,CAAC,OAAO,EAAE,iBAAiB;IA2ChD,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGpC;AAED,wBAAgB,eAAe,SA0D9B;AAOD,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/datepicker/index.js b/node_modules/flowbite/lib/cjs/components/datepicker/index.js new file mode 100644 index 0000000..7b3aa72 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/index.js @@ -0,0 +1,192 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initDatepickers = void 0; +var instances_1 = require("../../dom/instances"); +var flowbite_datepicker_1 = require("flowbite-datepicker"); +var Default = { + defaultDatepickerId: null, + autohide: false, + format: 'mm/dd/yyyy', + maxDate: null, + minDate: null, + orientation: 'bottom', + buttons: false, + autoSelectToday: 0, + title: null, + language: 'en', + rangePicker: false, + onShow: function () { }, + onHide: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Datepicker = /** @class */ (function () { + function Datepicker(datepickerEl, options, instanceOptions) { + if (datepickerEl === void 0) { datepickerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : datepickerEl.id; + this._datepickerEl = datepickerEl; + this._datepickerInstance = null; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Datepicker', this, this._instanceId, instanceOptions.override); + } + Datepicker.prototype.init = function () { + if (this._datepickerEl && !this._initialized) { + if (this._options.rangePicker) { + this._datepickerInstance = new flowbite_datepicker_1.DateRangePicker(this._datepickerEl, this._getDatepickerOptions(this._options)); + } + else { + this._datepickerInstance = new flowbite_datepicker_1.Datepicker(this._datepickerEl, this._getDatepickerOptions(this._options)); + } + this._initialized = true; + } + }; + Datepicker.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + this._datepickerInstance.destroy(); + } + }; + Datepicker.prototype.removeInstance = function () { + this.destroy(); + instances_1.default.removeInstance('Datepicker', this._instanceId); + }; + Datepicker.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Datepicker.prototype.getDatepickerInstance = function () { + return this._datepickerInstance; + }; + Datepicker.prototype.getDate = function () { + if (this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.DateRangePicker) { + return this._datepickerInstance.getDates(); + } + if (!this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.Datepicker) { + return this._datepickerInstance.getDate(); + } + }; + Datepicker.prototype.setDate = function (date) { + if (this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.DateRangePicker) { + return this._datepickerInstance.setDates(date); + } + if (!this._options.rangePicker && + this._datepickerInstance instanceof flowbite_datepicker_1.Datepicker) { + return this._datepickerInstance.setDate(date); + } + }; + Datepicker.prototype.show = function () { + this._datepickerInstance.show(); + this._options.onShow(this); + }; + Datepicker.prototype.hide = function () { + this._datepickerInstance.hide(); + this._options.onHide(this); + }; + Datepicker.prototype._getDatepickerOptions = function (options) { + var datepickerOptions = {}; + if (options.buttons) { + datepickerOptions.todayBtn = true; + datepickerOptions.clearBtn = true; + if (options.autoSelectToday) { + datepickerOptions.todayBtnMode = 1; + } + } + if (options.autohide) { + datepickerOptions.autohide = true; + } + if (options.format) { + datepickerOptions.format = options.format; + } + if (options.maxDate) { + datepickerOptions.maxDate = options.maxDate; + } + if (options.minDate) { + datepickerOptions.minDate = options.minDate; + } + if (options.orientation) { + datepickerOptions.orientation = options.orientation; + } + if (options.title) { + datepickerOptions.title = options.title; + } + if (options.language) { + datepickerOptions.language = options.language; + } + return datepickerOptions; + }; + Datepicker.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Datepicker.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + return Datepicker; +}()); +function initDatepickers() { + document + .querySelectorAll('[datepicker], [inline-datepicker], [date-rangepicker]') + .forEach(function ($datepickerEl) { + if ($datepickerEl) { + var buttons = $datepickerEl.hasAttribute('datepicker-buttons'); + var autoselectToday = $datepickerEl.hasAttribute('datepicker-autoselect-today'); + var autohide = $datepickerEl.hasAttribute('datepicker-autohide'); + var format = $datepickerEl.getAttribute('datepicker-format'); + var maxDate = $datepickerEl.getAttribute('datepicker-max-date'); + var minDate = $datepickerEl.getAttribute('datepicker-min-date'); + var orientation_1 = $datepickerEl.getAttribute('datepicker-orientation'); + var title = $datepickerEl.getAttribute('datepicker-title'); + var language = $datepickerEl.getAttribute('datepicker-language'); + var rangePicker = $datepickerEl.hasAttribute('date-rangepicker'); + new Datepicker($datepickerEl, { + buttons: buttons ? buttons : Default.buttons, + autoSelectToday: autoselectToday + ? autoselectToday + : Default.autoSelectToday, + autohide: autohide ? autohide : Default.autohide, + format: format ? format : Default.format, + maxDate: maxDate ? maxDate : Default.maxDate, + minDate: minDate ? minDate : Default.minDate, + orientation: orientation_1 + ? orientation_1 + : Default.orientation, + title: title ? title : Default.title, + language: language ? language : Default.language, + rangePicker: rangePicker + ? rangePicker + : Default.rangePicker, + }); + } + else { + console.error("The datepicker element does not exist. Please check the datepicker attribute."); + } + }); +} +exports.initDatepickers = initDatepickers; +if (typeof window !== 'undefined') { + window.Datepicker = Datepicker; + window.initDatepickers = initDatepickers; +} +exports.default = Datepicker; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/datepicker/index.js.map b/node_modules/flowbite/lib/cjs/components/datepicker/index.js.map new file mode 100644 index 0000000..33265e0 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/datepicker/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAKA,iDAA4C;AAE5C,2DAG6B;AAE7B,IAAM,OAAO,GAAsB;IAC/B,mBAAmB,EAAE,IAAI;IACzB,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,KA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.ts b/node_modules/flowbite/lib/cjs/components/datepicker/interface.d.ts new file mode 100644 index 0000000..63c1553 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/interface.d.ts @@ -0,0 +1,11 @@ +import { DatepickerOptions } from './types'; +export declare interface DatepickerInterface { + _datepickerEl: HTMLElement; + _datepickerInstance: any | null; + _options: DatepickerOptions; + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/datepicker/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/datepicker/interface.d.ts.map new file mode 100644 index 0000000..c15a701 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/datepicker/interface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,CAAC,OAAO,WAAW,mBAAmB;IACxC,aAAa,EAAE,WAAW,CAAC;IAC3B,mBAAmB,EAAE,GAAG,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,iBAAiB,CAAC;IAE5B,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/datepicker/interface.js b/node_modules/flowbite/lib/cjs/components/datepicker/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/datepicker/interface.js.map b/node_modules/flowbite/lib/cjs/components/datepicker/interface.js.map new file mode 100644 index 0000000..f8355d8 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/datepicker/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/datepicker/types.d.ts b/node_modules/flowbite/lib/cjs/components/datepicker/types.d.ts new file mode 100644 index 0000000..b4f3a28 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/types.d.ts @@ -0,0 +1,20 @@ +import { DatepickerInterface } from './interface'; +export interface DatepickerOptions { + defaultDatepickerId?: string | null; + autohide?: boolean; + format?: string; + maxDate?: string | null; + minDate?: string | null; + orientation?: string; + buttons?: boolean; + autoSelectToday?: number; + title?: string | null; + language?: string; + locales?: { + [key: string]: any; + }; + rangePicker?: boolean | false; + onShow?: (Datepicker: DatepickerInterface) => void; + onHide?: (Datepicker: DatepickerInterface) => void; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/datepicker/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/datepicker/types.d.ts.map new file mode 100644 index 0000000..6a14c05 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/datepicker/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAC9B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnD,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACtD"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/datepicker/types.js b/node_modules/flowbite/lib/cjs/components/datepicker/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/datepicker/types.js.map b/node_modules/flowbite/lib/cjs/components/datepicker/types.js.map new file mode 100644 index 0000000..9c18faf --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/datepicker/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/datepicker/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/index.d.ts b/node_modules/flowbite/lib/cjs/components/dial/index.d.ts new file mode 100644 index 0000000..8fbb33a --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/index.d.ts @@ -0,0 +1,34 @@ +import type { DialOptions, DialTriggerType } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { DialInterface } from './interface'; +declare class Dial implements DialInterface { + _instanceId: string; + _parentEl: HTMLElement; + _triggerEl: HTMLElement; + _targetEl: HTMLElement; + _options: DialOptions; + _visible: boolean; + _initialized: boolean; + _showEventHandler: EventListenerOrEventListenerObject; + _hideEventHandler: EventListenerOrEventListenerObject; + constructor(parentEl?: HTMLElement | null, triggerEl?: HTMLElement | null, targetEl?: HTMLElement | null, options?: DialOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + hide(): void; + show(): void; + toggle(): void; + isHidden(): boolean; + isVisible(): boolean; + _getTriggerEventTypes(triggerType: DialTriggerType): { + showEvents: string[]; + hideEvents: string[]; + }; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initDials(): void; +export default Dial; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/dial/index.d.ts.map new file mode 100644 index 0000000..eb134b2 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAe5C,cAAM,IAAK,YAAW,aAAa;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,kCAAkC,CAAC;IACtD,iBAAiB,EAAE,kCAAkC,CAAC;gBAGlD,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,WAAqB,EAC9B,eAAe,GAAE,eAAwC;IAoB7D,IAAI;IA4BJ,OAAO;IAmBP,cAAc;IAId,wBAAwB;IAKxB,IAAI;IAWJ,IAAI;IAWJ,MAAM;IAQN,QAAQ;IAIR,SAAS;IAIT,qBAAqB,CAAC,WAAW,EAAE,eAAe;;;;IAyBlD,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,SAAS,SAgCxB;AAOD,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/index.js b/node_modules/flowbite/lib/cjs/components/dial/index.js new file mode 100644 index 0000000..a70c7e9 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/index.js @@ -0,0 +1,184 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initDials = void 0; +var instances_1 = require("../../dom/instances"); +var Default = { + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dial = /** @class */ (function () { + function Dial(parentEl, triggerEl, targetEl, options, instanceOptions) { + if (parentEl === void 0) { parentEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._parentEl = parentEl; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dial', this, this._instanceId, instanceOptions.override); + } + Dial.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + this._showEventHandler = function () { + _this.show(); + }; + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showEventHandler); + _this._targetEl.addEventListener(ev, _this._showEventHandler); + }); + this._hideEventHandler = function () { + if (!_this._parentEl.matches(':hover')) { + _this.hide(); + } + }; + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.addEventListener(ev, _this._hideEventHandler); + }); + this._initialized = true; + } + }; + Dial.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showEventHandler); + _this._targetEl.removeEventListener(ev, _this._showEventHandler); + }); + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.removeEventListener(ev, _this._hideEventHandler); + }); + this._initialized = false; + } + }; + Dial.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dial', this._instanceId); + }; + Dial.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dial.prototype.hide = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Dial.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dial.prototype.toggle = function () { + if (this._visible) { + this.hide(); + } + else { + this.show(); + } + }; + Dial.prototype.isHidden = function () { + return !this._visible; + }; + Dial.prototype.isVisible = function () { + return this._visible; + }; + Dial.prototype._getTriggerEventTypes = function (triggerType) { + switch (triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Dial.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Dial.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Dial.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Dial; +}()); +function initDials() { + document.querySelectorAll('[data-dial-init]').forEach(function ($parentEl) { + var $triggerEl = $parentEl.querySelector('[data-dial-toggle]'); + if ($triggerEl) { + var dialId = $triggerEl.getAttribute('data-dial-toggle'); + var $dialEl = document.getElementById(dialId); + if ($dialEl) { + var triggerType = $triggerEl.getAttribute('data-dial-trigger'); + new Dial($parentEl, $triggerEl, $dialEl, { + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("Dial with id ".concat(dialId, " does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?")); + } + } + else { + console.error("Dial with id ".concat($parentEl.id, " does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?")); + } + }); +} +exports.initDials = initDials; +if (typeof window !== 'undefined') { + window.Dial = Dial; + window.initDials = initDials; +} +exports.default = Dial; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/index.js.map b/node_modules/flowbite/lib/cjs/components/dial/index.js.map new file mode 100644 index 0000000..659ff79 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dial/index.ts"],"names":[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,aAAa,CAAC,oBAAoB,CAAC,CAAC;QAEjE,IAAI,UAAU,EAAE;YACZ,IAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;YAC3D,IAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAEhD,IAAI,OAAO,EAAE;gBACT,IAAM,WAAW,GACb,UAAU,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;gBACjD,IAAI,IAAI,CACJ,SAAwB,EACxB,UAAyB,EACzB,OAAsB,EACtB;oBACI,WAAW,EAAE,WAAW;wBACpB,CAAC,CAAC,WAAW;wBACb,CAAC,CAAC,OAAO,CAAC,WAAW;iBACb,CACnB,CAAC;aACL;iBAAM;gBACH,OAAO,CAAC,KAAK,CACT,uBAAgB,MAAM,sGAAmG,CAC5H,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uBAAgB,SAAS,CAAC,EAAE,+FAA4F,CAC3H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAhCD,8BAgCC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;CAChC;AAED,kBAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts b/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts new file mode 100644 index 0000000..3055e21 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts @@ -0,0 +1,19 @@ +import { DialOptions, DialTriggerEventTypes, DialTriggerType } from './types'; +export declare interface DialInterface { + _parentEl: HTMLElement; + _triggerEl: HTMLElement; + _targetEl: HTMLElement; + _options: DialOptions; + _visible: boolean; + init(): void; + isVisible(): boolean; + isHidden(): boolean; + hide(): void; + show(): void; + toggle(): void; + _getTriggerEventTypes(triggerType: DialTriggerType): DialTriggerEventTypes; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts.map new file mode 100644 index 0000000..af70962 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE9E,MAAM,CAAC,OAAO,WAAW,aAAa;IAClC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAElB,IAAI,IAAI,IAAI,CAAC;IACb,SAAS,IAAI,OAAO,CAAC;IACrB,QAAQ,IAAI,OAAO,CAAC;IACpB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IACf,qBAAqB,CAAC,WAAW,EAAE,eAAe,GAAG,qBAAqB,CAAC;IAE3E,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/interface.js b/node_modules/flowbite/lib/cjs/components/dial/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/interface.js.map b/node_modules/flowbite/lib/cjs/components/dial/interface.js.map new file mode 100644 index 0000000..83f6457 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dial/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/types.d.ts b/node_modules/flowbite/lib/cjs/components/dial/types.d.ts new file mode 100644 index 0000000..2f4877c --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/types.d.ts @@ -0,0 +1,13 @@ +import { DialInterface } from './interface'; +export declare type DialTriggerType = 'click' | 'hover' | 'none'; +export declare type DialTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type DialOptions = { + triggerType?: DialTriggerType; + onShow?: (dial: DialInterface) => void; + onHide?: (dial: DialInterface) => void; + onToggle?: (dial: DialInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/dial/types.d.ts.map new file mode 100644 index 0000000..da04793 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG;IACxC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG;IAC9B,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC5C,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/types.js b/node_modules/flowbite/lib/cjs/components/dial/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dial/types.js.map b/node_modules/flowbite/lib/cjs/components/dial/types.js.map new file mode 100644 index 0000000..0613f16 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dial/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dial/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts b/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts new file mode 100644 index 0000000..1a8c97b --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts @@ -0,0 +1,21 @@ +import type { DismissOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { DismissInterface } from './interface'; +declare class Dismiss implements DismissInterface { + _instanceId: string; + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: DismissOptions; + _initialized: boolean; + _clickHandler: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: DismissOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + hide(): void; + updateOnHide(callback: () => void): void; +} +export declare function initDismisses(): void; +export default Dismiss; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts.map new file mode 100644 index 0000000..562d083 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAe/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,kCAAkC,CAAC;gBAG9C,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB,EACjC,eAAe,GAAE,eAAwC;IAkB7D,IAAI;IAUJ,OAAO;IAOP,cAAc;IAId,wBAAwB;IAKxB,IAAI;IAeJ,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGpC;AAED,wBAAgB,aAAa,SAa5B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/index.js b/node_modules/flowbite/lib/cjs/components/dismiss/index.js new file mode 100644 index 0000000..52f125a --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/index.js @@ -0,0 +1,97 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initDismisses = void 0; +var instances_1 = require("../../dom/instances"); +var Default = { + transition: 'transition-opacity', + duration: 300, + timing: 'ease-out', + onHide: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dismiss = /** @class */ (function () { + function Dismiss(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dismiss', this, this._instanceId, instanceOptions.override); + } + Dismiss.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + this._clickHandler = function () { + _this.hide(); + }; + this._triggerEl.addEventListener('click', this._clickHandler); + this._initialized = true; + } + }; + Dismiss.prototype.destroy = function () { + if (this._triggerEl && this._initialized) { + this._triggerEl.removeEventListener('click', this._clickHandler); + this._initialized = false; + } + }; + Dismiss.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dismiss', this._instanceId); + }; + Dismiss.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dismiss.prototype.hide = function () { + var _this = this; + this._targetEl.classList.add(this._options.transition, "duration-".concat(this._options.duration), this._options.timing, 'opacity-0'); + setTimeout(function () { + _this._targetEl.classList.add('hidden'); + }, this._options.duration); + // callback function + this._options.onHide(this, this._targetEl); + }; + Dismiss.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + return Dismiss; +}()); +function initDismisses() { + document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-dismiss-target'); + var $dismissEl = document.querySelector(targetId); + if ($dismissEl) { + new Dismiss($dismissEl, $triggerEl); + } + else { + console.error("The dismiss element with id \"".concat(targetId, "\" does not exist. Please check the data-dismiss-target attribute.")); + } + }); +} +exports.initDismisses = initDismisses; +if (typeof window !== 'undefined') { + window.Dismiss = Dismiss; + window.initDismisses = initDismisses; +} +exports.default = Dismiss; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/index.js.map b/node_modules/flowbite/lib/cjs/components/dismiss/index.js.map new file mode 100644 index 0000000..9159545 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dismiss/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,iDAA4C;AAE5C,IAAM,OAAO,GAAmB;IAC5B,UAAU,EAAE,oBAAoB;IAChC,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,cAAO,CAAC;CACnB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IAQI,iBACI,QAAmC,EACnC,SAAoC,EACpC,OAAiC,EACjC,eAAyD;QAHzD,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAiC;QACjC,gCAAA,EAAA,wCAAyD;QAEzD,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE;YACjC,CAAC,CAAC,eAAe,CAAC,EAAE;YACpB,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;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C;YACP,KAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC3C,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAE3B,oBAAoB;QACpB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAED,8BAAY,GAAZ,UAAa,QAAoB;QAC7B,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC;IACpC,CAAC;IACL,cAAC;AAAD,CAAC,AA1ED,IA0EC;AAED,SAAgB,aAAa;IACzB,QAAQ,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC,UAAC,UAAU;QAClE,IAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;QAChE,IAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAEpD,IAAI,UAAU,EAAE;YACZ,IAAI,OAAO,CAAC,UAAyB,EAAE,UAAyB,CAAC,CAAC;SACrE;aAAM;YACH,OAAO,CAAC,KAAK,CACT,wCAAgC,QAAQ,uEAAmE,CAC9G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,sCAaC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,kBAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts b/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts new file mode 100644 index 0000000..ebe7565 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts @@ -0,0 +1,12 @@ +import { DismissOptions } from './types'; +export declare interface DismissInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: DismissOptions; + init(): void; + hide(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts.map new file mode 100644 index 0000000..4d156cb --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IAEzB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/interface.js b/node_modules/flowbite/lib/cjs/components/dismiss/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/interface.js.map b/node_modules/flowbite/lib/cjs/components/dismiss/interface.js.map new file mode 100644 index 0000000..6b664d5 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dismiss/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts b/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts new file mode 100644 index 0000000..c659c00 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts @@ -0,0 +1,8 @@ +import { DismissInterface } from './interface'; +export declare type DismissOptions = { + transition?: string; + duration?: number; + timing?: string; + onHide?: (dismiss: DismissInterface, targetEl: HTMLElement) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts.map new file mode 100644 index 0000000..2ccb43e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;CACvE,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/types.js b/node_modules/flowbite/lib/cjs/components/dismiss/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dismiss/types.js.map b/node_modules/flowbite/lib/cjs/components/dismiss/types.js.map new file mode 100644 index 0000000..8ceeeb5 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dismiss/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dismiss/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts b/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts new file mode 100644 index 0000000..aadf18d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts @@ -0,0 +1,35 @@ +import type { DrawerOptions, PlacementClasses } from './types'; +import type { InstanceOptions, EventListenerInstance } from '../../dom/types'; +import { DrawerInterface } from './interface'; +declare class Drawer implements DrawerInterface { + _instanceId: string; + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DrawerOptions; + _visible: boolean; + _eventListenerInstances: EventListenerInstance[]; + _handleEscapeKey: EventListenerOrEventListenerObject; + _initialized: boolean; + constructor(targetEl?: HTMLElement | null, options?: DrawerOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + hide(): void; + show(): void; + toggle(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _getPlacementClasses(placement: string): PlacementClasses; + isHidden(): boolean; + isVisible(): boolean; + addEventListenerInstance(element: HTMLElement, type: string, handler: EventListenerOrEventListenerObject): void; + removeAllEventListenerInstances(): void; + getAllEventListenerInstances(): EventListenerInstance[]; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initDrawers(): void; +export default Drawer; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts.map new file mode 100644 index 0000000..cdad17e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAoB9C,cAAM,MAAO,YAAW,eAAe;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,EAAE,qBAAqB,EAAE,CAAM;IACtD,gBAAgB,EAAE,kCAAkC,CAAC;IACrD,YAAY,EAAE,OAAO,CAAC;gBAGlB,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,aAAuB,EAChC,eAAe,GAAE,eAAwC;IAkB7D,IAAI;IA4BJ,OAAO;IAYP,cAAc;IAId,wBAAwB;IAKxB,IAAI;IA+CJ,IAAI;IA8CJ,MAAM;IAQN,eAAe;IAcf,kBAAkB;IASlB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAyCzD,QAAQ;IAIR,SAAS;IAIT,wBAAwB,CACpB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kCAAkC;IAS/C,+BAA+B;IAU/B,4BAA4B;IAI5B,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,WAAW,SA0I1B;AAOD,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/index.js b/node_modules/flowbite/lib/cjs/components/drawer/index.js new file mode 100644 index 0000000..dfec456 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/index.js @@ -0,0 +1,358 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initDrawers = void 0; +var instances_1 = require("../../dom/instances"); +var Default = { + placement: 'left', + bodyScrolling: false, + backdrop: true, + edge: false, + edgeOffset: 'bottom-[60px]', + backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Drawer = /** @class */ (function () { + function Drawer(targetEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._eventListenerInstances = []; + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Drawer', this, this._instanceId, instanceOptions.override); + } + Drawer.prototype.init = function () { + var _this = this; + // set initial accessibility attributes + if (this._targetEl && !this._initialized) { + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.classList.add('transition-transform'); + // set base placement classes + this._getPlacementClasses(this._options.placement).base.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._handleEscapeKey = function (event) { + if (event.key === 'Escape') { + // if 'Escape' key is pressed + if (_this.isVisible()) { + // if the Drawer is visible + _this.hide(); // hide the Drawer + } + } + }; + // add keyboard event listener to document + document.addEventListener('keydown', this._handleEscapeKey); + this._initialized = true; + } + }; + Drawer.prototype.destroy = function () { + if (this._initialized) { + this.removeAllEventListenerInstances(); + this._destroyBackdropEl(); + // Remove the keyboard event listener + document.removeEventListener('keydown', this._handleEscapeKey); + this._initialized = false; + } + }; + Drawer.prototype.removeInstance = function () { + instances_1.default.removeInstance('Drawer', this._instanceId); + }; + Drawer.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Drawer.prototype.hide = function () { + var _this = this; + // based on the edge option show placement classes + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + // enable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.remove('overflow-hidden'); + } + // destroy backdrop + if (this._options.backdrop) { + this._destroyBackdropEl(); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Drawer.prototype.show = function () { + var _this = this; + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + // disable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.add('overflow-hidden'); + } + // show backdrop + if (this._options.backdrop) { + this._createBackdrop(); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Drawer.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Drawer.prototype._createBackdrop = function () { + var _a; + var _this = this; + if (!this._visible) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('drawer-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + backdropEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Drawer.prototype._destroyBackdropEl = function () { + if (this._visible && + document.querySelector('[drawer-backdrop]') !== null) { + document.querySelector('[drawer-backdrop]').remove(); + } + }; + Drawer.prototype._getPlacementClasses = function (placement) { + switch (placement) { + case 'top': + return { + base: ['top-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['-translate-y-full'], + }; + case 'right': + return { + base: ['right-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-x-full'], + }; + case 'bottom': + return { + base: ['bottom-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['translate-y-full'], + }; + case 'left': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + case 'bottom-edge': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-y-full', this._options.edgeOffset], + }; + default: + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + } + }; + Drawer.prototype.isHidden = function () { + return !this._visible; + }; + Drawer.prototype.isVisible = function () { + return this._visible; + }; + Drawer.prototype.addEventListenerInstance = function (element, type, handler) { + this._eventListenerInstances.push({ + element: element, + type: type, + handler: handler, + }); + }; + Drawer.prototype.removeAllEventListenerInstances = function () { + this._eventListenerInstances.map(function (eventListenerInstance) { + eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler); + }); + this._eventListenerInstances = []; + }; + Drawer.prototype.getAllEventListenerInstances = function () { + return this._eventListenerInstances; + }; + Drawer.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Drawer.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Drawer.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Drawer; +}()); +function initDrawers() { + document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) { + // mandatory + var drawerId = $triggerEl.getAttribute('data-drawer-target'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var placement = $triggerEl.getAttribute('data-drawer-placement'); + var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling'); + var backdrop = $triggerEl.getAttribute('data-drawer-backdrop'); + var edge = $triggerEl.getAttribute('data-drawer-edge'); + var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset'); + new Drawer($drawerEl, { + placement: placement ? placement : Default.placement, + bodyScrolling: bodyScrolling + ? bodyScrolling === 'true' + ? true + : false + : Default.bodyScrolling, + backdrop: backdrop + ? backdrop === 'true' + ? true + : false + : Default.backdrop, + edge: edge ? (edge === 'true' ? true : false) : Default.edge, + edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset, + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-toggle'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_1 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_1) { + var toggleDrawer = function () { + drawer_1.toggle(); + }; + $triggerEl.addEventListener('click', toggleDrawer); + drawer_1.addEventListenerInstance($triggerEl, 'click', toggleDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document + .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]') + .forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-dismiss') + ? $triggerEl.getAttribute('data-drawer-dismiss') + : $triggerEl.getAttribute('data-drawer-hide'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_2 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_2) { + var hideDrawer = function () { + drawer_2.hide(); + }; + $triggerEl.addEventListener('click', hideDrawer); + drawer_2.addEventListenerInstance($triggerEl, 'click', hideDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id")); + } + }); + document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-show'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_3 = instances_1.default.getInstance('Drawer', drawerId); + if (drawer_3) { + var showDrawer = function () { + drawer_3.show(); + }; + $triggerEl.addEventListener('click', showDrawer); + drawer_3.addEventListenerInstance($triggerEl, 'click', showDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); +} +exports.initDrawers = initDrawers; +if (typeof window !== 'undefined') { + window.Drawer = Drawer; + window.initDrawers = initDrawers; +} +exports.default = Drawer; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/index.js.map b/node_modules/flowbite/lib/cjs/components/drawer/index.js.map new file mode 100644 index 0000000..b4be917 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/drawer/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,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aAAM;YACH,OAAO,CAAC,KAAK,CACT,yBAAkB,QAAQ,oGAAiG,CAC9H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AA1ID,kCA0IC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;CACpC;AAED,kBAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts b/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts new file mode 100644 index 0000000..bec0496 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts @@ -0,0 +1,23 @@ +import { DrawerOptions, PlacementClasses } from './types'; +export declare interface DrawerInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DrawerOptions; + _visible: boolean; + init(): void; + isVisible(): boolean; + isHidden(): boolean; + hide(): void; + show(): void; + toggle(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _getPlacementClasses(placement: string): PlacementClasses; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + addEventListenerInstance(element: HTMLElement, type: string, handler: EventListenerOrEventListenerObject): void; + removeAllEventListenerInstances(): void; + getAllEventListenerInstances(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts.map new file mode 100644 index 0000000..f8da5d6 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,CAAC,OAAO,WAAW,eAAe;IAEpC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAGlB,IAAI,IAAI,IAAI,CAAC;IACb,SAAS,IAAI,OAAO,CAAC;IACrB,QAAQ,IAAI,OAAO,CAAC;IACpB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IACf,eAAe,IAAI,IAAI,CAAC;IACxB,kBAAkB,IAAI,IAAI,CAAC;IAC3B,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAAC;IAE1D,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;IAEjC,wBAAwB,CACpB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kCAAkC,GAC5C,IAAI,CAAC;IACR,+BAA+B,IAAI,IAAI,CAAC;IACxC,4BAA4B,IAAI,IAAI,CAAC;CACxC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/interface.js b/node_modules/flowbite/lib/cjs/components/drawer/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/interface.js.map b/node_modules/flowbite/lib/cjs/components/drawer/interface.js.map new file mode 100644 index 0000000..91cef96 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/drawer/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts b/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts new file mode 100644 index 0000000..a665b0b --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts @@ -0,0 +1,18 @@ +import { DrawerInterface } from './interface'; +export declare type DrawerOptions = { + placement?: string; + bodyScrolling?: boolean; + backdrop?: boolean; + edge?: boolean; + edgeOffset?: string; + backdropClasses?: string; + onShow?: (drawer: DrawerInterface) => void; + onHide?: (drawer: DrawerInterface) => void; + onToggle?: (drawer: DrawerInterface) => void; +}; +export declare type PlacementClasses = { + base: string[]; + active: string[]; + inactive: string[]; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts.map new file mode 100644 index 0000000..2e45303 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,gBAAgB,GAAG;IACnC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/types.js b/node_modules/flowbite/lib/cjs/components/drawer/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/drawer/types.js.map b/node_modules/flowbite/lib/cjs/components/drawer/types.js.map new file mode 100644 index 0000000..b9d5343 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/drawer/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/drawer/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts b/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts new file mode 100644 index 0000000..2513d3e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts @@ -0,0 +1,42 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { DropdownOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { DropdownInterface } from './interface'; +declare class Dropdown implements DropdownInterface { + _instanceId: string; + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DropdownOptions; + _visible: boolean; + _popperInstance: PopperInstance; + _initialized: boolean; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _hoverShowTriggerElHandler: EventListenerOrEventListenerObject; + _hoverShowTargetElHandler: EventListenerOrEventListenerObject; + _hoverHideHandler: EventListenerOrEventListenerObject; + _clickHandler: EventListenerOrEventListenerObject; + constructor(targetElement?: HTMLElement | null, triggerElement?: HTMLElement | null, options?: DropdownOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + toggle(): void; + isVisible(): boolean; + show(): void; + hide(): void; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initDropdowns(): void; +export default Dropdown; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts.map new file mode 100644 index 0000000..9e7f536 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,QAAQ,IAAI,cAAc,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAoBhD,cAAM,QAAS,YAAW,iBAAiB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,cAAc,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,yBAAyB,EAAE,kCAAkC,CAAC;IAC9D,iBAAiB,EAAE,kCAAkC,CAAC;IACtD,aAAa,EAAE,kCAAkC,CAAC;gBAG9C,aAAa,GAAE,WAAW,GAAG,IAAW,EACxC,cAAc,GAAE,WAAW,GAAG,IAAW,EACzC,OAAO,GAAE,eAAyB,EAClC,eAAe,GAAE,eAAwC;IAoB7D,IAAI;IAQJ,OAAO;IAiCP,cAAc;IAId,wBAAwB;IAKxB,oBAAoB;IAuDpB,qBAAqB;IAiBrB,0BAA0B;IAW1B,2BAA2B;IAQ3B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IA+BpD,iBAAiB;;;;IAyBjB,MAAM;IASN,SAAS;IAIT,IAAI;IAwBJ,IAAI;IAsBJ,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,aAAa,SAmD5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/index.js b/node_modules/flowbite/lib/cjs/components/dropdown/index.js new file mode 100644 index 0000000..9080780 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/index.js @@ -0,0 +1,306 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initDropdowns = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = require("@popperjs/core"); +var instances_1 = require("../../dom/instances"); +var Default = { + placement: 'bottom', + triggerType: 'click', + offsetSkidding: 0, + offsetDistance: 10, + delay: 300, + ignoreClickOutsideClass: false, + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dropdown = /** @class */ (function () { + function Dropdown(targetElement, triggerElement, options, instanceOptions) { + if (targetElement === void 0) { targetElement = null; } + if (triggerElement === void 0) { triggerElement = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetElement.id; + this._targetEl = targetElement; + this._triggerEl = triggerElement; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Dropdown', this, this._instanceId, instanceOptions.override); + } + Dropdown.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._popperInstance = this._createPopperInstance(); + this._setupEventListeners(); + this._initialized = true; + } + }; + Dropdown.prototype.destroy = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + // Remove click event listeners for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._clickHandler); + }); + } + // Remove hover event listeners for trigger and target elements + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hoverShowTriggerElHandler); + _this._targetEl.removeEventListener(ev, _this._hoverShowTargetElHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hoverHideHandler); + _this._targetEl.removeEventListener(ev, _this._hoverHideHandler); + }); + } + this._popperInstance.destroy(); + this._initialized = false; + }; + Dropdown.prototype.removeInstance = function () { + instances_1.default.removeInstance('Dropdown', this._instanceId); + }; + Dropdown.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dropdown.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._clickHandler = function () { + _this.toggle(); + }; + // click event handling for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._clickHandler); + }); + } + this._hoverShowTriggerElHandler = function (ev) { + if (ev.type === 'click') { + _this.toggle(); + } + else { + setTimeout(function () { + _this.show(); + }, _this._options.delay); + } + }; + this._hoverShowTargetElHandler = function () { + _this.show(); + }; + this._hoverHideHandler = function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }; + // hover event handling for trigger element + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hoverShowTriggerElHandler); + _this._targetEl.addEventListener(ev, _this._hoverShowTargetElHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hoverHideHandler); + _this._targetEl.addEventListener(ev, _this._hoverHideHandler); + }); + } + }; + Dropdown.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [ + this._options.offsetSkidding, + this._options.offsetDistance, + ], + }, + }, + ], + }); + }; + Dropdown.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + // Ignore clicks on the trigger element (ie. a datepicker input) + var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass; + var isIgnored = false; + if (ignoreClickOutsideClass) { + var ignoredClickOutsideEls = document.querySelectorAll(".".concat(ignoreClickOutsideClass)); + ignoredClickOutsideEls.forEach(function (el) { + if (el.contains(clickedEl)) { + isIgnored = true; + return; + } + }); + } + // Ignore clicks on the target element (ie. dropdown itself) + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + !isIgnored && + this.isVisible()) { + this.hide(); + } + }; + Dropdown.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'click'], + hideEvents: ['mouseleave'], + }; + case 'click': + return { + showEvents: ['click'], + hideEvents: [], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['click'], + hideEvents: [], + }; + } + }; + Dropdown.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Dropdown.prototype.isVisible = function () { + return this._visible; + }; + Dropdown.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + this._targetEl.classList.add('block'); + this._targetEl.removeAttribute('aria-hidden'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + this._setupClickOutsideListener(); + // Update its position + this._popperInstance.update(); + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dropdown.prototype.hide = function () { + this._targetEl.classList.remove('block'); + this._targetEl.classList.add('hidden'); + this._targetEl.setAttribute('aria-hidden', 'true'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + this._visible = false; + this._removeClickOutsideListener(); + // callback function + this._options.onHide(this); + }; + Dropdown.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Dropdown.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Dropdown.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Dropdown; +}()); +function initDropdowns() { + document + .querySelectorAll('[data-dropdown-toggle]') + .forEach(function ($triggerEl) { + var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle'); + var $dropdownEl = document.getElementById(dropdownId); + if ($dropdownEl) { + var placement = $triggerEl.getAttribute('data-dropdown-placement'); + var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding'); + var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance'); + var triggerType = $triggerEl.getAttribute('data-dropdown-trigger'); + var delay = $triggerEl.getAttribute('data-dropdown-delay'); + var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class'); + new Dropdown($dropdownEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + offsetSkidding: offsetSkidding + ? parseInt(offsetSkidding) + : Default.offsetSkidding, + offsetDistance: offsetDistance + ? parseInt(offsetDistance) + : Default.offsetDistance, + delay: delay ? parseInt(delay) : Default.delay, + ignoreClickOutsideClass: ignoreClickOutsideClass + ? ignoreClickOutsideClass + : Default.ignoreClickOutsideClass, + }); + } + else { + console.error("The dropdown element with id \"".concat(dropdownId, "\" does not exist. Please check the data-dropdown-toggle attribute.")); + } + }); +} +exports.initDropdowns = initDropdowns; +if (typeof window !== 'undefined') { + window.Dropdown = Dropdown; + window.initDropdowns = initDropdowns; +} +exports.default = Dropdown; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/index.js.map b/node_modules/flowbite/lib/cjs/components/dropdown/index.js.map new file mode 100644 index 0000000..3fc2732 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dropdown/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAA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GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,kBAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts b/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts new file mode 100644 index 0000000..04c8b50 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts @@ -0,0 +1,26 @@ +import { DropdownOptions, DropdownTriggerType, DropdownTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface DropdownInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DropdownOptions; + _visible: boolean; + _popperInstance: PopperInstance; + _initialized: boolean; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + init(): void; + _createPopperInstance(): PopperInstance; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: DropdownTriggerType): DropdownTriggerEventTypes; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts.map new file mode 100644 index 0000000..4f98c4c --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,cAAc,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,0BAA0B,EAAE,kCAAkC,CAAC;IAE/D,IAAI,IAAI,IAAI,CAAC;IACb,qBAAqB,IAAI,cAAc,CAAC;IACxC,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,mBAAmB,GACjC,yBAAyB,CAAC;IAC7B,SAAS,IAAI,OAAO,CAAC;IACrB,MAAM,IAAI,IAAI,CAAC;IACf,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/interface.js b/node_modules/flowbite/lib/cjs/components/dropdown/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/interface.js.map b/node_modules/flowbite/lib/cjs/components/dropdown/interface.js.map new file mode 100644 index 0000000..d4c8eb1 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dropdown/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts b/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts new file mode 100644 index 0000000..47c79fb --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts @@ -0,0 +1,19 @@ +import { DropdownInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type DropdownTriggerType = 'click' | 'hover' | 'none'; +export declare type DropdownTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type DropdownOptions = { + placement?: Placement; + triggerType?: DropdownTriggerType; + offsetSkidding?: number; + offsetDistance?: number; + ignoreClickOutsideClass?: string | boolean; + delay?: number; + onShow?: (tooltip: DropdownInterface) => void; + onHide?: (tooltip: DropdownInterface) => void; + onToggle?: (tooltip: DropdownInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts.map new file mode 100644 index 0000000..f74ca43 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,mBAAmB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAErE,MAAM,CAAC,OAAO,MAAM,yBAAyB,GAAG;IAC5C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACnD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/types.js b/node_modules/flowbite/lib/cjs/components/dropdown/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/dropdown/types.js.map b/node_modules/flowbite/lib/cjs/components/dropdown/types.js.map new file mode 100644 index 0000000..de3d7a3 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/dropdown/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dropdown/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/index.d.ts b/node_modules/flowbite/lib/cjs/components/index.d.ts new file mode 100644 index 0000000..3d22df6 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/index.d.ts @@ -0,0 +1,2 @@ +export declare function initFlowbite(): void; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/index.d.ts.map new file mode 100644 index 0000000..b060e1e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAeA,wBAAgB,YAAY,SAe3B"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/index.js b/node_modules/flowbite/lib/cjs/components/index.js new file mode 100644 index 0000000..b0218fa --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/index.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initFlowbite = void 0; +var accordion_1 = require("./accordion"); +var carousel_1 = require("./carousel"); +var clipboard_1 = require("./clipboard"); +var collapse_1 = require("./collapse"); +var dial_1 = require("./dial"); +var dismiss_1 = require("./dismiss"); +var drawer_1 = require("./drawer"); +var dropdown_1 = require("./dropdown"); +var input_counter_1 = require("./input-counter"); +var modal_1 = require("./modal"); +var popover_1 = require("./popover"); +var tabs_1 = require("./tabs"); +var tooltip_1 = require("./tooltip"); +var datepicker_1 = require("./datepicker"); +function initFlowbite() { + (0, accordion_1.initAccordions)(); + (0, collapse_1.initCollapses)(); + (0, carousel_1.initCarousels)(); + (0, dismiss_1.initDismisses)(); + (0, dropdown_1.initDropdowns)(); + (0, modal_1.initModals)(); + (0, drawer_1.initDrawers)(); + (0, tabs_1.initTabs)(); + (0, tooltip_1.initTooltips)(); + (0, popover_1.initPopovers)(); + (0, dial_1.initDials)(); + (0, input_counter_1.initInputCounters)(); + (0, clipboard_1.initCopyClipboards)(); + (0, datepicker_1.initDatepickers)(); +} +exports.initFlowbite = initFlowbite; +if (typeof window !== 'undefined') { + window.initFlowbite = initFlowbite; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/index.js.map b/node_modules/flowbite/lib/cjs/components/index.js.map new file mode 100644 index 0000000..416ab05 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,yCAA6C;AAC7C,uCAA2C;AAC3C,yCAAiD;AACjD,uCAA2C;AAC3C,+BAAmC;AACnC,qCAA0C;AAC1C,mCAAuC;AACvC,uCAA2C;AAC3C,iDAAoD;AACpD,iCAAqC;AACrC,qCAAyC;AACzC,+BAAkC;AAClC,qCAAyC;AACzC,2CAA+C;AAE/C,SAAgB,YAAY;IACxB,IAAA,0BAAc,GAAE,CAAC;IACjB,IAAA,wBAAa,GAAE,CAAC;IAChB,IAAA,wBAAa,GAAE,CAAC;IAChB,IAAA,uBAAa,GAAE,CAAC;IAChB,IAAA,wBAAa,GAAE,CAAC;IAChB,IAAA,kBAAU,GAAE,CAAC;IACb,IAAA,oBAAW,GAAE,CAAC;IACd,IAAA,eAAQ,GAAE,CAAC;IACX,IAAA,sBAAY,GAAE,CAAC;IACf,IAAA,sBAAY,GAAE,CAAC;IACf,IAAA,gBAAS,GAAE,CAAC;IACZ,IAAA,iCAAiB,GAAE,CAAC;IACpB,IAAA,8BAAkB,GAAE,CAAC;IACrB,IAAA,4BAAe,GAAE,CAAC;AACtB,CAAC;AAfD,oCAeC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;CACtC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/index.d.ts b/node_modules/flowbite/lib/cjs/components/input-counter/index.d.ts new file mode 100644 index 0000000..e49e8c7 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/index.d.ts @@ -0,0 +1,27 @@ +import type { InputCounterOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { InputCounterInterface } from './interface'; +declare class InputCounter implements InputCounterInterface { + _instanceId: string; + _targetEl: HTMLInputElement | null; + _incrementEl: HTMLElement | null; + _decrementEl: HTMLElement | null; + _options: InputCounterOptions; + _initialized: boolean; + _incrementClickHandler: EventListenerOrEventListenerObject; + _decrementClickHandler: EventListenerOrEventListenerObject; + _inputHandler: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLInputElement | null, incrementEl?: HTMLElement | null, decrementEl?: HTMLElement | null, options?: InputCounterOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getCurrentValue(): number; + increment(): void; + decrement(): void; + updateOnIncrement(callback: () => void): void; + updateOnDecrement(callback: () => void): void; +} +export declare function initInputCounters(): void; +export default InputCounter; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/input-counter/index.d.ts.map new file mode 100644 index 0000000..0a3b091 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/input-counter/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAepD,cAAM,YAAa,YAAW,qBAAqB;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACnC,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,YAAY,EAAE,OAAO,CAAC;IACtB,sBAAsB,EAAE,kCAAkC,CAAC;IAC3D,sBAAsB,EAAE,kCAAkC,CAAC;IAC3D,aAAa,EAAE,kCAAkC,CAAC;gBAG9C,QAAQ,GAAE,gBAAgB,GAAG,IAAW,EACxC,WAAW,GAAE,WAAW,GAAG,IAAW,EACtC,WAAW,GAAE,WAAW,GAAG,IAAW,EACtC,OAAO,GAAE,mBAA6B,EACtC,eAAe,GAAE,eAAwC;IAqB7D,IAAI;IA2DJ,OAAO;IAoBP,cAAc;IAId,wBAAwB;IAKxB,eAAe;IAIf,SAAS;IAaT,SAAS;IAaT,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI;IAItC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGzC;AAED,wBAAgB,iBAAiB,SAuChC;AAOD,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/index.js b/node_modules/flowbite/lib/cjs/components/input-counter/index.js new file mode 100644 index 0000000..ef61f9d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/index.js @@ -0,0 +1,159 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initInputCounters = void 0; +var instances_1 = require("../../dom/instances"); +var Default = { + minValue: null, + maxValue: null, + onIncrement: function () { }, + onDecrement: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var InputCounter = /** @class */ (function () { + function InputCounter(targetEl, incrementEl, decrementEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (incrementEl === void 0) { incrementEl = null; } + if (decrementEl === void 0) { decrementEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._incrementEl = incrementEl; + this._decrementEl = decrementEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('InputCounter', this, this._instanceId, instanceOptions.override); + } + InputCounter.prototype.init = function () { + var _this = this; + if (this._targetEl && !this._initialized) { + this._inputHandler = function (event) { + { + var target = event.target; + // check if the value is numeric + if (!/^\d*$/.test(target.value)) { + // Regex to check if the value is numeric + target.value = target.value.replace(/[^\d]/g, ''); // Remove non-numeric characters + } + // check for max value + if (_this._options.maxValue !== null && + parseInt(target.value) > _this._options.maxValue) { + target.value = _this._options.maxValue.toString(); + } + // check for min value + if (_this._options.minValue !== null && + parseInt(target.value) < _this._options.minValue) { + target.value = _this._options.minValue.toString(); + } + } + }; + this._incrementClickHandler = function () { + _this.increment(); + }; + this._decrementClickHandler = function () { + _this.decrement(); + }; + // Add event listener to restrict input to numeric values only + this._targetEl.addEventListener('input', this._inputHandler); + if (this._incrementEl) { + this._incrementEl.addEventListener('click', this._incrementClickHandler); + } + if (this._decrementEl) { + this._decrementEl.addEventListener('click', this._decrementClickHandler); + } + this._initialized = true; + } + }; + InputCounter.prototype.destroy = function () { + if (this._targetEl && this._initialized) { + this._targetEl.removeEventListener('input', this._inputHandler); + if (this._incrementEl) { + this._incrementEl.removeEventListener('click', this._incrementClickHandler); + } + if (this._decrementEl) { + this._decrementEl.removeEventListener('click', this._decrementClickHandler); + } + this._initialized = false; + } + }; + InputCounter.prototype.removeInstance = function () { + instances_1.default.removeInstance('InputCounter', this._instanceId); + }; + InputCounter.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + InputCounter.prototype.getCurrentValue = function () { + return parseInt(this._targetEl.value) || 0; + }; + InputCounter.prototype.increment = function () { + // don't increment if the value is already at the maximum value + if (this._options.maxValue !== null && + this.getCurrentValue() >= this._options.maxValue) { + return; + } + this._targetEl.value = (this.getCurrentValue() + 1).toString(); + this._options.onIncrement(this); + }; + InputCounter.prototype.decrement = function () { + // don't decrement if the value is already at the minimum value + if (this._options.minValue !== null && + this.getCurrentValue() <= this._options.minValue) { + return; + } + this._targetEl.value = (this.getCurrentValue() - 1).toString(); + this._options.onDecrement(this); + }; + InputCounter.prototype.updateOnIncrement = function (callback) { + this._options.onIncrement = callback; + }; + InputCounter.prototype.updateOnDecrement = function (callback) { + this._options.onDecrement = callback; + }; + return InputCounter; +}()); +function initInputCounters() { + document.querySelectorAll('[data-input-counter]').forEach(function ($targetEl) { + var targetId = $targetEl.id; + var $incrementEl = document.querySelector('[data-input-counter-increment="' + targetId + '"]'); + var $decrementEl = document.querySelector('[data-input-counter-decrement="' + targetId + '"]'); + var minValue = $targetEl.getAttribute('data-input-counter-min'); + var maxValue = $targetEl.getAttribute('data-input-counter-max'); + // check if the target element exists + if ($targetEl) { + if (!instances_1.default.instanceExists('InputCounter', $targetEl.getAttribute('id'))) { + new InputCounter($targetEl, $incrementEl ? $incrementEl : null, $decrementEl ? $decrementEl : null, { + minValue: minValue ? parseInt(minValue) : null, + maxValue: maxValue ? parseInt(maxValue) : null, + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-input-counter attribute.")); + } + }); +} +exports.initInputCounters = initInputCounters; +if (typeof window !== 'undefined') { + window.InputCounter = InputCounter; + window.initInputCounters = initInputCounters; +} +exports.default = InputCounter; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/index.js.map b/node_modules/flowbite/lib/cjs/components/input-counter/index.js.map new file mode 100644 index 0000000..46945a6 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/input-counter/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,iDAA4C;AAE5C,IAAM,OAAO,GAAwB;IACjC,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,cAAO,CAAC;IACrB,WAAW,EAAE,cAAO,CAAC;CACxB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IAWI,s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CAAC,CAAC,CAAC,IAAI;oBAC9C,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI;iBAC1B,CAC3B,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uCAA+B,QAAQ,sEAAkE,CAC5G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAvCD,8CAuCC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,MAAM,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;CAChD;AAED,kBAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/interface.d.ts b/node_modules/flowbite/lib/cjs/components/input-counter/interface.d.ts new file mode 100644 index 0000000..cd66d46 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/interface.d.ts @@ -0,0 +1,14 @@ +import { InputCounterOptions } from './types'; +export declare interface InputCounterInterface { + _targetEl: HTMLElement | null; + _incrementEl: HTMLElement | null; + _decrementEl: HTMLElement | null; + _options: InputCounterOptions; + init(): void; + increment(): void; + decrement(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/input-counter/interface.d.ts.map new file mode 100644 index 0000000..25b2885 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/input-counter/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,CAAC,OAAO,WAAW,qBAAqB;IAC1C,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,mBAAmB,CAAC;IAE9B,IAAI,IAAI,IAAI,CAAC;IACb,SAAS,IAAI,IAAI,CAAC;IAClB,SAAS,IAAI,IAAI,CAAC;IAElB,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/interface.js b/node_modules/flowbite/lib/cjs/components/input-counter/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/interface.js.map b/node_modules/flowbite/lib/cjs/components/input-counter/interface.js.map new file mode 100644 index 0000000..dd82e5f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/input-counter/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/types.d.ts b/node_modules/flowbite/lib/cjs/components/input-counter/types.d.ts new file mode 100644 index 0000000..1d13daa --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/types.d.ts @@ -0,0 +1,8 @@ +import { InputCounterInterface } from './interface'; +export declare type InputCounterOptions = { + minValue?: number | null; + maxValue?: number | null; + onIncrement?: (InputCounter: InputCounterInterface) => void; + onDecrement?: (InputCounter: InputCounterInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/input-counter/types.d.ts.map new file mode 100644 index 0000000..0fd79eb --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/input-counter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,CAAC,OAAO,MAAM,mBAAmB,GAAG;IACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC5D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAC/D,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/types.js b/node_modules/flowbite/lib/cjs/components/input-counter/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/input-counter/types.js.map b/node_modules/flowbite/lib/cjs/components/input-counter/types.js.map new file mode 100644 index 0000000..28646fd --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/input-counter/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/input-counter/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/index.d.ts b/node_modules/flowbite/lib/cjs/components/modal/index.d.ts new file mode 100644 index 0000000..57eef2b --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/index.d.ts @@ -0,0 +1,39 @@ +import type { ModalOptions } from './types'; +import type { InstanceOptions, EventListenerInstance } from '../../dom/types'; +import { ModalInterface } from './interface'; +declare class Modal implements ModalInterface { + _instanceId: string; + _targetEl: HTMLElement | null; + _options: ModalOptions; + _isHidden: boolean; + _backdropEl: HTMLElement | null; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _eventListenerInstances: EventListenerInstance[]; + _initialized: boolean; + constructor(targetEl?: HTMLElement | null, options?: ModalOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _setupModalCloseEventListeners(): void; + _removeModalCloseEventListeners(): void; + _handleOutsideClick(target: EventTarget): void; + _getPlacementClasses(): string[]; + toggle(): void; + show(): void; + hide(): void; + isVisible(): boolean; + isHidden(): boolean; + addEventListenerInstance(element: HTMLElement, type: string, handler: EventListenerOrEventListenerObject): void; + removeAllEventListenerInstances(): void; + getAllEventListenerInstances(): EventListenerInstance[]; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initModals(): void; +export default Modal; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/modal/index.d.ts.map new file mode 100644 index 0000000..3d09226 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkB7C,cAAM,KAAM,YAAW,cAAc;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAC1D,uBAAuB,EAAE,qBAAqB,EAAE,CAAM;IACtD,YAAY,EAAE,OAAO,CAAC;gBAGlB,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,YAAsB,EAC/B,eAAe,GAAE,eAAwC;IAmB7D,IAAI;IASJ,OAAO;IAQP,cAAc;IAId,wBAAwB;IAKxB,eAAe;IAWf,kBAAkB;IAOlB,8BAA8B;IAwB9B,+BAA+B;IAe/B,mBAAmB,CAAC,MAAM,EAAE,WAAW;IASvC,oBAAoB;IA+BpB,MAAM;IAWN,IAAI;IAuBJ,IAAI;IAsBJ,SAAS;IAIT,QAAQ;IAIR,wBAAwB,CACpB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kCAAkC;IAS/C,+BAA+B;IAU/B,4BAA4B;IAI5B,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,UAAU,SAyHzB;AAOD,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/index.js b/node_modules/flowbite/lib/cjs/components/modal/index.js new file mode 100644 index 0000000..669333a --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/index.js @@ -0,0 +1,305 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initModals = void 0; +var instances_1 = require("../../dom/instances"); +var Default = { + placement: 'center', + backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40', + backdrop: 'dynamic', + closable: true, + onHide: function () { }, + onShow: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Modal = /** @class */ (function () { + function Modal(targetEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._eventListenerInstances = []; + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._isHidden = true; + this._backdropEl = null; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Modal', this, this._instanceId, instanceOptions.override); + } + Modal.prototype.init = function () { + var _this = this; + if (this._targetEl && !this._initialized) { + this._getPlacementClasses().map(function (c) { + _this._targetEl.classList.add(c); + }); + this._initialized = true; + } + }; + Modal.prototype.destroy = function () { + if (this._initialized) { + this.removeAllEventListenerInstances(); + this._destroyBackdropEl(); + this._initialized = false; + } + }; + Modal.prototype.removeInstance = function () { + instances_1.default.removeInstance('Modal', this._instanceId); + }; + Modal.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Modal.prototype._createBackdrop = function () { + var _a; + if (this._isHidden) { + var backdropEl = document.createElement('div'); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + this._backdropEl = backdropEl; + } + }; + Modal.prototype._destroyBackdropEl = function () { + if (!this._isHidden && this._backdropEl) { + this._backdropEl.remove(); + this._backdropEl = null; + } + }; + Modal.prototype._setupModalCloseEventListeners = function () { + var _this = this; + if (this._options.backdrop === 'dynamic') { + this._clickOutsideEventListener = function (ev) { + _this._handleOutsideClick(ev.target); + }; + this._targetEl.addEventListener('click', this._clickOutsideEventListener, true); + } + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._removeModalCloseEventListeners = function () { + if (this._options.backdrop === 'dynamic') { + this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true); + } + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._handleOutsideClick = function (target) { + if (target === this._targetEl || + (target === this._backdropEl && this.isVisible())) { + this.hide(); + } + }; + Modal.prototype._getPlacementClasses = function () { + switch (this._options.placement) { + // top + case 'top-left': + return ['justify-start', 'items-start']; + case 'top-center': + return ['justify-center', 'items-start']; + case 'top-right': + return ['justify-end', 'items-start']; + // center + case 'center-left': + return ['justify-start', 'items-center']; + case 'center': + return ['justify-center', 'items-center']; + case 'center-right': + return ['justify-end', 'items-center']; + // bottom + case 'bottom-left': + return ['justify-start', 'items-end']; + case 'bottom-center': + return ['justify-center', 'items-end']; + case 'bottom-right': + return ['justify-end', 'items-end']; + default: + return ['justify-center', 'items-center']; + } + }; + Modal.prototype.toggle = function () { + if (this._isHidden) { + this.show(); + } + else { + this.hide(); + } + // callback function + this._options.onToggle(this); + }; + Modal.prototype.show = function () { + if (this.isHidden) { + this._targetEl.classList.add('flex'); + this._targetEl.classList.remove('hidden'); + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + this._createBackdrop(); + this._isHidden = false; + // Add keyboard event listener to the document + if (this._options.closable) { + this._setupModalCloseEventListeners(); + } + // prevent body scroll + document.body.classList.add('overflow-hidden'); + // callback function + this._options.onShow(this); + } + }; + Modal.prototype.hide = function () { + if (this.isVisible) { + this._targetEl.classList.add('hidden'); + this._targetEl.classList.remove('flex'); + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + this._destroyBackdropEl(); + this._isHidden = true; + // re-apply body scroll + document.body.classList.remove('overflow-hidden'); + if (this._options.closable) { + this._removeModalCloseEventListeners(); + } + // callback function + this._options.onHide(this); + } + }; + Modal.prototype.isVisible = function () { + return !this._isHidden; + }; + Modal.prototype.isHidden = function () { + return this._isHidden; + }; + Modal.prototype.addEventListenerInstance = function (element, type, handler) { + this._eventListenerInstances.push({ + element: element, + type: type, + handler: handler, + }); + }; + Modal.prototype.removeAllEventListenerInstances = function () { + this._eventListenerInstances.map(function (eventListenerInstance) { + eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler); + }); + this._eventListenerInstances = []; + }; + Modal.prototype.getAllEventListenerInstances = function () { + return this._eventListenerInstances; + }; + Modal.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Modal.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Modal.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Modal; +}()); +function initModals() { + // initiate modal based on data-modal-target + document.querySelectorAll('[data-modal-target]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-target'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + new Modal($modalEl, { + placement: placement ? placement : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }); + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.")); + } + }); + // toggle modal visibility + document.querySelectorAll('[data-modal-toggle]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-toggle'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_1 = instances_1.default.getInstance('Modal', modalId); + if (modal_1) { + var toggleModal = function () { + modal_1.toggle(); + }; + $triggerEl.addEventListener('click', toggleModal); + modal_1.addEventListenerInstance($triggerEl, 'click', toggleModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?")); + } + }); + // show modal on click if exists based on id + document.querySelectorAll('[data-modal-show]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-show'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_2 = instances_1.default.getInstance('Modal', modalId); + if (modal_2) { + var showModal = function () { + modal_2.show(); + }; + $triggerEl.addEventListener('click', showModal); + modal_2.addEventListenerInstance($triggerEl, 'click', showModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?")); + } + }); + // hide modal on click if exists based on id + document.querySelectorAll('[data-modal-hide]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-hide'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_3 = instances_1.default.getInstance('Modal', modalId); + if (modal_3) { + var hideModal = function () { + modal_3.hide(); + }; + $triggerEl.addEventListener('click', hideModal); + modal_3.addEventListenerInstance($triggerEl, 'click', hideModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?")); + } + }); +} +exports.initModals = initModals; +if (typeof window !== 'undefined') { + window.Modal = Modal; + window.initModals = initModals; +} +exports.default = Modal; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/index.js.map b/node_modules/flowbite/lib/cjs/components/modal/index.js.map new file mode 100644 index 0000000..247b5a9 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"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AK,CAAC,wBAAwB,CAC1B,UAAyB,EACzB,OAAO,EACP,SAAS,CACZ,CAAC;aACL;iBAAM;gBACH,OAAO,CAAC,KAAK,CACT,wBAAiB,OAAO,2FAAwF,CACnH,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,wBAAiB,OAAO,qGAAkG,CAC7H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAzHD,gCAyHC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;CAClC;AAED,kBAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts b/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts new file mode 100644 index 0000000..7680b26 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts @@ -0,0 +1,27 @@ +import { ModalOptions } from './types'; +export declare interface ModalInterface { + _targetEl: HTMLElement | null; + _options: ModalOptions; + _isHidden: boolean; + _backdropEl: HTMLElement | null; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + init(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _setupModalCloseEventListeners(): void; + _handleOutsideClick(target: EventTarget): void; + _getPlacementClasses(): string[]; + toggle(): void; + show(): void; + hide(): void; + isHidden(): boolean; + isVisible(): boolean; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + addEventListenerInstance(element: HTMLElement, type: string, handler: EventListenerOrEventListenerObject): void; + removeAllEventListenerInstances(): void; + getAllEventListenerInstances(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts.map new file mode 100644 index 0000000..c427d1a --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,CAAC,OAAO,WAAW,cAAc;IAEnC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAG9B,QAAQ,EAAE,YAAY,CAAC;IAGvB,SAAS,EAAE,OAAO,CAAC;IAGnB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAEhC,0BAA0B,EAAE,kCAAkC,CAAC;IAE/D,qBAAqB,EAAE,kCAAkC,CAAC;IAG1D,IAAI,IAAI,IAAI,CAAC;IAGb,eAAe,IAAI,IAAI,CAAC;IAGxB,kBAAkB,IAAI,IAAI,CAAC;IAG3B,8BAA8B,IAAI,IAAI,CAAC;IAGvC,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAG/C,oBAAoB,IAAI,MAAM,EAAE,CAAC;IAGjC,MAAM,IAAI,IAAI,CAAC;IAGf,IAAI,IAAI,IAAI,CAAC;IAGb,IAAI,IAAI,IAAI,CAAC;IAGb,QAAQ,IAAI,OAAO,CAAC;IAGpB,SAAS,IAAI,OAAO,CAAC;IAErB,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;IACjC,wBAAwB,CACpB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kCAAkC,GAC5C,IAAI,CAAC;IACR,+BAA+B,IAAI,IAAI,CAAC;IACxC,4BAA4B,IAAI,IAAI,CAAC;CACxC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/interface.js b/node_modules/flowbite/lib/cjs/components/modal/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/interface.js.map b/node_modules/flowbite/lib/cjs/components/modal/interface.js.map new file mode 100644 index 0000000..5de1079 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/modal/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/types.d.ts b/node_modules/flowbite/lib/cjs/components/modal/types.d.ts new file mode 100644 index 0000000..2f7d51f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/types.d.ts @@ -0,0 +1,13 @@ +import { ModalInterface } from './interface'; +export declare type modalBackdrop = 'static' | 'dynamic'; +export declare type modalPlacement = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; +export declare type ModalOptions = { + placement?: modalPlacement; + backdropClasses?: string; + backdrop?: modalBackdrop; + closable?: boolean; + onShow?: (modal: ModalInterface) => void; + onHide?: (modal: ModalInterface) => void; + onToggle?: (modal: ModalInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/modal/types.d.ts.map new file mode 100644 index 0000000..50c0ad4 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AACzD,MAAM,CAAC,OAAO,MAAM,cAAc,GAC5B,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,QAAQ,GACR,cAAc,GACd,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAErB,MAAM,CAAC,OAAO,MAAM,YAAY,GAAG;IAC/B,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/types.js b/node_modules/flowbite/lib/cjs/components/modal/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/modal/types.js.map b/node_modules/flowbite/lib/cjs/components/modal/types.js.map new file mode 100644 index 0000000..e049979 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/modal/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/modal/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/index.d.ts b/node_modules/flowbite/lib/cjs/components/popover/index.d.ts new file mode 100644 index 0000000..7477f33 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/index.d.ts @@ -0,0 +1,43 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { PopoverOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { PopoverInterface } from './interface'; +declare class Popover implements PopoverInterface { + _instanceId: string; + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: PopoverOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _visible: boolean; + _initialized: boolean; + _showHandler: EventListenerOrEventListenerObject; + _hideHandler: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: PopoverOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initPopovers(): void; +export default Popover; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/popover/index.d.ts.map new file mode 100644 index 0000000..219b51b --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,QAAQ,IAAI,cAAc,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAiB/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAC1D,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,kCAAkC,CAAC;IACjD,YAAY,EAAE,kCAAkC,CAAC;gBAG7C,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB,EACjC,eAAe,GAAE,eAAwC;IAoB7D,IAAI;IAQJ,OAAO;IA8BP,cAAc;IAId,wBAAwB;IAKxB,oBAAoB;IA0BpB,qBAAqB;IAcrB,iBAAiB;;;;IAyBjB,qBAAqB;IAarB,sBAAsB;IAQtB,0BAA0B;IAW1B,2BAA2B;IAQ3B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IAYpD,SAAS;IAIT,MAAM;IASN,IAAI;IA6BJ,IAAI;IA0BJ,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,YAAY,SA2B3B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/index.js b/node_modules/flowbite/lib/cjs/components/popover/index.js new file mode 100644 index 0000000..1e465e8 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/index.js @@ -0,0 +1,269 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initPopovers = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = require("@popperjs/core"); +var instances_1 = require("../../dom/instances"); +var Default = { + placement: 'top', + offset: 10, + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Popover = /** @class */ (function () { + function Popover(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Popover', this, instanceOptions.id ? instanceOptions.id : this._targetEl.id, instanceOptions.override); + } + Popover.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._setupEventListeners(); + this._popperInstance = this._createPopperInstance(); + this._initialized = true; + } + }; + Popover.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + // remove event listeners associated with the trigger element and target element + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showHandler); + _this._targetEl.removeEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hideHandler); + _this._targetEl.removeEventListener(ev, _this._hideHandler); + }); + // remove event listeners for keydown + this._removeKeydownListener(); + // remove event listeners for click outside + this._removeClickOutsideListener(); + // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance) + if (this._popperInstance) { + this._popperInstance.destroy(); + } + this._initialized = false; + } + }; + Popover.prototype.removeInstance = function () { + instances_1.default.removeInstance('Popover', this._instanceId); + }; + Popover.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Popover.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._showHandler = function () { + _this.show(); + }; + this._hideHandler = function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }; + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showHandler); + _this._targetEl.addEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hideHandler); + _this._targetEl.addEventListener(ev, _this._hideHandler); + }); + }; + Popover.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, this._options.offset], + }, + }, + ], + }); + }; + Popover.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Popover.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Popover.prototype.isVisible = function () { + return this._visible; + }; + Popover.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Popover.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility to true + this._visible = true; + // callback function + this._options.onShow(this); + }; + Popover.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility to false + this._visible = false; + // callback function + this._options.onHide(this); + }; + Popover.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Popover.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Popover.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Popover; +}()); +function initPopovers() { + document.querySelectorAll('[data-popover-target]').forEach(function ($triggerEl) { + var popoverID = $triggerEl.getAttribute('data-popover-target'); + var $popoverEl = document.getElementById(popoverID); + if ($popoverEl) { + var triggerType = $triggerEl.getAttribute('data-popover-trigger'); + var placement = $triggerEl.getAttribute('data-popover-placement'); + var offset = $triggerEl.getAttribute('data-popover-offset'); + new Popover($popoverEl, $triggerEl, { + placement: placement ? placement : Default.placement, + offset: offset ? parseInt(offset) : Default.offset, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The popover element with id \"".concat(popoverID, "\" does not exist. Please check the data-popover-target attribute.")); + } + }); +} +exports.initPopovers = initPopovers; +if (typeof window !== 'undefined') { + window.Popover = Popover; + window.initPopovers = initPopovers; +} +exports.default = Popover; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/index.js.map b/node_modules/flowbite/lib/cjs/components/popover/index.js.map new file mode 100644 index 0000000..efacb84 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/popover/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,uCAA8C;AAQ9C,iDAA4C;AAE5C,IAAM,OAAO,GAAmB;IAC5B,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,EAAE;IACV,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IAaI,iBACI,QAAmC,EACnC,SAAoC,EACpC,OAAiC,EACjC,eAAyD;QAHzD,yBAAA,EAAA,eAAmC;QACnC,0BAAA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C,SAAS,CAAC,CAAC;QAEtD,IAAI,UAAU,EAAE;YACZ,IAAM,WAAW,GAAG,UAAU,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;YACpE,IAAM,SAAS,GAAG,UAAU,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC;YACpE,IAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;YAE9D,IAAI,OAAO,CACP,UAAyB,EACzB,UAAyB,EACzB;gBACI,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS;gBACpD,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM;gBAClD,WAAW,EAAE,WAAW;oBACpB,CAAC,CAAC,WAAW;oBACb,CAAC,CAAC,OAAO,CAAC,WAAW;aACV,CACtB,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CACT,wCAAgC,SAAS,uEAAmE,CAC/G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AA3BD,oCA2BC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;CACtC;AAED,kBAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts b/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts new file mode 100644 index 0000000..755c9d4 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts @@ -0,0 +1,26 @@ +import { PopoverOptions, PopoverTriggerType, PopoverTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface PopoverInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: PopoverOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + init(): void; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: PopoverTriggerType): PopoverTriggerEventTypes; + isVisible(): boolean; + show(): void; + hide(): void; + toggle(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts.map new file mode 100644 index 0000000..729f9b3 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAE1D,IAAI,IAAI,IAAI,CAAC;IACb,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,qBAAqB,IAAI,IAAI,CAAC;IAC9B,sBAAsB,IAAI,IAAI,CAAC;IAC/B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,kBAAkB,GAChC,wBAAwB,CAAC;IAC5B,SAAS,IAAI,OAAO,CAAC;IACrB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IAEf,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/interface.js b/node_modules/flowbite/lib/cjs/components/popover/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/interface.js.map b/node_modules/flowbite/lib/cjs/components/popover/interface.js.map new file mode 100644 index 0000000..495553d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/popover/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/types.d.ts b/node_modules/flowbite/lib/cjs/components/popover/types.d.ts new file mode 100644 index 0000000..1b8512f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/types.d.ts @@ -0,0 +1,16 @@ +import { PopoverInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type PopoverTriggerType = 'click' | 'hover' | 'none'; +export declare type PopoverTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type PopoverOptions = { + placement?: Placement; + offset?: number; + triggerType?: PopoverTriggerType; + onShow?: (tooltip: PopoverInterface) => void; + onHide?: (tooltip: PopoverInterface) => void; + onToggle?: (tooltip: PopoverInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/popover/types.d.ts.map new file mode 100644 index 0000000..83d1cf6 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE,MAAM,CAAC,OAAO,MAAM,wBAAwB,GAAG;IAC3C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/types.js b/node_modules/flowbite/lib/cjs/components/popover/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/popover/types.js.map b/node_modules/flowbite/lib/cjs/components/popover/types.js.map new file mode 100644 index 0000000..8f2e0e4 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/popover/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/popover/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts b/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts new file mode 100644 index 0000000..fd1b6a0 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts @@ -0,0 +1,24 @@ +import type { TabItem, TabsOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { TabsInterface } from './interface'; +declare class Tabs implements TabsInterface { + _instanceId: string; + _tabsEl: HTMLElement; + _items: TabItem[]; + _activeTab: TabItem; + _options: TabsOptions; + _initialized: boolean; + constructor(tabsEl?: HTMLElement | null, items?: TabItem[], options?: TabsOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getActiveTab(): TabItem; + setActiveTab(tab: TabItem): void; + getTab(id: string): TabItem; + show(id: string, forceShow?: boolean): void; + updateOnShow(callback: () => void): void; +} +export declare function initTabs(): void; +export default Tabs; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts.map new file mode 100644 index 0000000..e315b63 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAiB5C,cAAM,IAAK,YAAW,aAAa;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;gBAGlB,MAAM,GAAE,WAAW,GAAG,IAAW,EACjC,KAAK,GAAE,OAAO,EAAO,EACrB,OAAO,GAAE,WAAqB,EAC9B,eAAe,GAAE,eAAwC;IAiB7D,IAAI;IAoBJ,OAAO;IAMP,cAAc;IAKd,wBAAwB;IAKxB,YAAY;IAIZ,YAAY,CAAC,GAAG,EAAE,OAAO;IAIzB,MAAM,CAAC,EAAE,EAAE,MAAM;IAIjB,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,UAAQ;IAoClC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGpC;AAED,wBAAgB,QAAQ,SAuCvB;AAOD,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/index.js b/node_modules/flowbite/lib/cjs/components/tabs/index.js new file mode 100644 index 0000000..674be31 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/index.js @@ -0,0 +1,151 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initTabs = void 0; +var instances_1 = require("../../dom/instances"); +var Default = { + defaultTabId: null, + activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500', + inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300', + onShow: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Tabs = /** @class */ (function () { + function Tabs(tabsEl, items, options, instanceOptions) { + if (tabsEl === void 0) { tabsEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id; + this._tabsEl = tabsEl; + this._items = items; + this._activeTab = options ? this.getTab(options.defaultTabId) : null; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances_1.default.addInstance('Tabs', this, this._instanceId, instanceOptions.override); + } + Tabs.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + // set the first tab as active if not set by explicitly + if (!this._activeTab) { + this.setActiveTab(this._items[0]); + } + // force show the first default tab + this.show(this._activeTab.id, true); + // show tab content based on click + this._items.map(function (tab) { + tab.triggerEl.addEventListener('click', function (event) { + event.preventDefault(); + _this.show(tab.id); + }); + }); + } + }; + Tabs.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + } + }; + Tabs.prototype.removeInstance = function () { + this.destroy(); + instances_1.default.removeInstance('Tabs', this._instanceId); + }; + Tabs.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Tabs.prototype.getActiveTab = function () { + return this._activeTab; + }; + Tabs.prototype.setActiveTab = function (tab) { + this._activeTab = tab; + }; + Tabs.prototype.getTab = function (id) { + return this._items.filter(function (t) { return t.id === id; })[0]; + }; + Tabs.prototype.show = function (id, forceShow) { + var _a, _b; + var _this = this; + if (forceShow === void 0) { forceShow = false; } + var tab = this.getTab(id); + // don't do anything if already active + if (tab === this._activeTab && !forceShow) { + return; + } + // hide other tabs + this._items.map(function (t) { + var _a, _b; + if (t !== tab) { + (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + t.targetEl.classList.add('hidden'); + t.triggerEl.setAttribute('aria-selected', 'false'); + } + }); + // show active tab + (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + tab.triggerEl.setAttribute('aria-selected', 'true'); + tab.targetEl.classList.remove('hidden'); + this.setActiveTab(tab); + // callback function + this._options.onShow(this, tab); + }; + Tabs.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + return Tabs; +}()); +function initTabs() { + document.querySelectorAll('[data-tabs-toggle]').forEach(function ($parentEl) { + var tabItems = []; + var activeClasses = $parentEl.getAttribute('data-tabs-active-classes'); + var inactiveClasses = $parentEl.getAttribute('data-tabs-inactive-classes'); + var defaultTabId = null; + $parentEl + .querySelectorAll('[role="tab"]') + .forEach(function ($triggerEl) { + var isActive = $triggerEl.getAttribute('aria-selected') === 'true'; + var tab = { + id: $triggerEl.getAttribute('data-tabs-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target')), + }; + tabItems.push(tab); + if (isActive) { + defaultTabId = tab.id; + } + }); + new Tabs($parentEl, tabItems, { + defaultTabId: defaultTabId, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +exports.initTabs = initTabs; +if (typeof window !== 'undefined') { + window.Tabs = Tabs; + window.initTabs = initTabs; +} +exports.default = Tabs; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/index.js.map b/node_modules/flowbite/lib/cjs/components/tabs/index.js.map new file mode 100644 index 0000000..c94ffe0 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/index.js.map @@ -0,0 +1 @@ +{"version":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aAAa;gBACxB,CAAC,CAAC,aAAa;gBACf,CAAC,CAAC,OAAO,CAAC,aAAa;YAC3B,eAAe,EAAE,eAAe;gBAC5B,CAAC,CAAC,eAAe;gBACjB,CAAC,CAAC,OAAO,CAAC,eAAe;SACjB,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;AACP,CAAC;AAvCD,4BAuCC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;CAC9B;AAED,kBAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts b/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts new file mode 100644 index 0000000..500beb8 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts @@ -0,0 +1,16 @@ +import { TabItem, TabsOptions } from './types'; +export declare interface TabsInterface { + _tabsEl: HTMLElement; + _items: TabItem[]; + _activeTab: TabItem; + _options: TabsOptions; + init(): void; + setActiveTab(tab: TabItem): void; + getActiveTab(): TabItem; + getTab(id: string): TabItem; + show(id: string, forceShow?: boolean): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts.map new file mode 100644 index 0000000..80b938f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,CAAC,OAAO,WAAW,aAAa;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;IAEtB,IAAI,IAAI,IAAI,CAAC;IACb,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,YAAY,IAAI,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE5C,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/interface.js b/node_modules/flowbite/lib/cjs/components/tabs/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/interface.js.map b/node_modules/flowbite/lib/cjs/components/tabs/interface.js.map new file mode 100644 index 0000000..6fc7bb2 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/tabs/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts b/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts new file mode 100644 index 0000000..342be0d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts @@ -0,0 +1,13 @@ +import { TabsInterface } from './interface'; +export declare type TabsOptions = { + defaultTabId?: string; + activeClasses?: string; + inactiveClasses?: string; + onShow?: (tabs: TabsInterface, tab: TabItem) => void; +}; +export declare type TabItem = { + id: string; + triggerEl: HTMLElement; + targetEl: HTMLElement; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts.map new file mode 100644 index 0000000..da457a9 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,OAAO,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/types.js b/node_modules/flowbite/lib/cjs/components/tabs/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tabs/types.js.map b/node_modules/flowbite/lib/cjs/components/tabs/types.js.map new file mode 100644 index 0000000..a4a4aff --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tabs/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/tabs/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts b/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts new file mode 100644 index 0000000..2e825a8 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts @@ -0,0 +1,43 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { TooltipOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { TooltipInterface } from './interface'; +declare class Tooltip implements TooltipInterface { + _instanceId: string; + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: TooltipOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _visible: boolean; + _initialized: boolean; + _showHandler: EventListenerOrEventListenerObject; + _hideHandler: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: TooltipOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initTooltips(): void; +export default Tooltip; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts.map b/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts.map new file mode 100644 index 0000000..db03f92 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts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,MAAM,IAAI;CAGtC;AAED,wBAAgB,YAAY,SAyB3B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/index.js b/node_modules/flowbite/lib/cjs/components/tooltip/index.js new file mode 100644 index 0000000..5f30ab1 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/index.js @@ -0,0 +1,257 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initTooltips = void 0; +/* eslint-disable @typescript-eslint/no-empty-function */ +var core_1 = require("@popperjs/core"); +var instances_1 = require("../../dom/instances"); +var Default = { + placement: 'top', + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Tooltip = /** @class */ (function () { + function Tooltip(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances_1.default.addInstance('Tooltip', this, this._instanceId, instanceOptions.override); + } + Tooltip.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._setupEventListeners(); + this._popperInstance = this._createPopperInstance(); + this._initialized = true; + } + }; + Tooltip.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + // remove event listeners associated with the trigger element + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hideHandler); + }); + // remove event listeners for keydown + this._removeKeydownListener(); + // remove event listeners for click outside + this._removeClickOutsideListener(); + // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance) + if (this._popperInstance) { + this._popperInstance.destroy(); + } + this._initialized = false; + } + }; + Tooltip.prototype.removeInstance = function () { + instances_1.default.removeInstance('Tooltip', this._instanceId); + }; + Tooltip.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Tooltip.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._showHandler = function () { + _this.show(); + }; + this._hideHandler = function () { + _this.hide(); + }; + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hideHandler); + }); + }; + Tooltip.prototype._createPopperInstance = function () { + return (0, core_1.createPopper)(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, 8], + }, + }, + ], + }); + }; + Tooltip.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Tooltip.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Tooltip.prototype.isVisible = function () { + return this._visible; + }; + Tooltip.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Tooltip.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility + this._visible = true; + // callback function + this._options.onShow(this); + }; + Tooltip.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility + this._visible = false; + // callback function + this._options.onHide(this); + }; + Tooltip.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Tooltip.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Tooltip.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Tooltip; +}()); +function initTooltips() { + document.querySelectorAll('[data-tooltip-target]').forEach(function ($triggerEl) { + var tooltipId = $triggerEl.getAttribute('data-tooltip-target'); + var $tooltipEl = document.getElementById(tooltipId); + if ($tooltipEl) { + var triggerType = $triggerEl.getAttribute('data-tooltip-trigger'); + var placement = $triggerEl.getAttribute('data-tooltip-placement'); + new Tooltip($tooltipEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The tooltip element with id \"".concat(tooltipId, "\" does not exist. Please check the data-tooltip-target attribute.")); + } + }); +} +exports.initTooltips = initTooltips; +if (typeof window !== 'undefined') { + window.Tooltip = Tooltip; + window.initTooltips = initTooltips; +} +exports.default = Tooltip; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/index.js.map b/node_modules/flowbite/lib/cjs/components/tooltip/index.js.map new file mode 100644 index 0000000..041264f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/tooltip/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,uCAA8C;AAQ9C,iDAA4C;AAE5C,IAAM,OAAO,GAAmB;IAC5B,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;A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IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;CACtC;AAED,kBAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts b/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts new file mode 100644 index 0000000..60e5cb1 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts @@ -0,0 +1,26 @@ +import { TooltipOptions, TooltipTriggerType, TooltipTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface TooltipInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: TooltipOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + init(): void; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: TooltipTriggerType): TooltipTriggerEventTypes; + isVisible(): boolean; + show(): void; + hide(): void; + toggle(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts.map b/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts.map new file mode 100644 index 0000000..5e015c5 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAE1D,IAAI,IAAI,IAAI,CAAC;IACb,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,qBAAqB,IAAI,IAAI,CAAC;IAC9B,sBAAsB,IAAI,IAAI,CAAC;IAC/B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,kBAAkB,GAChC,wBAAwB,CAAC;IAC5B,SAAS,IAAI,OAAO,CAAC;IACrB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IAEf,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/interface.js b/node_modules/flowbite/lib/cjs/components/tooltip/interface.js new file mode 100644 index 0000000..d549d1f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/interface.js.map b/node_modules/flowbite/lib/cjs/components/tooltip/interface.js.map new file mode 100644 index 0000000..8a5f072 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/tooltip/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts b/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts new file mode 100644 index 0000000..1ba5bb3 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts @@ -0,0 +1,15 @@ +import { TooltipInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type TooltipTriggerType = 'click' | 'hover' | 'none'; +export declare type TooltipTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type TooltipOptions = { + placement?: Placement; + triggerType?: TooltipTriggerType; + onShow?: (tooltip: TooltipInterface) => void; + onHide?: (tooltip: TooltipInterface) => void; + onToggle?: (tooltip: TooltipInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts.map b/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts.map new file mode 100644 index 0000000..048bf1d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE,MAAM,CAAC,OAAO,MAAM,wBAAwB,GAAG;IAC3C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/types.js b/node_modules/flowbite/lib/cjs/components/tooltip/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/components/tooltip/types.js.map b/node_modules/flowbite/lib/cjs/components/tooltip/types.js.map new file mode 100644 index 0000000..cd09cf9 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/components/tooltip/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/tooltip/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/config/global.d.ts b/node_modules/flowbite/lib/cjs/config/global.d.ts new file mode 100644 index 0000000..c6eedb1 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/config/global.d.ts @@ -0,0 +1,49 @@ +import Accordion from '../components/accordion'; +import Carousel from '../components/carousel'; +import Collapse from '../components/collapse'; +import Dial from '../components/dial'; +import Dismiss from '../components/dismiss'; +import Drawer from '../components/drawer'; +import Dropdown from '../components/dropdown'; +import Modal from '../components/modal'; +import Popover from '../components/popover'; +import Tabs from '../components/tabs'; +import Tooltip from '../components/tooltip'; +import InputCounter from '../components/input-counter'; +import Clipboard from '../components/clipboard'; +import Datepicker from '../components/datepicker'; +declare global { + interface Window { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Dismiss: typeof Dismiss; + Drawer: typeof Drawer; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + InputCounter: typeof InputCounter; + CopyClipboard: typeof Clipboard; + Datepicker: typeof Datepicker; + initAccordions: () => void; + initCarousels: () => void; + initCollapses: () => void; + initDials: () => void; + initDismisses: () => void; + initDrawers: () => void; + initDropdowns: () => void; + initModals: () => void; + initPopovers: () => void; + initTabs: () => void; + initTooltips: () => void; + initInputCounters: () => void; + initClipboards: () => void; + initDatepickers: () => void; + initFlowbite: () => void; + FlowbiteInstances: any; + } +} +//# sourceMappingURL=global.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/config/global.d.ts.map b/node_modules/flowbite/lib/cjs/config/global.d.ts.map new file mode 100644 index 0000000..606e9c7 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/config/global.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/config/global.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,SAA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newline at end of file diff --git a/node_modules/flowbite/lib/cjs/config/global.js b/node_modules/flowbite/lib/cjs/config/global.js new file mode 100644 index 0000000..74429bb --- /dev/null +++ b/node_modules/flowbite/lib/cjs/config/global.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=global.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/config/global.js.map b/node_modules/flowbite/lib/cjs/config/global.js.map new file mode 100644 index 0000000..52ccc1e --- /dev/null +++ b/node_modules/flowbite/lib/cjs/config/global.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../src/config/global.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/events.d.ts b/node_modules/flowbite/lib/cjs/dom/events.d.ts new file mode 100644 index 0000000..3bbb83b --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/events.d.ts @@ -0,0 +1,8 @@ +declare class Events { + private _eventType; + private _eventFunctions; + constructor(eventType: string, eventFunctions?: EventListener[]); + init(): void; +} +export default Events; +//# sourceMappingURL=events.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/events.d.ts.map b/node_modules/flowbite/lib/cjs/dom/events.d.ts.map new file mode 100644 index 0000000..de90c16 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/events.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/dom/events.ts"],"names":[],"mappings":"AAAA,cAAM,MAAM;IACR,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,eAAe,CAAkB;gBAE7B,SAAS,EAAE,MAAM,EAAE,cAAc,GAAE,aAAa,EAAO;IAKnE,IAAI;CAOP;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/events.js b/node_modules/flowbite/lib/cjs/dom/events.js new file mode 100644 index 0000000..3d7d94c --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/events.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Events = /** @class */ (function () { + function Events(eventType, eventFunctions) { + if (eventFunctions === void 0) { eventFunctions = []; } + this._eventType = eventType; + this._eventFunctions = eventFunctions; + } + Events.prototype.init = function () { + var _this = this; + this._eventFunctions.forEach(function (eventFunction) { + if (typeof window !== 'undefined') { + window.addEventListener(_this._eventType, eventFunction); + } + }); + }; + return Events; +}()); +exports.default = Events; +//# sourceMappingURL=events.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/events.js.map b/node_modules/flowbite/lib/cjs/dom/events.js.map new file mode 100644 index 0000000..369511c --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/events.js.map @@ -0,0 +1 @@ +{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/dom/events.ts"],"names":[],"mappings":";;AAAA;IAII,gBAAY,SAAiB,EAAE,cAAoC;QAApC,+BAAA,EAAA,mBAAoC;QAC/D,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IAC1C,CAAC;IAED,qBAAI,GAAJ;QAAA,iBAMC;QALG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,UAAC,aAAa;YACvC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;gBAC/B,MAAM,CAAC,gBAAgB,CAAC,KAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;aAC3D;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IACL,aAAC;AAAD,CAAC,AAhBD,IAgBC;AAED,kBAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/instances.d.ts b/node_modules/flowbite/lib/cjs/dom/instances.d.ts new file mode 100644 index 0000000..82f7318 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/instances.d.ts @@ -0,0 +1,100 @@ +import { AccordionInterface } from '../components/accordion/interface'; +import { CarouselInterface } from '../components/carousel/interface'; +import { CollapseInterface } from '../components/collapse/interface'; +import { DialInterface } from '../components/dial/interface'; +import { DismissInterface } from '../components/dismiss/interface'; +import { DrawerInterface } from '../components/drawer/interface'; +import { DropdownInterface } from '../components/dropdown/interface'; +import { ModalInterface } from '../components/modal/interface'; +import { PopoverInterface } from '../components/popover/interface'; +import { TabsInterface } from '../components/tabs/interface'; +import { TooltipInterface } from '../components/tooltip/interface'; +import { InputCounterInterface } from '../components/input-counter/interface'; +import { CopyClipboardInterface } from '../components/clipboard/interface'; +import { DatepickerInterface } from '../components/datepicker/interface'; +declare class Instances { + private _instances; + constructor(); + addInstance(component: keyof Instances['_instances'], instance: any, id?: string, override?: boolean): boolean; + getAllInstances(): { + Accordion: { + [id: string]: AccordionInterface; + }; + Carousel: { + [id: string]: CarouselInterface; + }; + Collapse: { + [id: string]: CollapseInterface; + }; + Dial: { + [id: string]: DialInterface; + }; + Dismiss: { + [id: string]: DismissInterface; + }; + Drawer: { + [id: string]: DrawerInterface; + }; + Dropdown: { + [id: string]: DropdownInterface; + }; + Modal: { + [id: string]: ModalInterface; + }; + Popover: { + [id: string]: PopoverInterface; + }; + Tabs: { + [id: string]: TabsInterface; + }; + Tooltip: { + [id: string]: TooltipInterface; + }; + InputCounter: { + [id: string]: InputCounterInterface; + }; + CopyClipboard: { + [id: string]: CopyClipboardInterface; + }; + Datepicker: { + [id: string]: DatepickerInterface; + }; + }; + getInstances(component: keyof Instances['_instances']): false | { + [id: string]: AccordionInterface; + } | { + [id: string]: CarouselInterface; + } | { + [id: string]: CollapseInterface; + } | { + [id: string]: DialInterface; + } | { + [id: string]: DismissInterface; + } | { + [id: string]: DrawerInterface; + } | { + [id: string]: DropdownInterface; + } | { + [id: string]: ModalInterface; + } | { + [id: string]: TabsInterface; + } | { + [id: string]: TooltipInterface; + } | { + [id: string]: InputCounterInterface; + } | { + [id: string]: CopyClipboardInterface; + } | { + [id: string]: DatepickerInterface; + }; + getInstance(component: keyof Instances['_instances'], id: string): any; + destroyAndRemoveInstance(component: keyof Instances['_instances'], id: string): void; + removeInstance(component: keyof Instances['_instances'], id: string): void; + destroyInstanceObject(component: keyof Instances['_instances'], id: string): void; + instanceExists(component: keyof Instances['_instances'], id: string): boolean; + _generateRandomId(): string; + private _componentAndInstanceCheck; +} +declare const instances: Instances; +export default instances; +//# sourceMappingURL=instances.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/instances.d.ts.map b/node_modules/flowbite/lib/cjs/dom/instances.d.ts.map new file mode 100644 index 0000000..5ca67ca --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/instances.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../../src/dom/instances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,cAAM,SAAS;IACX,OAAO,CAAC,UAAU,CAehB;;IAqBF,WAAW,CACP,SAAS,EAAE,MAAM,SAAS,CAAC,YAAY,CAAC,EACxC,QAAQ,EAAE,GAAG,EACb,EAAE,CAAC,EAAE,MAAM,EACX,QAAQ,UAAQ;IAoBpB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIf,YAAY,CAAC,SAAS,EAAE,MAAM,SAAS,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQrD,WAAW,CAAC,SAAS,EAAE,MAAM,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE,EAAE,MAAM;IAYhE,wBAAwB,CACpB,SAAS,EAAE,MAAM,SAAS,CAAC,YAAY,CAAC,EACxC,EAAE,EAAE,MAAM;IASd,cAAc,CAAC,SAAS,EAAE,MAAM,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE,EAAE,MAAM;IAOnE,qBAAqB,CACjB,SAAS,EAAE,MAAM,SAAS,CAAC,YAAY,CAAC,EACxC,EAAE,EAAE,MAAM;IAQd,cAAc,CAAC,SAAS,EAAE,MAAM,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE,EAAE,MAAM;IAYnE,iBAAiB;IAIjB,OAAO,CAAC,0BAA0B;CAgBrC;AAED,QAAA,MAAM,SAAS,WAAkB,CAAC;AAElC,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/instances.js b/node_modules/flowbite/lib/cjs/dom/instances.js new file mode 100644 index 0000000..85449e1 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/instances.js @@ -0,0 +1,107 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Instances = /** @class */ (function () { + function Instances() { + this._instances = { + Accordion: {}, + Carousel: {}, + Collapse: {}, + Dial: {}, + Dismiss: {}, + Drawer: {}, + Dropdown: {}, + Modal: {}, + Popover: {}, + Tabs: {}, + Tooltip: {}, + InputCounter: {}, + CopyClipboard: {}, + Datepicker: {}, + }; + } + Instances.prototype.addInstance = function (component, instance, id, override) { + if (override === void 0) { override = false; } + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + if (this._instances[component][id] && !override) { + console.warn("Flowbite: Instance with ID ".concat(id, " already exists.")); + return; + } + if (override && this._instances[component][id]) { + this._instances[component][id].destroyAndRemoveInstance(); + } + this._instances[component][id ? id : this._generateRandomId()] = + instance; + }; + Instances.prototype.getAllInstances = function () { + return this._instances; + }; + Instances.prototype.getInstances = function (component) { + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + return this._instances[component]; + }; + Instances.prototype.getInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + if (!this._instances[component][id]) { + console.warn("Flowbite: Instance with ID ".concat(id, " does not exist.")); + return; + } + return this._instances[component][id]; + }; + Instances.prototype.destroyAndRemoveInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + this.destroyInstanceObject(component, id); + this.removeInstance(component, id); + }; + Instances.prototype.removeInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + delete this._instances[component][id]; + }; + Instances.prototype.destroyInstanceObject = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + this._instances[component][id].destroy(); + }; + Instances.prototype.instanceExists = function (component, id) { + if (!this._instances[component]) { + return false; + } + if (!this._instances[component][id]) { + return false; + } + return true; + }; + Instances.prototype._generateRandomId = function () { + return Math.random().toString(36).substr(2, 9); + }; + Instances.prototype._componentAndInstanceCheck = function (component, id) { + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + if (!this._instances[component][id]) { + console.warn("Flowbite: Instance with ID ".concat(id, " does not exist.")); + return false; + } + return true; + }; + return Instances; +}()); +var instances = new Instances(); +exports.default = instances; +if (typeof window !== 'undefined') { + window.FlowbiteInstances = instances; +} +//# sourceMappingURL=instances.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/instances.js.map b/node_modules/flowbite/lib/cjs/dom/instances.js.map new file mode 100644 index 0000000..10d1bfe --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/instances.js.map @@ -0,0 +1 @@ +{"version":3,"file":"instances.js","sourceRoot":"","sources":["../../../src/dom/instances.ts"],"names":[],"mappings":";;AAeA;IAkBI;QACI,IAAI,CAAC,UAAU,GAAG;YACd,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,EAAE;YACT,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,EAAE;YACjB,UAAU,EAAE,EAAE;SACjB,CAAC;IACN,CAAC;IAED,+BAAW,GAAX,UACI,SAAwC,EACxC,QAAa,EACb,EAAW,EACX,QAAgB;QAAhB,yBAAA,EAAA,gBAAgB;QAEhB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,CAAC,IAAI,CAAC,8BAAuB,SAAS,qBAAkB,CAAC,CAAC;YACjE,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC7C,OAAO,CAAC,IAAI,CAAC,qCAA8B,EAAE,qBAAkB,CAAC,CAAC;YACjE,OAAO;SACV;QAED,IAAI,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;YAC5C,IAAI,CAAC,UAAU,CAAC,SAAS,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B,CAAC;IACL,gBAAC;AAAD,CAAC,AAjJD,IAiJC;AAED,IAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;AAElC,kBAAe,SAAS,CAAC;AAEzB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,iBAAiB,GAAG,SAAS,CAAC;CACxC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/types.d.ts b/node_modules/flowbite/lib/cjs/dom/types.d.ts new file mode 100644 index 0000000..b461000 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/types.d.ts @@ -0,0 +1,10 @@ +export declare type InstanceOptions = { + id?: string; + override?: boolean; +}; +export declare type EventListenerInstance = { + element: HTMLElement; + type: string; + handler: EventListenerOrEventListenerObject; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/types.d.ts.map b/node_modules/flowbite/lib/cjs/dom/types.d.ts.map new file mode 100644 index 0000000..fcee7cc --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dom/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG;IACxC,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,kCAAkC,CAAC;CAC/C,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/types.js b/node_modules/flowbite/lib/cjs/dom/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/dom/types.js.map b/node_modules/flowbite/lib/cjs/dom/types.js.map new file mode 100644 index 0000000..81849c0 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/dom/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/dom/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.d.ts b/node_modules/flowbite/lib/cjs/index.d.ts new file mode 100644 index 0000000..e9525ba --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.d.ts @@ -0,0 +1,61 @@ +import './components/index'; +import './types/declarations'; +export { default as Accordion } from './components/accordion'; +export { default as Carousel } from './components/carousel'; +export { default as Collapse } from './components/collapse'; +export { default as Dial } from './components/dial'; +export { default as Dismiss } from './components/dismiss'; +export { default as Drawer } from './components/drawer'; +export { default as Dropdown } from './components/dropdown'; +export { default as Modal } from './components/modal'; +export { default as Popover } from './components/popover'; +export { default as Tabs } from './components/tabs'; +export { default as Tooltip } from './components/tooltip'; +export { default as InputCounter } from './components/input-counter'; +export { default as CopyClipboard } from './components/clipboard'; +export { default as Datepicker } from './components/datepicker'; +export * from './components/accordion/types'; +export * from './components/carousel/types'; +export * from './components/collapse/types'; +export * from './components/dial/types'; +export * from './components/dismiss/types'; +export * from './components/drawer/types'; +export * from './components/dropdown/types'; +export * from './components/modal/types'; +export * from './components/popover/types'; +export * from './components/tabs/types'; +export * from './components/tooltip/types'; +export * from './components/input-counter/types'; +export * from './components/clipboard/types'; +export * from './components/datepicker/types'; +export * from './dom/types'; +export * from './components/accordion/interface'; +export * from './components/carousel/interface'; +export * from './components/collapse/interface'; +export * from './components/dial/interface'; +export * from './components/dismiss/interface'; +export * from './components/drawer/interface'; +export * from './components/dropdown/interface'; +export * from './components/modal/interface'; +export * from './components/popover/interface'; +export * from './components/tabs/interface'; +export * from './components/tooltip/interface'; +export * from './components/input-counter/interface'; +export * from './components/clipboard/interface'; +export * from './components/datepicker/interface'; +export { initAccordions } from './components/accordion'; +export { initCarousels } from './components/carousel'; +export { initCollapses } from './components/collapse'; +export { initDials } from './components/dial'; +export { initDismisses } from './components/dismiss'; +export { initDrawers } from './components/drawer'; +export { initDropdowns } from './components/dropdown'; +export { initModals } from './components/modal'; +export { initPopovers } from './components/popover'; +export { initTabs } from './components/tabs'; +export { initTooltips } from './components/tooltip'; +export { initInputCounters } from './components/input-counter'; +export { initCopyClipboards } from './components/clipboard'; +export { initDatepickers } from './components/datepicker'; +export { initFlowbite } from './components/index'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.d.ts.map b/node_modules/flowbite/lib/cjs/index.d.ts.map new file mode 100644 index 0000000..e392f92 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,sBAAsB,CAAC;AAsB9B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sB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AE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.js b/node_modules/flowbite/lib/cjs/index.js new file mode 100644 index 0000000..ee66494 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.js @@ -0,0 +1,145 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initFlowbite = exports.initDatepickers = exports.initCopyClipboards = exports.initInputCounters = exports.initTooltips = exports.initTabs = exports.initPopovers = exports.initModals = exports.initDropdowns = exports.initDrawers = exports.initDismisses = exports.initDials = exports.initCollapses = exports.initCarousels = exports.initAccordions = exports.Datepicker = exports.CopyClipboard = exports.InputCounter = exports.Tooltip = exports.Tabs = exports.Popover = exports.Modal = exports.Dropdown = exports.Drawer = exports.Dismiss = exports.Dial = exports.Collapse = exports.Carousel = exports.Accordion = void 0; +var events_1 = require("./dom/events"); +var accordion_1 = require("./components/accordion"); +var collapse_1 = require("./components/collapse"); +var carousel_1 = require("./components/carousel"); +var dismiss_1 = require("./components/dismiss"); +var dropdown_1 = require("./components/dropdown"); +var modal_1 = require("./components/modal"); +var drawer_1 = require("./components/drawer"); +var tabs_1 = require("./components/tabs"); +var tooltip_1 = require("./components/tooltip"); +var popover_1 = require("./components/popover"); +var dial_1 = require("./components/dial"); +var input_counter_1 = require("./components/input-counter"); +var clipboard_1 = require("./components/clipboard"); +var datepicker_1 = require("./components/datepicker"); +require("./components/index"); +require("./types/declarations"); +// setup events for data attributes +var events = new events_1.default('load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, + input_counter_1.initInputCounters, + clipboard_1.initCopyClipboards, + datepicker_1.initDatepickers, +]); +events.init(); +// export all components +var accordion_2 = require("./components/accordion"); +Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return accordion_2.default; } }); +var carousel_2 = require("./components/carousel"); +Object.defineProperty(exports, "Carousel", { enumerable: true, get: function () { return carousel_2.default; } }); +var collapse_2 = require("./components/collapse"); +Object.defineProperty(exports, "Collapse", { enumerable: true, get: function () { return collapse_2.default; } }); +var dial_2 = require("./components/dial"); +Object.defineProperty(exports, "Dial", { enumerable: true, get: function () { return dial_2.default; } }); +var dismiss_2 = require("./components/dismiss"); +Object.defineProperty(exports, "Dismiss", { enumerable: true, get: function () { return dismiss_2.default; } }); +var drawer_2 = require("./components/drawer"); +Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return drawer_2.default; } }); +var dropdown_2 = require("./components/dropdown"); +Object.defineProperty(exports, "Dropdown", { enumerable: true, get: function () { return dropdown_2.default; } }); +var modal_2 = require("./components/modal"); +Object.defineProperty(exports, "Modal", { enumerable: true, get: function () { return modal_2.default; } }); +var popover_2 = require("./components/popover"); +Object.defineProperty(exports, "Popover", { enumerable: true, get: function () { return popover_2.default; } }); +var tabs_2 = require("./components/tabs"); +Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return tabs_2.default; } }); +var tooltip_2 = require("./components/tooltip"); +Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return tooltip_2.default; } }); +var input_counter_2 = require("./components/input-counter"); +Object.defineProperty(exports, "InputCounter", { enumerable: true, get: function () { return input_counter_2.default; } }); +var clipboard_2 = require("./components/clipboard"); +Object.defineProperty(exports, "CopyClipboard", { enumerable: true, get: function () { return clipboard_2.default; } }); +var datepicker_2 = require("./components/datepicker"); +Object.defineProperty(exports, "Datepicker", { enumerable: true, get: function () { return datepicker_2.default; } }); +// export all types +__exportStar(require("./components/accordion/types"), exports); +__exportStar(require("./components/carousel/types"), exports); +__exportStar(require("./components/collapse/types"), exports); +__exportStar(require("./components/dial/types"), exports); +__exportStar(require("./components/dismiss/types"), exports); +__exportStar(require("./components/drawer/types"), exports); +__exportStar(require("./components/dropdown/types"), exports); +__exportStar(require("./components/modal/types"), exports); +__exportStar(require("./components/popover/types"), exports); +__exportStar(require("./components/tabs/types"), exports); +__exportStar(require("./components/tooltip/types"), exports); +__exportStar(require("./components/input-counter/types"), exports); +__exportStar(require("./components/clipboard/types"), exports); +__exportStar(require("./components/datepicker/types"), exports); +__exportStar(require("./dom/types"), exports); +// export all interfaces +__exportStar(require("./components/accordion/interface"), exports); +__exportStar(require("./components/carousel/interface"), exports); +__exportStar(require("./components/collapse/interface"), exports); +__exportStar(require("./components/dial/interface"), exports); +__exportStar(require("./components/dismiss/interface"), exports); +__exportStar(require("./components/drawer/interface"), exports); +__exportStar(require("./components/dropdown/interface"), exports); +__exportStar(require("./components/modal/interface"), exports); +__exportStar(require("./components/popover/interface"), exports); +__exportStar(require("./components/tabs/interface"), exports); +__exportStar(require("./components/tooltip/interface"), exports); +__exportStar(require("./components/input-counter/interface"), exports); +__exportStar(require("./components/clipboard/interface"), exports); +__exportStar(require("./components/datepicker/interface"), exports); +// export init functions +var accordion_3 = require("./components/accordion"); +Object.defineProperty(exports, "initAccordions", { enumerable: true, get: function () { return accordion_3.initAccordions; } }); +var carousel_3 = require("./components/carousel"); +Object.defineProperty(exports, "initCarousels", { enumerable: true, get: function () { return carousel_3.initCarousels; } }); +var collapse_3 = require("./components/collapse"); +Object.defineProperty(exports, "initCollapses", { enumerable: true, get: function () { return collapse_3.initCollapses; } }); +var dial_3 = require("./components/dial"); +Object.defineProperty(exports, "initDials", { enumerable: true, get: function () { return dial_3.initDials; } }); +var dismiss_3 = require("./components/dismiss"); +Object.defineProperty(exports, "initDismisses", { enumerable: true, get: function () { return dismiss_3.initDismisses; } }); +var drawer_3 = require("./components/drawer"); +Object.defineProperty(exports, "initDrawers", { enumerable: true, get: function () { return drawer_3.initDrawers; } }); +var dropdown_3 = require("./components/dropdown"); +Object.defineProperty(exports, "initDropdowns", { enumerable: true, get: function () { return dropdown_3.initDropdowns; } }); +var modal_3 = require("./components/modal"); +Object.defineProperty(exports, "initModals", { enumerable: true, get: function () { return modal_3.initModals; } }); +var popover_3 = require("./components/popover"); +Object.defineProperty(exports, "initPopovers", { enumerable: true, get: function () { return popover_3.initPopovers; } }); +var tabs_3 = require("./components/tabs"); +Object.defineProperty(exports, "initTabs", { enumerable: true, get: function () { return tabs_3.initTabs; } }); +var tooltip_3 = require("./components/tooltip"); +Object.defineProperty(exports, "initTooltips", { enumerable: true, get: function () { return tooltip_3.initTooltips; } }); +var input_counter_3 = require("./components/input-counter"); +Object.defineProperty(exports, "initInputCounters", { enumerable: true, get: function () { return input_counter_3.initInputCounters; } }); +var clipboard_3 = require("./components/clipboard"); +Object.defineProperty(exports, "initCopyClipboards", { enumerable: true, get: function () { return clipboard_3.initCopyClipboards; } }); +var datepicker_3 = require("./components/datepicker"); +Object.defineProperty(exports, "initDatepickers", { enumerable: true, get: function () { return datepicker_3.initDatepickers; } }); +// export all init functions +var index_1 = require("./components/index"); +Object.defineProperty(exports, "initFlowbite", { enumerable: true, get: function () { return index_1.initFlowbite; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.js.map b/node_modules/flowbite/lib/cjs/index.js.map new file mode 100644 index 0000000..04edbb5 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAAkC;AAClC,oDAAwD;AACxD,kDAAsD;AACtD,kDAAsD;AACtD,gDAAqD;AACrD,kDAAsD;AACtD,4CAAgD;AAChD,8CAAkD;AAClD,0CAA6C;AAC7C,gDAAoD;AACpD,gDAAoD;AACpD,0CAA8C;AAC9C,4DAA+D;AAC/D,oDAA4D;AAC5D,sDAA0D;AAC1D,8BAA4B;AAC5B,gCAA8B;AAE9B,mCAAmC;AACnC,IAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,MAAM,EAAE;IAC9B,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;IACT,iCAAiB;IACjB,8BAAkB;IAClB,4BAAe;CAClB,CAAC,CAAC;AACH,MAAM,CAAC,IAAI,EAAE,CAAC;AAEd,wBAAwB;AACxB,oDAA8D;AAArD,sGAAA,OAAO,OAAa;AAC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ACtB,8CAAkD;AAAzC,qGAAA,WAAW,OAAA;AACpB,kDAAsD;AAA7C,yGAAA,aAAa,OAAA;AACtB,4CAAgD;AAAvC,mGAAA,UAAU,OAAA;AACnB,gDAAoD;AAA3C,uGAAA,YAAY,OAAA;AACrB,0CAA6C;AAApC,gGAAA,QAAQ,OAAA;AACjB,gDAAoD;AAA3C,uGAAA,YAAY,OAAA;AACrB,4DAA+D;AAAtD,kHAAA,iBAAiB,OAAA;AAC1B,oDAA4D;AAAnD,+GAAA,kBAAkB,OAAA;AAC3B,sDAA0D;AAAjD,6GAAA,eAAe,OAAA;AAExB,4BAA4B;AAC5B,4CAAkD;AAAzC,qGAAA,YAAY,OAAA"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.phoenix.d.ts b/node_modules/flowbite/lib/cjs/index.phoenix.d.ts new file mode 100644 index 0000000..82d80c7 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.phoenix.d.ts @@ -0,0 +1,35 @@ +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import InputCounter from './components/input-counter'; +import CopyClipboard from './components/clipboard'; +import Datepicker from './components/datepicker'; +import './components/index'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + InputCounter: typeof InputCounter; + CopyClipboard: typeof CopyClipboard; + Datepicker: typeof Datepicker; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.phoenix.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.phoenix.d.ts.map b/node_modules/flowbite/lib/cjs/index.phoenix.d.ts.map new file mode 100644 index 0000000..060b009 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.phoenix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.phoenix.d.ts","sourceRoot":"","sources":["../../src/index.phoenix.ts"],"names":[],"mappings":"AACA,OAAO,SAA6B,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAA0B,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAuB,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAqB,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,YAAmC,MAAM,4BAA4B,CAAC;AAC7E,OAAO,aAAqC,MAAM,wBAAwB,CAAC;AAC3E,OAAO,UAA+B,MAAM,yBAAyB,CAAC;AACtE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;AAsClC,wBAgBE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.phoenix.js b/node_modules/flowbite/lib/cjs/index.phoenix.js new file mode 100644 index 0000000..fa2b00f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.phoenix.js @@ -0,0 +1,71 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +// core components +var accordion_1 = require("./components/accordion"); +var carousel_1 = require("./components/carousel"); +var collapse_1 = require("./components/collapse"); +var dial_1 = require("./components/dial"); +var dismiss_1 = require("./components/dismiss"); +var drawer_1 = require("./components/drawer"); +var dropdown_1 = require("./components/dropdown"); +var modal_1 = require("./components/modal"); +var popover_1 = require("./components/popover"); +var tabs_1 = require("./components/tabs"); +var tooltip_1 = require("./components/tooltip"); +var input_counter_1 = require("./components/input-counter"); +var clipboard_1 = require("./components/clipboard"); +var datepicker_1 = require("./components/datepicker"); +require("./components/index"); +var events_1 = require("./dom/events"); +var liveViewLoadEvents = new events_1.default('phx:page-loading-stop', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, + input_counter_1.initInputCounters, + clipboard_1.initCopyClipboards, + datepicker_1.initDatepickers, +]); +liveViewLoadEvents.init(); +var regularViewLoadEvents = new events_1.default('load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, + input_counter_1.initInputCounters, + clipboard_1.initCopyClipboards, + datepicker_1.initDatepickers, +]); +regularViewLoadEvents.init(); +exports.default = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + InputCounter: input_counter_1.default, + CopyClipboard: clipboard_1.default, + Datepicker: datepicker_1.default, + Events: events_1.default, +}; +//# sourceMappingURL=index.phoenix.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.phoenix.js.map b/node_modules/flowbite/lib/cjs/index.phoenix.js.map new file mode 100644 index 0000000..b9238d2 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.phoenix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.phoenix.js","sourceRoot":"","sources":["../../src/index.phoenix.ts"],"names":[],"mappings":";;AAAA,kBAAkB;AAClB,oDAAmE;AACnE,kDAAgE;AAChE,kDAAgE;AAChE,0CAAoD;AACpD,gDAA8D;AAC9D,8CAA0D;AAC1D,kDAAgE;AAChE,4CAAuD;AACvD,gDAA6D;AAC7D,0CAAmD;AACnD,gDAA6D;AAC7D,4DAA6E;AAC7E,oDAA2E;AAC3E,sDAAsE;AACtE,8BAA4B;AAC5B,uCAAkC;AAElC,IAAM,kBAAkB,GAAG,IAAI,gBAAM,CAAC,uBAAuB,EAAE;IAC3D,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;IACT,iCAAiB;IACjB,8BAAkB;IAClB,4BAAe;CAClB,CAAC,CAAC;AACH,kBAAkB,CAAC,IAAI,EAAE,CAAC;AAE1B,IAAM,qBAAqB,GAAG,IAAI,gBAAM,CAAC,MAAM,EAAE;IAC7C,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;IACT,iCAAiB;IACjB,8BAAkB;IAClB,4BAAe;CAClB,CAAC,CAAC;AACH,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAE7B,kBAAe;IACX,SAAS,qBAAA;IACT,QAAQ,oBAAA;IACR,QAAQ,oBAAA;IACR,IAAI,gBAAA;IACJ,MAAM,kBAAA;IACN,OAAO,mBAAA;IACP,QAAQ,oBAAA;IACR,KAAK,iBAAA;IACL,OAAO,mBAAA;IACP,IAAI,gBAAA;IACJ,OAAO,mBAAA;IACP,YAAY,yBAAA;IACZ,aAAa,qBAAA;IACb,UAAU,sBAAA;IACV,MAAM,kBAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.turbo.d.ts b/node_modules/flowbite/lib/cjs/index.turbo.d.ts new file mode 100644 index 0000000..7448488 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.turbo.d.ts @@ -0,0 +1,34 @@ +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import InputCounter from './components/input-counter'; +import CopyClipboard from './components/clipboard'; +import Datepicker from './components/datepicker'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + InputCounter: typeof InputCounter; + CopyClipboard: typeof CopyClipboard; + Datepicker: typeof Datepicker; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.turbo.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.turbo.d.ts.map b/node_modules/flowbite/lib/cjs/index.turbo.d.ts.map new file mode 100644 index 0000000..af258d3 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.turbo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.turbo.d.ts","sourceRoot":"","sources":["../../src/index.turbo.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,aAAa,MAAM,wBAAwB,CAAC;AACnD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAEjD,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;AAyBlC,wBAgBE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.turbo.js b/node_modules/flowbite/lib/cjs/index.turbo.js new file mode 100644 index 0000000..3a071e8 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.turbo.js @@ -0,0 +1,55 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +// core components +var accordion_1 = require("./components/accordion"); +var carousel_1 = require("./components/carousel"); +var collapse_1 = require("./components/collapse"); +var dial_1 = require("./components/dial"); +var dismiss_1 = require("./components/dismiss"); +var drawer_1 = require("./components/drawer"); +var dropdown_1 = require("./components/dropdown"); +var modal_1 = require("./components/modal"); +var popover_1 = require("./components/popover"); +var tabs_1 = require("./components/tabs"); +var tooltip_1 = require("./components/tooltip"); +var input_counter_1 = require("./components/input-counter"); +var clipboard_1 = require("./components/clipboard"); +var datepicker_1 = require("./components/datepicker"); +var index_1 = require("./components/index"); +var events_1 = require("./dom/events"); +// Since turbo maintainers refuse to add this event, we'll add it ourselves +// https://discuss.hotwired.dev/t/event-to-know-a-turbo-stream-has-been-rendered/1554/10 +var afterRenderEvent = new Event('turbo:after-stream-render'); +addEventListener('turbo:before-stream-render', function (event) { + var originalRender = event.detail.render; + event.detail.render = function (streamElement) { + originalRender(streamElement); + window.dispatchEvent(afterRenderEvent); + }; +}); +var turboLoadEvents = new events_1.default('turbo:load', [index_1.initFlowbite]); +turboLoadEvents.init(); +var turboFrameLoadEvents = new events_1.default('turbo:frame-load', [index_1.initFlowbite]); +turboFrameLoadEvents.init(); +var turboStreamLoadEvents = new events_1.default('turbo:after-stream-render', [ + index_1.initFlowbite, +]); +turboStreamLoadEvents.init(); +exports.default = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + InputCounter: input_counter_1.default, + CopyClipboard: clipboard_1.default, + Datepicker: datepicker_1.default, + Events: events_1.default, +}; +//# sourceMappingURL=index.turbo.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.turbo.js.map b/node_modules/flowbite/lib/cjs/index.turbo.js.map new file mode 100644 index 0000000..31b0725 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.turbo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.turbo.js","sourceRoot":"","sources":["../../src/index.turbo.ts"],"names":[],"mappings":";;AAAA,kBAAkB;AAClB,oDAA+C;AAC/C,kDAA6C;AAC7C,kDAA6C;AAC7C,0CAAqC;AACrC,gDAA2C;AAC3C,8CAAyC;AACzC,kDAA6C;AAC7C,4CAAuC;AACvC,gDAA2C;AAC3C,0CAAqC;AACrC,gDAA2C;AAC3C,4DAAsD;AACtD,oDAAmD;AACnD,sDAAiD;AACjD,4CAAkD;AAClD,uCAAkC;AAElC,2EAA2E;AAC3E,wFAAwF;AACxF,IAAM,gBAAgB,GAAG,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAChE,gBAAgB,CAAC,4BAA4B,EAAE,UAAC,KAAkB;IAC9D,IAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;IAE3C,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,UAAU,aAAsB;QAClD,cAAc,CAAC,aAAa,CAAC,CAAC;QAC9B,MAAM,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC3C,CAAC,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,IAAM,eAAe,GAAG,IAAI,gBAAM,CAAC,YAAY,EAAE,CAAC,oBAAY,CAAC,CAAC,CAAC;AACjE,eAAe,CAAC,IAAI,EAAE,CAAC;AAEvB,IAAM,oBAAoB,GAAG,IAAI,gBAAM,CAAC,kBAAkB,EAAE,CAAC,oBAAY,CAAC,CAAC,CAAC;AAC5E,oBAAoB,CAAC,IAAI,EAAE,CAAC;AAE5B,IAAM,qBAAqB,GAAG,IAAI,gBAAM,CAAC,2BAA2B,EAAE;IAClE,oBAAY;CACf,CAAC,CAAC;AACH,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAE7B,kBAAe;IACX,SAAS,qBAAA;IACT,QAAQ,oBAAA;IACR,QAAQ,oBAAA;IACR,IAAI,gBAAA;IACJ,MAAM,kBAAA;IACN,OAAO,mBAAA;IACP,QAAQ,oBAAA;IACR,KAAK,iBAAA;IACL,OAAO,mBAAA;IACP,IAAI,gBAAA;IACJ,OAAO,mBAAA;IACP,YAAY,yBAAA;IACZ,aAAa,qBAAA;IACb,UAAU,sBAAA;IACV,MAAM,kBAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.umd.d.ts b/node_modules/flowbite/lib/cjs/index.umd.d.ts new file mode 100644 index 0000000..129d641 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.umd.d.ts @@ -0,0 +1,36 @@ +import './flowbite.css'; +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import InputCounter from './components/input-counter'; +import CopyClipboard from './components/clipboard'; +import Datepicker from './components/datepicker'; +import './components/index'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + InputCounter: typeof InputCounter; + CopyClipboard: typeof CopyClipboard; + Datepicker: typeof Datepicker; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.umd.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.umd.d.ts.map b/node_modules/flowbite/lib/cjs/index.umd.d.ts.map new file mode 100644 index 0000000..5dff765 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.umd.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.umd.d.ts","sourceRoot":"","sources":["../../src/index.umd.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAGxB,OAAO,SAA6B,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAA0B,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAuB,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAqB,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,YAAmC,MAAM,4BAA4B,CAAC;AAC7E,OAAO,aAAqC,MAAM,wBAAwB,CAAC;AAC3E,OAAO,UAA+B,MAAM,yBAAyB,CAAC;AACtE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;AAoBlC,wBAgBE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.umd.js b/node_modules/flowbite/lib/cjs/index.umd.js new file mode 100644 index 0000000..2e5fde7 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.umd.js @@ -0,0 +1,55 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +require("./flowbite.css"); +// core components +var accordion_1 = require("./components/accordion"); +var carousel_1 = require("./components/carousel"); +var collapse_1 = require("./components/collapse"); +var dial_1 = require("./components/dial"); +var dismiss_1 = require("./components/dismiss"); +var drawer_1 = require("./components/drawer"); +var dropdown_1 = require("./components/dropdown"); +var modal_1 = require("./components/modal"); +var popover_1 = require("./components/popover"); +var tabs_1 = require("./components/tabs"); +var tooltip_1 = require("./components/tooltip"); +var input_counter_1 = require("./components/input-counter"); +var clipboard_1 = require("./components/clipboard"); +var datepicker_1 = require("./components/datepicker"); +require("./components/index"); +var events_1 = require("./dom/events"); +var events = new events_1.default('load', [ + accordion_1.initAccordions, + collapse_1.initCollapses, + carousel_1.initCarousels, + dismiss_1.initDismisses, + dropdown_1.initDropdowns, + modal_1.initModals, + drawer_1.initDrawers, + tabs_1.initTabs, + tooltip_1.initTooltips, + popover_1.initPopovers, + dial_1.initDials, + clipboard_1.initCopyClipboards, + input_counter_1.initInputCounters, + datepicker_1.initDatepickers, +]); +events.init(); +exports.default = { + Accordion: accordion_1.default, + Carousel: carousel_1.default, + Collapse: collapse_1.default, + Dial: dial_1.default, + Drawer: drawer_1.default, + Dismiss: dismiss_1.default, + Dropdown: dropdown_1.default, + Modal: modal_1.default, + Popover: popover_1.default, + Tabs: tabs_1.default, + Tooltip: tooltip_1.default, + InputCounter: input_counter_1.default, + CopyClipboard: clipboard_1.default, + Datepicker: datepicker_1.default, + Events: events_1.default, +}; +//# sourceMappingURL=index.umd.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/index.umd.js.map b/node_modules/flowbite/lib/cjs/index.umd.js.map new file mode 100644 index 0000000..39d8ffa --- /dev/null +++ b/node_modules/flowbite/lib/cjs/index.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.umd.js","sourceRoot":"","sources":["../../src/index.umd.ts"],"names":[],"mappings":";;AAAA,0BAAwB;AAExB,kBAAkB;AAClB,oDAAmE;AACnE,kDAAgE;AAChE,kDAAgE;AAChE,0CAAoD;AACpD,gDAA8D;AAC9D,8CAA0D;AAC1D,kDAAgE;AAChE,4CAAuD;AACvD,gDAA6D;AAC7D,0CAAmD;AACnD,gDAA6D;AAC7D,4DAA6E;AAC7E,oDAA2E;AAC3E,sDAAsE;AACtE,8BAA4B;AAC5B,uCAAkC;AAElC,IAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,MAAM,EAAE;IAC9B,0BAAc;IACd,wBAAa;IACb,wBAAa;IACb,uBAAa;IACb,wBAAa;IACb,kBAAU;IACV,oBAAW;IACX,eAAQ;IACR,sBAAY;IACZ,sBAAY;IACZ,gBAAS;IACT,8BAAkB;IAClB,iCAAiB;IACjB,4BAAe;CAClB,CAAC,CAAC;AACH,MAAM,CAAC,IAAI,EAAE,CAAC;AAEd,kBAAe;IACX,SAAS,qBAAA;IACT,QAAQ,oBAAA;IACR,QAAQ,oBAAA;IACR,IAAI,gBAAA;IACJ,MAAM,kBAAA;IACN,OAAO,mBAAA;IACP,QAAQ,oBAAA;IACR,KAAK,iBAAA;IACL,OAAO,mBAAA;IACP,IAAI,gBAAA;IACJ,OAAO,mBAAA;IACP,YAAY,yBAAA;IACZ,aAAa,qBAAA;IACb,UAAU,sBAAA;IACV,MAAM,kBAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/types/declarations.d.ts b/node_modules/flowbite/lib/cjs/types/declarations.d.ts new file mode 100644 index 0000000..1e2caf9 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/types/declarations.d.ts @@ -0,0 +1,19 @@ +declare module 'flowbite-datepicker' { + class Datepicker { + constructor(element: HTMLElement, options: any); + destroy(): void; + show(): void; + hide(): void; + setDate(date: string): void; + getDate(): string; + } + class DateRangePicker { + constructor(element: HTMLElement, options: any); + destroy(): void; + hide(): void; + show(): void; + setDates(dates: string[]): void; + getDates(): string[]; + } +} +//# sourceMappingURL=declarations.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/types/declarations.d.ts.map b/node_modules/flowbite/lib/cjs/types/declarations.d.ts.map new file mode 100644 index 0000000..97b642f --- /dev/null +++ b/node_modules/flowbite/lib/cjs/types/declarations.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"declarations.d.ts","sourceRoot":"","sources":["../../../src/types/declarations.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,qBAAqB,CAAC;IACjC,MAAa,UAAU;oBACP,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG;QAC9C,OAAO,IAAI,IAAI;QACf,IAAI,IAAI,IAAI;QACZ,IAAI,IAAI,IAAI;QACZ,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;QAC3B,OAAO,IAAI,MAAM;KACpB;IAED,MAAa,eAAe;oBACZ,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG;QAC9C,OAAO,IAAI,IAAI;QACf,IAAI,IAAI,IAAI;QACZ,IAAI,IAAI,IAAI;QACZ,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;QAC/B,QAAQ,IAAI,MAAM,EAAE;KACvB;CACJ"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/types/declarations.js b/node_modules/flowbite/lib/cjs/types/declarations.js new file mode 100644 index 0000000..af74c58 --- /dev/null +++ b/node_modules/flowbite/lib/cjs/types/declarations.js @@ -0,0 +1 @@ +//# sourceMappingURL=declarations.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/cjs/types/declarations.js.map b/node_modules/flowbite/lib/cjs/types/declarations.js.map new file mode 100644 index 0000000..4f7d8bc --- /dev/null +++ b/node_modules/flowbite/lib/cjs/types/declarations.js.map @@ -0,0 +1 @@ +{"version":3,"file":"declarations.js","sourceRoot":"","sources":["../../../src/types/declarations.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/index.d.ts b/node_modules/flowbite/lib/esm/components/accordion/index.d.ts new file mode 100644 index 0000000..c8bb6b1 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/index.d.ts @@ -0,0 +1,26 @@ +import type { AccordionItem, AccordionOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { AccordionInterface } from './interface'; +declare class Accordion implements AccordionInterface { + _instanceId: string; + _accordionEl: HTMLElement; + _items: AccordionItem[]; + _options: AccordionOptions; + _clickHandler: EventListenerOrEventListenerObject; + _initialized: boolean; + constructor(accordionEl?: HTMLElement | null, items?: AccordionItem[], options?: AccordionOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getItem(id: string): AccordionItem; + open(id: string): void; + toggle(id: string): void; + close(id: string): void; + updateOnOpen(callback: () => void): void; + updateOnClose(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initAccordions(): void; +export default Accordion; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/index.d.ts.map b/node_modules/flowbite/lib/esm/components/accordion/index.d.ts.map new file mode 100644 index 0000000..44b1de8 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAiBjD,cAAM,SAAU,YAAW,kBAAkB;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,WAAW,CAAC;IAC1B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,aAAa,EAAE,kCAAkC,CAAC;IAClD,YAAY,EAAE,OAAO,CAAC;gBAGlB,WAAW,GAAE,WAAW,GAAG,IAAW,EACtC,KAAK,GAAE,aAAa,EAAO,EAC3B,OAAO,GAAE,gBAA0B,EACnC,eAAe,GAAE,eAAwC;IAkB7D,IAAI;IAqBJ,OAAO;IAYP,cAAc;IAId,wBAAwB;IAKxB,OAAO,CAAC,EAAE,EAAE,MAAM;IAIlB,IAAI,CAAC,EAAE,EAAE,MAAM;IA2Cf,MAAM,CAAC,EAAE,EAAE,MAAM;IAajB,KAAK,CAAC,EAAE,EAAE,MAAM;IAsBhB,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,aAAa,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIlC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,cAAc,SA2C7B;AAOD,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/index.js b/node_modules/flowbite/lib/esm/components/accordion/index.js new file mode 100644 index 0000000..f42b2c0 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/index.js @@ -0,0 +1,190 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import instances from '../../dom/instances'; +var Default = { + alwaysOpen: false, + activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white', + inactiveClasses: 'text-gray-500 dark:text-gray-400', + onOpen: function () { }, + onClose: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Accordion = /** @class */ (function () { + function Accordion(accordionEl, items, options, instanceOptions) { + if (accordionEl === void 0) { accordionEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : accordionEl.id; + this._accordionEl = accordionEl; + this._items = items; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances.addInstance('Accordion', this, this._instanceId, instanceOptions.override); + } + Accordion.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + // show accordion item based on click + this._items.forEach(function (item) { + if (item.active) { + _this.open(item.id); + } + var clickHandler = function () { + _this.toggle(item.id); + }; + item.triggerEl.addEventListener('click', clickHandler); + // Store the clickHandler in a property of the item for removal later + item.clickHandler = clickHandler; + }); + this._initialized = true; + } + }; + Accordion.prototype.destroy = function () { + if (this._items.length && this._initialized) { + this._items.forEach(function (item) { + item.triggerEl.removeEventListener('click', item.clickHandler); + // Clean up by deleting the clickHandler property from the item + delete item.clickHandler; + }); + this._initialized = false; + } + }; + Accordion.prototype.removeInstance = function () { + instances.removeInstance('Accordion', this._instanceId); + }; + Accordion.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Accordion.prototype.getItem = function (id) { + return this._items.filter(function (item) { return item.id === id; })[0]; + }; + Accordion.prototype.open = function (id) { + var _a, _b; + var _this = this; + var item = this.getItem(id); + // don't hide other accordions if always open + if (!this._options.alwaysOpen) { + this._items.map(function (i) { + var _a, _b; + if (i !== item) { + (_a = i.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = i.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + i.targetEl.classList.add('hidden'); + i.triggerEl.setAttribute('aria-expanded', 'false'); + i.active = false; + // rotate icon if set + if (i.iconEl) { + i.iconEl.classList.add('rotate-180'); + } + } + }); + } + // show active item + (_a = item.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + item.triggerEl.setAttribute('aria-expanded', 'true'); + item.targetEl.classList.remove('hidden'); + item.active = true; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.remove('rotate-180'); + } + // callback function + this._options.onOpen(this, item); + }; + Accordion.prototype.toggle = function (id) { + var item = this.getItem(id); + if (item.active) { + this.close(id); + } + else { + this.open(id); + } + // callback function + this._options.onToggle(this, item); + }; + Accordion.prototype.close = function (id) { + var _a, _b; + var item = this.getItem(id); + (_a = item.triggerEl.classList).remove.apply(_a, this._options.activeClasses.split(' ')); + (_b = item.triggerEl.classList).add.apply(_b, this._options.inactiveClasses.split(' ')); + item.targetEl.classList.add('hidden'); + item.triggerEl.setAttribute('aria-expanded', 'false'); + item.active = false; + // rotate icon if set + if (item.iconEl) { + item.iconEl.classList.add('rotate-180'); + } + // callback function + this._options.onClose(this, item); + }; + Accordion.prototype.updateOnOpen = function (callback) { + this._options.onOpen = callback; + }; + Accordion.prototype.updateOnClose = function (callback) { + this._options.onClose = callback; + }; + Accordion.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Accordion; +}()); +export function initAccordions() { + document.querySelectorAll('[data-accordion]').forEach(function ($accordionEl) { + var alwaysOpen = $accordionEl.getAttribute('data-accordion'); + var activeClasses = $accordionEl.getAttribute('data-active-classes'); + var inactiveClasses = $accordionEl.getAttribute('data-inactive-classes'); + var items = []; + $accordionEl + .querySelectorAll('[data-accordion-target]') + .forEach(function ($triggerEl) { + // Consider only items that directly belong to $accordionEl + // (to make nested accordions work). + if ($triggerEl.closest('[data-accordion]') === $accordionEl) { + var item = { + id: $triggerEl.getAttribute('data-accordion-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-accordion-target')), + iconEl: $triggerEl.querySelector('[data-accordion-icon]'), + active: $triggerEl.getAttribute('aria-expanded') === 'true' + ? true + : false, + }; + items.push(item); + } + }); + new Accordion($accordionEl, items, { + alwaysOpen: alwaysOpen === 'open' ? true : false, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +if (typeof window !== 'undefined') { + window.Accordion = Accordion; + window.initAccordions = initAccordions; +} +export default Accordion; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/index.js.map b/node_modules/flowbite/lib/esm/components/accordion/index.js.map new file mode 100644 index 0000000..673feb4 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/accordion/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAqB;IAC9B,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,4DAA4D;IAC3E,eAAe,EAAE,kCAAkC;IACnD,MAAM,EAAE,cAAO,CAAC;IAChB,OAAO,EAAE,cAAO,CAAC;IACjB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IAQI,mBACI,WAAsC,EACtC,KAA2B,EAC3B,OAAmC,EACnC,eAAyD;QAHzD,4BAAA,EAAA,kBAAsC;QACtC,sBAAA,EAAA,UAA2B;QAC3B,wBAAA,EAAA,iBAAmC;QACnC,gCAAA,EAAA,wCAAyD;QAEzD,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE;YACjC,CAAC,CAAC,eAAe,CAAC,EAAE;YACpB,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;QACrB,IAAI,CAA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AC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,cAAc,GAAG,cAAc,CAAC;CAC1C;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts b/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts new file mode 100644 index 0000000..525a332 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts @@ -0,0 +1,13 @@ +import { AccordionItem, AccordionOptions } from './types'; +export declare interface AccordionInterface { + _items: AccordionItem[]; + _options: AccordionOptions; + getItem(id: string): AccordionItem | undefined; + open(id: string): void; + toggle(id: string): void; + close(id: string): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts.map new file mode 100644 index 0000000..feb8275 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/interface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG1D,MAAM,CAAC,OAAO,WAAW,kBAAkB;IACvC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAC/C,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/interface.js b/node_modules/flowbite/lib/esm/components/accordion/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/interface.js.map b/node_modules/flowbite/lib/esm/components/accordion/interface.js.map new file mode 100644 index 0000000..a7ef24a --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/accordion/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/types.d.ts b/node_modules/flowbite/lib/esm/components/accordion/types.d.ts new file mode 100644 index 0000000..9c762a6 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/types.d.ts @@ -0,0 +1,18 @@ +import { AccordionInterface } from './interface'; +export declare type AccordionItem = { + id: string; + triggerEl: HTMLElement; + targetEl: HTMLElement; + iconEl?: HTMLElement | null; + active?: boolean; + clickHandler?: EventListenerOrEventListenerObject; +}; +export declare type AccordionOptions = { + alwaysOpen?: boolean; + activeClasses?: string; + inactiveClasses?: string; + onOpen?: (accordion: AccordionInterface, item: AccordionItem) => void; + onClose?: (accordion: AccordionInterface, item: AccordionItem) => void; + onToggle?: (accordion: AccordionInterface, item: AccordionItem) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/types.d.ts.map b/node_modules/flowbite/lib/esm/components/accordion/types.d.ts.map new file mode 100644 index 0000000..5b16bfa --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,kCAAkC,CAAC;CACrD,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,gBAAgB,GAAG;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACtE,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3E,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/types.js b/node_modules/flowbite/lib/esm/components/accordion/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/accordion/types.js.map b/node_modules/flowbite/lib/esm/components/accordion/types.js.map new file mode 100644 index 0000000..e0f0c46 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/accordion/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/accordion/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/index.d.ts b/node_modules/flowbite/lib/esm/components/carousel/index.d.ts new file mode 100644 index 0000000..6854369 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/index.d.ts @@ -0,0 +1,64 @@ +import type { CarouselOptions, CarouselItem, IndicatorItem, RotationItems } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { CarouselInterface } from './interface'; +declare class Carousel implements CarouselInterface { + _instanceId: string; + _carouselEl: HTMLElement; + _items: CarouselItem[]; + _indicators: IndicatorItem[]; + _activeItem: CarouselItem; + _intervalDuration: number; + _intervalInstance: number; + _options: CarouselOptions; + _initialized: boolean; + constructor(carouselEl?: HTMLElement | null, items?: CarouselItem[], options?: CarouselOptions, instanceOptions?: InstanceOptions); + /** + * initialize carousel and items based on active one + */ + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getItem(position: number): CarouselItem; + /** + * Slide to the element based on id + * @param {*} position + */ + slideTo(position: number): void; + /** + * Based on the currently active item it will go to the next position + */ + next(): void; + /** + * Based on the currently active item it will go to the previous position + */ + prev(): void; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + _rotate(rotationItems: RotationItems): void; + /** + * Set an interval to cycle through the carousel items + */ + cycle(): void; + /** + * Clears the cycling interval + */ + pause(): void; + /** + * Get the currently active item + */ + getActiveItem(): CarouselItem; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + _setActiveItem(item: CarouselItem): void; + updateOnNext(callback: () => void): void; + updateOnPrev(callback: () => void): void; + updateOnChange(callback: () => void): void; +} +export declare function initCarousels(): void; +export default Carousel; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/index.d.ts.map b/node_modules/flowbite/lib/esm/components/carousel/index.d.ts.map new file mode 100644 index 0000000..aa0757d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAsBhD,cAAM,QAAS,YAAW,iBAAiB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,aAAa,EAAE,CAAC;IAC7B,WAAW,EAAE,YAAY,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;gBAGlB,UAAU,GAAE,WAAW,GAAG,IAAW,EACrC,KAAK,GAAE,YAAY,EAAO,EAC1B,OAAO,GAAE,eAAyB,EAClC,eAAe,GAAE,eAAwC;IA0B7D;;OAEG;IACH,IAAI;IA4BJ,OAAO;IAMP,cAAc;IAId,wBAAwB;IAKxB,OAAO,CAAC,QAAQ,EAAE,MAAM;IAIxB;;;OAGG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM;IAuBxB;;OAEG;IACH,IAAI;IAiBJ;;OAEG;IACH,IAAI;IAiBJ;;;OAGG;IACH,OAAO,CAAC,aAAa,EAAE,aAAa;IAmDpC;;OAEG;IACH,KAAK;IAQL;;OAEG;IACH,KAAK;IAIL;;OAEG;IACH,aAAa;IAIb;;;OAGG;IACH,cAAc,CAAC,IAAI,EAAE,YAAY;IAyBjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,aAAa,SA0E5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/index.js b/node_modules/flowbite/lib/esm/components/carousel/index.js new file mode 100644 index 0000000..9622f4e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/index.js @@ -0,0 +1,285 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import instances from '../../dom/instances'; +var Default = { + defaultPosition: 0, + indicators: { + items: [], + activeClasses: 'bg-white dark:bg-gray-800', + inactiveClasses: 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800', + }, + interval: 3000, + onNext: function () { }, + onPrev: function () { }, + onChange: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Carousel = /** @class */ (function () { + function Carousel(carouselEl, items, options, instanceOptions) { + if (carouselEl === void 0) { carouselEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : carouselEl.id; + this._carouselEl = carouselEl; + this._items = items; + this._options = __assign(__assign(__assign({}, Default), options), { indicators: __assign(__assign({}, Default.indicators), options.indicators) }); + this._activeItem = this.getItem(this._options.defaultPosition); + this._indicators = this._options.indicators.items; + this._intervalDuration = this._options.interval; + this._intervalInstance = null; + this._initialized = false; + this.init(); + instances.addInstance('Carousel', this, this._instanceId, instanceOptions.override); + } + /** + * initialize carousel and items based on active one + */ + Carousel.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + this._items.map(function (item) { + item.el.classList.add('absolute', 'inset-0', 'transition-transform', 'transform'); + }); + // if no active item is set then first position is default + if (this.getActiveItem()) { + this.slideTo(this.getActiveItem().position); + } + else { + this.slideTo(0); + } + this._indicators.map(function (indicator, position) { + indicator.el.addEventListener('click', function () { + _this.slideTo(position); + }); + }); + this._initialized = true; + } + }; + Carousel.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + } + }; + Carousel.prototype.removeInstance = function () { + instances.removeInstance('Carousel', this._instanceId); + }; + Carousel.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Carousel.prototype.getItem = function (position) { + return this._items[position]; + }; + /** + * Slide to the element based on id + * @param {*} position + */ + Carousel.prototype.slideTo = function (position) { + var nextItem = this._items[position]; + var rotationItems = { + left: nextItem.position === 0 + ? this._items[this._items.length - 1] + : this._items[nextItem.position - 1], + middle: nextItem, + right: nextItem.position === this._items.length - 1 + ? this._items[0] + : this._items[nextItem.position + 1], + }; + this._rotate(rotationItems); + this._setActiveItem(nextItem); + if (this._intervalInstance) { + this.pause(); + this.cycle(); + } + this._options.onChange(this); + }; + /** + * Based on the currently active item it will go to the next position + */ + Carousel.prototype.next = function () { + var activeItem = this.getActiveItem(); + var nextItem = null; + // check if last item + if (activeItem.position === this._items.length - 1) { + nextItem = this._items[0]; + } + else { + nextItem = this._items[activeItem.position + 1]; + } + this.slideTo(nextItem.position); + // callback function + this._options.onNext(this); + }; + /** + * Based on the currently active item it will go to the previous position + */ + Carousel.prototype.prev = function () { + var activeItem = this.getActiveItem(); + var prevItem = null; + // check if first item + if (activeItem.position === 0) { + prevItem = this._items[this._items.length - 1]; + } + else { + prevItem = this._items[activeItem.position - 1]; + } + this.slideTo(prevItem.position); + // callback function + this._options.onPrev(this); + }; + /** + * This method applies the transform classes based on the left, middle, and right rotation carousel items + * @param {*} rotationItems + */ + Carousel.prototype._rotate = function (rotationItems) { + // reset + this._items.map(function (item) { + item.el.classList.add('hidden'); + }); + // Handling the case when there is only one item + if (this._items.length === 1) { + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-20'); + return; + } + // left item (previously active) + rotationItems.left.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-20'); + rotationItems.left.el.classList.add('-translate-x-full', 'z-10'); + // currently active item + rotationItems.middle.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-10'); + rotationItems.middle.el.classList.add('translate-x-0', 'z-30'); + // right item (upcoming active) + rotationItems.right.el.classList.remove('-translate-x-full', 'translate-x-full', 'translate-x-0', 'hidden', 'z-30'); + rotationItems.right.el.classList.add('translate-x-full', 'z-20'); + }; + /** + * Set an interval to cycle through the carousel items + */ + Carousel.prototype.cycle = function () { + var _this = this; + if (typeof window !== 'undefined') { + this._intervalInstance = window.setInterval(function () { + _this.next(); + }, this._intervalDuration); + } + }; + /** + * Clears the cycling interval + */ + Carousel.prototype.pause = function () { + clearInterval(this._intervalInstance); + }; + /** + * Get the currently active item + */ + Carousel.prototype.getActiveItem = function () { + return this._activeItem; + }; + /** + * Set the currently active item and data attribute + * @param {*} position + */ + Carousel.prototype._setActiveItem = function (item) { + var _a, _b; + var _this = this; + this._activeItem = item; + var position = item.position; + // update the indicators if available + if (this._indicators.length) { + this._indicators.map(function (indicator) { + var _a, _b; + indicator.el.setAttribute('aria-current', 'false'); + (_a = indicator.el.classList).remove.apply(_a, _this._options.indicators.activeClasses.split(' ')); + (_b = indicator.el.classList).add.apply(_b, _this._options.indicators.inactiveClasses.split(' ')); + }); + (_a = this._indicators[position].el.classList).add.apply(_a, this._options.indicators.activeClasses.split(' ')); + (_b = this._indicators[position].el.classList).remove.apply(_b, this._options.indicators.inactiveClasses.split(' ')); + this._indicators[position].el.setAttribute('aria-current', 'true'); + } + }; + Carousel.prototype.updateOnNext = function (callback) { + this._options.onNext = callback; + }; + Carousel.prototype.updateOnPrev = function (callback) { + this._options.onPrev = callback; + }; + Carousel.prototype.updateOnChange = function (callback) { + this._options.onChange = callback; + }; + return Carousel; +}()); +export function initCarousels() { + document.querySelectorAll('[data-carousel]').forEach(function ($carouselEl) { + var interval = $carouselEl.getAttribute('data-carousel-interval'); + var slide = $carouselEl.getAttribute('data-carousel') === 'slide' + ? true + : false; + var items = []; + var defaultPosition = 0; + if ($carouselEl.querySelectorAll('[data-carousel-item]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-item]')).map(function ($carouselItemEl, position) { + items.push({ + position: position, + el: $carouselItemEl, + }); + if ($carouselItemEl.getAttribute('data-carousel-item') === + 'active') { + defaultPosition = position; + } + }); + } + var indicators = []; + if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) { + Array.from($carouselEl.querySelectorAll('[data-carousel-slide-to]')).map(function ($indicatorEl) { + indicators.push({ + position: parseInt($indicatorEl.getAttribute('data-carousel-slide-to')), + el: $indicatorEl, + }); + }); + } + var carousel = new Carousel($carouselEl, items, { + defaultPosition: defaultPosition, + indicators: { + items: indicators, + }, + interval: interval ? interval : Default.interval, + }); + if (slide) { + carousel.cycle(); + } + // check for controls + var carouselNextEl = $carouselEl.querySelector('[data-carousel-next]'); + var carouselPrevEl = $carouselEl.querySelector('[data-carousel-prev]'); + if (carouselNextEl) { + carouselNextEl.addEventListener('click', function () { + carousel.next(); + }); + } + if (carouselPrevEl) { + carouselPrevEl.addEventListener('click', function () { + carousel.prev(); + }); + } + }); +} +if (typeof window !== 'undefined') { + window.Carousel = Carousel; + window.initCarousels = initCarousels; +} +export default Carousel; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/index.js.map b/node_modules/flowbite/lib/esm/components/carousel/index.js.map new file mode 100644 index 0000000..004da2e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/carousel/index.ts"],"names":[],"mappings":";;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E;IAC/B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts b/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts new file mode 100644 index 0000000..0847622 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts @@ -0,0 +1,23 @@ +import { CarouselOptions, CarouselItem, IndicatorItem, RotationItems } from './types'; +export declare interface CarouselInterface { + _items: CarouselItem[]; + _indicators: IndicatorItem[]; + _activeItem: CarouselItem; + _intervalDuration: number; + _intervalInstance: number; + _options: CarouselOptions; + init(): void; + getItem(position: number): CarouselItem; + getActiveItem(): CarouselItem; + _setActiveItem(item: CarouselItem): void; + slideTo(position: number): void; + next(): void; + prev(): void; + _rotate(rotationItems: RotationItems): void; + cycle(): void; + pause(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts.map new file mode 100644 index 0000000..5b50215 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EAChB,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,aAAa,EAAE,CAAC;IAC7B,WAAW,EAAE,YAAY,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAE1B,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAAC;IACxC,aAAa,IAAI,YAAY,CAAC;IAE9B,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAEzC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5C,KAAK,IAAI,IAAI,CAAC;IACd,KAAK,IAAI,IAAI,CAAC;IAEd,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/interface.js b/node_modules/flowbite/lib/esm/components/carousel/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/interface.js.map b/node_modules/flowbite/lib/esm/components/carousel/interface.js.map new file mode 100644 index 0000000..3c63595 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/carousel/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/types.d.ts b/node_modules/flowbite/lib/esm/components/carousel/types.d.ts new file mode 100644 index 0000000..8ae7d3d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/types.d.ts @@ -0,0 +1,27 @@ +import { CarouselInterface } from './interface'; +export declare type CarouselItem = { + position: number; + el: HTMLElement; +}; +export declare type IndicatorItem = { + position: number; + el: HTMLElement; +}; +export declare type RotationItems = { + left: CarouselItem; + middle: CarouselItem; + right: CarouselItem; +}; +export declare type CarouselOptions = { + defaultPosition?: number; + indicators?: { + items?: IndicatorItem[]; + activeClasses?: string; + inactiveClasses?: string; + }; + interval?: number; + onNext?: (carousel: CarouselInterface) => void; + onPrev?: (carousel: CarouselInterface) => void; + onChange?: (carousel: CarouselInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/types.d.ts.map b/node_modules/flowbite/lib/esm/components/carousel/types.d.ts.map new file mode 100644 index 0000000..8cb376d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,YAAY,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/types.js b/node_modules/flowbite/lib/esm/components/carousel/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/carousel/types.js.map b/node_modules/flowbite/lib/esm/components/carousel/types.js.map new file mode 100644 index 0000000..72b8fbd --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/carousel/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/carousel/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/index.d.ts b/node_modules/flowbite/lib/esm/components/clipboard/index.d.ts new file mode 100644 index 0000000..5f42284 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/index.d.ts @@ -0,0 +1,24 @@ +import type { CopyClipboardOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { CopyClipboardInterface } from './interface'; +declare class CopyClipboard implements CopyClipboardInterface { + _instanceId: string; + _triggerEl: HTMLElement | null; + _targetEl: HTMLInputElement | null; + _options: CopyClipboardOptions; + _initialized: boolean; + _triggerElClickHandler: EventListenerOrEventListenerObject; + _inputHandler: EventListenerOrEventListenerObject; + constructor(triggerEl?: HTMLElement | null, targetEl?: HTMLInputElement | null, options?: CopyClipboardOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getTargetValue(): string; + copy(): string; + decodeHTML(html: string): string; + updateOnCopyCallback(callback: () => void): void; +} +export declare function initCopyClipboards(): void; +export default CopyClipboard; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/index.d.ts.map b/node_modules/flowbite/lib/esm/components/clipboard/index.d.ts.map new file mode 100644 index 0000000..2dc7859 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/clipboard/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAcrD,cAAM,aAAc,YAAW,sBAAsB;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACnC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,sBAAsB,EAAE,kCAAkC,CAAC;IAC3D,aAAa,EAAE,kCAAkC,CAAC;gBAG9C,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,QAAQ,GAAE,gBAAgB,GAAG,IAAW,EACxC,OAAO,GAAE,oBAA8B,EACvC,eAAe,GAAE,eAAwC;IAoB7D,IAAI;IAkBJ,OAAO;IAYP,cAAc;IAId,wBAAwB;IAKxB,cAAc;IAcd,IAAI;IA4BJ,UAAU,CAAC,IAAI,EAAE,MAAM;IAMvB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,IAAI;CAG5C;AAED,wBAAgB,kBAAkB,SA2CjC;AAOD,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/index.js b/node_modules/flowbite/lib/esm/components/clipboard/index.js new file mode 100644 index 0000000..89b2ec6 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/index.js @@ -0,0 +1,139 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import instances from '../../dom/instances'; +var Default = { + htmlEntities: false, + contentType: 'input', + onCopy: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var CopyClipboard = /** @class */ (function () { + function CopyClipboard(triggerEl, targetEl, options, instanceOptions) { + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances.addInstance('CopyClipboard', this, this._instanceId, instanceOptions.override); + } + CopyClipboard.prototype.init = function () { + var _this = this; + if (this._targetEl && this._triggerEl && !this._initialized) { + this._triggerElClickHandler = function () { + _this.copy(); + }; + // clicking on the trigger element should copy the value of the target element + if (this._triggerEl) { + this._triggerEl.addEventListener('click', this._triggerElClickHandler); + } + this._initialized = true; + } + }; + CopyClipboard.prototype.destroy = function () { + if (this._triggerEl && this._targetEl && this._initialized) { + if (this._triggerEl) { + this._triggerEl.removeEventListener('click', this._triggerElClickHandler); + } + this._initialized = false; + } + }; + CopyClipboard.prototype.removeInstance = function () { + instances.removeInstance('CopyClipboard', this._instanceId); + }; + CopyClipboard.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + CopyClipboard.prototype.getTargetValue = function () { + if (this._options.contentType === 'input') { + return this._targetEl.value; + } + if (this._options.contentType === 'innerHTML') { + return this._targetEl.innerHTML; + } + if (this._options.contentType === 'textContent') { + return this._targetEl.textContent.replace(/\s+/g, ' ').trim(); + } + }; + CopyClipboard.prototype.copy = function () { + var textToCopy = this.getTargetValue(); + // Check if HTMLEntities option is enabled + if (this._options.htmlEntities) { + // Encode the text using HTML entities + textToCopy = this.decodeHTML(textToCopy); + } + // Create a temporary textarea element + var tempTextArea = document.createElement('textarea'); + tempTextArea.value = textToCopy; + document.body.appendChild(tempTextArea); + // Select the text inside the textarea and copy it to the clipboard + tempTextArea.select(); + document.execCommand('copy'); + // Remove the temporary textarea + document.body.removeChild(tempTextArea); + // Callback function + this._options.onCopy(this); + return textToCopy; + }; + // Function to encode text into HTML entities + CopyClipboard.prototype.decodeHTML = function (html) { + var textarea = document.createElement('textarea'); + textarea.innerHTML = html; + return textarea.textContent; + }; + CopyClipboard.prototype.updateOnCopyCallback = function (callback) { + this._options.onCopy = callback; + }; + return CopyClipboard; +}()); +export function initCopyClipboards() { + document + .querySelectorAll('[data-copy-to-clipboard-target]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-copy-to-clipboard-target'); + var $targetEl = document.getElementById(targetId); + var contentType = $triggerEl.getAttribute('data-copy-to-clipboard-content-type'); + var htmlEntities = $triggerEl.getAttribute('data-copy-to-clipboard-html-entities'); + // check if the target element exists + if ($targetEl) { + if (!instances.instanceExists('CopyClipboard', $targetEl.getAttribute('id'))) { + new CopyClipboard($triggerEl, $targetEl, { + htmlEntities: htmlEntities && htmlEntities === 'true' + ? true + : Default.htmlEntities, + contentType: contentType + ? contentType + : Default.contentType, + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-copy-to-clipboard-target attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.CopyClipboard = CopyClipboard; + window.initClipboards = initCopyClipboards; +} +export default CopyClipboard; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/index.js.map b/node_modules/flowbite/lib/esm/components/clipboard/index.js.map new file mode 100644 index 0000000..bab8462 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/clipboard/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAyB;IAClC,YAAY,EAAE,KAAK;IACnB,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;CACnB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IASI,uBACI,SAAoC,EACpC,QAAwC,EACxC,OAAuC,EACvC,eAAyD;QAHzD,0BAAA,EAAA,gBAAoC;QACpC,yBAAA,EAAA,eAAwC;QACxC,wBAAA,EAAA,iBAAuC;QACvC,gCAAA,EAAA,wCAAyD;QAEzD,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE;YACjC,CAAC,CAAC,eAAe,CAAC,EAAE;YACpB,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAElB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAE1B,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,SAAS,CAAC,WAAW,CACjB,eAAe,EACf,IAAI,EACJ,IAAI,CAAC,WAAW,EAChB,eAAe,CAAC,QAAQ,CAC3B,CAAC;IACN,CAAC;IAED,4BAAI,GAAJ;QAAA,iBAgBC;QAfG,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACzD,IAAI,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CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QACpD,IAAM,WAAW,GAAG,UAAU,CAAC,YAAY,CACvC,qCAAqC,CACxC,CAAC;QACF,IAAM,YAAY,GAAG,UAAU,CAAC,YAAY,CACxC,sCAAsC,CACzC,CAAC;QAEF,qCAAqC;QACrC,IAAI,SAAS,EAAE;YACX,IACI,CAAC,SAAS,CAAC,cAAc,CACrB,eAAe,EACf,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAC/B,EACH;gBACE,IAAI,aAAa,CACb,UAAyB,EACzB,SAA6B,EAC7B;oBACI,YAAY,EACR,YAAY,IAAI,YAAY,KAAK,MAAM;wBACnC,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,OAAO,CAAC,YAAY;oBAC9B,WAAW,EAAE,WAAW;wBACpB,CAAC,CAAC,WAAW;wBACb,CAAC,CAAC,OAAO,CAAC,WAAW;iBACJ,CAC5B,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uCAA+B,QAAQ,iFAA6E,CACvH,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,MAAM,CAAC,cAAc,GAAG,kBAAkB,CAAC;CAC9C;AAED,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/interface.d.ts b/node_modules/flowbite/lib/esm/components/clipboard/interface.d.ts new file mode 100644 index 0000000..b995ed3 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/interface.d.ts @@ -0,0 +1,12 @@ +import { CopyClipboardOptions } from './types'; +export declare interface CopyClipboardInterface { + _triggerEl: HTMLElement | null; + _targetEl: HTMLElement | HTMLInputElement | null; + _options: CopyClipboardOptions; + init(): void; + copy(): string; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/clipboard/interface.d.ts.map new file mode 100644 index 0000000..378c9f3 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/clipboard/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,CAAC,OAAO,WAAW,sBAAsB;IAC3C,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,WAAW,GAAG,gBAAgB,GAAG,IAAI,CAAC;IACjD,QAAQ,EAAE,oBAAoB,CAAC;IAE/B,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,MAAM,CAAC;IAEf,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/interface.js b/node_modules/flowbite/lib/esm/components/clipboard/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/interface.js.map b/node_modules/flowbite/lib/esm/components/clipboard/interface.js.map new file mode 100644 index 0000000..05b8440 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/clipboard/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/types.d.ts b/node_modules/flowbite/lib/esm/components/clipboard/types.d.ts new file mode 100644 index 0000000..ae90e80 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/types.d.ts @@ -0,0 +1,7 @@ +import { CopyClipboardInterface } from './interface'; +export declare type CopyClipboardOptions = { + htmlEntities: boolean; + contentType?: string; + onCopy?: (clipboard: CopyClipboardInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/types.d.ts.map b/node_modules/flowbite/lib/esm/components/clipboard/types.d.ts.map new file mode 100644 index 0000000..b2e739f --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/clipboard/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,CAAC,OAAO,MAAM,oBAAoB,GAAG;IACvC,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,sBAAsB,KAAK,IAAI,CAAC;CACxD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/types.js b/node_modules/flowbite/lib/esm/components/clipboard/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/clipboard/types.js.map b/node_modules/flowbite/lib/esm/components/clipboard/types.js.map new file mode 100644 index 0000000..6a3d545 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/clipboard/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/clipboard/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/index.d.ts b/node_modules/flowbite/lib/esm/components/collapse/index.d.ts new file mode 100644 index 0000000..e2d93be --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/index.d.ts @@ -0,0 +1,26 @@ +import type { CollapseOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { CollapseInterface } from './interface'; +declare class Collapse implements CollapseInterface { + _instanceId: string; + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: CollapseOptions; + _visible: boolean; + _initialized: boolean; + _clickHandler: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: CollapseOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + collapse(): void; + expand(): void; + toggle(): void; + updateOnCollapse(callback: () => void): void; + updateOnExpand(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initCollapses(): void; +export default Collapse; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/index.d.ts.map b/node_modules/flowbite/lib/esm/components/collapse/index.d.ts.map new file mode 100644 index 0000000..798b3e5 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAchD,cAAM,QAAS,YAAW,iBAAiB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,kCAAkC,CAAC;gBAG9C,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,eAAyB,EAClC,eAAe,GAAE,eAAwC;IAmB7D,IAAI;IAmBJ,OAAO;IAOP,cAAc;IAId,wBAAwB;IAKxB,QAAQ;IAWR,MAAM;IAWN,MAAM;IAUN,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIrC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;IAInC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,aAAa,SAuC5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/index.js b/node_modules/flowbite/lib/esm/components/collapse/index.js new file mode 100644 index 0000000..28cafa4 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/index.js @@ -0,0 +1,139 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import instances from '../../dom/instances'; +var Default = { + onCollapse: function () { }, + onExpand: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Collapse = /** @class */ (function () { + function Collapse(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances.addInstance('Collapse', this, this._instanceId, instanceOptions.override); + } + Collapse.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + if (this._triggerEl.hasAttribute('aria-expanded')) { + this._visible = + this._triggerEl.getAttribute('aria-expanded') === 'true'; + } + else { + // fix until v2 not to break previous single collapses which became dismiss + this._visible = !this._targetEl.classList.contains('hidden'); + } + this._clickHandler = function () { + _this.toggle(); + }; + this._triggerEl.addEventListener('click', this._clickHandler); + this._initialized = true; + } + }; + Collapse.prototype.destroy = function () { + if (this._triggerEl && this._initialized) { + this._triggerEl.removeEventListener('click', this._clickHandler); + this._initialized = false; + } + }; + Collapse.prototype.removeInstance = function () { + instances.removeInstance('Collapse', this._instanceId); + }; + Collapse.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Collapse.prototype.collapse = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onCollapse(this); + }; + Collapse.prototype.expand = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onExpand(this); + }; + Collapse.prototype.toggle = function () { + if (this._visible) { + this.collapse(); + } + else { + this.expand(); + } + // callback function + this._options.onToggle(this); + }; + Collapse.prototype.updateOnCollapse = function (callback) { + this._options.onCollapse = callback; + }; + Collapse.prototype.updateOnExpand = function (callback) { + this._options.onExpand = callback; + }; + Collapse.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Collapse; +}()); +export function initCollapses() { + document + .querySelectorAll('[data-collapse-toggle]') + .forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-collapse-toggle'); + var $targetEl = document.getElementById(targetId); + // check if the target element exists + if ($targetEl) { + if (!instances.instanceExists('Collapse', $targetEl.getAttribute('id'))) { + new Collapse($targetEl, $triggerEl); + } + else { + // if instance exists already for the same target element then create a new one with a different trigger element + new Collapse($targetEl, $triggerEl, {}, { + id: $targetEl.getAttribute('id') + + '_' + + instances._generateRandomId(), + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-collapse-toggle attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.Collapse = Collapse; + window.initCollapses = initCollapses; +} +export default Collapse; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/index.js.map b/node_modules/flowbite/lib/esm/components/collapse/index.js.map new file mode 100644 index 0000000..33cde25 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/collapse/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAoB;IAC7B,UAAU,EAAE,cAAO,CAAC;IACpB,QAAQ,EAAE,cAAO,CAAC;IAClB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IASI,kBACI,QAAmC,EACnC,SAAoC,EACpC,OAAkC,EAClC,eAAyD;QAHzD,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAkC;QAClC,gCAAA,EAAA,wCAAyD;QAEzD,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE;YACjC,CAAC,CAAC,eAAe,CAAC,EAAE;YACpB,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,YAA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AQ,CAAC;IACtC,CAAC;IACL,eAAC;AAAD,CAAC,AA9GD,IA8GC;AAED,MAAM,UAAU,aAAa;IACzB,QAAQ;SACH,gBAAgB,CAAC,wBAAwB,CAAC;SAC1C,OAAO,CAAC,UAAC,UAAU;QAChB,IAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;QACjE,IAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAEpD,qCAAqC;QACrC,IAAI,SAAS,EAAE;YACX,IACI,CAAC,SAAS,CAAC,cAAc,CACrB,UAAU,EACV,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAC/B,EACH;gBACE,IAAI,QAAQ,CACR,SAAwB,EACxB,UAAyB,CAC5B,CAAC;aACL;iBAAM;gBACH,gHAAgH;gBAChH,IAAI,QAAQ,CACR,SAAwB,EACxB,UAAyB,EACzB,EAAE,EACF;oBACI,EAAE,EACE,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC;wBAC5B,GAAG;wBACH,SAAS,CAAC,iBAAiB,EAAE;iBACpC,CACJ,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uCAA+B,QAAQ,wEAAoE,CAC9G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts b/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts new file mode 100644 index 0000000..91e2593 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts @@ -0,0 +1,15 @@ +import { CollapseOptions } from './types'; +export declare interface CollapseInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: CollapseOptions; + _visible: boolean; + init(): void; + collapse(): void; + expand(): void; + toggle(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts.map new file mode 100644 index 0000000..c324287 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAElB,IAAI,IAAI,IAAI,CAAC;IACb,QAAQ,IAAI,IAAI,CAAC;IACjB,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,IAAI,CAAC;IAEf,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/interface.js b/node_modules/flowbite/lib/esm/components/collapse/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/interface.js.map b/node_modules/flowbite/lib/esm/components/collapse/interface.js.map new file mode 100644 index 0000000..b82a2f4 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/collapse/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/types.d.ts b/node_modules/flowbite/lib/esm/components/collapse/types.d.ts new file mode 100644 index 0000000..3f3094e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/types.d.ts @@ -0,0 +1,7 @@ +import { CollapseInterface } from './interface'; +export declare type CollapseOptions = { + onCollapse?: (collapse: CollapseInterface) => void; + onExpand?: (collapse: CollapseInterface) => void; + onToggle?: (collapse: CollapseInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/types.d.ts.map b/node_modules/flowbite/lib/esm/components/collapse/types.d.ts.map new file mode 100644 index 0000000..ba058f8 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/collapse/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/types.js b/node_modules/flowbite/lib/esm/components/collapse/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/collapse/types.js.map b/node_modules/flowbite/lib/esm/components/collapse/types.js.map new file mode 100644 index 0000000..c1e2361 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/collapse/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/collapse/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/index.d.ts b/node_modules/flowbite/lib/esm/components/datepicker/index.d.ts new file mode 100644 index 0000000..df66173 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/index.d.ts @@ -0,0 +1,27 @@ +import type { DatepickerOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { DatepickerInterface } from './interface'; +import { Datepicker as FlowbiteDatepicker, DateRangePicker as FlowbiteDateRangePicker } from 'flowbite-datepicker'; +declare class Datepicker implements DatepickerInterface { + _instanceId: string; + _datepickerEl: HTMLElement; + _datepickerInstance: FlowbiteDatepicker | FlowbiteDateRangePicker | null; + _options: DatepickerOptions; + _initialized: boolean; + constructor(datepickerEl?: HTMLElement | null, options?: DatepickerOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getDatepickerInstance(): FlowbiteDatepicker | FlowbiteDateRangePicker; + getDate(): string | string[]; + setDate(date: any): void; + show(): void; + hide(): void; + _getDatepickerOptions(options: DatepickerOptions): any; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; +} +export declare function initDatepickers(): void; +export default Datepicker; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/index.d.ts.map b/node_modules/flowbite/lib/esm/components/datepicker/index.d.ts.map new file mode 100644 index 0000000..c519296 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/datepicker/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,EACH,UAAU,IAAI,kBAAkB,EAChC,eAAe,IAAI,uBAAuB,EAC7C,MAAM,qBAAqB,CAAC;AAuB7B,cAAM,UAAW,YAAW,mBAAmB;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,WAAW,CAAC;IAC3B,mBAAmB,EAAE,kBAAkB,GAAG,uBAAuB,GAAG,IAAI,CAAC;IACzE,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,YAAY,EAAE,OAAO,CAAC;gBAGlB,YAAY,GAAE,WAAW,GAAG,IAAW,EACvC,OAAO,GAAE,iBAA2B,EACpC,eAAe,GAAE,eAAwC;IAkB7D,IAAI;IAkBJ,OAAO;IAOP,cAAc;IAKd,wBAAwB;IAKxB,qBAAqB;IAIrB,OAAO;IAgBP,OAAO,CAAC,IAAI,EAAE,GAAG;IAgBjB,IAAI;IAKJ,IAAI;IAKJ,qBAAqB,CAAC,OAAO,EAAE,iBAAiB;IA2ChD,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGpC;AAED,wBAAgB,eAAe,SA0D9B;AAOD,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/index.js b/node_modules/flowbite/lib/esm/components/datepicker/index.js new file mode 100644 index 0000000..ca3152f --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/index.js @@ -0,0 +1,188 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import instances from '../../dom/instances'; +import { Datepicker as FlowbiteDatepicker, DateRangePicker as FlowbiteDateRangePicker, } from 'flowbite-datepicker'; +var Default = { + defaultDatepickerId: null, + autohide: false, + format: 'mm/dd/yyyy', + maxDate: null, + minDate: null, + orientation: 'bottom', + buttons: false, + autoSelectToday: 0, + title: null, + language: 'en', + rangePicker: false, + onShow: function () { }, + onHide: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Datepicker = /** @class */ (function () { + function Datepicker(datepickerEl, options, instanceOptions) { + if (datepickerEl === void 0) { datepickerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : datepickerEl.id; + this._datepickerEl = datepickerEl; + this._datepickerInstance = null; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances.addInstance('Datepicker', this, this._instanceId, instanceOptions.override); + } + Datepicker.prototype.init = function () { + if (this._datepickerEl && !this._initialized) { + if (this._options.rangePicker) { + this._datepickerInstance = new FlowbiteDateRangePicker(this._datepickerEl, this._getDatepickerOptions(this._options)); + } + else { + this._datepickerInstance = new FlowbiteDatepicker(this._datepickerEl, this._getDatepickerOptions(this._options)); + } + this._initialized = true; + } + }; + Datepicker.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + this._datepickerInstance.destroy(); + } + }; + Datepicker.prototype.removeInstance = function () { + this.destroy(); + instances.removeInstance('Datepicker', this._instanceId); + }; + Datepicker.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Datepicker.prototype.getDatepickerInstance = function () { + return this._datepickerInstance; + }; + Datepicker.prototype.getDate = function () { + if (this._options.rangePicker && + this._datepickerInstance instanceof FlowbiteDateRangePicker) { + return this._datepickerInstance.getDates(); + } + if (!this._options.rangePicker && + this._datepickerInstance instanceof FlowbiteDatepicker) { + return this._datepickerInstance.getDate(); + } + }; + Datepicker.prototype.setDate = function (date) { + if (this._options.rangePicker && + this._datepickerInstance instanceof FlowbiteDateRangePicker) { + return this._datepickerInstance.setDates(date); + } + if (!this._options.rangePicker && + this._datepickerInstance instanceof FlowbiteDatepicker) { + return this._datepickerInstance.setDate(date); + } + }; + Datepicker.prototype.show = function () { + this._datepickerInstance.show(); + this._options.onShow(this); + }; + Datepicker.prototype.hide = function () { + this._datepickerInstance.hide(); + this._options.onHide(this); + }; + Datepicker.prototype._getDatepickerOptions = function (options) { + var datepickerOptions = {}; + if (options.buttons) { + datepickerOptions.todayBtn = true; + datepickerOptions.clearBtn = true; + if (options.autoSelectToday) { + datepickerOptions.todayBtnMode = 1; + } + } + if (options.autohide) { + datepickerOptions.autohide = true; + } + if (options.format) { + datepickerOptions.format = options.format; + } + if (options.maxDate) { + datepickerOptions.maxDate = options.maxDate; + } + if (options.minDate) { + datepickerOptions.minDate = options.minDate; + } + if (options.orientation) { + datepickerOptions.orientation = options.orientation; + } + if (options.title) { + datepickerOptions.title = options.title; + } + if (options.language) { + datepickerOptions.language = options.language; + } + return datepickerOptions; + }; + Datepicker.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Datepicker.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + return Datepicker; +}()); +export function initDatepickers() { + document + .querySelectorAll('[datepicker], [inline-datepicker], [date-rangepicker]') + .forEach(function ($datepickerEl) { + if ($datepickerEl) { + var buttons = $datepickerEl.hasAttribute('datepicker-buttons'); + var autoselectToday = $datepickerEl.hasAttribute('datepicker-autoselect-today'); + var autohide = $datepickerEl.hasAttribute('datepicker-autohide'); + var format = $datepickerEl.getAttribute('datepicker-format'); + var maxDate = $datepickerEl.getAttribute('datepicker-max-date'); + var minDate = $datepickerEl.getAttribute('datepicker-min-date'); + var orientation_1 = $datepickerEl.getAttribute('datepicker-orientation'); + var title = $datepickerEl.getAttribute('datepicker-title'); + var language = $datepickerEl.getAttribute('datepicker-language'); + var rangePicker = $datepickerEl.hasAttribute('date-rangepicker'); + new Datepicker($datepickerEl, { + buttons: buttons ? buttons : Default.buttons, + autoSelectToday: autoselectToday + ? autoselectToday + : Default.autoSelectToday, + autohide: autohide ? autohide : Default.autohide, + format: format ? format : Default.format, + maxDate: maxDate ? maxDate : Default.maxDate, + minDate: minDate ? minDate : Default.minDate, + orientation: orientation_1 + ? orientation_1 + : Default.orientation, + title: title ? title : Default.title, + language: language ? language : Default.language, + rangePicker: rangePicker + ? rangePicker + : Default.rangePicker, + }); + } + else { + console.error("The datepicker element does not exist. Please check the datepicker attribute."); + } + }); +} +if (typeof window !== 'undefined') { + window.Datepicker = Datepicker; + window.initDatepickers = initDatepickers; +} +export default Datepicker; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/index.js.map b/node_modules/flowbite/lib/esm/components/datepicker/index.js.map new file mode 100644 index 0000000..520bd62 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/datepicker/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAKA,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EACH,UAAU,IAAI,kBAAkB,EAChC,eAAe,IAAI,uBAAuB,GAC7C,MAAM,qBAAqB,CAAC;AAE7B,IAAM,OAAO,GAAsB;IAC/B,mBAAmB,EAAE,IAAI;IACzB,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,KAAK;IACd,eAAe,EAAE,CAAC;IAClB,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,KAAK;IAClB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;CACnB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;I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AAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ;gBAChD,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM;gBACxC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO;gBAC5C,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO;gBAC5C,WAAW,EAAE,aAAW;oBACpB,CAAC,CAAC,aAAW;oBACb,CAAC,CAAC,OAAO,CAAC,WAAW;gBACzB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK;gBACpC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ;gBAChD,WAAW,EAAE,WAAW;oBACpB,CAAC,CAAC,WAAW;oBACb,CAAC,CAAC,OAAO,CAAC,WAAW;aACP,CACzB,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CACT,+EAA+E,CAClF,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;CAC5C;AAED,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/interface.d.ts b/node_modules/flowbite/lib/esm/components/datepicker/interface.d.ts new file mode 100644 index 0000000..63c1553 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/interface.d.ts @@ -0,0 +1,11 @@ +import { DatepickerOptions } from './types'; +export declare interface DatepickerInterface { + _datepickerEl: HTMLElement; + _datepickerInstance: any | null; + _options: DatepickerOptions; + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/datepicker/interface.d.ts.map new file mode 100644 index 0000000..c15a701 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/datepicker/interface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,CAAC,OAAO,WAAW,mBAAmB;IACxC,aAAa,EAAE,WAAW,CAAC;IAC3B,mBAAmB,EAAE,GAAG,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,iBAAiB,CAAC;IAE5B,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/interface.js b/node_modules/flowbite/lib/esm/components/datepicker/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/interface.js.map b/node_modules/flowbite/lib/esm/components/datepicker/interface.js.map new file mode 100644 index 0000000..f8355d8 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/datepicker/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/types.d.ts b/node_modules/flowbite/lib/esm/components/datepicker/types.d.ts new file mode 100644 index 0000000..b4f3a28 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/types.d.ts @@ -0,0 +1,20 @@ +import { DatepickerInterface } from './interface'; +export interface DatepickerOptions { + defaultDatepickerId?: string | null; + autohide?: boolean; + format?: string; + maxDate?: string | null; + minDate?: string | null; + orientation?: string; + buttons?: boolean; + autoSelectToday?: number; + title?: string | null; + language?: string; + locales?: { + [key: string]: any; + }; + rangePicker?: boolean | false; + onShow?: (Datepicker: DatepickerInterface) => void; + onHide?: (Datepicker: DatepickerInterface) => void; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/types.d.ts.map b/node_modules/flowbite/lib/esm/components/datepicker/types.d.ts.map new file mode 100644 index 0000000..6a14c05 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/datepicker/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAC9B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnD,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACtD"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/types.js b/node_modules/flowbite/lib/esm/components/datepicker/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/datepicker/types.js.map b/node_modules/flowbite/lib/esm/components/datepicker/types.js.map new file mode 100644 index 0000000..9c18faf --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/datepicker/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/datepicker/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/index.d.ts b/node_modules/flowbite/lib/esm/components/dial/index.d.ts new file mode 100644 index 0000000..8fbb33a --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/index.d.ts @@ -0,0 +1,34 @@ +import type { DialOptions, DialTriggerType } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { DialInterface } from './interface'; +declare class Dial implements DialInterface { + _instanceId: string; + _parentEl: HTMLElement; + _triggerEl: HTMLElement; + _targetEl: HTMLElement; + _options: DialOptions; + _visible: boolean; + _initialized: boolean; + _showEventHandler: EventListenerOrEventListenerObject; + _hideEventHandler: EventListenerOrEventListenerObject; + constructor(parentEl?: HTMLElement | null, triggerEl?: HTMLElement | null, targetEl?: HTMLElement | null, options?: DialOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + hide(): void; + show(): void; + toggle(): void; + isHidden(): boolean; + isVisible(): boolean; + _getTriggerEventTypes(triggerType: DialTriggerType): { + showEvents: string[]; + hideEvents: string[]; + }; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initDials(): void; +export default Dial; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/index.d.ts.map b/node_modules/flowbite/lib/esm/components/dial/index.d.ts.map new file mode 100644 index 0000000..eb134b2 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAe5C,cAAM,IAAK,YAAW,aAAa;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,kCAAkC,CAAC;IACtD,iBAAiB,EAAE,kCAAkC,CAAC;gBAGlD,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,WAAqB,EAC9B,eAAe,GAAE,eAAwC;IAoB7D,IAAI;IA4BJ,OAAO;IAmBP,cAAc;IAId,wBAAwB;IAKxB,IAAI;IAWJ,IAAI;IAWJ,MAAM;IAQN,QAAQ;IAIR,SAAS;IAIT,qBAAqB,CAAC,WAAW,EAAE,eAAe;;;;IAyBlD,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,SAAS,SAgCxB;AAOD,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/index.js b/node_modules/flowbite/lib/esm/components/dial/index.js new file mode 100644 index 0000000..d3103e0 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/index.js @@ -0,0 +1,180 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import instances from '../../dom/instances'; +var Default = { + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dial = /** @class */ (function () { + function Dial(parentEl, triggerEl, targetEl, options, instanceOptions) { + if (parentEl === void 0) { parentEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._parentEl = parentEl; + this._triggerEl = triggerEl; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances.addInstance('Dial', this, this._instanceId, instanceOptions.override); + } + Dial.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + this._showEventHandler = function () { + _this.show(); + }; + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showEventHandler); + _this._targetEl.addEventListener(ev, _this._showEventHandler); + }); + this._hideEventHandler = function () { + if (!_this._parentEl.matches(':hover')) { + _this.hide(); + } + }; + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.addEventListener(ev, _this._hideEventHandler); + }); + this._initialized = true; + } + }; + Dial.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + var triggerEventTypes = this._getTriggerEventTypes(this._options.triggerType); + triggerEventTypes.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showEventHandler); + _this._targetEl.removeEventListener(ev, _this._showEventHandler); + }); + triggerEventTypes.hideEvents.forEach(function (ev) { + _this._parentEl.removeEventListener(ev, _this._hideEventHandler); + }); + this._initialized = false; + } + }; + Dial.prototype.removeInstance = function () { + instances.removeInstance('Dial', this._instanceId); + }; + Dial.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dial.prototype.hide = function () { + this._targetEl.classList.add('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'false'); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Dial.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + if (this._triggerEl) { + this._triggerEl.setAttribute('aria-expanded', 'true'); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dial.prototype.toggle = function () { + if (this._visible) { + this.hide(); + } + else { + this.show(); + } + }; + Dial.prototype.isHidden = function () { + return !this._visible; + }; + Dial.prototype.isVisible = function () { + return this._visible; + }; + Dial.prototype._getTriggerEventTypes = function (triggerType) { + switch (triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Dial.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Dial.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Dial.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Dial; +}()); +export function initDials() { + document.querySelectorAll('[data-dial-init]').forEach(function ($parentEl) { + var $triggerEl = $parentEl.querySelector('[data-dial-toggle]'); + if ($triggerEl) { + var dialId = $triggerEl.getAttribute('data-dial-toggle'); + var $dialEl = document.getElementById(dialId); + if ($dialEl) { + var triggerType = $triggerEl.getAttribute('data-dial-trigger'); + new Dial($parentEl, $triggerEl, $dialEl, { + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("Dial with id ".concat(dialId, " does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?")); + } + } + else { + console.error("Dial with id ".concat($parentEl.id, " does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?")); + } + }); +} +if (typeof window !== 'undefined') { + window.Dial = Dial; + window.initDials = initDials; +} +export default Dial; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/index.js.map b/node_modules/flowbite/lib/esm/components/dial/index.js.map new file mode 100644 index 0000000..2531c28 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dial/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAgB;IACzB,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IAWI,cACI,QAAmC,EACnC,SAAoC,EACpC,QAAmC,EACnC,OAA8B,EAC9B,eAAyD;QAJzD,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAA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CAAC,CAAC,OAAO,CAAC,WAAW;iBACb,CACnB,CAAC;aACL;iBAAM;gBACH,OAAO,CAAC,KAAK,CACT,uBAAgB,MAAM,sGAAmG,CAC5H,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uBAAgB,SAAS,CAAC,EAAE,+FAA4F,CAC3H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;CAChC;AAED,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/interface.d.ts b/node_modules/flowbite/lib/esm/components/dial/interface.d.ts new file mode 100644 index 0000000..3055e21 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/interface.d.ts @@ -0,0 +1,19 @@ +import { DialOptions, DialTriggerEventTypes, DialTriggerType } from './types'; +export declare interface DialInterface { + _parentEl: HTMLElement; + _triggerEl: HTMLElement; + _targetEl: HTMLElement; + _options: DialOptions; + _visible: boolean; + init(): void; + isVisible(): boolean; + isHidden(): boolean; + hide(): void; + show(): void; + toggle(): void; + _getTriggerEventTypes(triggerType: DialTriggerType): DialTriggerEventTypes; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/dial/interface.d.ts.map new file mode 100644 index 0000000..af70962 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE9E,MAAM,CAAC,OAAO,WAAW,aAAa;IAClC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAElB,IAAI,IAAI,IAAI,CAAC;IACb,SAAS,IAAI,OAAO,CAAC;IACrB,QAAQ,IAAI,OAAO,CAAC;IACpB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IACf,qBAAqB,CAAC,WAAW,EAAE,eAAe,GAAG,qBAAqB,CAAC;IAE3E,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/interface.js b/node_modules/flowbite/lib/esm/components/dial/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/interface.js.map b/node_modules/flowbite/lib/esm/components/dial/interface.js.map new file mode 100644 index 0000000..83f6457 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dial/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/types.d.ts b/node_modules/flowbite/lib/esm/components/dial/types.d.ts new file mode 100644 index 0000000..2f4877c --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/types.d.ts @@ -0,0 +1,13 @@ +import { DialInterface } from './interface'; +export declare type DialTriggerType = 'click' | 'hover' | 'none'; +export declare type DialTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type DialOptions = { + triggerType?: DialTriggerType; + onShow?: (dial: DialInterface) => void; + onHide?: (dial: DialInterface) => void; + onToggle?: (dial: DialInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/types.d.ts.map b/node_modules/flowbite/lib/esm/components/dial/types.d.ts.map new file mode 100644 index 0000000..da04793 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dial/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG;IACxC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG;IAC9B,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC5C,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/types.js b/node_modules/flowbite/lib/esm/components/dial/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dial/types.js.map b/node_modules/flowbite/lib/esm/components/dial/types.js.map new file mode 100644 index 0000000..0613f16 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dial/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dial/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts b/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts new file mode 100644 index 0000000..1a8c97b --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts @@ -0,0 +1,21 @@ +import type { DismissOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { DismissInterface } from './interface'; +declare class Dismiss implements DismissInterface { + _instanceId: string; + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: DismissOptions; + _initialized: boolean; + _clickHandler: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: DismissOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + hide(): void; + updateOnHide(callback: () => void): void; +} +export declare function initDismisses(): void; +export default Dismiss; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts.map b/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts.map new file mode 100644 index 0000000..562d083 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAe/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,kCAAkC,CAAC;gBAG9C,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB,EACjC,eAAe,GAAE,eAAwC;IAkB7D,IAAI;IAUJ,OAAO;IAOP,cAAc;IAId,wBAAwB;IAKxB,IAAI;IAeJ,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGpC;AAED,wBAAgB,aAAa,SAa5B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/index.js b/node_modules/flowbite/lib/esm/components/dismiss/index.js new file mode 100644 index 0000000..f3a7132 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/index.js @@ -0,0 +1,93 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import instances from '../../dom/instances'; +var Default = { + transition: 'transition-opacity', + duration: 300, + timing: 'ease-out', + onHide: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dismiss = /** @class */ (function () { + function Dismiss(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances.addInstance('Dismiss', this, this._instanceId, instanceOptions.override); + } + Dismiss.prototype.init = function () { + var _this = this; + if (this._triggerEl && this._targetEl && !this._initialized) { + this._clickHandler = function () { + _this.hide(); + }; + this._triggerEl.addEventListener('click', this._clickHandler); + this._initialized = true; + } + }; + Dismiss.prototype.destroy = function () { + if (this._triggerEl && this._initialized) { + this._triggerEl.removeEventListener('click', this._clickHandler); + this._initialized = false; + } + }; + Dismiss.prototype.removeInstance = function () { + instances.removeInstance('Dismiss', this._instanceId); + }; + Dismiss.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dismiss.prototype.hide = function () { + var _this = this; + this._targetEl.classList.add(this._options.transition, "duration-".concat(this._options.duration), this._options.timing, 'opacity-0'); + setTimeout(function () { + _this._targetEl.classList.add('hidden'); + }, this._options.duration); + // callback function + this._options.onHide(this, this._targetEl); + }; + Dismiss.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + return Dismiss; +}()); +export function initDismisses() { + document.querySelectorAll('[data-dismiss-target]').forEach(function ($triggerEl) { + var targetId = $triggerEl.getAttribute('data-dismiss-target'); + var $dismissEl = document.querySelector(targetId); + if ($dismissEl) { + new Dismiss($dismissEl, $triggerEl); + } + else { + console.error("The dismiss element with id \"".concat(targetId, "\" does not exist. Please check the data-dismiss-target attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.Dismiss = Dismiss; + window.initDismisses = initDismisses; +} +export default Dismiss; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/index.js.map b/node_modules/flowbite/lib/esm/components/dismiss/index.js.map new file mode 100644 index 0000000..75cceeb --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dismiss/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAmB;IAC5B,UAAU,EAAE,oBAAoB;IAChC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a,CAAC,QAAQ,CAAC,CAAC;QAEpD,IAAI,UAAU,EAAE;YACZ,IAAI,OAAO,CAAC,UAAyB,EAAE,UAAyB,CAAC,CAAC;SACrE;aAAM;YACH,OAAO,CAAC,KAAK,CACT,wCAAgC,QAAQ,uEAAmE,CAC9G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts b/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts new file mode 100644 index 0000000..ebe7565 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts @@ -0,0 +1,12 @@ +import { DismissOptions } from './types'; +export declare interface DismissInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: DismissOptions; + init(): void; + hide(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts.map new file mode 100644 index 0000000..4d156cb --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IAEzB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/interface.js b/node_modules/flowbite/lib/esm/components/dismiss/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/interface.js.map b/node_modules/flowbite/lib/esm/components/dismiss/interface.js.map new file mode 100644 index 0000000..6b664d5 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dismiss/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts b/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts new file mode 100644 index 0000000..c659c00 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts @@ -0,0 +1,8 @@ +import { DismissInterface } from './interface'; +export declare type DismissOptions = { + transition?: string; + duration?: number; + timing?: string; + onHide?: (dismiss: DismissInterface, targetEl: HTMLElement) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts.map b/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts.map new file mode 100644 index 0000000..2ccb43e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;CACvE,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/types.js b/node_modules/flowbite/lib/esm/components/dismiss/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dismiss/types.js.map b/node_modules/flowbite/lib/esm/components/dismiss/types.js.map new file mode 100644 index 0000000..8ceeeb5 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dismiss/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dismiss/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/index.d.ts b/node_modules/flowbite/lib/esm/components/drawer/index.d.ts new file mode 100644 index 0000000..aadf18d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/index.d.ts @@ -0,0 +1,35 @@ +import type { DrawerOptions, PlacementClasses } from './types'; +import type { InstanceOptions, EventListenerInstance } from '../../dom/types'; +import { DrawerInterface } from './interface'; +declare class Drawer implements DrawerInterface { + _instanceId: string; + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DrawerOptions; + _visible: boolean; + _eventListenerInstances: EventListenerInstance[]; + _handleEscapeKey: EventListenerOrEventListenerObject; + _initialized: boolean; + constructor(targetEl?: HTMLElement | null, options?: DrawerOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + hide(): void; + show(): void; + toggle(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _getPlacementClasses(placement: string): PlacementClasses; + isHidden(): boolean; + isVisible(): boolean; + addEventListenerInstance(element: HTMLElement, type: string, handler: EventListenerOrEventListenerObject): void; + removeAllEventListenerInstances(): void; + getAllEventListenerInstances(): EventListenerInstance[]; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initDrawers(): void; +export default Drawer; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/index.d.ts.map b/node_modules/flowbite/lib/esm/components/drawer/index.d.ts.map new file mode 100644 index 0000000..cdad17e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAoB9C,cAAM,MAAO,YAAW,eAAe;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,EAAE,qBAAqB,EAAE,CAAM;IACtD,gBAAgB,EAAE,kCAAkC,CAAC;IACrD,YAAY,EAAE,OAAO,CAAC;gBAGlB,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,aAAuB,EAChC,eAAe,GAAE,eAAwC;IAkB7D,IAAI;IA4BJ,OAAO;IAYP,cAAc;IAId,wBAAwB;IAKxB,IAAI;IA+CJ,IAAI;IA8CJ,MAAM;IAQN,eAAe;IAcf,kBAAkB;IASlB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAyCzD,QAAQ;IAIR,SAAS;IAIT,wBAAwB,CACpB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kCAAkC;IAS/C,+BAA+B;IAU/B,4BAA4B;IAI5B,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,WAAW,SA0I1B;AAOD,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/index.js b/node_modules/flowbite/lib/esm/components/drawer/index.js new file mode 100644 index 0000000..8cd0979 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/index.js @@ -0,0 +1,354 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import instances from '../../dom/instances'; +var Default = { + placement: 'left', + bodyScrolling: false, + backdrop: true, + edge: false, + edgeOffset: 'bottom-[60px]', + backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Drawer = /** @class */ (function () { + function Drawer(targetEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._eventListenerInstances = []; + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._visible = false; + this._initialized = false; + this.init(); + instances.addInstance('Drawer', this, this._instanceId, instanceOptions.override); + } + Drawer.prototype.init = function () { + var _this = this; + // set initial accessibility attributes + if (this._targetEl && !this._initialized) { + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.classList.add('transition-transform'); + // set base placement classes + this._getPlacementClasses(this._options.placement).base.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._handleEscapeKey = function (event) { + if (event.key === 'Escape') { + // if 'Escape' key is pressed + if (_this.isVisible()) { + // if the Drawer is visible + _this.hide(); // hide the Drawer + } + } + }; + // add keyboard event listener to document + document.addEventListener('keydown', this._handleEscapeKey); + this._initialized = true; + } + }; + Drawer.prototype.destroy = function () { + if (this._initialized) { + this.removeAllEventListenerInstances(); + this._destroyBackdropEl(); + // Remove the keyboard event listener + document.removeEventListener('keydown', this._handleEscapeKey); + this._initialized = false; + } + }; + Drawer.prototype.removeInstance = function () { + instances.removeInstance('Drawer', this._instanceId); + }; + Drawer.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Drawer.prototype.hide = function () { + var _this = this; + // based on the edge option show placement classes + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.remove(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.add(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + // enable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.remove('overflow-hidden'); + } + // destroy backdrop + if (this._options.backdrop) { + this._destroyBackdropEl(); + } + this._visible = false; + // callback function + this._options.onHide(this); + }; + Drawer.prototype.show = function () { + var _this = this; + if (this._options.edge) { + this._getPlacementClasses(this._options.placement + '-edge').active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement + '-edge').inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + else { + this._getPlacementClasses(this._options.placement).active.map(function (c) { + _this._targetEl.classList.add(c); + }); + this._getPlacementClasses(this._options.placement).inactive.map(function (c) { + _this._targetEl.classList.remove(c); + }); + } + // set accessibility attributes + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + // disable body scroll + if (!this._options.bodyScrolling) { + document.body.classList.add('overflow-hidden'); + } + // show backdrop + if (this._options.backdrop) { + this._createBackdrop(); + } + this._visible = true; + // callback function + this._options.onShow(this); + }; + Drawer.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Drawer.prototype._createBackdrop = function () { + var _a; + var _this = this; + if (!this._visible) { + var backdropEl = document.createElement('div'); + backdropEl.setAttribute('drawer-backdrop', ''); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + backdropEl.addEventListener('click', function () { + _this.hide(); + }); + } + }; + Drawer.prototype._destroyBackdropEl = function () { + if (this._visible && + document.querySelector('[drawer-backdrop]') !== null) { + document.querySelector('[drawer-backdrop]').remove(); + } + }; + Drawer.prototype._getPlacementClasses = function (placement) { + switch (placement) { + case 'top': + return { + base: ['top-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['-translate-y-full'], + }; + case 'right': + return { + base: ['right-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-x-full'], + }; + case 'bottom': + return { + base: ['bottom-0', 'left-0', 'right-0'], + active: ['transform-none'], + inactive: ['translate-y-full'], + }; + case 'left': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + case 'bottom-edge': + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['translate-y-full', this._options.edgeOffset], + }; + default: + return { + base: ['left-0', 'top-0'], + active: ['transform-none'], + inactive: ['-translate-x-full'], + }; + } + }; + Drawer.prototype.isHidden = function () { + return !this._visible; + }; + Drawer.prototype.isVisible = function () { + return this._visible; + }; + Drawer.prototype.addEventListenerInstance = function (element, type, handler) { + this._eventListenerInstances.push({ + element: element, + type: type, + handler: handler, + }); + }; + Drawer.prototype.removeAllEventListenerInstances = function () { + this._eventListenerInstances.map(function (eventListenerInstance) { + eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler); + }); + this._eventListenerInstances = []; + }; + Drawer.prototype.getAllEventListenerInstances = function () { + return this._eventListenerInstances; + }; + Drawer.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Drawer.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Drawer.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Drawer; +}()); +export function initDrawers() { + document.querySelectorAll('[data-drawer-target]').forEach(function ($triggerEl) { + // mandatory + var drawerId = $triggerEl.getAttribute('data-drawer-target'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var placement = $triggerEl.getAttribute('data-drawer-placement'); + var bodyScrolling = $triggerEl.getAttribute('data-drawer-body-scrolling'); + var backdrop = $triggerEl.getAttribute('data-drawer-backdrop'); + var edge = $triggerEl.getAttribute('data-drawer-edge'); + var edgeOffset = $triggerEl.getAttribute('data-drawer-edge-offset'); + new Drawer($drawerEl, { + placement: placement ? placement : Default.placement, + bodyScrolling: bodyScrolling + ? bodyScrolling === 'true' + ? true + : false + : Default.bodyScrolling, + backdrop: backdrop + ? backdrop === 'true' + ? true + : false + : Default.backdrop, + edge: edge ? (edge === 'true' ? true : false) : Default.edge, + edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset, + }); + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document.querySelectorAll('[data-drawer-toggle]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-toggle'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_1 = instances.getInstance('Drawer', drawerId); + if (drawer_1) { + var toggleDrawer = function () { + drawer_1.toggle(); + }; + $triggerEl.addEventListener('click', toggleDrawer); + drawer_1.addEventListenerInstance($triggerEl, 'click', toggleDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); + document + .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]') + .forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-dismiss') + ? $triggerEl.getAttribute('data-drawer-dismiss') + : $triggerEl.getAttribute('data-drawer-hide'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_2 = instances.getInstance('Drawer', drawerId); + if (drawer_2) { + var hideDrawer = function () { + drawer_2.hide(); + }; + $triggerEl.addEventListener('click', hideDrawer); + drawer_2.addEventListenerInstance($triggerEl, 'click', hideDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id")); + } + }); + document.querySelectorAll('[data-drawer-show]').forEach(function ($triggerEl) { + var drawerId = $triggerEl.getAttribute('data-drawer-show'); + var $drawerEl = document.getElementById(drawerId); + if ($drawerEl) { + var drawer_3 = instances.getInstance('Drawer', drawerId); + if (drawer_3) { + var showDrawer = function () { + drawer_3.show(); + }; + $triggerEl.addEventListener('click', showDrawer); + drawer_3.addEventListenerInstance($triggerEl, 'click', showDrawer); + } + else { + console.error("Drawer with id ".concat(drawerId, " has not been initialized. Please initialize it using the data-drawer-target attribute.")); + } + } + else { + console.error("Drawer with id ".concat(drawerId, " not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?")); + } + }); +} +if (typeof window !== 'undefined') { + window.Drawer = Drawer; + window.initDrawers = initDrawers; +} +export default Drawer; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/index.js.map b/node_modules/flowbite/lib/esm/components/drawer/index.js.map new file mode 100644 index 0000000..be85391 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/drawer/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAkB;IAC3B,SAAS,EAAE,MAAM;IACjB,aAAa,EAAE,KAAK;IACpB,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,KAAK;IACX,UAAU,EAAE,eAAe;IAC3B,eAAe,EAAE,uDAAuD;IACxE,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IAUI,gBACI,QAAmC,EACnC,OAAgC,EAChC,eAAyD;QAFzD,yBAAA,EAAA,eAAmC;QACnC,wBAAA,EAAA,iBAAgC;QAChC,gCAAA,EAAA,wCAAyD;QAP7D,4BAAuB,GAA4B,EAAE,CAAC;QASlD,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE;YACjC,CAAC,CAAC,eAAe,CAAC,EAAE;YACpB,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,QAAQ,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AI,SAAS,EAAE;YACX,IAAM,QAAM,GAAoB,SAAS,CAAC,WAAW,CACjD,QAAQ,EACR,QAAQ,CACX,CAAC;YAEF,IAAI,QAAM,EAAE;gBACR,IAAM,UAAU,GAAG;oBACf,QAAM,CAAC,IAAI,EAAE,CAAC;gBAClB,CAAC,CAAC;gBACF,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;gBACjD,QAAM,CAAC,wBAAwB,CAC3B,UAAyB,EACzB,OAAO,EACP,UAAU,CACb,CAAC;aACL;iBAAM;gBACH,OAAO,CAAC,KAAK,CACT,yBAAkB,QAAQ,4FAAyF,CACtH,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,yBAAkB,QAAQ,oGAAiG,CAC9H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;CACpC;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts b/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts new file mode 100644 index 0000000..bec0496 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts @@ -0,0 +1,23 @@ +import { DrawerOptions, PlacementClasses } from './types'; +export declare interface DrawerInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DrawerOptions; + _visible: boolean; + init(): void; + isVisible(): boolean; + isHidden(): boolean; + hide(): void; + show(): void; + toggle(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _getPlacementClasses(placement: string): PlacementClasses; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + addEventListenerInstance(element: HTMLElement, type: string, handler: EventListenerOrEventListenerObject): void; + removeAllEventListenerInstances(): void; + getAllEventListenerInstances(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts.map new file mode 100644 index 0000000..f8da5d6 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,CAAC,OAAO,WAAW,eAAe;IAEpC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAGlB,IAAI,IAAI,IAAI,CAAC;IACb,SAAS,IAAI,OAAO,CAAC;IACrB,QAAQ,IAAI,OAAO,CAAC;IACpB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IACf,eAAe,IAAI,IAAI,CAAC;IACxB,kBAAkB,IAAI,IAAI,CAAC;IAC3B,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAAC;IAE1D,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;IAEjC,wBAAwB,CACpB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kCAAkC,GAC5C,IAAI,CAAC;IACR,+BAA+B,IAAI,IAAI,CAAC;IACxC,4BAA4B,IAAI,IAAI,CAAC;CACxC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/interface.js b/node_modules/flowbite/lib/esm/components/drawer/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/interface.js.map b/node_modules/flowbite/lib/esm/components/drawer/interface.js.map new file mode 100644 index 0000000..91cef96 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/drawer/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/types.d.ts b/node_modules/flowbite/lib/esm/components/drawer/types.d.ts new file mode 100644 index 0000000..a665b0b --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/types.d.ts @@ -0,0 +1,18 @@ +import { DrawerInterface } from './interface'; +export declare type DrawerOptions = { + placement?: string; + bodyScrolling?: boolean; + backdrop?: boolean; + edge?: boolean; + edgeOffset?: string; + backdropClasses?: string; + onShow?: (drawer: DrawerInterface) => void; + onHide?: (drawer: DrawerInterface) => void; + onToggle?: (drawer: DrawerInterface) => void; +}; +export declare type PlacementClasses = { + base: string[]; + active: string[]; + inactive: string[]; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/types.d.ts.map b/node_modules/flowbite/lib/esm/components/drawer/types.d.ts.map new file mode 100644 index 0000000..2e45303 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,gBAAgB,GAAG;IACnC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/types.js b/node_modules/flowbite/lib/esm/components/drawer/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/drawer/types.js.map b/node_modules/flowbite/lib/esm/components/drawer/types.js.map new file mode 100644 index 0000000..b9d5343 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/drawer/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/drawer/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts b/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts new file mode 100644 index 0000000..2513d3e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts @@ -0,0 +1,42 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { DropdownOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { DropdownInterface } from './interface'; +declare class Dropdown implements DropdownInterface { + _instanceId: string; + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DropdownOptions; + _visible: boolean; + _popperInstance: PopperInstance; + _initialized: boolean; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _hoverShowTriggerElHandler: EventListenerOrEventListenerObject; + _hoverShowTargetElHandler: EventListenerOrEventListenerObject; + _hoverHideHandler: EventListenerOrEventListenerObject; + _clickHandler: EventListenerOrEventListenerObject; + constructor(targetElement?: HTMLElement | null, triggerElement?: HTMLElement | null, options?: DropdownOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + toggle(): void; + isVisible(): boolean; + show(): void; + hide(): void; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initDropdowns(): void; +export default Dropdown; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts.map b/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts.map new file mode 100644 index 0000000..9e7f536 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,QAAQ,IAAI,cAAc,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAoBhD,cAAM,QAAS,YAAW,iBAAiB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,cAAc,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,yBAAyB,EAAE,kCAAkC,CAAC;IAC9D,iBAAiB,EAAE,kCAAkC,CAAC;IACtD,aAAa,EAAE,kCAAkC,CAAC;gBAG9C,aAAa,GAAE,WAAW,GAAG,IAAW,EACxC,cAAc,GAAE,WAAW,GAAG,IAAW,EACzC,OAAO,GAAE,eAAyB,EAClC,eAAe,GAAE,eAAwC;IAoB7D,IAAI;IAQJ,OAAO;IAiCP,cAAc;IAId,wBAAwB;IAKxB,oBAAoB;IAuDpB,qBAAqB;IAiBrB,0BAA0B;IAW1B,2BAA2B;IAQ3B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IA+BpD,iBAAiB;;;;IAyBjB,MAAM;IASN,SAAS;IAIT,IAAI;IAwBJ,IAAI;IAsBJ,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,aAAa,SAmD5B;AAOD,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/index.js b/node_modules/flowbite/lib/esm/components/dropdown/index.js new file mode 100644 index 0000000..703ac19 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/index.js @@ -0,0 +1,302 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +/* eslint-disable @typescript-eslint/no-empty-function */ +import { createPopper } from '@popperjs/core'; +import instances from '../../dom/instances'; +var Default = { + placement: 'bottom', + triggerType: 'click', + offsetSkidding: 0, + offsetDistance: 10, + delay: 300, + ignoreClickOutsideClass: false, + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Dropdown = /** @class */ (function () { + function Dropdown(targetElement, triggerElement, options, instanceOptions) { + if (targetElement === void 0) { targetElement = null; } + if (triggerElement === void 0) { triggerElement = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetElement.id; + this._targetEl = targetElement; + this._triggerEl = triggerElement; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances.addInstance('Dropdown', this, this._instanceId, instanceOptions.override); + } + Dropdown.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._popperInstance = this._createPopperInstance(); + this._setupEventListeners(); + this._initialized = true; + } + }; + Dropdown.prototype.destroy = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + // Remove click event listeners for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._clickHandler); + }); + } + // Remove hover event listeners for trigger and target elements + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hoverShowTriggerElHandler); + _this._targetEl.removeEventListener(ev, _this._hoverShowTargetElHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hoverHideHandler); + _this._targetEl.removeEventListener(ev, _this._hoverHideHandler); + }); + } + this._popperInstance.destroy(); + this._initialized = false; + }; + Dropdown.prototype.removeInstance = function () { + instances.removeInstance('Dropdown', this._instanceId); + }; + Dropdown.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Dropdown.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._clickHandler = function () { + _this.toggle(); + }; + // click event handling for trigger element + if (this._options.triggerType === 'click') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._clickHandler); + }); + } + this._hoverShowTriggerElHandler = function (ev) { + if (ev.type === 'click') { + _this.toggle(); + } + else { + setTimeout(function () { + _this.show(); + }, _this._options.delay); + } + }; + this._hoverShowTargetElHandler = function () { + _this.show(); + }; + this._hoverHideHandler = function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, _this._options.delay); + }; + // hover event handling for trigger element + if (this._options.triggerType === 'hover') { + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hoverShowTriggerElHandler); + _this._targetEl.addEventListener(ev, _this._hoverShowTargetElHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hoverHideHandler); + _this._targetEl.addEventListener(ev, _this._hoverHideHandler); + }); + } + }; + Dropdown.prototype._createPopperInstance = function () { + return createPopper(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [ + this._options.offsetSkidding, + this._options.offsetDistance, + ], + }, + }, + ], + }); + }; + Dropdown.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Dropdown.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + // Ignore clicks on the trigger element (ie. a datepicker input) + var ignoreClickOutsideClass = this._options.ignoreClickOutsideClass; + var isIgnored = false; + if (ignoreClickOutsideClass) { + var ignoredClickOutsideEls = document.querySelectorAll(".".concat(ignoreClickOutsideClass)); + ignoredClickOutsideEls.forEach(function (el) { + if (el.contains(clickedEl)) { + isIgnored = true; + return; + } + }); + } + // Ignore clicks on the target element (ie. dropdown itself) + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + !isIgnored && + this.isVisible()) { + this.hide(); + } + }; + Dropdown.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'click'], + hideEvents: ['mouseleave'], + }; + case 'click': + return { + showEvents: ['click'], + hideEvents: [], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['click'], + hideEvents: [], + }; + } + }; + Dropdown.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Dropdown.prototype.isVisible = function () { + return this._visible; + }; + Dropdown.prototype.show = function () { + this._targetEl.classList.remove('hidden'); + this._targetEl.classList.add('block'); + this._targetEl.removeAttribute('aria-hidden'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + this._setupClickOutsideListener(); + // Update its position + this._popperInstance.update(); + this._visible = true; + // callback function + this._options.onShow(this); + }; + Dropdown.prototype.hide = function () { + this._targetEl.classList.remove('block'); + this._targetEl.classList.add('hidden'); + this._targetEl.setAttribute('aria-hidden', 'true'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + this._visible = false; + this._removeClickOutsideListener(); + // callback function + this._options.onHide(this); + }; + Dropdown.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Dropdown.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Dropdown.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Dropdown; +}()); +export function initDropdowns() { + document + .querySelectorAll('[data-dropdown-toggle]') + .forEach(function ($triggerEl) { + var dropdownId = $triggerEl.getAttribute('data-dropdown-toggle'); + var $dropdownEl = document.getElementById(dropdownId); + if ($dropdownEl) { + var placement = $triggerEl.getAttribute('data-dropdown-placement'); + var offsetSkidding = $triggerEl.getAttribute('data-dropdown-offset-skidding'); + var offsetDistance = $triggerEl.getAttribute('data-dropdown-offset-distance'); + var triggerType = $triggerEl.getAttribute('data-dropdown-trigger'); + var delay = $triggerEl.getAttribute('data-dropdown-delay'); + var ignoreClickOutsideClass = $triggerEl.getAttribute('data-dropdown-ignore-click-outside-class'); + new Dropdown($dropdownEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + offsetSkidding: offsetSkidding + ? parseInt(offsetSkidding) + : Default.offsetSkidding, + offsetDistance: offsetDistance + ? parseInt(offsetDistance) + : Default.offsetDistance, + delay: delay ? parseInt(delay) : Default.delay, + ignoreClickOutsideClass: ignoreClickOutsideClass + ? ignoreClickOutsideClass + : Default.ignoreClickOutsideClass, + }); + } + else { + console.error("The dropdown element with id \"".concat(dropdownId, "\" does not exist. Please check the data-dropdown-toggle attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.Dropdown = Dropdown; + window.initDropdowns = initDropdowns; +} +export default Dropdown; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/index.js.map b/node_modules/flowbite/lib/esm/components/dropdown/index.js.map new file mode 100644 index 0000000..0d823c0 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/dropdown/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAoB;IAC7B,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,OAAO;IACpB,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,EAAE;IAClB,KAAK,EAAE,GAAG;IACV,uBAAuB,EAAE,KAAK;IAC9B,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IAcI,kBACI,aAAwC,EACxC,cAAyC,EACzC,OAAkC,EAClC,eAAyD;QAHzD,8BAAA,EAAA,oBAAwC;QACxC,+BAAA,EAAA,qBAAyC;QACzC,wBAAA,EAAA,iBAAkC;QAClC,gCAAA,EAAA,wCAAyD;QAEzD,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE;YACjC,CAAC,CAAC,eAAe,CAAC,EAAE;YACpB,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC;QACjC,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,YAAY,GAAG,KAAK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B,CAAC,CAAC,OAAO,CAAC,uBAAuB;aACrB,CACvB,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CACT,yCAAiC,UAAU,wEAAoE,CAClH,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACX,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;CACxC;AAED,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts b/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts new file mode 100644 index 0000000..04c8b50 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts @@ -0,0 +1,26 @@ +import { DropdownOptions, DropdownTriggerType, DropdownTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface DropdownInterface { + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: DropdownOptions; + _visible: boolean; + _popperInstance: PopperInstance; + _initialized: boolean; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + init(): void; + _createPopperInstance(): PopperInstance; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: DropdownTriggerType): DropdownTriggerEventTypes; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts.map new file mode 100644 index 0000000..4f98c4c --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACtC,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,cAAc,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,0BAA0B,EAAE,kCAAkC,CAAC;IAE/D,IAAI,IAAI,IAAI,CAAC;IACb,qBAAqB,IAAI,cAAc,CAAC;IACxC,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,mBAAmB,GACjC,yBAAyB,CAAC;IAC7B,SAAS,IAAI,OAAO,CAAC;IACrB,MAAM,IAAI,IAAI,CAAC;IACf,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IAEb,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/interface.js b/node_modules/flowbite/lib/esm/components/dropdown/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/interface.js.map b/node_modules/flowbite/lib/esm/components/dropdown/interface.js.map new file mode 100644 index 0000000..d4c8eb1 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/dropdown/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts b/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts new file mode 100644 index 0000000..47c79fb --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts @@ -0,0 +1,19 @@ +import { DropdownInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type DropdownTriggerType = 'click' | 'hover' | 'none'; +export declare type DropdownTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type DropdownOptions = { + placement?: Placement; + triggerType?: DropdownTriggerType; + offsetSkidding?: number; + offsetDistance?: number; + ignoreClickOutsideClass?: string | boolean; + delay?: number; + onShow?: (tooltip: DropdownInterface) => void; + onHide?: (tooltip: DropdownInterface) => void; + onToggle?: (tooltip: DropdownInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts.map b/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts.map new file mode 100644 index 0000000..f74ca43 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,mBAAmB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAErE,MAAM,CAAC,OAAO,MAAM,yBAAyB,GAAG;IAC5C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACnD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/types.js b/node_modules/flowbite/lib/esm/components/dropdown/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/dropdown/types.js.map b/node_modules/flowbite/lib/esm/components/dropdown/types.js.map new file mode 100644 index 0000000..de3d7a3 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/dropdown/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/dropdown/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/index.d.ts b/node_modules/flowbite/lib/esm/components/index.d.ts new file mode 100644 index 0000000..3d22df6 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/index.d.ts @@ -0,0 +1,2 @@ +export declare function initFlowbite(): void; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/index.d.ts.map b/node_modules/flowbite/lib/esm/components/index.d.ts.map new file mode 100644 index 0000000..b060e1e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAeA,wBAAgB,YAAY,SAe3B"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/index.js b/node_modules/flowbite/lib/esm/components/index.js new file mode 100644 index 0000000..31c6e0a --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/index.js @@ -0,0 +1,34 @@ +import { initAccordions } from './accordion'; +import { initCarousels } from './carousel'; +import { initCopyClipboards } from './clipboard'; +import { initCollapses } from './collapse'; +import { initDials } from './dial'; +import { initDismisses } from './dismiss'; +import { initDrawers } from './drawer'; +import { initDropdowns } from './dropdown'; +import { initInputCounters } from './input-counter'; +import { initModals } from './modal'; +import { initPopovers } from './popover'; +import { initTabs } from './tabs'; +import { initTooltips } from './tooltip'; +import { initDatepickers } from './datepicker'; +export function initFlowbite() { + initAccordions(); + initCollapses(); + initCarousels(); + initDismisses(); + initDropdowns(); + initModals(); + initDrawers(); + initTabs(); + initTooltips(); + initPopovers(); + initDials(); + initInputCounters(); + initCopyClipboards(); + initDatepickers(); +} +if (typeof window !== 'undefined') { + window.initFlowbite = initFlowbite; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/index.js.map b/node_modules/flowbite/lib/esm/components/index.js.map new file mode 100644 index 0000000..70294d3 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,UAAU,YAAY;IACxB,cAAc,EAAE,CAAC;IACjB,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC;IACX,YAAY,EAAE,CAAC;IACf,YAAY,EAAE,CAAC;IACf,SAAS,EAAE,CAAC;IACZ,iBAAiB,EAAE,CAAC;IACpB,kBAAkB,EAAE,CAAC;IACrB,eAAe,EAAE,CAAC;AACtB,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;CACtC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/index.d.ts b/node_modules/flowbite/lib/esm/components/input-counter/index.d.ts new file mode 100644 index 0000000..e49e8c7 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/index.d.ts @@ -0,0 +1,27 @@ +import type { InputCounterOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { InputCounterInterface } from './interface'; +declare class InputCounter implements InputCounterInterface { + _instanceId: string; + _targetEl: HTMLInputElement | null; + _incrementEl: HTMLElement | null; + _decrementEl: HTMLElement | null; + _options: InputCounterOptions; + _initialized: boolean; + _incrementClickHandler: EventListenerOrEventListenerObject; + _decrementClickHandler: EventListenerOrEventListenerObject; + _inputHandler: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLInputElement | null, incrementEl?: HTMLElement | null, decrementEl?: HTMLElement | null, options?: InputCounterOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getCurrentValue(): number; + increment(): void; + decrement(): void; + updateOnIncrement(callback: () => void): void; + updateOnDecrement(callback: () => void): void; +} +export declare function initInputCounters(): void; +export default InputCounter; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/index.d.ts.map b/node_modules/flowbite/lib/esm/components/input-counter/index.d.ts.map new file mode 100644 index 0000000..0a3b091 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/input-counter/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAepD,cAAM,YAAa,YAAW,qBAAqB;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACnC,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,YAAY,EAAE,OAAO,CAAC;IACtB,sBAAsB,EAAE,kCAAkC,CAAC;IAC3D,sBAAsB,EAAE,kCAAkC,CAAC;IAC3D,aAAa,EAAE,kCAAkC,CAAC;gBAG9C,QAAQ,GAAE,gBAAgB,GAAG,IAAW,EACxC,WAAW,GAAE,WAAW,GAAG,IAAW,EACtC,WAAW,GAAE,WAAW,GAAG,IAAW,EACtC,OAAO,GAAE,mBAA6B,EACtC,eAAe,GAAE,eAAwC;IAqB7D,IAAI;IA2DJ,OAAO;IAoBP,cAAc;IAId,wBAAwB;IAKxB,eAAe;IAIf,SAAS;IAaT,SAAS;IAaT,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI;IAItC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGzC;AAED,wBAAgB,iBAAiB,SAuChC;AAOD,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/index.js b/node_modules/flowbite/lib/esm/components/input-counter/index.js new file mode 100644 index 0000000..2492322 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/index.js @@ -0,0 +1,155 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import instances from '../../dom/instances'; +var Default = { + minValue: null, + maxValue: null, + onIncrement: function () { }, + onDecrement: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var InputCounter = /** @class */ (function () { + function InputCounter(targetEl, incrementEl, decrementEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (incrementEl === void 0) { incrementEl = null; } + if (decrementEl === void 0) { decrementEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._incrementEl = incrementEl; + this._decrementEl = decrementEl; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances.addInstance('InputCounter', this, this._instanceId, instanceOptions.override); + } + InputCounter.prototype.init = function () { + var _this = this; + if (this._targetEl && !this._initialized) { + this._inputHandler = function (event) { + { + var target = event.target; + // check if the value is numeric + if (!/^\d*$/.test(target.value)) { + // Regex to check if the value is numeric + target.value = target.value.replace(/[^\d]/g, ''); // Remove non-numeric characters + } + // check for max value + if (_this._options.maxValue !== null && + parseInt(target.value) > _this._options.maxValue) { + target.value = _this._options.maxValue.toString(); + } + // check for min value + if (_this._options.minValue !== null && + parseInt(target.value) < _this._options.minValue) { + target.value = _this._options.minValue.toString(); + } + } + }; + this._incrementClickHandler = function () { + _this.increment(); + }; + this._decrementClickHandler = function () { + _this.decrement(); + }; + // Add event listener to restrict input to numeric values only + this._targetEl.addEventListener('input', this._inputHandler); + if (this._incrementEl) { + this._incrementEl.addEventListener('click', this._incrementClickHandler); + } + if (this._decrementEl) { + this._decrementEl.addEventListener('click', this._decrementClickHandler); + } + this._initialized = true; + } + }; + InputCounter.prototype.destroy = function () { + if (this._targetEl && this._initialized) { + this._targetEl.removeEventListener('input', this._inputHandler); + if (this._incrementEl) { + this._incrementEl.removeEventListener('click', this._incrementClickHandler); + } + if (this._decrementEl) { + this._decrementEl.removeEventListener('click', this._decrementClickHandler); + } + this._initialized = false; + } + }; + InputCounter.prototype.removeInstance = function () { + instances.removeInstance('InputCounter', this._instanceId); + }; + InputCounter.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + InputCounter.prototype.getCurrentValue = function () { + return parseInt(this._targetEl.value) || 0; + }; + InputCounter.prototype.increment = function () { + // don't increment if the value is already at the maximum value + if (this._options.maxValue !== null && + this.getCurrentValue() >= this._options.maxValue) { + return; + } + this._targetEl.value = (this.getCurrentValue() + 1).toString(); + this._options.onIncrement(this); + }; + InputCounter.prototype.decrement = function () { + // don't decrement if the value is already at the minimum value + if (this._options.minValue !== null && + this.getCurrentValue() <= this._options.minValue) { + return; + } + this._targetEl.value = (this.getCurrentValue() - 1).toString(); + this._options.onDecrement(this); + }; + InputCounter.prototype.updateOnIncrement = function (callback) { + this._options.onIncrement = callback; + }; + InputCounter.prototype.updateOnDecrement = function (callback) { + this._options.onDecrement = callback; + }; + return InputCounter; +}()); +export function initInputCounters() { + document.querySelectorAll('[data-input-counter]').forEach(function ($targetEl) { + var targetId = $targetEl.id; + var $incrementEl = document.querySelector('[data-input-counter-increment="' + targetId + '"]'); + var $decrementEl = document.querySelector('[data-input-counter-decrement="' + targetId + '"]'); + var minValue = $targetEl.getAttribute('data-input-counter-min'); + var maxValue = $targetEl.getAttribute('data-input-counter-max'); + // check if the target element exists + if ($targetEl) { + if (!instances.instanceExists('InputCounter', $targetEl.getAttribute('id'))) { + new InputCounter($targetEl, $incrementEl ? $incrementEl : null, $decrementEl ? $decrementEl : null, { + minValue: minValue ? parseInt(minValue) : null, + maxValue: maxValue ? parseInt(maxValue) : null, + }); + } + } + else { + console.error("The target element with id \"".concat(targetId, "\" does not exist. Please check the data-input-counter attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.InputCounter = InputCounter; + window.initInputCounters = initInputCounters; +} +export default InputCounter; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/index.js.map b/node_modules/flowbite/lib/esm/components/input-counter/index.js.map new file mode 100644 index 0000000..8be80ea --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/input-counter/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAwB;IACjC,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,cAAO,CAAC;IACrB,WAAW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D,YAAY,CAAC,CAAC,CAAE,YAA4B,CAAC,CAAC,CAAC,IAAI,EACnD;oBACI,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC9C,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI;iBAC1B,CAC3B,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,uCAA+B,QAAQ,sEAAkE,CAC5G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,MAAM,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;CAChD;AAED,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/interface.d.ts b/node_modules/flowbite/lib/esm/components/input-counter/interface.d.ts new file mode 100644 index 0000000..cd66d46 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/interface.d.ts @@ -0,0 +1,14 @@ +import { InputCounterOptions } from './types'; +export declare interface InputCounterInterface { + _targetEl: HTMLElement | null; + _incrementEl: HTMLElement | null; + _decrementEl: HTMLElement | null; + _options: InputCounterOptions; + init(): void; + increment(): void; + decrement(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/input-counter/interface.d.ts.map new file mode 100644 index 0000000..25b2885 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/input-counter/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,CAAC,OAAO,WAAW,qBAAqB;IAC1C,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,mBAAmB,CAAC;IAE9B,IAAI,IAAI,IAAI,CAAC;IACb,SAAS,IAAI,IAAI,CAAC;IAClB,SAAS,IAAI,IAAI,CAAC;IAElB,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/interface.js b/node_modules/flowbite/lib/esm/components/input-counter/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/interface.js.map b/node_modules/flowbite/lib/esm/components/input-counter/interface.js.map new file mode 100644 index 0000000..dd82e5f --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/input-counter/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/types.d.ts b/node_modules/flowbite/lib/esm/components/input-counter/types.d.ts new file mode 100644 index 0000000..1d13daa --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/types.d.ts @@ -0,0 +1,8 @@ +import { InputCounterInterface } from './interface'; +export declare type InputCounterOptions = { + minValue?: number | null; + maxValue?: number | null; + onIncrement?: (InputCounter: InputCounterInterface) => void; + onDecrement?: (InputCounter: InputCounterInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/types.d.ts.map b/node_modules/flowbite/lib/esm/components/input-counter/types.d.ts.map new file mode 100644 index 0000000..0fd79eb --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/input-counter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,CAAC,OAAO,MAAM,mBAAmB,GAAG;IACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC5D,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAC/D,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/types.js b/node_modules/flowbite/lib/esm/components/input-counter/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/input-counter/types.js.map b/node_modules/flowbite/lib/esm/components/input-counter/types.js.map new file mode 100644 index 0000000..28646fd --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/input-counter/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/input-counter/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/index.d.ts b/node_modules/flowbite/lib/esm/components/modal/index.d.ts new file mode 100644 index 0000000..57eef2b --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/index.d.ts @@ -0,0 +1,39 @@ +import type { ModalOptions } from './types'; +import type { InstanceOptions, EventListenerInstance } from '../../dom/types'; +import { ModalInterface } from './interface'; +declare class Modal implements ModalInterface { + _instanceId: string; + _targetEl: HTMLElement | null; + _options: ModalOptions; + _isHidden: boolean; + _backdropEl: HTMLElement | null; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _eventListenerInstances: EventListenerInstance[]; + _initialized: boolean; + constructor(targetEl?: HTMLElement | null, options?: ModalOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _setupModalCloseEventListeners(): void; + _removeModalCloseEventListeners(): void; + _handleOutsideClick(target: EventTarget): void; + _getPlacementClasses(): string[]; + toggle(): void; + show(): void; + hide(): void; + isVisible(): boolean; + isHidden(): boolean; + addEventListenerInstance(element: HTMLElement, type: string, handler: EventListenerOrEventListenerObject): void; + removeAllEventListenerInstances(): void; + getAllEventListenerInstances(): EventListenerInstance[]; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initModals(): void; +export default Modal; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/index.d.ts.map b/node_modules/flowbite/lib/esm/components/modal/index.d.ts.map new file mode 100644 index 0000000..3d09226 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkB7C,cAAM,KAAM,YAAW,cAAc;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAC1D,uBAAuB,EAAE,qBAAqB,EAAE,CAAM;IACtD,YAAY,EAAE,OAAO,CAAC;gBAGlB,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,OAAO,GAAE,YAAsB,EAC/B,eAAe,GAAE,eAAwC;IAmB7D,IAAI;IASJ,OAAO;IAQP,cAAc;IAId,wBAAwB;IAKxB,eAAe;IAWf,kBAAkB;IAOlB,8BAA8B;IAwB9B,+BAA+B;IAe/B,mBAAmB,CAAC,MAAM,EAAE,WAAW;IASvC,oBAAoB;IA+BpB,MAAM;IAWN,IAAI;IAuBJ,IAAI;IAsBJ,SAAS;IAIT,QAAQ;IAIR,wBAAwB,CACpB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kCAAkC;IAS/C,+BAA+B;IAU/B,4BAA4B;IAI5B,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,UAAU,SAyHzB;AAOD,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/index.js b/node_modules/flowbite/lib/esm/components/modal/index.js new file mode 100644 index 0000000..fada0f3 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/index.js @@ -0,0 +1,301 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import instances from '../../dom/instances'; +var Default = { + placement: 'center', + backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40', + backdrop: 'dynamic', + closable: true, + onHide: function () { }, + onShow: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Modal = /** @class */ (function () { + function Modal(targetEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._eventListenerInstances = []; + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._options = __assign(__assign({}, Default), options); + this._isHidden = true; + this._backdropEl = null; + this._initialized = false; + this.init(); + instances.addInstance('Modal', this, this._instanceId, instanceOptions.override); + } + Modal.prototype.init = function () { + var _this = this; + if (this._targetEl && !this._initialized) { + this._getPlacementClasses().map(function (c) { + _this._targetEl.classList.add(c); + }); + this._initialized = true; + } + }; + Modal.prototype.destroy = function () { + if (this._initialized) { + this.removeAllEventListenerInstances(); + this._destroyBackdropEl(); + this._initialized = false; + } + }; + Modal.prototype.removeInstance = function () { + instances.removeInstance('Modal', this._instanceId); + }; + Modal.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Modal.prototype._createBackdrop = function () { + var _a; + if (this._isHidden) { + var backdropEl = document.createElement('div'); + (_a = backdropEl.classList).add.apply(_a, this._options.backdropClasses.split(' ')); + document.querySelector('body').append(backdropEl); + this._backdropEl = backdropEl; + } + }; + Modal.prototype._destroyBackdropEl = function () { + if (!this._isHidden && this._backdropEl) { + this._backdropEl.remove(); + this._backdropEl = null; + } + }; + Modal.prototype._setupModalCloseEventListeners = function () { + var _this = this; + if (this._options.backdrop === 'dynamic') { + this._clickOutsideEventListener = function (ev) { + _this._handleOutsideClick(ev.target); + }; + this._targetEl.addEventListener('click', this._clickOutsideEventListener, true); + } + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._removeModalCloseEventListeners = function () { + if (this._options.backdrop === 'dynamic') { + this._targetEl.removeEventListener('click', this._clickOutsideEventListener, true); + } + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Modal.prototype._handleOutsideClick = function (target) { + if (target === this._targetEl || + (target === this._backdropEl && this.isVisible())) { + this.hide(); + } + }; + Modal.prototype._getPlacementClasses = function () { + switch (this._options.placement) { + // top + case 'top-left': + return ['justify-start', 'items-start']; + case 'top-center': + return ['justify-center', 'items-start']; + case 'top-right': + return ['justify-end', 'items-start']; + // center + case 'center-left': + return ['justify-start', 'items-center']; + case 'center': + return ['justify-center', 'items-center']; + case 'center-right': + return ['justify-end', 'items-center']; + // bottom + case 'bottom-left': + return ['justify-start', 'items-end']; + case 'bottom-center': + return ['justify-center', 'items-end']; + case 'bottom-right': + return ['justify-end', 'items-end']; + default: + return ['justify-center', 'items-center']; + } + }; + Modal.prototype.toggle = function () { + if (this._isHidden) { + this.show(); + } + else { + this.hide(); + } + // callback function + this._options.onToggle(this); + }; + Modal.prototype.show = function () { + if (this.isHidden) { + this._targetEl.classList.add('flex'); + this._targetEl.classList.remove('hidden'); + this._targetEl.setAttribute('aria-modal', 'true'); + this._targetEl.setAttribute('role', 'dialog'); + this._targetEl.removeAttribute('aria-hidden'); + this._createBackdrop(); + this._isHidden = false; + // Add keyboard event listener to the document + if (this._options.closable) { + this._setupModalCloseEventListeners(); + } + // prevent body scroll + document.body.classList.add('overflow-hidden'); + // callback function + this._options.onShow(this); + } + }; + Modal.prototype.hide = function () { + if (this.isVisible) { + this._targetEl.classList.add('hidden'); + this._targetEl.classList.remove('flex'); + this._targetEl.setAttribute('aria-hidden', 'true'); + this._targetEl.removeAttribute('aria-modal'); + this._targetEl.removeAttribute('role'); + this._destroyBackdropEl(); + this._isHidden = true; + // re-apply body scroll + document.body.classList.remove('overflow-hidden'); + if (this._options.closable) { + this._removeModalCloseEventListeners(); + } + // callback function + this._options.onHide(this); + } + }; + Modal.prototype.isVisible = function () { + return !this._isHidden; + }; + Modal.prototype.isHidden = function () { + return this._isHidden; + }; + Modal.prototype.addEventListenerInstance = function (element, type, handler) { + this._eventListenerInstances.push({ + element: element, + type: type, + handler: handler, + }); + }; + Modal.prototype.removeAllEventListenerInstances = function () { + this._eventListenerInstances.map(function (eventListenerInstance) { + eventListenerInstance.element.removeEventListener(eventListenerInstance.type, eventListenerInstance.handler); + }); + this._eventListenerInstances = []; + }; + Modal.prototype.getAllEventListenerInstances = function () { + return this._eventListenerInstances; + }; + Modal.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Modal.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Modal.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Modal; +}()); +export function initModals() { + // initiate modal based on data-modal-target + document.querySelectorAll('[data-modal-target]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-target'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var placement = $modalEl.getAttribute('data-modal-placement'); + var backdrop = $modalEl.getAttribute('data-modal-backdrop'); + new Modal($modalEl, { + placement: placement ? placement : Default.placement, + backdrop: backdrop ? backdrop : Default.backdrop, + }); + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.")); + } + }); + // toggle modal visibility + document.querySelectorAll('[data-modal-toggle]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-toggle'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_1 = instances.getInstance('Modal', modalId); + if (modal_1) { + var toggleModal = function () { + modal_1.toggle(); + }; + $triggerEl.addEventListener('click', toggleModal); + modal_1.addEventListenerInstance($triggerEl, 'click', toggleModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?")); + } + }); + // show modal on click if exists based on id + document.querySelectorAll('[data-modal-show]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-show'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_2 = instances.getInstance('Modal', modalId); + if (modal_2) { + var showModal = function () { + modal_2.show(); + }; + $triggerEl.addEventListener('click', showModal); + modal_2.addEventListenerInstance($triggerEl, 'click', showModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?")); + } + }); + // hide modal on click if exists based on id + document.querySelectorAll('[data-modal-hide]').forEach(function ($triggerEl) { + var modalId = $triggerEl.getAttribute('data-modal-hide'); + var $modalEl = document.getElementById(modalId); + if ($modalEl) { + var modal_3 = instances.getInstance('Modal', modalId); + if (modal_3) { + var hideModal = function () { + modal_3.hide(); + }; + $triggerEl.addEventListener('click', hideModal); + modal_3.addEventListenerInstance($triggerEl, 'click', hideModal); + } + else { + console.error("Modal with id ".concat(modalId, " has not been initialized. Please initialize it using the data-modal-target attribute.")); + } + } + else { + console.error("Modal with id ".concat(modalId, " does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?")); + } + }); +} +if (typeof window !== 'undefined') { + window.Modal = Modal; + window.initModals = initModals; +} +export default Modal; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/index.js.map b/node_modules/flowbite/lib/esm/components/modal/index.js.map new file mode 100644 index 0000000..e6fc62a --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/modal/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,OAAO,SAAS,MAAM,qBAAqB,C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;aACL;iBAAM;gBACH,OAAO,CAAC,KAAK,CACT,wBAAiB,OAAO,2FAAwF,CACnH,CAAC;aACL;SACJ;aAAM;YACH,OAAO,CAAC,KAAK,CACT,wBAAiB,OAAO,qGAAkG,CAC7H,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;CAClC;AAED,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/interface.d.ts b/node_modules/flowbite/lib/esm/components/modal/interface.d.ts new file mode 100644 index 0000000..7680b26 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/interface.d.ts @@ -0,0 +1,27 @@ +import { ModalOptions } from './types'; +export declare interface ModalInterface { + _targetEl: HTMLElement | null; + _options: ModalOptions; + _isHidden: boolean; + _backdropEl: HTMLElement | null; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + init(): void; + _createBackdrop(): void; + _destroyBackdropEl(): void; + _setupModalCloseEventListeners(): void; + _handleOutsideClick(target: EventTarget): void; + _getPlacementClasses(): string[]; + toggle(): void; + show(): void; + hide(): void; + isHidden(): boolean; + isVisible(): boolean; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + addEventListenerInstance(element: HTMLElement, type: string, handler: EventListenerOrEventListenerObject): void; + removeAllEventListenerInstances(): void; + getAllEventListenerInstances(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/modal/interface.d.ts.map new file mode 100644 index 0000000..c427d1a --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,CAAC,OAAO,WAAW,cAAc;IAEnC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAG9B,QAAQ,EAAE,YAAY,CAAC;IAGvB,SAAS,EAAE,OAAO,CAAC;IAGnB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAEhC,0BAA0B,EAAE,kCAAkC,CAAC;IAE/D,qBAAqB,EAAE,kCAAkC,CAAC;IAG1D,IAAI,IAAI,IAAI,CAAC;IAGb,eAAe,IAAI,IAAI,CAAC;IAGxB,kBAAkB,IAAI,IAAI,CAAC;IAG3B,8BAA8B,IAAI,IAAI,CAAC;IAGvC,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAG/C,oBAAoB,IAAI,MAAM,EAAE,CAAC;IAGjC,MAAM,IAAI,IAAI,CAAC;IAGf,IAAI,IAAI,IAAI,CAAC;IAGb,IAAI,IAAI,IAAI,CAAC;IAGb,QAAQ,IAAI,OAAO,CAAC;IAGpB,SAAS,IAAI,OAAO,CAAC;IAErB,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;IACjC,wBAAwB,CACpB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kCAAkC,GAC5C,IAAI,CAAC;IACR,+BAA+B,IAAI,IAAI,CAAC;IACxC,4BAA4B,IAAI,IAAI,CAAC;CACxC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/interface.js b/node_modules/flowbite/lib/esm/components/modal/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/interface.js.map b/node_modules/flowbite/lib/esm/components/modal/interface.js.map new file mode 100644 index 0000000..5de1079 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/modal/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/types.d.ts b/node_modules/flowbite/lib/esm/components/modal/types.d.ts new file mode 100644 index 0000000..2f7d51f --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/types.d.ts @@ -0,0 +1,13 @@ +import { ModalInterface } from './interface'; +export declare type modalBackdrop = 'static' | 'dynamic'; +export declare type modalPlacement = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; +export declare type ModalOptions = { + placement?: modalPlacement; + backdropClasses?: string; + backdrop?: modalBackdrop; + closable?: boolean; + onShow?: (modal: ModalInterface) => void; + onHide?: (modal: ModalInterface) => void; + onToggle?: (modal: ModalInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/types.d.ts.map b/node_modules/flowbite/lib/esm/components/modal/types.d.ts.map new file mode 100644 index 0000000..50c0ad4 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AACzD,MAAM,CAAC,OAAO,MAAM,cAAc,GAC5B,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,QAAQ,GACR,cAAc,GACd,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAErB,MAAM,CAAC,OAAO,MAAM,YAAY,GAAG;IAC/B,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/types.js b/node_modules/flowbite/lib/esm/components/modal/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/modal/types.js.map b/node_modules/flowbite/lib/esm/components/modal/types.js.map new file mode 100644 index 0000000..e049979 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/modal/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/modal/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/index.d.ts b/node_modules/flowbite/lib/esm/components/popover/index.d.ts new file mode 100644 index 0000000..7477f33 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/index.d.ts @@ -0,0 +1,43 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { PopoverOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { PopoverInterface } from './interface'; +declare class Popover implements PopoverInterface { + _instanceId: string; + _targetEl: HTMLElement; + _triggerEl: HTMLElement; + _options: PopoverOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _visible: boolean; + _initialized: boolean; + _showHandler: EventListenerOrEventListenerObject; + _hideHandler: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: PopoverOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initPopovers(): void; +export default Popover; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/index.d.ts.map b/node_modules/flowbite/lib/esm/components/popover/index.d.ts.map new file mode 100644 index 0000000..219b51b --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,QAAQ,IAAI,cAAc,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAiB/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAC1D,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,kCAAkC,CAAC;IACjD,YAAY,EAAE,kCAAkC,CAAC;gBAG7C,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB,EACjC,eAAe,GAAE,eAAwC;IAoB7D,IAAI;IAQJ,OAAO;IA8BP,cAAc;IAId,wBAAwB;IAKxB,oBAAoB;IA0BpB,qBAAqB;IAcrB,iBAAiB;;;;IAyBjB,qBAAqB;IAarB,sBAAsB;IAQtB,0BAA0B;IAW1B,2BAA2B;IAQ3B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IAYpD,SAAS;IAIT,MAAM;IASN,IAAI;IA6BJ,IAAI;IA0BJ,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,YAAY,SA2B3B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/index.js b/node_modules/flowbite/lib/esm/components/popover/index.js new file mode 100644 index 0000000..fcb8586 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/index.js @@ -0,0 +1,265 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +/* eslint-disable @typescript-eslint/no-empty-function */ +import { createPopper } from '@popperjs/core'; +import instances from '../../dom/instances'; +var Default = { + placement: 'top', + offset: 10, + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Popover = /** @class */ (function () { + function Popover(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances.addInstance('Popover', this, instanceOptions.id ? instanceOptions.id : this._targetEl.id, instanceOptions.override); + } + Popover.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._setupEventListeners(); + this._popperInstance = this._createPopperInstance(); + this._initialized = true; + } + }; + Popover.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + // remove event listeners associated with the trigger element and target element + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showHandler); + _this._targetEl.removeEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hideHandler); + _this._targetEl.removeEventListener(ev, _this._hideHandler); + }); + // remove event listeners for keydown + this._removeKeydownListener(); + // remove event listeners for click outside + this._removeClickOutsideListener(); + // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance) + if (this._popperInstance) { + this._popperInstance.destroy(); + } + this._initialized = false; + } + }; + Popover.prototype.removeInstance = function () { + instances.removeInstance('Popover', this._instanceId); + }; + Popover.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Popover.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._showHandler = function () { + _this.show(); + }; + this._hideHandler = function () { + setTimeout(function () { + if (!_this._targetEl.matches(':hover')) { + _this.hide(); + } + }, 100); + }; + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showHandler); + _this._targetEl.addEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hideHandler); + _this._targetEl.addEventListener(ev, _this._hideHandler); + }); + }; + Popover.prototype._createPopperInstance = function () { + return createPopper(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, this._options.offset], + }, + }, + ], + }); + }; + Popover.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Popover.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Popover.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Popover.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Popover.prototype.isVisible = function () { + return this._visible; + }; + Popover.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + this._options.onToggle(this); + }; + Popover.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility to true + this._visible = true; + // callback function + this._options.onShow(this); + }; + Popover.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility to false + this._visible = false; + // callback function + this._options.onHide(this); + }; + Popover.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Popover.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Popover.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Popover; +}()); +export function initPopovers() { + document.querySelectorAll('[data-popover-target]').forEach(function ($triggerEl) { + var popoverID = $triggerEl.getAttribute('data-popover-target'); + var $popoverEl = document.getElementById(popoverID); + if ($popoverEl) { + var triggerType = $triggerEl.getAttribute('data-popover-trigger'); + var placement = $triggerEl.getAttribute('data-popover-placement'); + var offset = $triggerEl.getAttribute('data-popover-offset'); + new Popover($popoverEl, $triggerEl, { + placement: placement ? placement : Default.placement, + offset: offset ? parseInt(offset) : Default.offset, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The popover element with id \"".concat(popoverID, "\" does not exist. Please check the data-popover-target attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.Popover = Popover; + window.initPopovers = initPopovers; +} +export default Popover; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/index.js.map b/node_modules/flowbite/lib/esm/components/popover/index.js.map new file mode 100644 index 0000000..aaeab37 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/popover/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAmB;IAC5B,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,EAAE;IACV,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IAaI,iBACI,QAAmC,EACnC,SAAoC,EACpC,OAAiC,EACjC,eAAyD;QAHzD,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAiC;QACjC,gCAAA,EAAA,wCAAyD;QAEzD,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE;YACjC,CAAC,CAAC,eAAe,CAAC,EAAE;YACpB,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,QAA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,CAAC,CAAC;YAE9D,IAAI,OAAO,CACP,UAAyB,EACzB,UAAyB,EACzB;gBACI,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS;gBACpD,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM;gBAClD,WAAW,EAAE,WAAW;oBACpB,CAAC,CAAC,WAAW;oBACb,CAAC,CAAC,OAAO,CAAC,WAAW;aACV,CACtB,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CACT,wCAAgC,SAAS,uEAAmE,CAC/G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;CACtC;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/interface.d.ts b/node_modules/flowbite/lib/esm/components/popover/interface.d.ts new file mode 100644 index 0000000..755c9d4 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/interface.d.ts @@ -0,0 +1,26 @@ +import { PopoverOptions, PopoverTriggerType, PopoverTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface PopoverInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: PopoverOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + init(): void; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: PopoverTriggerType): PopoverTriggerEventTypes; + isVisible(): boolean; + show(): void; + hide(): void; + toggle(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/popover/interface.d.ts.map new file mode 100644 index 0000000..729f9b3 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAE1D,IAAI,IAAI,IAAI,CAAC;IACb,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,qBAAqB,IAAI,IAAI,CAAC;IAC9B,sBAAsB,IAAI,IAAI,CAAC;IAC/B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,kBAAkB,GAChC,wBAAwB,CAAC;IAC5B,SAAS,IAAI,OAAO,CAAC;IACrB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IAEf,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/interface.js b/node_modules/flowbite/lib/esm/components/popover/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/interface.js.map b/node_modules/flowbite/lib/esm/components/popover/interface.js.map new file mode 100644 index 0000000..495553d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/popover/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/types.d.ts b/node_modules/flowbite/lib/esm/components/popover/types.d.ts new file mode 100644 index 0000000..1b8512f --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/types.d.ts @@ -0,0 +1,16 @@ +import { PopoverInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type PopoverTriggerType = 'click' | 'hover' | 'none'; +export declare type PopoverTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type PopoverOptions = { + placement?: Placement; + offset?: number; + triggerType?: PopoverTriggerType; + onShow?: (tooltip: PopoverInterface) => void; + onHide?: (tooltip: PopoverInterface) => void; + onToggle?: (tooltip: PopoverInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/types.d.ts.map b/node_modules/flowbite/lib/esm/components/popover/types.d.ts.map new file mode 100644 index 0000000..83d1cf6 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE,MAAM,CAAC,OAAO,MAAM,wBAAwB,GAAG;IAC3C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/types.js b/node_modules/flowbite/lib/esm/components/popover/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/popover/types.js.map b/node_modules/flowbite/lib/esm/components/popover/types.js.map new file mode 100644 index 0000000..8f2e0e4 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/popover/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/popover/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/index.d.ts b/node_modules/flowbite/lib/esm/components/tabs/index.d.ts new file mode 100644 index 0000000..fd1b6a0 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/index.d.ts @@ -0,0 +1,24 @@ +import type { TabItem, TabsOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { TabsInterface } from './interface'; +declare class Tabs implements TabsInterface { + _instanceId: string; + _tabsEl: HTMLElement; + _items: TabItem[]; + _activeTab: TabItem; + _options: TabsOptions; + _initialized: boolean; + constructor(tabsEl?: HTMLElement | null, items?: TabItem[], options?: TabsOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + getActiveTab(): TabItem; + setActiveTab(tab: TabItem): void; + getTab(id: string): TabItem; + show(id: string, forceShow?: boolean): void; + updateOnShow(callback: () => void): void; +} +export declare function initTabs(): void; +export default Tabs; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/index.d.ts.map b/node_modules/flowbite/lib/esm/components/tabs/index.d.ts.map new file mode 100644 index 0000000..e315b63 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAiB5C,cAAM,IAAK,YAAW,aAAa;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;gBAGlB,MAAM,GAAE,WAAW,GAAG,IAAW,EACjC,KAAK,GAAE,OAAO,EAAO,EACrB,OAAO,GAAE,WAAqB,EAC9B,eAAe,GAAE,eAAwC;IAiB7D,IAAI;IAoBJ,OAAO;IAMP,cAAc;IAKd,wBAAwB;IAKxB,YAAY;IAIZ,YAAY,CAAC,GAAG,EAAE,OAAO;IAIzB,MAAM,CAAC,EAAE,EAAE,MAAM;IAIjB,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,UAAQ;IAoClC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGpC;AAED,wBAAgB,QAAQ,SAuCvB;AAOD,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/index.js b/node_modules/flowbite/lib/esm/components/tabs/index.js new file mode 100644 index 0000000..097971e --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/index.js @@ -0,0 +1,147 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import instances from '../../dom/instances'; +var Default = { + defaultTabId: null, + activeClasses: 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500', + inactiveClasses: 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300', + onShow: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Tabs = /** @class */ (function () { + function Tabs(tabsEl, items, options, instanceOptions) { + if (tabsEl === void 0) { tabsEl = null; } + if (items === void 0) { items = []; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id; + this._tabsEl = tabsEl; + this._items = items; + this._activeTab = options ? this.getTab(options.defaultTabId) : null; + this._options = __assign(__assign({}, Default), options); + this._initialized = false; + this.init(); + instances.addInstance('Tabs', this, this._instanceId, instanceOptions.override); + } + Tabs.prototype.init = function () { + var _this = this; + if (this._items.length && !this._initialized) { + // set the first tab as active if not set by explicitly + if (!this._activeTab) { + this.setActiveTab(this._items[0]); + } + // force show the first default tab + this.show(this._activeTab.id, true); + // show tab content based on click + this._items.map(function (tab) { + tab.triggerEl.addEventListener('click', function (event) { + event.preventDefault(); + _this.show(tab.id); + }); + }); + } + }; + Tabs.prototype.destroy = function () { + if (this._initialized) { + this._initialized = false; + } + }; + Tabs.prototype.removeInstance = function () { + this.destroy(); + instances.removeInstance('Tabs', this._instanceId); + }; + Tabs.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Tabs.prototype.getActiveTab = function () { + return this._activeTab; + }; + Tabs.prototype.setActiveTab = function (tab) { + this._activeTab = tab; + }; + Tabs.prototype.getTab = function (id) { + return this._items.filter(function (t) { return t.id === id; })[0]; + }; + Tabs.prototype.show = function (id, forceShow) { + var _a, _b; + var _this = this; + if (forceShow === void 0) { forceShow = false; } + var tab = this.getTab(id); + // don't do anything if already active + if (tab === this._activeTab && !forceShow) { + return; + } + // hide other tabs + this._items.map(function (t) { + var _a, _b; + if (t !== tab) { + (_a = t.triggerEl.classList).remove.apply(_a, _this._options.activeClasses.split(' ')); + (_b = t.triggerEl.classList).add.apply(_b, _this._options.inactiveClasses.split(' ')); + t.targetEl.classList.add('hidden'); + t.triggerEl.setAttribute('aria-selected', 'false'); + } + }); + // show active tab + (_a = tab.triggerEl.classList).add.apply(_a, this._options.activeClasses.split(' ')); + (_b = tab.triggerEl.classList).remove.apply(_b, this._options.inactiveClasses.split(' ')); + tab.triggerEl.setAttribute('aria-selected', 'true'); + tab.targetEl.classList.remove('hidden'); + this.setActiveTab(tab); + // callback function + this._options.onShow(this, tab); + }; + Tabs.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + return Tabs; +}()); +export function initTabs() { + document.querySelectorAll('[data-tabs-toggle]').forEach(function ($parentEl) { + var tabItems = []; + var activeClasses = $parentEl.getAttribute('data-tabs-active-classes'); + var inactiveClasses = $parentEl.getAttribute('data-tabs-inactive-classes'); + var defaultTabId = null; + $parentEl + .querySelectorAll('[role="tab"]') + .forEach(function ($triggerEl) { + var isActive = $triggerEl.getAttribute('aria-selected') === 'true'; + var tab = { + id: $triggerEl.getAttribute('data-tabs-target'), + triggerEl: $triggerEl, + targetEl: document.querySelector($triggerEl.getAttribute('data-tabs-target')), + }; + tabItems.push(tab); + if (isActive) { + defaultTabId = tab.id; + } + }); + new Tabs($parentEl, tabItems, { + defaultTabId: defaultTabId, + activeClasses: activeClasses + ? activeClasses + : Default.activeClasses, + inactiveClasses: inactiveClasses + ? inactiveClasses + : Default.inactiveClasses, + }); + }); +} +if (typeof window !== 'undefined') { + window.Tabs = Tabs; + window.initTabs = initTabs; +} +export default Tabs; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/index.js.map b/node_modules/flowbite/lib/esm/components/tabs/index.js.map new file mode 100644 index 0000000..ceb1d01 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/tabs/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAgB;IACzB,YAAY,EAAE,IAAI;IAClB,aAAa,EACT,oHAAoH;IACxH,eAAe,EACX,kKAAkK;IACtK,MAAM,EAAE,cAAO,CAAC;CACnB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IAQI,cACI,MAAiC,EACjC,KAAqB,EACrB,OAA8B,EAC9B,eAAyD;QAHzD,uBAAA,EAAA,aAAiC;QACjC,sBAAA,E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/flowbite/lib/esm/components/tabs/interface.d.ts new file mode 100644 index 0000000..500beb8 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/interface.d.ts @@ -0,0 +1,16 @@ +import { TabItem, TabsOptions } from './types'; +export declare interface TabsInterface { + _tabsEl: HTMLElement; + _items: TabItem[]; + _activeTab: TabItem; + _options: TabsOptions; + init(): void; + setActiveTab(tab: TabItem): void; + getActiveTab(): TabItem; + getTab(id: string): TabItem; + show(id: string, forceShow?: boolean): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/tabs/interface.d.ts.map new file mode 100644 index 0000000..80b938f --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,CAAC,OAAO,WAAW,aAAa;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;IAEtB,IAAI,IAAI,IAAI,CAAC;IACb,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,YAAY,IAAI,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE5C,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/interface.js b/node_modules/flowbite/lib/esm/components/tabs/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/interface.js.map b/node_modules/flowbite/lib/esm/components/tabs/interface.js.map new file mode 100644 index 0000000..6fc7bb2 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/tabs/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/types.d.ts b/node_modules/flowbite/lib/esm/components/tabs/types.d.ts new file mode 100644 index 0000000..342be0d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/types.d.ts @@ -0,0 +1,13 @@ +import { TabsInterface } from './interface'; +export declare type TabsOptions = { + defaultTabId?: string; + activeClasses?: string; + inactiveClasses?: string; + onShow?: (tabs: TabsInterface, tab: TabItem) => void; +}; +export declare type TabItem = { + id: string; + triggerEl: HTMLElement; + targetEl: HTMLElement; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/types.d.ts.map b/node_modules/flowbite/lib/esm/components/tabs/types.d.ts.map new file mode 100644 index 0000000..da457a9 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,OAAO,MAAM,WAAW,GAAG;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,OAAO,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/types.js b/node_modules/flowbite/lib/esm/components/tabs/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tabs/types.js.map b/node_modules/flowbite/lib/esm/components/tabs/types.js.map new file mode 100644 index 0000000..a4a4aff --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tabs/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/tabs/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts b/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts new file mode 100644 index 0000000..2e825a8 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts @@ -0,0 +1,43 @@ +import type { Instance as PopperInstance } from '@popperjs/core'; +import type { TooltipOptions } from './types'; +import type { InstanceOptions } from '../../dom/types'; +import { TooltipInterface } from './interface'; +declare class Tooltip implements TooltipInterface { + _instanceId: string; + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: TooltipOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + _visible: boolean; + _initialized: boolean; + _showHandler: EventListenerOrEventListenerObject; + _hideHandler: EventListenerOrEventListenerObject; + constructor(targetEl?: HTMLElement | null, triggerEl?: HTMLElement | null, options?: TooltipOptions, instanceOptions?: InstanceOptions); + init(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; + _setupEventListeners(): void; + _createPopperInstance(): PopperInstance; + _getTriggerEvents(): { + showEvents: string[]; + hideEvents: string[]; + }; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + isVisible(): boolean; + toggle(): void; + show(): void; + hide(): void; + updateOnShow(callback: () => void): void; + updateOnHide(callback: () => void): void; + updateOnToggle(callback: () => void): void; +} +export declare function initTooltips(): void; +export default Tooltip; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts.map b/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts.map new file mode 100644 index 0000000..db03f92 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,QAAQ,IAAI,cAAc,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAgB/C,cAAM,OAAQ,YAAW,gBAAgB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAC1D,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,kCAAkC,CAAC;IACjD,YAAY,EAAE,kCAAkC,CAAC;gBAG7C,QAAQ,GAAE,WAAW,GAAG,IAAW,EACnC,SAAS,GAAE,WAAW,GAAG,IAAW,EACpC,OAAO,GAAE,cAAwB,EACjC,eAAe,GAAE,eAAwC;IAoB7D,IAAI;IAQJ,OAAO;IA2BP,cAAc;IAId,wBAAwB;IAKxB,oBAAoB;IAoBpB,qBAAqB;IAcrB,iBAAiB;;;;IAyBjB,qBAAqB;IAarB,sBAAsB;IAQtB,0BAA0B;IAW1B,2BAA2B;IAQ3B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IAYpD,SAAS;IAIT,MAAM;IAQN,IAAI;IA6BJ,IAAI;IA0BJ,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CAGtC;AAED,wBAAgB,YAAY,SAyB3B;AAOD,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/index.js b/node_modules/flowbite/lib/esm/components/tooltip/index.js new file mode 100644 index 0000000..c981755 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/index.js @@ -0,0 +1,253 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +/* eslint-disable @typescript-eslint/no-empty-function */ +import { createPopper } from '@popperjs/core'; +import instances from '../../dom/instances'; +var Default = { + placement: 'top', + triggerType: 'hover', + onShow: function () { }, + onHide: function () { }, + onToggle: function () { }, +}; +var DefaultInstanceOptions = { + id: null, + override: true, +}; +var Tooltip = /** @class */ (function () { + function Tooltip(targetEl, triggerEl, options, instanceOptions) { + if (targetEl === void 0) { targetEl = null; } + if (triggerEl === void 0) { triggerEl = null; } + if (options === void 0) { options = Default; } + if (instanceOptions === void 0) { instanceOptions = DefaultInstanceOptions; } + this._instanceId = instanceOptions.id + ? instanceOptions.id + : targetEl.id; + this._targetEl = targetEl; + this._triggerEl = triggerEl; + this._options = __assign(__assign({}, Default), options); + this._popperInstance = null; + this._visible = false; + this._initialized = false; + this.init(); + instances.addInstance('Tooltip', this, this._instanceId, instanceOptions.override); + } + Tooltip.prototype.init = function () { + if (this._triggerEl && this._targetEl && !this._initialized) { + this._setupEventListeners(); + this._popperInstance = this._createPopperInstance(); + this._initialized = true; + } + }; + Tooltip.prototype.destroy = function () { + var _this = this; + if (this._initialized) { + // remove event listeners associated with the trigger element + var triggerEvents = this._getTriggerEvents(); + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.removeEventListener(ev, _this._hideHandler); + }); + // remove event listeners for keydown + this._removeKeydownListener(); + // remove event listeners for click outside + this._removeClickOutsideListener(); + // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance) + if (this._popperInstance) { + this._popperInstance.destroy(); + } + this._initialized = false; + } + }; + Tooltip.prototype.removeInstance = function () { + instances.removeInstance('Tooltip', this._instanceId); + }; + Tooltip.prototype.destroyAndRemoveInstance = function () { + this.destroy(); + this.removeInstance(); + }; + Tooltip.prototype._setupEventListeners = function () { + var _this = this; + var triggerEvents = this._getTriggerEvents(); + this._showHandler = function () { + _this.show(); + }; + this._hideHandler = function () { + _this.hide(); + }; + triggerEvents.showEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._showHandler); + }); + triggerEvents.hideEvents.forEach(function (ev) { + _this._triggerEl.addEventListener(ev, _this._hideHandler); + }); + }; + Tooltip.prototype._createPopperInstance = function () { + return createPopper(this._triggerEl, this._targetEl, { + placement: this._options.placement, + modifiers: [ + { + name: 'offset', + options: { + offset: [0, 8], + }, + }, + ], + }); + }; + Tooltip.prototype._getTriggerEvents = function () { + switch (this._options.triggerType) { + case 'hover': + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + case 'click': + return { + showEvents: ['click', 'focus'], + hideEvents: ['focusout', 'blur'], + }; + case 'none': + return { + showEvents: [], + hideEvents: [], + }; + default: + return { + showEvents: ['mouseenter', 'focus'], + hideEvents: ['mouseleave', 'blur'], + }; + } + }; + Tooltip.prototype._setupKeydownListener = function () { + var _this = this; + this._keydownEventListener = function (ev) { + if (ev.key === 'Escape') { + _this.hide(); + } + }; + document.body.addEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._removeKeydownListener = function () { + document.body.removeEventListener('keydown', this._keydownEventListener, true); + }; + Tooltip.prototype._setupClickOutsideListener = function () { + var _this = this; + this._clickOutsideEventListener = function (ev) { + _this._handleClickOutside(ev, _this._targetEl); + }; + document.body.addEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._removeClickOutsideListener = function () { + document.body.removeEventListener('click', this._clickOutsideEventListener, true); + }; + Tooltip.prototype._handleClickOutside = function (ev, targetEl) { + var clickedEl = ev.target; + if (clickedEl !== targetEl && + !targetEl.contains(clickedEl) && + !this._triggerEl.contains(clickedEl) && + this.isVisible()) { + this.hide(); + } + }; + Tooltip.prototype.isVisible = function () { + return this._visible; + }; + Tooltip.prototype.toggle = function () { + if (this.isVisible()) { + this.hide(); + } + else { + this.show(); + } + }; + Tooltip.prototype.show = function () { + this._targetEl.classList.remove('opacity-0', 'invisible'); + this._targetEl.classList.add('opacity-100', 'visible'); + // Enable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: true }, + ], false) })); }); + // handle click outside + this._setupClickOutsideListener(); + // handle esc keydown + this._setupKeydownListener(); + // Update its position + this._popperInstance.update(); + // set visibility + this._visible = true; + // callback function + this._options.onShow(this); + }; + Tooltip.prototype.hide = function () { + this._targetEl.classList.remove('opacity-100', 'visible'); + this._targetEl.classList.add('opacity-0', 'invisible'); + // Disable the event listeners + this._popperInstance.setOptions(function (options) { return (__assign(__assign({}, options), { modifiers: __spreadArray(__spreadArray([], options.modifiers, true), [ + { name: 'eventListeners', enabled: false }, + ], false) })); }); + // handle click outside + this._removeClickOutsideListener(); + // handle esc keydown + this._removeKeydownListener(); + // set visibility + this._visible = false; + // callback function + this._options.onHide(this); + }; + Tooltip.prototype.updateOnShow = function (callback) { + this._options.onShow = callback; + }; + Tooltip.prototype.updateOnHide = function (callback) { + this._options.onHide = callback; + }; + Tooltip.prototype.updateOnToggle = function (callback) { + this._options.onToggle = callback; + }; + return Tooltip; +}()); +export function initTooltips() { + document.querySelectorAll('[data-tooltip-target]').forEach(function ($triggerEl) { + var tooltipId = $triggerEl.getAttribute('data-tooltip-target'); + var $tooltipEl = document.getElementById(tooltipId); + if ($tooltipEl) { + var triggerType = $triggerEl.getAttribute('data-tooltip-trigger'); + var placement = $triggerEl.getAttribute('data-tooltip-placement'); + new Tooltip($tooltipEl, $triggerEl, { + placement: placement ? placement : Default.placement, + triggerType: triggerType + ? triggerType + : Default.triggerType, + }); + } + else { + console.error("The tooltip element with id \"".concat(tooltipId, "\" does not exist. Please check the data-tooltip-target attribute.")); + } + }); +} +if (typeof window !== 'undefined') { + window.Tooltip = Tooltip; + window.initTooltips = initTooltips; +} +export default Tooltip; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/index.js.map b/node_modules/flowbite/lib/esm/components/tooltip/index.js.map new file mode 100644 index 0000000..fa80217 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/tooltip/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,IAAM,OAAO,GAAmB;IAC5B,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,cAAO,CAAC;IAChB,MAAM,EAAE,cAAO,CAAC;IAChB,QAAQ,EAAE,cAAO,CAAC;CACrB,CAAC;AAEF,IAAM,sBAAsB,GAAoB;IAC5C,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF;IAaI,iBACI,QAAmC,EACnC,SAAoC,EACpC,OAAiC,EACjC,eAAyD;QAHzD,yBAAA,EAAA,eAAmC;QACnC,0BAAA,EAAA,gBAAoC;QACpC,wBAAA,EAAA,iBAAiC;QACjC,gCAAA,EAAA,wCAAyD;QAEzD,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE;YACjC,CAAC,CAAC,eAAe,CAAC,EAAE;YACpB,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,yBAAQ,OAAO,GAAK,OAAO,CAAE,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,C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CAAC,qBAAqB,CAAC,CAAC;QACjE,IAAM,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAEtD,IAAI,UAAU,EAAE;YACZ,IAAM,WAAW,GAAG,UAAU,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;YACpE,IAAM,SAAS,GAAG,UAAU,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC;YAEpE,IAAI,OAAO,CACP,UAAyB,EACzB,UAAyB,EACzB;gBACI,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS;gBACpD,WAAW,EAAE,WAAW;oBACpB,CAAC,CAAC,WAAW;oBACb,CAAC,CAAC,OAAO,CAAC,WAAW;aACV,CACtB,CAAC;SACL;aAAM;YACH,OAAO,CAAC,KAAK,CACT,wCAAgC,SAAS,uEAAmE,CAC/G,CAAC;SACL;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;CACtC;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts b/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts new file mode 100644 index 0000000..60e5cb1 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts @@ -0,0 +1,26 @@ +import { TooltipOptions, TooltipTriggerType, TooltipTriggerEventTypes } from './types'; +import type { Instance as PopperInstance } from '@popperjs/core'; +export declare interface TooltipInterface { + _targetEl: HTMLElement | null; + _triggerEl: HTMLElement | null; + _options: TooltipOptions; + _popperInstance: PopperInstance; + _clickOutsideEventListener: EventListenerOrEventListenerObject; + _keydownEventListener: EventListenerOrEventListenerObject; + init(): void; + _setupEventListeners(): void; + _setupClickOutsideListener(): void; + _removeClickOutsideListener(): void; + _setupKeydownListener(): void; + _removeKeydownListener(): void; + _handleClickOutside(ev: Event, targetEl: HTMLElement): void; + _getTriggerEvents(triggerType: TooltipTriggerType): TooltipTriggerEventTypes; + isVisible(): boolean; + show(): void; + hide(): void; + toggle(): void; + destroy(): void; + removeInstance(): void; + destroyAndRemoveInstance(): void; +} +//# sourceMappingURL=interface.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts.map b/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts.map new file mode 100644 index 0000000..5e015c5 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/interface.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACrC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,0BAA0B,EAAE,kCAAkC,CAAC;IAC/D,qBAAqB,EAAE,kCAAkC,CAAC;IAE1D,IAAI,IAAI,IAAI,CAAC;IACb,oBAAoB,IAAI,IAAI,CAAC;IAC7B,0BAA0B,IAAI,IAAI,CAAC;IACnC,2BAA2B,IAAI,IAAI,CAAC;IACpC,qBAAqB,IAAI,IAAI,CAAC;IAC9B,sBAAsB,IAAI,IAAI,CAAC;IAC/B,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CACb,WAAW,EAAE,kBAAkB,GAChC,wBAAwB,CAAC;IAC5B,SAAS,IAAI,OAAO,CAAC;IACrB,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IAEf,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,wBAAwB,IAAI,IAAI,CAAC;CACpC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/interface.js b/node_modules/flowbite/lib/esm/components/tooltip/interface.js new file mode 100644 index 0000000..95423ac --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/interface.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/interface.js.map b/node_modules/flowbite/lib/esm/components/tooltip/interface.js.map new file mode 100644 index 0000000..8a5f072 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/interface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/components/tooltip/interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts b/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts new file mode 100644 index 0000000..1ba5bb3 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts @@ -0,0 +1,15 @@ +import { TooltipInterface } from './interface'; +import type { Placement } from '@popperjs/core'; +export declare type TooltipTriggerType = 'click' | 'hover' | 'none'; +export declare type TooltipTriggerEventTypes = { + showEvents: string[]; + hideEvents: string[]; +}; +export declare type TooltipOptions = { + placement?: Placement; + triggerType?: TooltipTriggerType; + onShow?: (tooltip: TooltipInterface) => void; + onHide?: (tooltip: TooltipInterface) => void; + onToggle?: (tooltip: TooltipInterface) => void; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts.map b/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts.map new file mode 100644 index 0000000..048bf1d --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,OAAO,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE,MAAM,CAAC,OAAO,MAAM,wBAAwB,GAAG;IAC3C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/types.js b/node_modules/flowbite/lib/esm/components/tooltip/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/components/tooltip/types.js.map b/node_modules/flowbite/lib/esm/components/tooltip/types.js.map new file mode 100644 index 0000000..cd09cf9 --- /dev/null +++ b/node_modules/flowbite/lib/esm/components/tooltip/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/tooltip/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/config/global.d.ts b/node_modules/flowbite/lib/esm/config/global.d.ts new file mode 100644 index 0000000..c6eedb1 --- /dev/null +++ b/node_modules/flowbite/lib/esm/config/global.d.ts @@ -0,0 +1,49 @@ +import Accordion from '../components/accordion'; +import Carousel from '../components/carousel'; +import Collapse from '../components/collapse'; +import Dial from '../components/dial'; +import Dismiss from '../components/dismiss'; +import Drawer from '../components/drawer'; +import Dropdown from '../components/dropdown'; +import Modal from '../components/modal'; +import Popover from '../components/popover'; +import Tabs from '../components/tabs'; +import Tooltip from '../components/tooltip'; +import InputCounter from '../components/input-counter'; +import Clipboard from '../components/clipboard'; +import Datepicker from '../components/datepicker'; +declare global { + interface Window { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Dismiss: typeof Dismiss; + Drawer: typeof Drawer; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + InputCounter: typeof InputCounter; + CopyClipboard: typeof Clipboard; + Datepicker: typeof Datepicker; + initAccordions: () => void; + initCarousels: () => void; + initCollapses: () => void; + initDials: () => void; + initDismisses: () => void; + initDrawers: () => void; + initDropdowns: () => void; + initModals: () => void; + initPopovers: () => void; + initTabs: () => void; + initTooltips: () => void; + initInputCounters: () => void; + initClipboards: () => void; + initDatepickers: () => void; + initFlowbite: () => void; + FlowbiteInstances: any; + } +} +//# sourceMappingURL=global.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/config/global.d.ts.map b/node_modules/flowbite/lib/esm/config/global.d.ts.map new file mode 100644 index 0000000..606e9c7 --- /dev/null +++ b/node_modules/flowbite/lib/esm/config/global.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/config/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AM,IAAI,CAAC;QAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;QACtB,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,WAAW,EAAE,MAAM,IAAI,CAAC;QACxB,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,UAAU,EAAE,MAAM,IAAI,CAAC;QACvB,YAAY,EAAE,MAAM,IAAI,CAAC;QACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;QACrB,YAAY,EAAE,MAAM,IAAI,CAAC;QACzB,iBAAiB,EAAE,MAAM,IAAI,CAAC;QAC9B,cAAc,EAAE,MAAM,IAAI,CAAC;QAC3B,eAAe,EAAE,MAAM,IAAI,CAAC;QAC5B,YAAY,EAAE,MAAM,IAAI,CAAC;QACzB,iBAAiB,EAAE,GAAG,CAAC;KAC1B;CACJ"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/config/global.js b/node_modules/flowbite/lib/esm/config/global.js new file mode 100644 index 0000000..a8d4563 --- /dev/null +++ b/node_modules/flowbite/lib/esm/config/global.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=global.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/config/global.js.map b/node_modules/flowbite/lib/esm/config/global.js.map new file mode 100644 index 0000000..52ccc1e --- /dev/null +++ b/node_modules/flowbite/lib/esm/config/global.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../src/config/global.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/events.d.ts b/node_modules/flowbite/lib/esm/dom/events.d.ts new file mode 100644 index 0000000..3bbb83b --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/events.d.ts @@ -0,0 +1,8 @@ +declare class Events { + private _eventType; + private _eventFunctions; + constructor(eventType: string, eventFunctions?: EventListener[]); + init(): void; +} +export default Events; +//# sourceMappingURL=events.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/events.d.ts.map b/node_modules/flowbite/lib/esm/dom/events.d.ts.map new file mode 100644 index 0000000..de90c16 --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/events.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/dom/events.ts"],"names":[],"mappings":"AAAA,cAAM,MAAM;IACR,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,eAAe,CAAkB;gBAE7B,SAAS,EAAE,MAAM,EAAE,cAAc,GAAE,aAAa,EAAO;IAKnE,IAAI;CAOP;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/events.js b/node_modules/flowbite/lib/esm/dom/events.js new file mode 100644 index 0000000..3d335f6 --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/events.js @@ -0,0 +1,18 @@ +var Events = /** @class */ (function () { + function Events(eventType, eventFunctions) { + if (eventFunctions === void 0) { eventFunctions = []; } + this._eventType = eventType; + this._eventFunctions = eventFunctions; + } + Events.prototype.init = function () { + var _this = this; + this._eventFunctions.forEach(function (eventFunction) { + if (typeof window !== 'undefined') { + window.addEventListener(_this._eventType, eventFunction); + } + }); + }; + return Events; +}()); +export default Events; +//# sourceMappingURL=events.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/events.js.map b/node_modules/flowbite/lib/esm/dom/events.js.map new file mode 100644 index 0000000..727d3ef --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/events.js.map @@ -0,0 +1 @@ +{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/dom/events.ts"],"names":[],"mappings":"AAAA;IAII,gBAAY,SAAiB,EAAE,cAAoC;QAApC,+BAAA,EAAA,mBAAoC;QAC/D,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IAC1C,CAAC;IAED,qBAAI,GAAJ;QAAA,iBAMC;QALG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,UAAC,aAAa;YACvC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;gBAC/B,MAAM,CAAC,gBAAgB,CAAC,KAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;aAC3D;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IACL,aAAC;AAAD,CAAC,AAhBD,IAgBC;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/instances.d.ts b/node_modules/flowbite/lib/esm/dom/instances.d.ts new file mode 100644 index 0000000..82f7318 --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/instances.d.ts @@ -0,0 +1,100 @@ +import { AccordionInterface } from '../components/accordion/interface'; +import { CarouselInterface } from '../components/carousel/interface'; +import { CollapseInterface } from '../components/collapse/interface'; +import { DialInterface } from '../components/dial/interface'; +import { DismissInterface } from '../components/dismiss/interface'; +import { DrawerInterface } from '../components/drawer/interface'; +import { DropdownInterface } from '../components/dropdown/interface'; +import { ModalInterface } from '../components/modal/interface'; +import { PopoverInterface } from '../components/popover/interface'; +import { TabsInterface } from '../components/tabs/interface'; +import { TooltipInterface } from '../components/tooltip/interface'; +import { InputCounterInterface } from '../components/input-counter/interface'; +import { CopyClipboardInterface } from '../components/clipboard/interface'; +import { DatepickerInterface } from '../components/datepicker/interface'; +declare class Instances { + private _instances; + constructor(); + addInstance(component: keyof Instances['_instances'], instance: any, id?: string, override?: boolean): boolean; + getAllInstances(): { + Accordion: { + [id: string]: AccordionInterface; + }; + Carousel: { + [id: string]: CarouselInterface; + }; + Collapse: { + [id: string]: CollapseInterface; + }; + Dial: { + [id: string]: DialInterface; + }; + Dismiss: { + [id: string]: DismissInterface; + }; + Drawer: { + [id: string]: DrawerInterface; + }; + Dropdown: { + [id: string]: DropdownInterface; + }; + Modal: { + [id: string]: ModalInterface; + }; + Popover: { + [id: string]: PopoverInterface; + }; + Tabs: { + [id: string]: TabsInterface; + }; + Tooltip: { + [id: string]: TooltipInterface; + }; + InputCounter: { + [id: string]: InputCounterInterface; + }; + CopyClipboard: { + [id: string]: CopyClipboardInterface; + }; + Datepicker: { + [id: string]: DatepickerInterface; + }; + }; + getInstances(component: keyof Instances['_instances']): false | { + [id: string]: AccordionInterface; + } | { + [id: string]: CarouselInterface; + } | { + [id: string]: CollapseInterface; + } | { + [id: string]: DialInterface; + } | { + [id: string]: DismissInterface; + } | { + [id: string]: DrawerInterface; + } | { + [id: string]: DropdownInterface; + } | { + [id: string]: ModalInterface; + } | { + [id: string]: TabsInterface; + } | { + [id: string]: TooltipInterface; + } | { + [id: string]: InputCounterInterface; + } | { + [id: string]: CopyClipboardInterface; + } | { + [id: string]: DatepickerInterface; + }; + getInstance(component: keyof Instances['_instances'], id: string): any; + destroyAndRemoveInstance(component: keyof Instances['_instances'], id: string): void; + removeInstance(component: keyof Instances['_instances'], id: string): void; + destroyInstanceObject(component: keyof Instances['_instances'], id: string): void; + instanceExists(component: keyof Instances['_instances'], id: string): boolean; + _generateRandomId(): string; + private _componentAndInstanceCheck; +} +declare const instances: Instances; +export default instances; +//# sourceMappingURL=instances.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/instances.d.ts.map b/node_modules/flowbite/lib/esm/dom/instances.d.ts.map new file mode 100644 index 0000000..5ca67ca --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/instances.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../../src/dom/instances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,gC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,CAAC,0BAA0B;CAgBrC;AAED,QAAA,MAAM,SAAS,WAAkB,CAAC;AAElC,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/instances.js b/node_modules/flowbite/lib/esm/dom/instances.js new file mode 100644 index 0000000..7b606fb --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/instances.js @@ -0,0 +1,105 @@ +var Instances = /** @class */ (function () { + function Instances() { + this._instances = { + Accordion: {}, + Carousel: {}, + Collapse: {}, + Dial: {}, + Dismiss: {}, + Drawer: {}, + Dropdown: {}, + Modal: {}, + Popover: {}, + Tabs: {}, + Tooltip: {}, + InputCounter: {}, + CopyClipboard: {}, + Datepicker: {}, + }; + } + Instances.prototype.addInstance = function (component, instance, id, override) { + if (override === void 0) { override = false; } + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + if (this._instances[component][id] && !override) { + console.warn("Flowbite: Instance with ID ".concat(id, " already exists.")); + return; + } + if (override && this._instances[component][id]) { + this._instances[component][id].destroyAndRemoveInstance(); + } + this._instances[component][id ? id : this._generateRandomId()] = + instance; + }; + Instances.prototype.getAllInstances = function () { + return this._instances; + }; + Instances.prototype.getInstances = function (component) { + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + return this._instances[component]; + }; + Instances.prototype.getInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + if (!this._instances[component][id]) { + console.warn("Flowbite: Instance with ID ".concat(id, " does not exist.")); + return; + } + return this._instances[component][id]; + }; + Instances.prototype.destroyAndRemoveInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + this.destroyInstanceObject(component, id); + this.removeInstance(component, id); + }; + Instances.prototype.removeInstance = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + delete this._instances[component][id]; + }; + Instances.prototype.destroyInstanceObject = function (component, id) { + if (!this._componentAndInstanceCheck(component, id)) { + return; + } + this._instances[component][id].destroy(); + }; + Instances.prototype.instanceExists = function (component, id) { + if (!this._instances[component]) { + return false; + } + if (!this._instances[component][id]) { + return false; + } + return true; + }; + Instances.prototype._generateRandomId = function () { + return Math.random().toString(36).substr(2, 9); + }; + Instances.prototype._componentAndInstanceCheck = function (component, id) { + if (!this._instances[component]) { + console.warn("Flowbite: Component ".concat(component, " does not exist.")); + return false; + } + if (!this._instances[component][id]) { + console.warn("Flowbite: Instance with ID ".concat(id, " does not exist.")); + return false; + } + return true; + }; + return Instances; +}()); +var instances = new Instances(); +export default instances; +if (typeof window !== 'undefined') { + window.FlowbiteInstances = instances; +} +//# sourceMappingURL=instances.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/instances.js.map b/node_modules/flowbite/lib/esm/dom/instances.js.map new file mode 100644 index 0000000..dfdb723 --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/instances.js.map @@ -0,0 +1 @@ +{"version":3,"file":"instances.js","sourceRoot":"","sources":["../../../src/dom/instances.ts"],"names":[],"mappings":"AAeA;IAkBI;QACI,IAAI,CAAC,UAAU,GAAG;YACd,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,EAAE;YACT,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,EAAE;YACjB,UAAU,EAAE,EAAE;SACjB,CAAC;IACN,CAAC;IAED,+BAAW,GAAX,UACI,SAAwC,EACxC,QAAa,EACb,EAAW,EACX,QAAgB;QAAhB,yBAAA,EAAA,gBAAgB;QAEhB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,CAAC,IAAI,CAAC,8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AU;QAEV,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,CAAC,IAAI,CAAC,8BAAuB,SAAS,qBAAkB,CAAC,CAAC;YACjE,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;YACjC,OAAO,CAAC,IAAI,CAAC,qCAA8B,EAAE,qBAAkB,CAAC,CAAC;YACjE,OAAO,KAAK,CAAC;SAChB;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IACL,gBAAC;AAAD,CAAC,AAjJD,IAiJC;AAED,IAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;AAElC,eAAe,SAAS,CAAC;AAEzB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,MAAM,CAAC,iBAAiB,GAAG,SAAS,CAAC;CACxC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/types.d.ts b/node_modules/flowbite/lib/esm/dom/types.d.ts new file mode 100644 index 0000000..b461000 --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/types.d.ts @@ -0,0 +1,10 @@ +export declare type InstanceOptions = { + id?: string; + override?: boolean; +}; +export declare type EventListenerInstance = { + element: HTMLElement; + type: string; + handler: EventListenerOrEventListenerObject; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/types.d.ts.map b/node_modules/flowbite/lib/esm/dom/types.d.ts.map new file mode 100644 index 0000000..fcee7cc --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dom/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG;IACxC,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,kCAAkC,CAAC;CAC/C,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/types.js b/node_modules/flowbite/lib/esm/dom/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/dom/types.js.map b/node_modules/flowbite/lib/esm/dom/types.js.map new file mode 100644 index 0000000..81849c0 --- /dev/null +++ b/node_modules/flowbite/lib/esm/dom/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/dom/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.d.ts b/node_modules/flowbite/lib/esm/index.d.ts new file mode 100644 index 0000000..e9525ba --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.d.ts @@ -0,0 +1,61 @@ +import './components/index'; +import './types/declarations'; +export { default as Accordion } from './components/accordion'; +export { default as Carousel } from './components/carousel'; +export { default as Collapse } from './components/collapse'; +export { default as Dial } from './components/dial'; +export { default as Dismiss } from './components/dismiss'; +export { default as Drawer } from './components/drawer'; +export { default as Dropdown } from './components/dropdown'; +export { default as Modal } from './components/modal'; +export { default as Popover } from './components/popover'; +export { default as Tabs } from './components/tabs'; +export { default as Tooltip } from './components/tooltip'; +export { default as InputCounter } from './components/input-counter'; +export { default as CopyClipboard } from './components/clipboard'; +export { default as Datepicker } from './components/datepicker'; +export * from './components/accordion/types'; +export * from './components/carousel/types'; +export * from './components/collapse/types'; +export * from './components/dial/types'; +export * from './components/dismiss/types'; +export * from './components/drawer/types'; +export * from './components/dropdown/types'; +export * from './components/modal/types'; +export * from './components/popover/types'; +export * from './components/tabs/types'; +export * from './components/tooltip/types'; +export * from './components/input-counter/types'; +export * from './components/clipboard/types'; +export * from './components/datepicker/types'; +export * from './dom/types'; +export * from './components/accordion/interface'; +export * from './components/carousel/interface'; +export * from './components/collapse/interface'; +export * from './components/dial/interface'; +export * from './components/dismiss/interface'; +export * from './components/drawer/interface'; +export * from './components/dropdown/interface'; +export * from './components/modal/interface'; +export * from './components/popover/interface'; +export * from './components/tabs/interface'; +export * from './components/tooltip/interface'; +export * from './components/input-counter/interface'; +export * from './components/clipboard/interface'; +export * from './components/datepicker/interface'; +export { initAccordions } from './components/accordion'; +export { initCarousels } from './components/carousel'; +export { initCollapses } from './components/collapse'; +export { initDials } from './components/dial'; +export { initDismisses } from './components/dismiss'; +export { initDrawers } from './components/drawer'; +export { initDropdowns } from './components/dropdown'; +export { initModals } from './components/modal'; +export { initPopovers } from './components/popover'; +export { initTabs } from './components/tabs'; +export { initTooltips } from './components/tooltip'; +export { initInputCounters } from './components/input-counter'; +export { initCopyClipboards } from './components/clipboard'; +export { initDatepickers } from './components/datepicker'; +export { initFlowbite } from './components/index'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.d.ts.map b/node_modules/flowbite/lib/esm/index.d.ts.map new file mode 100644 index 0000000..e392f92 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,sBAAsB,CAAC;AAsB9B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;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ChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.js b/node_modules/flowbite/lib/esm/index.js new file mode 100644 index 0000000..5591886 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.js @@ -0,0 +1,99 @@ +import Events from './dom/events'; +import { initAccordions } from './components/accordion'; +import { initCollapses } from './components/collapse'; +import { initCarousels } from './components/carousel'; +import { initDismisses } from './components/dismiss'; +import { initDropdowns } from './components/dropdown'; +import { initModals } from './components/modal'; +import { initDrawers } from './components/drawer'; +import { initTabs } from './components/tabs'; +import { initTooltips } from './components/tooltip'; +import { initPopovers } from './components/popover'; +import { initDials } from './components/dial'; +import { initInputCounters } from './components/input-counter'; +import { initCopyClipboards } from './components/clipboard'; +import { initDatepickers } from './components/datepicker'; +import './components/index'; +import './types/declarations'; +// setup events for data attributes +var events = new Events('load', [ + initAccordions, + initCollapses, + initCarousels, + initDismisses, + initDropdowns, + initModals, + initDrawers, + initTabs, + initTooltips, + initPopovers, + initDials, + initInputCounters, + initCopyClipboards, + initDatepickers, +]); +events.init(); +// export all components +export { default as Accordion } from './components/accordion'; +export { default as Carousel } from './components/carousel'; +export { default as Collapse } from './components/collapse'; +export { default as Dial } from './components/dial'; +export { default as Dismiss } from './components/dismiss'; +export { default as Drawer } from './components/drawer'; +export { default as Dropdown } from './components/dropdown'; +export { default as Modal } from './components/modal'; +export { default as Popover } from './components/popover'; +export { default as Tabs } from './components/tabs'; +export { default as Tooltip } from './components/tooltip'; +export { default as InputCounter } from './components/input-counter'; +export { default as CopyClipboard } from './components/clipboard'; +export { default as Datepicker } from './components/datepicker'; +// export all types +export * from './components/accordion/types'; +export * from './components/carousel/types'; +export * from './components/collapse/types'; +export * from './components/dial/types'; +export * from './components/dismiss/types'; +export * from './components/drawer/types'; +export * from './components/dropdown/types'; +export * from './components/modal/types'; +export * from './components/popover/types'; +export * from './components/tabs/types'; +export * from './components/tooltip/types'; +export * from './components/input-counter/types'; +export * from './components/clipboard/types'; +export * from './components/datepicker/types'; +export * from './dom/types'; +// export all interfaces +export * from './components/accordion/interface'; +export * from './components/carousel/interface'; +export * from './components/collapse/interface'; +export * from './components/dial/interface'; +export * from './components/dismiss/interface'; +export * from './components/drawer/interface'; +export * from './components/dropdown/interface'; +export * from './components/modal/interface'; +export * from './components/popover/interface'; +export * from './components/tabs/interface'; +export * from './components/tooltip/interface'; +export * from './components/input-counter/interface'; +export * from './components/clipboard/interface'; +export * from './components/datepicker/interface'; +// export init functions +export { initAccordions } from './components/accordion'; +export { initCarousels } from './components/carousel'; +export { initCollapses } from './components/collapse'; +export { initDials } from './components/dial'; +export { initDismisses } from './components/dismiss'; +export { initDrawers } from './components/drawer'; +export { initDropdowns } from './components/dropdown'; +export { initModals } from './components/modal'; +export { initPopovers } from './components/popover'; +export { initTabs } from './components/tabs'; +export { initTooltips } from './components/tooltip'; +export { initInputCounters } from './components/input-counter'; +export { initCopyClipboards } from './components/clipboard'; +export { initDatepickers } from './components/datepicker'; +// export all init functions +export { initFlowbite } from './components/index'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.js.map b/node_modules/flowbite/lib/esm/index.js.map new file mode 100644 index 0000000..4d455ce --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,O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qBAAqB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,4BAA4B;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.phoenix.d.ts b/node_modules/flowbite/lib/esm/index.phoenix.d.ts new file mode 100644 index 0000000..82d80c7 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.phoenix.d.ts @@ -0,0 +1,35 @@ +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import InputCounter from './components/input-counter'; +import CopyClipboard from './components/clipboard'; +import Datepicker from './components/datepicker'; +import './components/index'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + InputCounter: typeof InputCounter; + CopyClipboard: typeof CopyClipboard; + Datepicker: typeof Datepicker; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.phoenix.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.phoenix.d.ts.map b/node_modules/flowbite/lib/esm/index.phoenix.d.ts.map new file mode 100644 index 0000000..060b009 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.phoenix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.phoenix.d.ts","sourceRoot":"","sources":["../../src/index.phoenix.ts"],"names":[],"mappings":"AACA,OAAO,SAA6B,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAA0B,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAuB,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAqB,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,YAAmC,MAAM,4BAA4B,CAAC;AAC7E,OAAO,aAAqC,MAAM,wBAAwB,CAAC;AAC3E,OAAO,UAA+B,MAAM,yBAAyB,CAAC;AACtE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;AAsClC,wBAgBE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.phoenix.js b/node_modules/flowbite/lib/esm/index.phoenix.js new file mode 100644 index 0000000..326c04a --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.phoenix.js @@ -0,0 +1,69 @@ +// core components +import Accordion, { initAccordions } from './components/accordion'; +import Carousel, { initCarousels } from './components/carousel'; +import Collapse, { initCollapses } from './components/collapse'; +import Dial, { initDials } from './components/dial'; +import Dismiss, { initDismisses } from './components/dismiss'; +import Drawer, { initDrawers } from './components/drawer'; +import Dropdown, { initDropdowns } from './components/dropdown'; +import Modal, { initModals } from './components/modal'; +import Popover, { initPopovers } from './components/popover'; +import Tabs, { initTabs } from './components/tabs'; +import Tooltip, { initTooltips } from './components/tooltip'; +import InputCounter, { initInputCounters } from './components/input-counter'; +import CopyClipboard, { initCopyClipboards } from './components/clipboard'; +import Datepicker, { initDatepickers } from './components/datepicker'; +import './components/index'; +import Events from './dom/events'; +var liveViewLoadEvents = new Events('phx:page-loading-stop', [ + initAccordions, + initCollapses, + initCarousels, + initDismisses, + initDropdowns, + initModals, + initDrawers, + initTabs, + initTooltips, + initPopovers, + initDials, + initInputCounters, + initCopyClipboards, + initDatepickers, +]); +liveViewLoadEvents.init(); +var regularViewLoadEvents = new Events('load', [ + initAccordions, + initCollapses, + initCarousels, + initDismisses, + initDropdowns, + initModals, + initDrawers, + initTabs, + initTooltips, + initPopovers, + initDials, + initInputCounters, + initCopyClipboards, + initDatepickers, +]); +regularViewLoadEvents.init(); +export default { + Accordion: Accordion, + Carousel: Carousel, + Collapse: Collapse, + Dial: Dial, + Drawer: Drawer, + Dismiss: Dismiss, + Dropdown: Dropdown, + Modal: Modal, + Popover: Popover, + Tabs: Tabs, + Tooltip: Tooltip, + InputCounter: InputCounter, + CopyClipboard: CopyClipboard, + Datepicker: Datepicker, + Events: Events, +}; +//# sourceMappingURL=index.phoenix.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.phoenix.js.map b/node_modules/flowbite/lib/esm/index.phoenix.js.map new file mode 100644 index 0000000..b9f63e3 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.phoenix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.phoenix.js","sourceRoot":"","sources":["../../src/index.phoenix.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,SAAS,EAAE,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAAQ,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Aa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,UAAU;IACV,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;CAClB,CAAC,CAAC;AACH,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAE7B,eAAe;IACX,SAAS,WAAA;IACT,QAAQ,UAAA;IACR,QAAQ,UAAA;IACR,IAAI,MAAA;IACJ,MAAM,QAAA;IACN,OAAO,SAAA;IACP,QAAQ,UAAA;IACR,KAAK,OAAA;IACL,OAAO,SAAA;IACP,IAAI,MAAA;IACJ,OAAO,SAAA;IACP,YAAY,cAAA;IACZ,aAAa,eAAA;IACb,UAAU,YAAA;IACV,MAAM,QAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.turbo.d.ts b/node_modules/flowbite/lib/esm/index.turbo.d.ts new file mode 100644 index 0000000..7448488 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.turbo.d.ts @@ -0,0 +1,34 @@ +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import InputCounter from './components/input-counter'; +import CopyClipboard from './components/clipboard'; +import Datepicker from './components/datepicker'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + InputCounter: typeof InputCounter; + CopyClipboard: typeof CopyClipboard; + Datepicker: typeof Datepicker; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.turbo.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.turbo.d.ts.map b/node_modules/flowbite/lib/esm/index.turbo.d.ts.map new file mode 100644 index 0000000..af258d3 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.turbo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.turbo.d.ts","sourceRoot":"","sources":["../../src/index.turbo.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,aAAa,MAAM,wBAAwB,CAAC;AACnD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAEjD,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;AAyBlC,wBAgBE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.turbo.js b/node_modules/flowbite/lib/esm/index.turbo.js new file mode 100644 index 0000000..c017b69 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.turbo.js @@ -0,0 +1,53 @@ +// core components +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import InputCounter from './components/input-counter'; +import CopyClipboard from './components/clipboard'; +import Datepicker from './components/datepicker'; +import { initFlowbite } from './components/index'; +import Events from './dom/events'; +// Since turbo maintainers refuse to add this event, we'll add it ourselves +// https://discuss.hotwired.dev/t/event-to-know-a-turbo-stream-has-been-rendered/1554/10 +var afterRenderEvent = new Event('turbo:after-stream-render'); +addEventListener('turbo:before-stream-render', function (event) { + var originalRender = event.detail.render; + event.detail.render = function (streamElement) { + originalRender(streamElement); + window.dispatchEvent(afterRenderEvent); + }; +}); +var turboLoadEvents = new Events('turbo:load', [initFlowbite]); +turboLoadEvents.init(); +var turboFrameLoadEvents = new Events('turbo:frame-load', [initFlowbite]); +turboFrameLoadEvents.init(); +var turboStreamLoadEvents = new Events('turbo:after-stream-render', [ + initFlowbite, +]); +turboStreamLoadEvents.init(); +export default { + Accordion: Accordion, + Carousel: Carousel, + Collapse: Collapse, + Dial: Dial, + Drawer: Drawer, + Dismiss: Dismiss, + Dropdown: Dropdown, + Modal: Modal, + Popover: Popover, + Tabs: Tabs, + Tooltip: Tooltip, + InputCounter: InputCounter, + CopyClipboard: CopyClipboard, + Datepicker: Datepicker, + Events: Events, +}; +//# sourceMappingURL=index.turbo.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.turbo.js.map b/node_modules/flowbite/lib/esm/index.turbo.js.map new file mode 100644 index 0000000..69d6448 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.turbo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.turbo.js","sourceRoot":"","sources":["../../src/index.turbo.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,MAAM,M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A;IACR,QAAQ,UAAA;IACR,IAAI,MAAA;IACJ,MAAM,QAAA;IACN,OAAO,SAAA;IACP,QAAQ,UAAA;IACR,KAAK,OAAA;IACL,OAAO,SAAA;IACP,IAAI,MAAA;IACJ,OAAO,SAAA;IACP,YAAY,cAAA;IACZ,aAAa,eAAA;IACb,UAAU,YAAA;IACV,MAAM,QAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.umd.d.ts b/node_modules/flowbite/lib/esm/index.umd.d.ts new file mode 100644 index 0000000..129d641 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.umd.d.ts @@ -0,0 +1,36 @@ +import './flowbite.css'; +import Accordion from './components/accordion'; +import Carousel from './components/carousel'; +import Collapse from './components/collapse'; +import Dial from './components/dial'; +import Dismiss from './components/dismiss'; +import Drawer from './components/drawer'; +import Dropdown from './components/dropdown'; +import Modal from './components/modal'; +import Popover from './components/popover'; +import Tabs from './components/tabs'; +import Tooltip from './components/tooltip'; +import InputCounter from './components/input-counter'; +import CopyClipboard from './components/clipboard'; +import Datepicker from './components/datepicker'; +import './components/index'; +import Events from './dom/events'; +declare const _default: { + Accordion: typeof Accordion; + Carousel: typeof Carousel; + Collapse: typeof Collapse; + Dial: typeof Dial; + Drawer: typeof Drawer; + Dismiss: typeof Dismiss; + Dropdown: typeof Dropdown; + Modal: typeof Modal; + Popover: typeof Popover; + Tabs: typeof Tabs; + Tooltip: typeof Tooltip; + InputCounter: typeof InputCounter; + CopyClipboard: typeof CopyClipboard; + Datepicker: typeof Datepicker; + Events: typeof Events; +}; +export default _default; +//# sourceMappingURL=index.umd.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.umd.d.ts.map b/node_modules/flowbite/lib/esm/index.umd.d.ts.map new file mode 100644 index 0000000..5dff765 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.umd.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.umd.d.ts","sourceRoot":"","sources":["../../src/index.umd.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAGxB,OAAO,SAA6B,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAmB,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAA0B,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAuB,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAA2B,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAqB,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,YAAmC,MAAM,4BAA4B,CAAC;AAC7E,OAAO,aAAqC,MAAM,wBAAwB,CAAC;AAC3E,OAAO,UAA+B,MAAM,yBAAyB,CAAC;AACtE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;AAoBlC,wBAgBE"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.umd.js b/node_modules/flowbite/lib/esm/index.umd.js new file mode 100644 index 0000000..ec99d7a --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.umd.js @@ -0,0 +1,53 @@ +import './flowbite.css'; +// core components +import Accordion, { initAccordions } from './components/accordion'; +import Carousel, { initCarousels } from './components/carousel'; +import Collapse, { initCollapses } from './components/collapse'; +import Dial, { initDials } from './components/dial'; +import Dismiss, { initDismisses } from './components/dismiss'; +import Drawer, { initDrawers } from './components/drawer'; +import Dropdown, { initDropdowns } from './components/dropdown'; +import Modal, { initModals } from './components/modal'; +import Popover, { initPopovers } from './components/popover'; +import Tabs, { initTabs } from './components/tabs'; +import Tooltip, { initTooltips } from './components/tooltip'; +import InputCounter, { initInputCounters } from './components/input-counter'; +import CopyClipboard, { initCopyClipboards } from './components/clipboard'; +import Datepicker, { initDatepickers } from './components/datepicker'; +import './components/index'; +import Events from './dom/events'; +var events = new Events('load', [ + initAccordions, + initCollapses, + initCarousels, + initDismisses, + initDropdowns, + initModals, + initDrawers, + initTabs, + initTooltips, + initPopovers, + initDials, + initCopyClipboards, + initInputCounters, + initDatepickers, +]); +events.init(); +export default { + Accordion: Accordion, + Carousel: Carousel, + Collapse: Collapse, + Dial: Dial, + Drawer: Drawer, + Dismiss: Dismiss, + Dropdown: Dropdown, + Modal: Modal, + Popover: Popover, + Tabs: Tabs, + Tooltip: Tooltip, + InputCounter: InputCounter, + CopyClipboard: CopyClipboard, + Datepicker: Datepicker, + Events: Events, +}; +//# sourceMappingURL=index.umd.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/index.umd.js.map b/node_modules/flowbite/lib/esm/index.umd.js.map new file mode 100644 index 0000000..4aa54e0 --- /dev/null +++ b/node_modules/flowbite/lib/esm/index.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.umd.js","sourceRoot":"","sources":["../../src/index.umd.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,kBAAkB;AAClB,OAAO,SAAS,EAAE,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,YAAY,EAAE,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,aAAa,EAAE,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,UAAU,EAAE,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,IAAM,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE;IAC9B,cAAc;IACd,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,UAAU;IACV,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;CAClB,CAAC,CAAC;AACH,MAAM,CAAC,IAAI,EAAE,CAAC;AAEd,eAAe;IACX,SAAS,WAAA;IACT,QAAQ,UAAA;IACR,QAAQ,UAAA;IACR,IAAI,MAAA;IACJ,MAAM,QAAA;IACN,OAAO,SAAA;IACP,QAAQ,UAAA;IACR,KAAK,OAAA;IACL,OAAO,SAAA;IACP,IAAI,MAAA;IACJ,OAAO,SAAA;IACP,YAAY,cAAA;IACZ,aAAa,eAAA;IACb,UAAU,YAAA;IACV,MAAM,QAAA;CACT,CAAC"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/types/declarations.d.ts b/node_modules/flowbite/lib/esm/types/declarations.d.ts new file mode 100644 index 0000000..1e2caf9 --- /dev/null +++ b/node_modules/flowbite/lib/esm/types/declarations.d.ts @@ -0,0 +1,19 @@ +declare module 'flowbite-datepicker' { + class Datepicker { + constructor(element: HTMLElement, options: any); + destroy(): void; + show(): void; + hide(): void; + setDate(date: string): void; + getDate(): string; + } + class DateRangePicker { + constructor(element: HTMLElement, options: any); + destroy(): void; + hide(): void; + show(): void; + setDates(dates: string[]): void; + getDates(): string[]; + } +} +//# sourceMappingURL=declarations.d.ts.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/types/declarations.d.ts.map b/node_modules/flowbite/lib/esm/types/declarations.d.ts.map new file mode 100644 index 0000000..97b642f --- /dev/null +++ b/node_modules/flowbite/lib/esm/types/declarations.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"declarations.d.ts","sourceRoot":"","sources":["../../../src/types/declarations.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,qBAAqB,CAAC;IACjC,MAAa,UAAU;oBACP,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG;QAC9C,OAAO,IAAI,IAAI;QACf,IAAI,IAAI,IAAI;QACZ,IAAI,IAAI,IAAI;QACZ,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;QAC3B,OAAO,IAAI,MAAM;KACpB;IAED,MAAa,eAAe;oBACZ,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG;QAC9C,OAAO,IAAI,IAAI;QACf,IAAI,IAAI,IAAI;QACZ,IAAI,IAAI,IAAI;QACZ,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;QAC/B,QAAQ,IAAI,MAAM,EAAE;KACvB;CACJ"} \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/types/declarations.js b/node_modules/flowbite/lib/esm/types/declarations.js new file mode 100644 index 0000000..af74c58 --- /dev/null +++ b/node_modules/flowbite/lib/esm/types/declarations.js @@ -0,0 +1 @@ +//# sourceMappingURL=declarations.js.map \ No newline at end of file diff --git a/node_modules/flowbite/lib/esm/types/declarations.js.map b/node_modules/flowbite/lib/esm/types/declarations.js.map new file mode 100644 index 0000000..4f7d8bc --- /dev/null +++ b/node_modules/flowbite/lib/esm/types/declarations.js.map @@ -0,0 +1 @@ +{"version":3,"file":"declarations.js","sourceRoot":"","sources":["../../../src/types/declarations.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/flowbite/package.json b/node_modules/flowbite/package.json new file mode 100644 index 0000000..6d61273 --- /dev/null +++ b/node_modules/flowbite/package.json @@ -0,0 +1,123 @@ +{ + "name": "flowbite", + "version": "2.5.2", + "description": "The most popular library of interactive components built with Tailwind CSS", + "keywords": [ + "flowbite", + "typescript", + "javascript", + "webpack", + "html", + "css", + "component library", + "ui components", + "tailwind", + "tailwind css", + "tailwind components", + "tailwind elements", + "tailwind library", + "tailwind sections", + "tailwind css", + "tailwind ui", + "tailwind react", + "tailwind vue", + "tailwind angular", + "tailwind svelte", + "tailwind django", + "tailwind ruby on rails", + "tailwind laravel", + "tailwind nuxt", + "tailwind next", + "tailwind astro", + "tailwind flask", + "eslint", + "prettier", + "cjs", + "esm", + "umd" + ], + "license": "MIT", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/esm/index.d.ts", + "style": "dist/flowbite.min.css", + "repository": "https://github.com/themesberg/flowbite.git", + "bugs": "https://github.com/themesberg/flowbite/issues", + "homepage": "https://flowbite.com", + "contributors": [ + "Zoltán Szőgyényi (https://x.com/zoltanszogyenyi)", + "Robert Tanislav (https://x.com/roberttanislav)" + ], + "author": "Bergside Inc.", + "scripts": { + "start": "NODE_ENV=development run-p start:*", + "start:hugo": "hugo server -D", + "start:webpack": "webpack --mode=development --watch", + "build": "NODE_ENV=production && HUGO_ENV=production && run-s build:webpack build:hugo", + "build:hugo": "hugo", + "build:webpack": "webpack --mode=production", + "build:css:min": "NPM_ENV=production npx postcss src/flowbite.css > dist/flowbite.min.css", + "build:css": "NPM_ENV=development npx postcss src/flowbite.css > dist/flowbite.css", + "build:js": "run-s build:webpack", + "copy:js:dist": "copyfiles --flat static/flowbite.js dist && copyfiles --flat static/flowbite.js.map dist && copyfiles --flat static/flowbite.min.js.map dist && copyfiles --flat static/flowbite.min.js dist && copyfiles --flat static/flowbite.turbo.js dist && copyfiles --flat static/flowbite.turbo.min.js dist && copyfiles --flat static/flowbite.turbo.js.map dist && copyfiles --flat static/flowbite.turbo.min.js.map dist && copyfiles --flat static/flowbite.phoenix.js dist && copyfiles --flat static/flowbite.phoenix.min.js dist && copyfiles --flat static/flowbite.phoenix.js.map dist && copyfiles --flat static/flowbite.phoenix.min.js.map dist", + "build:dist": "mkdir -p dist && run-s build:css:min build:css build:js copy:js:dist", + "build:lib": "tsc --outDir lib/cjs && tsc -m es6 --outDir lib/esm", + "clean:lib": "shx rm -rf lib", + "clean:dist": "shx rm -rf dist", + "build:npm": "run-s clean:lib build:lib clean:dist build:dist", + "lint": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-path .gitignore" + }, + "devDependencies": { + "@babel/core": "^7.14.8", + "@babel/preset-env": "^7.14.8", + "@docsearch/js": "^3.0.0-alpha.42", + "@typescript-eslint/eslint-plugin": "^5.46.1", + "@typescript-eslint/parser": "^5.46.1", + "autoprefixer": "^10.3.3", + "babel-loader": "^8.2.2", + "copyfiles": "^2.4.1", + "core-js": "^3.8.1", + "css-loader": "^5.2.7", + "css-minimizer-webpack-plugin": "^3.0.2", + "cssnano": "^5.0.8", + "eslint": "^8.29.0", + "eslint-config-prettier": "^8.0.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-tailwindcss": "^3.7.1", + "file-loader": "^6.2.0", + "flowbite-typography": "^1.0.4", + "mini-css-extract-plugin": "^1.3.3", + "npm-run-all": "^4.1.5", + "postcss": "^8.3.6", + "postcss-cli": "^8.3.1", + "postcss-loader": "^4.3.0", + "postcss-preset-env": "^6.7.0", + "prettier": "^2.8.1", + "prettier-plugin-tailwindcss": "^0.2.1", + "shx": "^0.3.4", + "source-map-loader": "^2.0.0", + "style-loader": "^2.0.0", + "tailwindcss": "^3.4.1", + "terser-webpack-plugin": "^5.3.6", + "ts-loader": "^9.4.2", + "typescript": "^4.9.4", + "webpack": "^5.47.0", + "webpack-cli": "^4.7.2", + "webpack-dev-server": "^4.11.1", + "windicss": "^3.5.6", + "yarn": "^1.22.10" + }, + "dependencies": { + "@popperjs/core": "^2.9.3", + "flowbite-datepicker": "^1.3.0", + "mini-svg-data-uri": "^1.4.3" + }, + "files": [ + "lib", + "dist", + "types", + "plugin.d.ts", + "plugin.js", + "plugin-windicss.js" + ] +} diff --git a/node_modules/flowbite/plugin-windicss.js b/node_modules/flowbite/plugin-windicss.js new file mode 100644 index 0000000..c9bd26e --- /dev/null +++ b/node_modules/flowbite/plugin-windicss.js @@ -0,0 +1,588 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const svgToDataUri = require('mini-svg-data-uri'); +const plugin = require('windicss/plugin'); +const defaultTheme = require('windicss/defaultTheme'); +const colors = require('windicss/colors'); +const [baseFontSize, { lineHeight: baseLineHeight }] = + defaultTheme.fontSize.base; +const { spacing, borderWidth, borderRadius } = defaultTheme; + +module.exports = plugin( + function ({ addBase, theme }) { + addBase({ + [[ + "[type='text']", + "[type='email']", + "[type='url']", + "[type='password']", + "[type='number']", + "[type='date']", + "[type='datetime-local']", + "[type='month']", + "[type='search']", + "[type='tel']", + "[type='time']", + "[type='week']", + '[multiple]', + 'textarea', + 'select', + ]]: { + appearance: 'none', + 'background-color': '#fff', + 'border-color': theme('colors.gray.500', colors.gray[500]), + 'border-width': borderWidth['DEFAULT'], + 'border-radius': borderRadius.none, + 'padding-top': spacing[2], + 'padding-right': spacing[3], + 'padding-bottom': spacing[2], + 'padding-left': spacing[3], + 'font-size': baseFontSize, + 'line-height': baseLineHeight, + '--tw-shadow': '0 0 #0000', + '&:focus': { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '0px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': theme( + 'colors.blue.600', + colors.blue[600] + ), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + 'border-color': theme('colors.blue.600', colors.blue[600]), + }, + }, + [['input::placeholder', 'textarea::placeholder']]: { + color: theme('colors.gray.500', colors.gray[500]), + opacity: '1', + }, + ['::-webkit-datetime-edit-fields-wrapper']: { + padding: '0', + }, + ['::-webkit-date-and-time-value']: { + 'min-height': '1.5em', + }, + ['select']: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-position': `right ${spacing[2]} center`, + 'background-repeat': `no-repeat`, + 'background-size': `1.5em 1.5em`, + 'padding-right': spacing[10], + 'print-color-adjust': `exact`, + }, + ['[multiple]']: { + 'background-image': 'initial', + 'background-position': 'initial', + 'background-repeat': 'unset', + 'background-size': 'initial', + 'padding-right': spacing[3], + 'print-color-adjust': 'unset', + }, + [[`[type='checkbox']`, `[type='radio']`]]: { + appearance: 'none', + padding: '0', + 'print-color-adjust': 'exact', + display: 'inline-block', + 'vertical-align': 'middle', + 'background-origin': 'border-box', + 'user-select': 'none', + 'flex-shrink': '0', + height: spacing[4], + width: spacing[4], + color: theme('colors.blue.600', colors.blue[600]), + 'background-color': '#fff', + 'border-color': theme('colors.gray.500', colors.gray[500]), + 'border-width': borderWidth['DEFAULT'], + '--tw-shadow': '0 0 #0000', + }, + [`[type='checkbox']`]: { + 'border-radius': borderRadius['none'], + }, + [`[type='radio']`]: { + 'border-radius': '100%', + }, + [[`[type='checkbox']:focus`, `[type='radio']:focus`]]: { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '2px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': theme('colors.blue.600', colors.blue[600]), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + }, + [[ + `[type='checkbox']:checked`, + `[type='radio']:checked`, + `.dark [type='checkbox']:checked`, + `.dark [type='radio']:checked`, + ]]: { + 'border-color': `transparent`, + 'background-color': `currentColor`, + 'background-size': `100% 100%`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + }, + [`[type='checkbox']:checked`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + }, + [`[type='radio']:checked`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + }, + [`[type='checkbox']:indeterminate`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'border-color': `transparent`, + 'background-color': `currentColor`, + 'background-size': `100% 100%`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + }, + [[ + `[type='checkbox']:indeterminate:hover`, + `[type='checkbox']:indeterminate:focus`, + ]]: { + 'border-color': 'transparent', + 'background-color': 'currentColor', + }, + [`[type='file']`]: { + background: 'unset', + 'border-color': 'inherit', + 'border-width': '0', + 'border-radius': '0', + padding: '0', + 'font-size': 'unset', + 'line-height': 'inherit', + }, + [`[type='file']:focus`]: { + outline: `1px auto inherit`, + }, + [[`input[type=file]::file-selector-button`]]: { + color: 'white', + background: theme('colors.gray.800', colors.gray[800]), + border: 0, + 'font-weight': theme('fontWeight.medium'), + 'font-size': theme('fontSize.sm'), + cursor: 'pointer', + 'padding-top': spacing[2.5], + 'padding-bottom': spacing[2.5], + 'padding-left': spacing[8], + 'padding-right': spacing[4], + 'margin-inline-start': '-1rem', + 'margin-inline-end': '1rem', + '&:hover': { + background: theme('colors.gray.700', colors.gray[700]), + }, + }, + [[`.dark input[type=file]::file-selector-button`]]: { + color: 'white', + background: theme('colors.gray.600', colors.gray[600]), + '&:hover': { + background: theme('colors.gray.500', colors.gray[500]), + }, + }, + [[`input[type="range"]::-webkit-slider-thumb`]]: { + height: spacing[5], + width: spacing[5], + background: theme('colors.blue.600', colors.blue[600]), + 'border-radius': borderRadius.full, + border: 0, + appearance: 'none', + '-moz-appearance': 'none', + '-webkit-appearance': 'none', + cursor: 'pointer', + }, + [[`input[type="range"]:disabled::-webkit-slider-thumb`]]: { + background: theme('colors.gray.400', colors.gray[400]), + }, + [[`.dark input[type="range"]:disabled::-webkit-slider-thumb`]]: { + background: theme('colors.gray.500', colors.gray[500]), + }, + [[`input[type="range"]:focus::-webkit-slider-thumb`]]: { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-offset-shadow': + 'var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)', + '--tw-ring-shadow': + 'var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)', + 'box-shadow': + 'var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)', + '--tw-ring-opacity': 1, + '--tw-ring-color': 'rgb(164 202 254 / var(--tw-ring-opacity))', + }, + [[`input[type="range"]::-moz-range-thumb`]]: { + height: spacing[5], + width: spacing[5], + background: theme('colors.blue.600', colors.blue[600]), + 'border-radius': borderRadius.full, + border: 0, + appearance: 'none', + '-moz-appearance': 'none', + '-webkit-appearance': 'none', + cursor: 'pointer', + }, + [[`input[type="range"]:disabled::-moz-range-thumb`]]: { + background: theme('colors.gray.400', colors.gray[400]), + }, + [[`.dark input[type="range"]:disabled::-moz-range-thumb`]]: { + background: theme('colors.gray.500', colors.gray[500]), + }, + [[`input[type="range"]::-moz-range-progress`]]: { + background: theme('colors.blue.500', colors.blue[500]), + }, + [[`input[type="range"]::-ms-fill-lower`]]: { + background: theme('colors.blue.500', colors.blue[500]), + }, + [[`input[type="range"].range-sm::-webkit-slider-thumb`]]: { + height: spacing[4], + width: spacing[4], + }, + [[`input[type="range"].range-lg::-webkit-slider-thumb`]]: { + height: spacing[6], + width: spacing[6], + }, + [[`input[type="range"].range-sm::-moz-range-thumb`]]: { + height: spacing[4], + width: spacing[4], + }, + [[`input[type="range"].range-lg::-moz-range-thumb`]]: { + height: spacing[6], + width: spacing[6], + }, + // remove from v2.x+ + ['.toggle-bg:after']: { + content: '""', + position: 'absolute', + top: spacing[0.5], + left: spacing[0.5], + background: 'white', + 'border-color': theme('colors.gray.300', colors.gray[300]), + 'border-width': borderWidth['DEFAULT'], + 'border-radius': borderRadius.full, + height: theme('height.5'), + width: theme('width.5'), + 'transition-property': + 'background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter', + 'transition-duration': '.15s', + 'box-shadow': + 'var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)', + }, + ['input:checked + .toggle-bg:after']: { + transform: 'translateX(100%);', + 'border-color': 'white', + }, + ['input:checked + .toggle-bg']: { + background: theme('colors.blue.600', colors.gray[600]), + 'border-color': theme('colors.blue.600', colors.gray[600]), + }, + // remove from v2.x+ END + [['.tooltip-arrow', '.tooltip-arrow:before']]: { + position: 'absolute', + width: '8px', + height: '8px', + background: 'inherit', + }, + ['.tooltip-arrow']: { + visibility: 'hidden', + }, + ['.tooltip-arrow:before']: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + }, + [`[data-tooltip-style^='light'] + .tooltip > .tooltip-arrow:before`]: + { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='top'] > .tooltip-arrow:before`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='right'] > .tooltip-arrow:before`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='bottom'] > .tooltip-arrow:before`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='left'] > .tooltip-arrow:before`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`.tooltip[data-popper-placement^='top'] > .tooltip-arrow`]: { + bottom: '-4px', + }, + [`.tooltip[data-popper-placement^='bottom'] > .tooltip-arrow`]: { + top: '-4px', + }, + [`.tooltip[data-popper-placement^='left'] > .tooltip-arrow`]: { + right: '-4px', + }, + [`.tooltip[data-popper-placement^='right'] > .tooltip-arrow`]: { + left: '-4px', + }, + ['.tooltip.invisible > .tooltip-arrow:before']: { + visibility: 'hidden', + }, + [['[data-popper-arrow]', '[data-popper-arrow]:before']]: { + position: 'absolute', + width: '8px', + height: '8px', + background: 'inherit', + }, + ['[data-popper-arrow]']: { + visibility: 'hidden', + }, + ['[data-popper-arrow]:before']: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + }, + ['[data-popper-arrow]:after']: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + position: 'absolute', + width: '9px', + height: '9px', + background: 'inherit', + }, + [`[role="tooltip"] > [data-popper-arrow]:before`]: { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`.dark [role="tooltip"] > [data-popper-arrow]:before`]: { + 'border-style': 'solid', + 'border-color': colors.gray[600], + }, + [`[role="tooltip"] > [data-popper-arrow]:after`]: { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`.dark [role="tooltip"] > [data-popper-arrow]:after`]: { + 'border-style': 'solid', + 'border-color': colors.gray[600], + }, + [`[role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:before`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:after`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:before`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:after`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:before`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:after`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:before`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:after`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`[role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]`]: + { + bottom: '-5px', + }, + [`[role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]`]: + { + top: '-5px', + }, + [`[role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]`]: + { + right: '-5px', + }, + [`[role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]`]: + { + left: '-5px', + }, + ['[role="tooltip"].invisible > [data-popper-arrow]:before']: { + visibility: 'hidden', + }, + ['[role="tooltip"].invisible > [data-popper-arrow]:after']: { + visibility: 'hidden', + }, + }); + }, + { + darkMode: 'class', // or 'media' or 'class', + theme: { + extend: { + height: { + modal: 'calc(100% - 2rem)', + }, + boxShadow: { + 'sm-light': '0 2px 5px 0px rgba(255, 255, 255, 0.08)', + }, + colors: { + transparent: 'transparent', + white: '#ffffff', + black: '#000000', + gray: { + 50: '#F9FAFB', + 100: '#F3F4F6', + 200: '#E5E7EB', + 300: '#D1D5DB', + 400: '#9CA3AF', + 500: '#6B7280', + 600: '#4B5563', + 700: '#374151', + 800: '#1F2937', + 900: '#111827', + }, + red: { + 50: '#FDF2F2', + 100: '#FDE8E8', + 200: '#FBD5D5', + 300: '#F8B4B4', + 400: '#F98080', + 500: '#F05252', + 600: '#E02424', + 700: '#C81E1E', + 800: '#9B1C1C', + 900: '#771D1D', + }, + orange: { + 50: '#FFF8F1', + 100: '#FEECDC', + 200: '#FCD9BD', + 300: '#FDBA8C', + 400: '#FF8A4C', + 500: '#FF5A1F', + 600: '#D03801', + 700: '#B43403', + 800: '#8A2C0D', + 900: '#771D1D', + }, + yellow: { + 50: '#FDFDEA', + 100: '#FDF6B2', + 200: '#FCE96A', + 300: '#FACA15', + 400: '#E3A008', + 500: '#C27803', + 600: '#9F580A', + 700: '#8E4B10', + 800: '#723B13', + 900: '#633112', + }, + green: { + 50: '#F3FAF7', + 100: '#DEF7EC', + 200: '#BCF0DA', + 300: '#84E1BC', + 400: '#31C48D', + 500: '#0E9F6E', + 600: '#057A55', + 700: '#046C4E', + 800: '#03543F', + 900: '#014737', + }, + teal: { + 50: '#EDFAFA', + 100: '#D5F5F6', + 200: '#AFECEF', + 300: '#7EDCE2', + 400: '#16BDCA', + 500: '#0694A2', + 600: '#047481', + 700: '#036672', + 800: '#05505C', + 900: '#014451', + }, + blue: { + 50: '#EBF5FF', + 100: '#E1EFFE', + 200: '#C3DDFD', + 300: '#A4CAFE', + 400: '#76A9FA', + 500: '#3F83F8', + 600: '#1C64F2', + 700: '#1A56DB', + 800: '#1E429F', + 900: '#233876', + }, + indigo: { + 50: '#F0F5FF', + 100: '#E5EDFF', + 200: '#CDDBFE', + 300: '#B4C6FC', + 400: '#8DA2FB', + 500: '#6875F5', + 600: '#5850EC', + 700: '#5145CD', + 800: '#42389D', + 900: '#362F78', + }, + purple: { + 50: '#F6F5FF', + 100: '#EDEBFE', + 200: '#DCD7FE', + 300: '#CABFFD', + 400: '#AC94FA', + 500: '#9061F9', + 600: '#7E3AF2', + 700: '#6C2BD9', + 800: '#5521B5', + 900: '#4A1D96', + }, + pink: { + 50: '#FDF2F8', + 100: '#FCE8F3', + 200: '#FAD1E8', + 300: '#F8B4D9', + 400: '#F17EB8', + 500: '#E74694', + 600: '#D61F69', + 700: '#BF125D', + 800: '#99154B', + 900: '#751A3D', + }, + }, + }, + }, + } +); diff --git a/node_modules/flowbite/plugin.d.ts b/node_modules/flowbite/plugin.d.ts new file mode 100644 index 0000000..a693e7f --- /dev/null +++ b/node_modules/flowbite/plugin.d.ts @@ -0,0 +1,2 @@ +declare const plugin: { handler: () => void }; +export = plugin; diff --git a/node_modules/flowbite/plugin.js b/node_modules/flowbite/plugin.js new file mode 100644 index 0000000..2536aea --- /dev/null +++ b/node_modules/flowbite/plugin.js @@ -0,0 +1,1462 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const svgToDataUri = require('mini-svg-data-uri'); +const plugin = require('tailwindcss/plugin'); +const defaultTheme = require('tailwindcss/defaultTheme'); +const colors = require('tailwindcss/colors'); +const [baseFontSize, { lineHeight: baseLineHeight }] = + defaultTheme.fontSize.base; +const { spacing, borderWidth, borderRadius, boxShadow } = defaultTheme; + +module.exports = plugin.withOptions( + function (options = {}) { + // Enable forms and tooltip by default if not specified in options + const { + charts = false, + datatables = false, + forms = true, + tooltips = true, + wysiwyg = false, + } = options; + + return function ({ addBase, addComponents, theme }) { + // tooltip and popover styles + if (tooltips) { + addBase({ + // remove from v2.x+ END + [['.tooltip-arrow', '.tooltip-arrow:before']]: { + position: 'absolute', + width: '8px', + height: '8px', + background: 'inherit', + }, + [['.tooltip-arrow']]: { + visibility: 'hidden', + }, + [['.tooltip-arrow:before']]: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + }, + [`[data-tooltip-style^='light'] + .tooltip > .tooltip-arrow:before`]: + { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='top'] > .tooltip-arrow:before`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='right'] > .tooltip-arrow:before`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='bottom'] > .tooltip-arrow:before`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='left'] > .tooltip-arrow:before`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`.tooltip[data-popper-placement^='top'] > .tooltip-arrow`]: + { + bottom: '-4px', + }, + [`.tooltip[data-popper-placement^='bottom'] > .tooltip-arrow`]: + { + top: '-4px', + }, + [`.tooltip[data-popper-placement^='left'] > .tooltip-arrow`]: + { + right: '-4px', + }, + [`.tooltip[data-popper-placement^='right'] > .tooltip-arrow`]: + { + left: '-4px', + }, + ['.tooltip.invisible > .tooltip-arrow:before']: { + visibility: 'hidden', + }, + [['[data-popper-arrow]', '[data-popper-arrow]:before']]: { + position: 'absolute', + width: '8px', + height: '8px', + background: 'inherit', + }, + ['[data-popper-arrow]']: { + visibility: 'hidden', + }, + ['[data-popper-arrow]:before']: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + }, + ['[data-popper-arrow]:after']: { + content: '""', + visibility: 'visible', + transform: 'rotate(45deg)', + position: 'absolute', + width: '9px', + height: '9px', + background: 'inherit', + }, + [`[role="tooltip"] > [data-popper-arrow]:before`]: { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`.dark [role="tooltip"] > [data-popper-arrow]:before`]: { + 'border-style': 'solid', + 'border-color': colors.gray[600], + }, + [`[role="tooltip"] > [data-popper-arrow]:after`]: { + 'border-style': 'solid', + 'border-color': colors.gray[200], + }, + [`.dark [role="tooltip"] > [data-popper-arrow]:after`]: { + 'border-style': 'solid', + 'border-color': colors.gray[600], + }, + [`[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:before`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]:after`]: + { + 'border-bottom-width': '1px', + 'border-right-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:before`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]:after`]: + { + 'border-bottom-width': '1px', + 'border-left-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:before`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]:after`]: + { + 'border-top-width': '1px', + 'border-left-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:before`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]:after`]: + { + 'border-top-width': '1px', + 'border-right-width': '1px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]`]: + { + bottom: '-5px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]`]: + { + top: '-5px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]`]: + { + right: '-5px', + }, + [`[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]`]: + { + left: '-5px', + }, + ['[role="tooltip"].invisible > [data-popper-arrow]:before']: + { + visibility: 'hidden', + }, + ['[role="tooltip"].invisible > [data-popper-arrow]:after']: + { + visibility: 'hidden', + }, + }); + } + + // form styles + if (forms) { + addBase({ + [[ + "[type='text']", + "[type='email']", + "[type='url']", + "[type='password']", + "[type='number']", + "[type='date']", + "[type='datetime-local']", + "[type='month']", + "[type='search']", + "[type='tel']", + "[type='time']", + "[type='week']", + '[multiple]', + 'textarea', + 'select', + ]]: { + appearance: 'none', + 'background-color': '#fff', + 'border-color': theme( + 'colors.gray.500', + colors.gray[500] + ), + 'border-width': borderWidth['DEFAULT'], + 'border-radius': borderRadius.none, + 'padding-top': spacing[2], + 'padding-right': spacing[3], + 'padding-bottom': spacing[2], + 'padding-left': spacing[3], + 'font-size': baseFontSize, + 'line-height': baseLineHeight, + '--tw-shadow': '0 0 #0000', + '&:focus': { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '0px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': theme( + 'colors.blue.600', + colors.blue[600] + ), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + 'border-color': theme( + 'colors.blue.600', + colors.blue[600] + ), + }, + }, + [['input::placeholder', 'textarea::placeholder']]: { + color: theme('colors.gray.500', colors.gray[500]), + opacity: '1', + }, + ['::-webkit-datetime-edit-fields-wrapper']: { + padding: '0', + }, + ['input[type="time"]::-webkit-calendar-picker-indicator']: { + background: 'none', + }, + ['select:not([size])']: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-position': `right ${spacing[3]} center`, + 'background-repeat': `no-repeat`, + 'background-size': `0.75em 0.75em`, + 'padding-right': spacing[10], + 'print-color-adjust': `exact`, + }, + [[`:is([dir=rtl]) select:not([size])`]]: { + backgroundPosition: `left ${spacing[3]} center`, + paddingRight: spacing[3], + paddingLeft: 0, + }, + ['[multiple]']: { + 'background-image': 'initial', + 'background-position': 'initial', + 'background-repeat': 'unset', + 'background-size': 'initial', + 'padding-right': spacing[3], + 'print-color-adjust': 'unset', + }, + [[`[type='checkbox']`, `[type='radio']`]]: { + appearance: 'none', + padding: '0', + 'print-color-adjust': 'exact', + display: 'inline-block', + 'vertical-align': 'middle', + 'background-origin': 'border-box', + 'user-select': 'none', + 'flex-shrink': '0', + height: spacing[4], + width: spacing[4], + color: theme('colors.blue.600', colors.blue[600]), + 'background-color': '#fff', + 'border-color': theme( + 'colors.gray.500', + colors.gray[500] + ), + 'border-width': borderWidth['DEFAULT'], + '--tw-shadow': '0 0 #0000', + }, + [`[type='checkbox']`]: { + 'border-radius': borderRadius['none'], + }, + [`[type='radio']`]: { + 'border-radius': '100%', + }, + [[`[type='checkbox']:focus`, `[type='radio']:focus`]]: { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '2px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': theme( + 'colors.blue.600', + colors.blue[600] + ), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + }, + [[ + `[type='checkbox']:checked`, + `[type='radio']:checked`, + `.dark [type='checkbox']:checked`, + `.dark [type='radio']:checked`, + ]]: { + 'border-color': `transparent`, + 'background-color': `currentColor`, + 'background-size': `0.55em 0.55em`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + }, + [`[type='checkbox']:checked`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-repeat': `no-repeat`, + 'background-size': `0.55em 0.55em`, + 'print-color-adjust': `exact`, + }, + [`[type='radio']:checked`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-size': `1em 1em`, + }, + [`.dark [type='radio']:checked`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-size': `1em 1em`, + }, + [`[type='checkbox']:indeterminate`]: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-color': `currentColor`, + 'border-color': `transparent`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + 'background-size': `0.55em 0.55em`, + 'print-color-adjust': `exact`, + }, + [[ + `[type='checkbox']:indeterminate:hover`, + `[type='checkbox']:indeterminate:focus`, + ]]: { + 'border-color': 'transparent', + 'background-color': 'currentColor', + }, + [`[type='file']`]: { + background: 'unset', + 'border-color': 'inherit', + 'border-width': '0', + 'border-radius': '0', + padding: '0', + 'font-size': 'unset', + 'line-height': 'inherit', + }, + [`[type='file']:focus`]: { + outline: `1px auto inherit`, + }, + [[`input[type=file]::file-selector-button`]]: { + color: 'white', + background: theme('colors.gray.800', colors.gray[800]), + border: 0, + 'font-weight': theme('fontWeight.medium'), + 'font-size': theme('fontSize.sm'), + cursor: 'pointer', + 'padding-top': spacing[2.5], + 'padding-bottom': spacing[2.5], + 'padding-left': spacing[8], + 'padding-right': spacing[4], + 'margin-inline-start': '-1rem', + 'margin-inline-end': '1rem', + '&:hover': { + background: theme( + 'colors.gray.700', + colors.gray[700] + ), + }, + }, + [[`:is([dir=rtl]) input[type=file]::file-selector-button`]]: + { + paddingRight: spacing[8], + paddingLeft: spacing[4], + }, + [[`.dark input[type=file]::file-selector-button`]]: { + color: 'white', + background: theme('colors.gray.600', colors.gray[600]), + '&:hover': { + background: theme( + 'colors.gray.500', + colors.gray[500] + ), + }, + }, + [[`input[type="range"]::-webkit-slider-thumb`]]: { + height: spacing[5], + width: spacing[5], + background: theme('colors.blue.600', colors.blue[600]), + 'border-radius': borderRadius.full, + border: 0, + appearance: 'none', + '-moz-appearance': 'none', + '-webkit-appearance': 'none', + cursor: 'pointer', + }, + [[`input[type="range"]:disabled::-webkit-slider-thumb`]]: { + background: theme('colors.gray.400', colors.gray[400]), + }, + [[ + `.dark input[type="range"]:disabled::-webkit-slider-thumb`, + ]]: { + background: theme('colors.gray.500', colors.gray[500]), + }, + [[`input[type="range"]:focus::-webkit-slider-thumb`]]: { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-offset-shadow': + 'var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)', + '--tw-ring-shadow': + 'var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)', + 'box-shadow': + 'var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)', + '--tw-ring-opacity': 1, + '--tw-ring-color': + 'rgb(164 202 254 / var(--tw-ring-opacity))', + }, + [[`input[type="range"]::-moz-range-thumb`]]: { + height: spacing[5], + width: spacing[5], + background: theme('colors.blue.600', colors.blue[600]), + 'border-radius': borderRadius.full, + border: 0, + appearance: 'none', + '-moz-appearance': 'none', + '-webkit-appearance': 'none', + cursor: 'pointer', + }, + [[`input[type="range"]:disabled::-moz-range-thumb`]]: { + background: theme('colors.gray.400', colors.gray[400]), + }, + [[`.dark input[type="range"]:disabled::-moz-range-thumb`]]: + { + background: theme( + 'colors.gray.500', + colors.gray[500] + ), + }, + [[`input[type="range"]::-moz-range-progress`]]: { + background: theme('colors.blue.500', colors.blue[500]), + }, + [[`input[type="range"]::-ms-fill-lower`]]: { + background: theme('colors.blue.500', colors.blue[500]), + }, + [[`input[type="range"].range-sm::-webkit-slider-thumb`]]: { + height: spacing[4], + width: spacing[4], + }, + [[`input[type="range"].range-lg::-webkit-slider-thumb`]]: { + height: spacing[6], + width: spacing[6], + }, + [[`input[type="range"].range-sm::-moz-range-thumb`]]: { + height: spacing[4], + width: spacing[4], + }, + [[`input[type="range"].range-lg::-moz-range-thumb`]]: { + height: spacing[6], + width: spacing[6], + }, + // remove from v2.x+ + [['.toggle-bg:after']]: { + content: '""', + position: 'absolute', + top: spacing[0.5], + left: spacing[0.5], + background: 'white', + 'border-color': theme( + 'colors.gray.300', + colors.gray[300] + ), + 'border-width': borderWidth['DEFAULT'], + 'border-radius': borderRadius.full, + height: theme('height.5'), + width: theme('width.5'), + 'transition-property': + 'background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter', + 'transition-duration': '.15s', + 'box-shadow': + 'var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)', + }, + [['input:checked + .toggle-bg:after']]: { + transform: 'translateX(100%);', + 'border-color': 'white', + }, + [['input:checked + .toggle-bg']]: { + background: theme('colors.blue.600', colors.gray[600]), + 'border-color': theme( + 'colors.blue.600', + colors.gray[600] + ), + }, + }); + } + + if (wysiwyg) { + addComponents({ + '.selectedCell': { + backgroundColor: `${theme( + 'colors.gray.50', + colors.gray[50] + )}`, + }, + '.dark .selectedCell': { + backgroundColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + }, + }); + } + + // datatable styles + if (datatables) { + addComponents({ + '.datatable-wrapper': { + width: '100%', + }, + '.datatable-wrapper .datatable-top': { + display: 'flex', + justifyContent: 'space-between', + flexDirection: 'column-reverse', + alignItems: 'start', + gap: `${theme('spacing.4', spacing[4])}`, + marginBottom: `${theme('spacing.4', spacing[4])}`, + }, + '.datatable-wrapper .datatable-search .datatable-input, .datatable-wrapper .datatable-input': + { + color: `${theme( + 'colors.gray.900', + colors.gray[900] + )}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )}`, + border: `1px solid ${theme('colors.gray.300')}`, + borderRadius: `${theme( + 'borderRadius.lg', + borderRadius.lg + )}`, + backgroundColor: `${theme( + 'colors.gray.50', + colors.gray[50] + )}`, + minWidth: '16rem', + }, + '.dark .datatable-wrapper .datatable-search .datatable-input, .dark .datatable-wrapper .datatable-input': + { + color: 'white', + backgroundColor: `${theme( + 'colors.gray.800', + colors.gray[800] + )}`, + border: `1px solid ${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + }, + '.datatable-wrapper thead th .datatable-input': { + backgroundColor: 'white', + fontWeight: `${theme('fontWeight.normal')}`, + color: `${theme('colors.gray.900', colors.gray[900])}`, + paddingTop: `.35rem`, + paddingBottom: `.35rem`, + minWidth: '0', + }, + '.dark .datatable-wrapper thead th .datatable-input': { + backgroundColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + borderColor: `${theme( + 'colors.gray.600', + colors.gray[600] + )}`, + color: 'white', + }, + '.datatable-wrapper .datatable-top .datatable-dropdown': { + color: `${theme('colors.gray.500', colors.gray[500])}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )}`, + }, + '.dark .datatable-wrapper .datatable-top .datatable-dropdown': + { + color: `${theme( + 'colors.gray.400', + colors.gray[400] + )}`, + }, + '.datatable-wrapper .datatable-top .datatable-dropdown .datatable-selector': + { + backgroundColor: `${theme('colors.gray.50')}`, + color: `${theme( + 'colors.gray.900', + colors.gray[900] + )}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )}`, + border: `1px solid ${theme('colors.gray.300')}`, + borderRadius: `${theme( + 'borderRadius.lg', + borderRadius.lg + )}`, + marginRight: `${theme('spacing.1', spacing[1])}`, + minWidth: '4rem', + }, + '.dark .datatable-wrapper .datatable-top .datatable-dropdown .datatable-selector': + { + backgroundColor: `${theme( + 'colors.gray.800', + colors.gray[800] + )}`, + border: `1px solid ${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + color: 'white', + }, + '.datatable-wrapper .datatable-container thead tr.search-filtering-row th': + { + paddingTop: '0', + }, + '.datatable-wrapper .datatable-search .datatable-input:focus': + { + borderColor: `${theme( + 'colors.blue.600', + colors.blue[600] + )}`, + }, + '.datatable-wrapper .datatable-container': { + overflowX: 'auto', + }, + '.datatable-wrapper .datatable-table': { + width: '100%', + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )}`, + color: `${theme('colors.gray.500', colors.gray[500])}`, + textAlign: 'left', + }, + '.dark .datatable-wrapper .datatable-table': { + color: `${theme('colors.gray.400', colors.gray[400])}`, + }, + '.datatable-wrapper .datatable-table thead': { + fontSize: `${theme( + 'fontSize.xs', + defaultTheme.fontSize.xs + )}`, + color: `${theme('colors.gray.500', colors.gray[500])}`, + backgroundColor: `${theme( + 'colors.gray.50', + colors.gray[50] + )}`, + }, + '.dark .datatable-wrapper .datatable-table thead': { + color: `${theme('colors.gray.400', colors.gray[400])}`, + backgroundColor: `${theme( + 'colors.gray.800', + colors.gray[800] + )}`, + }, + '.datatable-wrapper .datatable-table thead th': { + whiteSpace: 'nowrap', + }, + '.datatable-wrapper .datatable-table thead th, .datatable-wrapper .datatable-table tbody th, .datatable-wrapper .datatable-table tbody td': + { + width: 'auto !important', + paddingTop: `${theme('spacing.3', spacing[3])}`, + paddingBottom: `${theme('spacing.3', spacing[3])}`, + paddingLeft: `${theme('spacing.6', spacing[6])}`, + paddingRight: `${theme('spacing.6', spacing[6])}`, + }, + '.datatable-wrapper .datatable-table thead th .datatable-sorter, .datatable-wrapper .datatable-table thead th': + { + textTransform: 'uppercase', + }, + '.datatable-wrapper .datatable-table thead th .datatable-sorter:hover, .datatable-wrapper .datatable-table thead th.datatable-ascending .datatable-sorter, .datatable-wrapper .datatable-table thead th.datatable-descending .datatable-sorter': + { + color: `${theme( + 'colors.gray.900', + colors.blue[900] + )}`, + }, + '.dark .datatable-wrapper .datatable-table thead th .datatable-sorter:hover, .dark .datatable-wrapper .datatable-table thead th.datatable-ascending .datatable-sorter, .dark .datatable-wrapper .datatable-table thead th.datatable-descending .datatable-sorter': + { + color: 'white', + }, + '.datatable-wrapper .datatable-table tbody tr.selected': { + backgroundColor: `${theme( + 'colors.gray.100', + colors.gray[100] + )}`, + }, + '.dark .datatable-wrapper .datatable-table tbody tr.selected': + { + backgroundColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + }, + '.datatable-wrapper .datatable-table tbody tr': { + borderBottom: `1px solid ${theme('colors.gray.200')}`, + }, + '.dark .datatable-wrapper .datatable-table tbody tr': { + borderBottom: `1px solid ${theme('colors.gray.700')}`, + }, + '.datatable-wrapper .datatable-table .datatable-empty': { + textAlign: 'center', + }, + '.datatable-wrapper .datatable-bottom': { + display: 'flex', + flexDirection: 'column', + justifyContent: 'space-between', + alignItems: 'start', + marginTop: `${theme('spacing.4', spacing[4])}`, + gap: `${theme('spacing.4', spacing[4])}`, + }, + '.datatable-wrapper .datatable-bottom .datatable-info': { + color: `${theme('colors.gray.500', colors.gray[500])}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )}`, + }, + '.dark .datatable-wrapper .datatable-bottom .datatable-info': + { + color: `${theme( + 'colors.gray.400', + colors.gray[400] + )}`, + }, + '.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list': + { + display: 'flex', + alignItems: 'center', + height: spacing[8], + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )}`, + }, + '.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link': + { + display: 'flex', + alignItems: 'center', + color: `${theme( + 'colors.gray.500', + colors.gray[500] + )}`, + fontWeight: `${theme('fontWeight.medium')}`, + paddingLeft: `${theme('spacing.3', spacing[3])}`, + paddingRight: `${theme('spacing.3', spacing[3])}`, + height: spacing[8], + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )}`, + borderTop: `1px solid ${theme('colors.gray.300')}`, + borderBottom: `1px solid ${theme( + 'colors.gray.300' + )}`, + borderRight: `1px solid ${theme( + 'colors.gray.300' + )}`, + }, + '.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link': + { + color: `${theme( + 'colors.gray.400', + colors.gray[400] + )}`, + borderColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + }, + '.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type, .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type': + { + position: 'relative', + }, + '.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link, .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link': + { + color: 'transparent', + }, + '.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link, .dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link': + { + color: 'transparent', + }, + '.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link::after': + { + content: `url("${svgToDataUri( + `` + )}")`, + position: 'absolute', + top: '50%', + left: '50%', + width: '1.3rem', + height: '1.3rem', + transform: 'translate(-50%, -50%)', + }, + '.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:hover::after': + { + content: `url("${svgToDataUri( + `` + )}")`, + }, + '.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link::after': + { + content: `url("${svgToDataUri( + `` + )}")`, + }, + '.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:hover::after': + { + content: `url("${svgToDataUri( + `` + )}")`, + }, + '.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link::after': + { + content: `url("${svgToDataUri( + ` + ` + )}")`, + position: 'absolute', + top: '50%', + right: '50%', + width: '1.3rem', + height: '1.3rem', + transform: 'translate(50%, -50%)', + }, + '.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:hover::after': + { + content: `url("${svgToDataUri( + ` + ` + )}")`, + }, + '.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link::after': + { + content: `url("${svgToDataUri( + ` + ` + )}")`, + }, + '.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:hover::after': + { + content: `url("${svgToDataUri( + ` + ` + )}")`, + }, + '.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link': + { + borderTopLeftRadius: `${theme( + 'borderRadius.lg', + borderRadius.lg + )}`, + borderBottomLeftRadius: `${theme( + 'borderRadius.lg', + borderRadius.lg + )}`, + borderLeft: `1px solid ${theme('colors.gray.300')}`, + }, + '.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link': + { + borderLeft: `1px solid ${theme('colors.gray.700')}`, + }, + '.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link': + { + borderTopRightRadius: `${theme( + 'borderRadius.lg', + borderRadius.lg + )}`, + borderBottomRightRadius: `${theme( + 'borderRadius.lg', + borderRadius.lg + )}`, + borderLeft: 0, + }, + '.datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link:hover': + { + backgroundColor: `${theme('colors.gray.50')}`, + color: `${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + }, + '.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link:hover': + { + backgroundColor: `${theme('colors.gray.700')}`, + color: 'white', + }, + '@screen sm': { + '.datatable-wrapper .datatable-top': { + flexDirection: 'row-reverse', + alignItems: 'center', + }, + '.datatable-wrapper .datatable-bottom': { + flexDirection: 'row', + alignItems: 'center', + }, + }, + }); + } + + // chart styles + if (charts) { + addComponents({ + '.apexcharts-canvas .apexcharts-tooltip': { + backgroundColor: 'white', + color: `${theme('colors.gray.500', colors.gray[500])}`, + border: '0 !important', + borderRadius: `${theme( + 'borderRadius.DEFAULT', + borderRadius.DEFAULT + )}`, + // padding: `${theme('spacing.3', spacing[3])}`, + boxShadow: `${theme('boxShadow.md', boxShadow.md)}`, + }, + '.dark .apexcharts-canvas .apexcharts-tooltip': { + backgroundColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + color: `${theme('colors.gray.400', colors.gray[400])}`, + borderColor: 'transparent', + boxShadow: `${theme('boxShadow.md', boxShadow.md)}`, + }, + '.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title': + { + paddingTop: `${theme('spacing.2', spacing[2])}`, + paddingBottom: `${theme('spacing.2', spacing[2])}`, + paddingRight: `${theme('spacing.3', spacing[3])}`, + paddingLeft: `${theme('spacing.3', spacing[3])}`, + marginBottom: `${theme('spacing.3', spacing[3])}`, + backgroundColor: `${theme( + 'colors.gray.100', + colors.gray[100] + )}`, + borderBottomColor: `${theme( + 'colors.gray.200', + colors.gray[200] + )}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )} !important`, + fontWeight: `${theme( + 'fontWeight.normal', + defaultTheme.fontWeight.normal + )}`, + color: `${theme( + 'colors.gray.500', + colors.gray[500] + )}`, + }, + '.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title': + { + backgroundColor: `${theme( + 'colors.gray.600', + colors.gray[600] + )}`, + borderColor: `${theme( + 'colors.gray.500', + colors.gray[500] + )}`, + color: `${theme( + 'colors.gray.400', + colors.gray[400] + )}`, + }, + '.apexcharts-canvas .apexcharts-xaxistooltip': { + color: `${theme('colors.gray.500', colors.gray[500])}`, + paddingTop: `${theme('spacing.2', spacing[2])}`, + paddingBottom: `${theme('spacing.2', spacing[2])}`, + paddingRight: `${theme('spacing.3', spacing[3])}`, + paddingLeft: `${theme('spacing.3', spacing[3])}`, + borderColor: `transparent`, + backgroundColor: 'white', + borderRadius: `${theme( + 'borderRadius.DEFAULT', + borderRadius.DEFAULT + )}`, + boxShadow: `${theme('boxShadow.md', boxShadow.md)}`, + }, + '.dark .apexcharts-canvas .apexcharts-xaxistooltip': { + color: `${theme('colors.gray.400', colors.gray[400])}`, + backgroundColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + }, + '.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label': + { + color: `${theme( + 'colors.gray.500', + colors.gray[500] + )}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )}`, + }, + '.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label': + { + color: `${theme( + 'colors.gray.400', + colors.gray[400] + )}`, + }, + '.apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value': + { + color: `${theme( + 'colors.gray.900', + colors.gray[900] + )}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )}`, + }, + ':is([dir=rtl]) .apexcharts-tooltip .apexcharts-tooltip-marker': + { + marginRight: `${theme('spacing.0', spacing[0])}`, + marginLeft: `${theme('spacing.1.5', spacing[1.5])}`, + }, + '.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value': + { + color: 'white', + }, + '.apexcharts-canvas .apexcharts-xaxistooltip-text': { + fontWeight: `${theme( + 'fontWeight.normal', + defaultTheme.fontWeight.normal + )}`, + fontSize: `${theme( + 'fontSize.sm', + defaultTheme.fontSize.sm + )} !important`, + }, + '.apexcharts-canvas .apexcharts-xaxistooltip:after, .apexcharts-canvas .apexcharts-xaxistooltip:before': + { + borderBottomColor: 'white', + }, + '.apexcharts-canvas .apexcharts-xaxistooltip:after': { + borderWidth: '8px', + marginLeft: '-8px', + }, + '.apexcharts-canvas .apexcharts-xaxistooltip:before': { + borderWidth: '10px', + marginLeft: '-10px', + }, + '.dark .apexcharts-canvas .apexcharts-xaxistooltip:after, .dark .apexcharts-canvas .apexcharts-xaxistooltip:before': + { + borderBottomColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )}`, + }, + '.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-y-group': + { + padding: '0', + }, + '.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active': + { + paddingLeft: `${theme('spacing.3', spacing[3])}`, + paddingRight: `${theme('spacing.3', spacing[3])}`, + paddingBottom: `${theme('spacing.3', spacing[3])}`, + backgroundColor: 'white !important', + color: `${theme( + 'colors.gray.500', + colors.gray[500] + )} !important`, + }, + '.dark .apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active': + { + backgroundColor: `${theme( + 'colors.gray.700', + colors.gray[700] + )} !important`, + color: `${theme( + 'colors.gray.400', + colors.gray[400] + )} !important`, + }, + '.apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active:first-of-type': + { + paddingTop: `${theme('spacing.3', spacing[3])}`, + }, + '.apexcharts-canvas .apexcharts-legend': { + padding: '0 !important', + }, + '.apexcharts-canvas .apexcharts-legend-text': { + fontSize: `${theme( + 'fontSize.xs', + defaultTheme.fontSize.xs + )}`, + fontWeight: `${theme( + 'fontWeight.medium', + defaultTheme.fontWeight.medium + )} !important`, + paddingLeft: `${theme('spacing.5', spacing[5])}`, + color: `${theme( + 'colors.gray.500', + colors.gray[500] + )} !important`, + }, + ':is([dir=rtl]) .apexcharts-canvas .apexcharts-legend-text': + { + paddingRight: `${theme('spacing.2', spacing[2])}`, + }, + '.apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover': + { + color: `${theme( + 'colors.gray.900', + colors.gray[900] + )} !important`, + }, + '.dark .apexcharts-canvas .apexcharts-legend-text': { + color: `${theme( + 'colors.gray.400', + colors.gray[400] + )} !important`, + }, + '.dark .apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover': + { + color: `white !important`, + }, + '.apexcharts-canvas .apexcharts-legend-series': { + marginLeft: `${theme('spacing.2', spacing[2])}`, + marginRight: `${theme('spacing.2', spacing[2])}`, + marginBottom: `${theme( + 'spacing.1', + spacing[1] + )} !important`, + display: 'flex', + alignItems: 'center', + }, + '.apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value': + { + fill: `${theme( + 'colors.gray.900', + colors.gray[900] + )} !important`, + fontSize: `${theme('fontSize.3xl')}`, + fontWeight: `${theme( + 'fontWeight.bold', + defaultTheme.fontWeight.bold + )}`, + }, + '.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value': + { + fill: `white !important`, + }, + '.apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label': + { + fill: `${theme( + 'colors.gray.500', + colors.gray[500] + )} !important`, + fontSize: `${theme('fontSize.base')}`, + fontWeight: `${theme( + 'fontWeight.normal', + defaultTheme.fontWeight.normal + )}`, + }, + '.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label': + { + fill: `${theme( + 'colors.gray.400', + colors.gray[400] + )} !important`, + }, + '.apexcharts-canvas .apexcharts-datalabels .apexcharts-text.apexcharts-pie-label': + { + fontSize: `${theme('fontSize.xs')} !important`, + fontWeight: `${theme( + 'fontWeight.semibold', + defaultTheme.fontWeight.semibold + )} !important`, + textShadow: `${theme( + 'boxShadow.none', + boxShadow.none + )} !important`, + filter: `none !important`, + }, + '.apexcharts-gridline, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs': + { + stroke: `${theme( + 'colors.gray.200', + colors.gray[200] + )} !important`, + }, + '.dark .apexcharts-gridline, .dark .apexcharts-xcrosshairs, .dark .apexcharts-ycrosshairs': + { + stroke: `${theme( + 'colors.gray.700', + colors.gray[700] + )} !important`, + }, + }); + } + }; + }, + function (options = {}) { + // Enable forms and tooltip by default if not specified in options + const { + charts = false, + datatables = false, + forms = true, + tooltips = true, + wysiwyg = false, + } = options; + + const safelist = [ + 'z-40', + 'w-64', + 'w-1/2', + 'rounded-l-lg', + 'rounded-r-lg', + 'rounded-s-lg', + 'rounded-e-lg', + 'bg-gray-200', + 'grid-cols-4', + 'grid-cols-7', + 'h-6', + 'leading-6', + 'h-9', + 'leading-9', + 'shadow-lg', + '!bg-gray-50', + 'dark:!bg-gray-700', + 'selectedCell', + ]; + + if (charts) { + safelist.push({ pattern: /^apexcharts-.*$/ }); + } + + if (charts) { + safelist.push({ pattern: /^datatable-.*$/ }); + } + + return { + safelist: safelist, + darkMode: 'class', // or 'media' or 'class', + theme: { + extend: { + height: { + modal: 'calc(100% - 2rem)', + }, + boxShadow: { + 'sm-light': '0 2px 5px 0px rgba(255, 255, 255, 0.08)', + }, + colors: { + transparent: 'transparent', + white: '#ffffff', + black: '#000000', + gray: { + 50: '#F9FAFB', + 100: '#F3F4F6', + 200: '#E5E7EB', + 300: '#D1D5DB', + 400: '#9CA3AF', + 500: '#6B7280', + 600: '#4B5563', + 700: '#374151', + 800: '#1F2937', + 900: '#111827', + }, + red: { + 50: '#FDF2F2', + 100: '#FDE8E8', + 200: '#FBD5D5', + 300: '#F8B4B4', + 400: '#F98080', + 500: '#F05252', + 600: '#E02424', + 700: '#C81E1E', + 800: '#9B1C1C', + 900: '#771D1D', + }, + orange: { + 50: '#FFF8F1', + 100: '#FEECDC', + 200: '#FCD9BD', + 300: '#FDBA8C', + 400: '#FF8A4C', + 500: '#FF5A1F', + 600: '#D03801', + 700: '#B43403', + 800: '#8A2C0D', + 900: '#771D1D', + }, + yellow: { + 50: '#FDFDEA', + 100: '#FDF6B2', + 200: '#FCE96A', + 300: '#FACA15', + 400: '#E3A008', + 500: '#C27803', + 600: '#9F580A', + 700: '#8E4B10', + 800: '#723B13', + 900: '#633112', + }, + green: { + 50: '#F3FAF7', + 100: '#DEF7EC', + 200: '#BCF0DA', + 300: '#84E1BC', + 400: '#31C48D', + 500: '#0E9F6E', + 600: '#057A55', + 700: '#046C4E', + 800: '#03543F', + 900: '#014737', + }, + teal: { + 50: '#EDFAFA', + 100: '#D5F5F6', + 200: '#AFECEF', + 300: '#7EDCE2', + 400: '#16BDCA', + 500: '#0694A2', + 600: '#047481', + 700: '#036672', + 800: '#05505C', + 900: '#014451', + }, + blue: { + 50: '#EBF5FF', + 100: '#E1EFFE', + 200: '#C3DDFD', + 300: '#A4CAFE', + 400: '#76A9FA', + 500: '#3F83F8', + 600: '#1C64F2', + 700: '#1A56DB', + 800: '#1E429F', + 900: '#233876', + }, + indigo: { + 50: '#F0F5FF', + 100: '#E5EDFF', + 200: '#CDDBFE', + 300: '#B4C6FC', + 400: '#8DA2FB', + 500: '#6875F5', + 600: '#5850EC', + 700: '#5145CD', + 800: '#42389D', + 900: '#362F78', + }, + purple: { + 50: '#F6F5FF', + 100: '#EDEBFE', + 200: '#DCD7FE', + 300: '#CABFFD', + 400: '#AC94FA', + 500: '#9061F9', + 600: '#7E3AF2', + 700: '#6C2BD9', + 800: '#5521B5', + 900: '#4A1D96', + }, + pink: { + 50: '#FDF2F8', + 100: '#FCE8F3', + 200: '#FAD1E8', + 300: '#F8B4D9', + 400: '#F17EB8', + 500: '#E74694', + 600: '#D61F69', + 700: '#BF125D', + 800: '#99154B', + 900: '#751A3D', + }, + }, + }, + }, + }; + } +); diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc new file mode 100644 index 0000000..71a054f --- /dev/null +++ b/node_modules/function-bind/.eslintrc @@ -0,0 +1,21 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "indent": [2, 4], + "no-new-func": [1], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + "strict": [0] + }, + }, + ], +} diff --git a/node_modules/function-bind/.github/FUNDING.yml b/node_modules/function-bind/.github/FUNDING.yml new file mode 100644 index 0000000..7448219 --- /dev/null +++ b/node_modules/function-bind/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/function-bind +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/function-bind/.github/SECURITY.md b/node_modules/function-bind/.github/SECURITY.md new file mode 100644 index 0000000..82e4285 --- /dev/null +++ b/node_modules/function-bind/.github/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/function-bind/.nycrc b/node_modules/function-bind/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/function-bind/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/function-bind/CHANGELOG.md b/node_modules/function-bind/CHANGELOG.md new file mode 100644 index 0000000..f9e6cc0 --- /dev/null +++ b/node_modules/function-bind/CHANGELOG.md @@ -0,0 +1,136 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.2](https://github.com/ljharb/function-bind/compare/v1.1.1...v1.1.2) - 2023-10-12 + +### Merged + +- Point to the correct file [`#16`](https://github.com/ljharb/function-bind/pull/16) + +### Commits + +- [Tests] migrate tests to Github Actions [`4f8b57c`](https://github.com/ljharb/function-bind/commit/4f8b57c02f2011fe9ae353d5e74e8745f0988af8) +- [Tests] remove `jscs` [`90eb2ed`](https://github.com/ljharb/function-bind/commit/90eb2edbeefd5b76cd6c3a482ea3454db169b31f) +- [meta] update `.gitignore` [`53fcdc3`](https://github.com/ljharb/function-bind/commit/53fcdc371cd66634d6e9b71c836a50f437e89fed) +- [Tests] up to `node` `v11.10`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9`; use `nvm install-latest-npm`; run audit script in tests [`1fe8f6e`](https://github.com/ljharb/function-bind/commit/1fe8f6e9aed0dfa8d8b3cdbd00c7f5ea0cd2b36e) +- [meta] add `auto-changelog` [`1921fcb`](https://github.com/ljharb/function-bind/commit/1921fcb5b416b63ffc4acad051b6aad5722f777d) +- [Robustness] remove runtime dependency on all builtins except `.apply` [`f743e61`](https://github.com/ljharb/function-bind/commit/f743e61aa6bb2360358c04d4884c9db853d118b7) +- Docs: enable badges; update wording [`503cb12`](https://github.com/ljharb/function-bind/commit/503cb12d998b5f91822776c73332c7adcd6355dd) +- [readme] update badges [`290c5db`](https://github.com/ljharb/function-bind/commit/290c5dbbbda7264efaeb886552a374b869a4bb48) +- [Tests] switch to nyc for coverage [`ea360ba`](https://github.com/ljharb/function-bind/commit/ea360ba907fc2601ed18d01a3827fa2d3533cdf8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`cae5e9e`](https://github.com/ljharb/function-bind/commit/cae5e9e07a5578dc6df26c03ee22851ce05b943c) +- [meta] add `funding` field; create FUNDING.yml [`c9f4274`](https://github.com/ljharb/function-bind/commit/c9f4274aa80ea3aae9657a3938fdba41a3b04ca6) +- [Tests] fix eslint errors from #15 [`f69aaa2`](https://github.com/ljharb/function-bind/commit/f69aaa2beb2fdab4415bfb885760a699d0b9c964) +- [actions] fix permissions [`99a0cd9`](https://github.com/ljharb/function-bind/commit/99a0cd9f3b5bac223a0d572f081834cd73314be7) +- [meta] use `npmignore` to autogenerate an npmignore file [`f03b524`](https://github.com/ljharb/function-bind/commit/f03b524ca91f75a109a5d062f029122c86ecd1ae) +- [Dev Deps] update `@ljharb/eslint‑config`, `eslint`, `tape` [`7af9300`](https://github.com/ljharb/function-bind/commit/7af930023ae2ce7645489532821e4fbbcd7a2280) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`64a9127`](https://github.com/ljharb/function-bind/commit/64a9127ab0bd331b93d6572eaf6e9971967fc08c) +- [Tests] use `aud` instead of `npm audit` [`e75069c`](https://github.com/ljharb/function-bind/commit/e75069c50010a8fcce2a9ce2324934c35fdb4386) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`d03555c`](https://github.com/ljharb/function-bind/commit/d03555ca59dea3b71ce710045e4303b9e2619e28) +- [meta] add `safe-publish-latest` [`9c8f809`](https://github.com/ljharb/function-bind/commit/9c8f8092aed027d7e80c94f517aa892385b64f09) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`baf6893`](https://github.com/ljharb/function-bind/commit/baf6893e27f5b59abe88bc1995e6f6ed1e527397) +- [meta] create SECURITY.md [`4db1779`](https://github.com/ljharb/function-bind/commit/4db17799f1f28ae294cb95e0081ca2b591c3911b) +- [Tests] add `npm run audit` [`c8b38ec`](https://github.com/ljharb/function-bind/commit/c8b38ec40ed3f85dabdee40ed4148f1748375bc2) +- Revert "Point to the correct file" [`05cdf0f`](https://github.com/ljharb/function-bind/commit/05cdf0fa205c6a3c5ba40bbedd1dfa9874f915c9) + +## [v1.1.1](https://github.com/ljharb/function-bind/compare/v1.1.0...v1.1.1) - 2017-08-28 + +### Commits + +- [Tests] up to `node` `v8`; newer npm breaks on older node; fix scripts [`817f7d2`](https://github.com/ljharb/function-bind/commit/817f7d28470fdbff8ef608d4d565dd4d1430bc5e) +- [Dev Deps] update `eslint`, `jscs`, `tape`, `@ljharb/eslint-config` [`854288b`](https://github.com/ljharb/function-bind/commit/854288b1b6f5c555f89aceb9eff1152510262084) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`83e639f`](https://github.com/ljharb/function-bind/commit/83e639ff74e6cd6921285bccec22c1bcf72311bd) +- Only apps should have lockfiles [`5ed97f5`](https://github.com/ljharb/function-bind/commit/5ed97f51235c17774e0832e122abda0f3229c908) +- Use a SPDX-compliant “license” field. [`5feefea`](https://github.com/ljharb/function-bind/commit/5feefea0dc0193993e83e5df01ded424403a5381) + +## [v1.1.0](https://github.com/ljharb/function-bind/compare/v1.0.2...v1.1.0) - 2016-02-14 + +### Commits + +- Update `eslint`, `tape`; use my personal shared `eslint` config [`9c9062a`](https://github.com/ljharb/function-bind/commit/9c9062abbe9dd70b59ea2c3a3c3a81f29b457097) +- Add `npm run eslint` [`dd96c56`](https://github.com/ljharb/function-bind/commit/dd96c56720034a3c1ffee10b8a59a6f7c53e24ad) +- [New] return the native `bind` when available. [`82186e0`](https://github.com/ljharb/function-bind/commit/82186e03d73e580f95ff167e03f3582bed90ed72) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a3dd767`](https://github.com/ljharb/function-bind/commit/a3dd76720c795cb7f4586b0544efabf8aa107b8b) +- Update `eslint` [`3dae2f7`](https://github.com/ljharb/function-bind/commit/3dae2f7423de30a2d20313ddb1edc19660142fe9) +- Update `tape`, `covert`, `jscs` [`a181eee`](https://github.com/ljharb/function-bind/commit/a181eee0cfa24eb229c6e843a971f36e060a2f6a) +- [Tests] up to `node` `v5.6`, `v4.3` [`964929a`](https://github.com/ljharb/function-bind/commit/964929a6a4ddb36fb128de2bcc20af5e4f22e1ed) +- Test up to `io.js` `v2.1` [`2be7310`](https://github.com/ljharb/function-bind/commit/2be7310f2f74886a7124ca925be411117d41d5ea) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`45f3d68`](https://github.com/ljharb/function-bind/commit/45f3d6865c6ca93726abcef54febe009087af101) +- [Dev Deps] update `tape`, `jscs` [`6e1340d`](https://github.com/ljharb/function-bind/commit/6e1340d94642deaecad3e717825db641af4f8b1f) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`d9bad2b`](https://github.com/ljharb/function-bind/commit/d9bad2b778b1b3a6dd2876087b88b3acf319f8cc) +- Update `eslint` [`935590c`](https://github.com/ljharb/function-bind/commit/935590caa024ab356102e4858e8fc315b2ccc446) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`8c9a1ef`](https://github.com/ljharb/function-bind/commit/8c9a1efd848e5167887aa8501857a0940a480c57) +- Test on `io.js` `v2.2` [`9a3a38c`](https://github.com/ljharb/function-bind/commit/9a3a38c92013aed6e108666e7bd40969b84ac86e) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`69afc26`](https://github.com/ljharb/function-bind/commit/69afc2617405b147dd2a8d8ae73ca9e9283f18b4) +- [Dev Deps] Update `tape`, `eslint` [`36c1be0`](https://github.com/ljharb/function-bind/commit/36c1be0ab12b45fe5df6b0fdb01a5d5137fd0115) +- Update `tape`, `jscs` [`98d8303`](https://github.com/ljharb/function-bind/commit/98d8303cd5ca1c6b8f985469f86b0d44d7d45f6e) +- Update `jscs` [`9633a4e`](https://github.com/ljharb/function-bind/commit/9633a4e9fbf82051c240855166e468ba8ba0846f) +- Update `tape`, `jscs` [`c80ef0f`](https://github.com/ljharb/function-bind/commit/c80ef0f46efc9791e76fa50de4414092ac147831) +- Test up to `io.js` `v3.0` [`7e2c853`](https://github.com/ljharb/function-bind/commit/7e2c8537d52ab9cf5a655755561d8917684c0df4) +- Test on `io.js` `v2.4` [`5a199a2`](https://github.com/ljharb/function-bind/commit/5a199a27ba46795ba5eaf0845d07d4b8232895c9) +- Test on `io.js` `v2.3` [`a511b88`](https://github.com/ljharb/function-bind/commit/a511b8896de0bddf3b56862daa416c701f4d0453) +- Fixing a typo from 822b4e1938db02dc9584aa434fd3a45cb20caf43 [`732d6b6`](https://github.com/ljharb/function-bind/commit/732d6b63a9b33b45230e630dbcac7a10855d3266) +- Update `jscs` [`da52a48`](https://github.com/ljharb/function-bind/commit/da52a4886c06d6490f46ae30b15e4163ba08905d) +- Lock covert to v1.0.0. [`d6150fd`](https://github.com/ljharb/function-bind/commit/d6150fda1e6f486718ebdeff823333d9e48e7430) + +## [v1.0.2](https://github.com/ljharb/function-bind/compare/v1.0.1...v1.0.2) - 2014-10-04 + +## [v1.0.1](https://github.com/ljharb/function-bind/compare/v1.0.0...v1.0.1) - 2014-10-03 + +### Merged + +- make CI build faster [`#3`](https://github.com/ljharb/function-bind/pull/3) + +### Commits + +- Using my standard jscs.json [`d8ee94c`](https://github.com/ljharb/function-bind/commit/d8ee94c993eff0a84cf5744fe6a29627f5cffa1a) +- Adding `npm run lint` [`7571ab7`](https://github.com/ljharb/function-bind/commit/7571ab7dfdbd99b25a1dbb2d232622bd6f4f9c10) +- Using consistent indentation [`e91a1b1`](https://github.com/ljharb/function-bind/commit/e91a1b13a61e99ec1e530e299b55508f74218a95) +- Updating jscs [`7e17892`](https://github.com/ljharb/function-bind/commit/7e1789284bc629bc9c1547a61c9b227bbd8c7a65) +- Using consistent quotes [`c50b57f`](https://github.com/ljharb/function-bind/commit/c50b57fcd1c5ec38320979c837006069ebe02b77) +- Adding keywords [`cb94631`](https://github.com/ljharb/function-bind/commit/cb946314eed35f21186a25fb42fc118772f9ee00) +- Directly export a function expression instead of using a declaration, and relying on hoisting. [`5a33c5f`](https://github.com/ljharb/function-bind/commit/5a33c5f45642de180e0d207110bf7d1843ceb87c) +- Naming npm URL and badge in README; use SVG [`2aef8fc`](https://github.com/ljharb/function-bind/commit/2aef8fcb79d54e63a58ae557c4e60949e05d5e16) +- Naming deps URLs in README [`04228d7`](https://github.com/ljharb/function-bind/commit/04228d766670ee45ca24e98345c1f6a7621065b5) +- Naming travis-ci URLs in README; using SVG [`62c810c`](https://github.com/ljharb/function-bind/commit/62c810c2f54ced956cd4d4ab7b793055addfe36e) +- Make sure functions are invoked correctly (also passing coverage tests) [`2b289b4`](https://github.com/ljharb/function-bind/commit/2b289b4dfbf037ffcfa4dc95eb540f6165e9e43a) +- Removing the strict mode pragmas; they make tests fail. [`1aa701d`](https://github.com/ljharb/function-bind/commit/1aa701d199ddc3782476e8f7eef82679be97b845) +- Adding myself as a contributor [`85fd57b`](https://github.com/ljharb/function-bind/commit/85fd57b0860e5a7af42de9a287f3f265fc6d72fc) +- Adding strict mode pragmas [`915b08e`](https://github.com/ljharb/function-bind/commit/915b08e084c86a722eafe7245e21db74aa21ca4c) +- Adding devDeps URLs to README [`4ccc731`](https://github.com/ljharb/function-bind/commit/4ccc73112c1769859e4ca3076caf4086b3cba2cd) +- Fixing the description. [`a7a472c`](https://github.com/ljharb/function-bind/commit/a7a472cf649af515c635cf560fc478fbe48999c8) +- Using a function expression instead of a function declaration. [`b5d3e4e`](https://github.com/ljharb/function-bind/commit/b5d3e4ea6aaffc63888953eeb1fbc7ff45f1fa14) +- Updating tape [`f086be6`](https://github.com/ljharb/function-bind/commit/f086be6029fb56dde61a258c1340600fa174d1e0) +- Updating jscs [`5f9bdb3`](https://github.com/ljharb/function-bind/commit/5f9bdb375ab13ba48f30852aab94029520c54d71) +- Updating jscs [`9b409ba`](https://github.com/ljharb/function-bind/commit/9b409ba6118e23395a4e5d83ef39152aab9d3bfc) +- Run coverage as part of tests. [`8e1b6d4`](https://github.com/ljharb/function-bind/commit/8e1b6d459f047d1bd4fee814e01247c984c80bd0) +- Run linter as part of tests [`c1ca83f`](https://github.com/ljharb/function-bind/commit/c1ca83f832df94587d09e621beba682fabfaa987) +- Updating covert [`701e837`](https://github.com/ljharb/function-bind/commit/701e83774b57b4d3ef631e1948143f43a72f4bb9) + +## [v1.0.0](https://github.com/ljharb/function-bind/compare/v0.2.0...v1.0.0) - 2014-08-09 + +### Commits + +- Make sure old and unstable nodes don't fail Travis [`27adca3`](https://github.com/ljharb/function-bind/commit/27adca34a4ab6ad67b6dfde43942a1b103ce4d75) +- Fixing an issue when the bound function is called as a constructor in ES3. [`e20122d`](https://github.com/ljharb/function-bind/commit/e20122d267d92ce553859b280cbbea5d27c07731) +- Adding `npm run coverage` [`a2e29c4`](https://github.com/ljharb/function-bind/commit/a2e29c4ecaef9e2f6cd1603e868c139073375502) +- Updating tape [`b741168`](https://github.com/ljharb/function-bind/commit/b741168b12b235b1717ff696087645526b69213c) +- Upgrading tape [`63631a0`](https://github.com/ljharb/function-bind/commit/63631a04c7fbe97cc2fa61829cc27246d6986f74) +- Updating tape [`363cb46`](https://github.com/ljharb/function-bind/commit/363cb46dafb23cb3e347729a22f9448051d78464) + +## v0.2.0 - 2014-03-23 + +### Commits + +- Updating test coverage to match es5-shim. [`aa94d44`](https://github.com/ljharb/function-bind/commit/aa94d44b8f9d7f69f10e060db7709aa7a694e5d4) +- initial [`942ee07`](https://github.com/ljharb/function-bind/commit/942ee07e94e542d91798137bc4b80b926137e066) +- Setting the bound function's length properly. [`079f46a`](https://github.com/ljharb/function-bind/commit/079f46a2d3515b7c0b308c2c13fceb641f97ca25) +- Ensuring that some older browsers will throw when given a regex. [`36ac55b`](https://github.com/ljharb/function-bind/commit/36ac55b87f460d4330253c92870aa26fbfe8227f) +- Removing npm scripts that don't have dependencies [`9d2be60`](https://github.com/ljharb/function-bind/commit/9d2be600002cb8bc8606f8f3585ad3e05868c750) +- Updating tape [`297a4ac`](https://github.com/ljharb/function-bind/commit/297a4acc5464db381940aafb194d1c88f4e678f3) +- Skipping length tests for now. [`d9891ea`](https://github.com/ljharb/function-bind/commit/d9891ea4d2aaffa69f408339cdd61ff740f70565) +- don't take my tea [`dccd930`](https://github.com/ljharb/function-bind/commit/dccd930bfd60ea10cb178d28c97550c3bc8c1e07) diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE new file mode 100644 index 0000000..62d6d23 --- /dev/null +++ b/node_modules/function-bind/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/node_modules/function-bind/README.md b/node_modules/function-bind/README.md new file mode 100644 index 0000000..814c20b --- /dev/null +++ b/node_modules/function-bind/README.md @@ -0,0 +1,46 @@ +# function-bind [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] + +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Implementation of function.prototype.bind + +Old versions of phantomjs, Internet Explorer < 9, and node < 0.6 don't support `Function.prototype.bind`. + +## Example + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + +[package-url]: https://npmjs.org/package/function-bind +[npm-version-svg]: https://versionbadg.es/Raynos/function-bind.svg +[deps-svg]: https://david-dm.org/Raynos/function-bind.svg +[deps-url]: https://david-dm.org/Raynos/function-bind +[dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg +[dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/function-bind.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/function-bind.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/function-bind.svg +[downloads-url]: https://npm-stat.com/charts.html?package=function-bind +[codecov-image]: https://codecov.io/gh/Raynos/function-bind/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/Raynos/function-bind/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/Raynos/function-bind +[actions-url]: https://github.com/Raynos/function-bind/actions diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js new file mode 100644 index 0000000..fd4384c --- /dev/null +++ b/node_modules/function-bind/implementation.js @@ -0,0 +1,84 @@ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js new file mode 100644 index 0000000..3bb6b96 --- /dev/null +++ b/node_modules/function-bind/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json new file mode 100644 index 0000000..6185963 --- /dev/null +++ b/node_modules/function-bind/package.json @@ -0,0 +1,87 @@ +{ + "name": "function-bind", + "version": "1.1.2", + "description": "Implementation of Function.prototype.bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "author": "Raynos ", + "repository": { + "type": "git", + "url": "https://github.com/Raynos/function-bind.git" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "main": "index", + "homepage": "https://github.com/Raynos/function-bind", + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.1" + }, + "license": "MIT", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepack": "npmignore --auto --commentLines=autogenerated", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc new file mode 100644 index 0000000..8a56d5b --- /dev/null +++ b/node_modules/function-bind/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": 0, + "no-magic-numbers": 0, + } +} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js new file mode 100644 index 0000000..2edecce --- /dev/null +++ b/node_modules/function-bind/test/index.js @@ -0,0 +1,252 @@ +// jscs:disable requireUseStrict + +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/node_modules/hasown/.eslintrc b/node_modules/hasown/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/hasown/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/hasown/.github/FUNDING.yml b/node_modules/hasown/.github/FUNDING.yml new file mode 100644 index 0000000..d68c8b7 --- /dev/null +++ b/node_modules/hasown/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/hasown +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/hasown/.nycrc b/node_modules/hasown/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/hasown/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/hasown/CHANGELOG.md b/node_modules/hasown/CHANGELOG.md new file mode 100644 index 0000000..2b0a980 --- /dev/null +++ b/node_modules/hasown/CHANGELOG.md @@ -0,0 +1,40 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10 + +### Commits + +- [types] use shared config [`68e9d4d`](https://github.com/inspect-js/hasOwn/commit/68e9d4dab6facb4f05f02c6baea94a3f2a4e44b2) +- [actions] remove redundant finisher; use reusable workflow [`241a68e`](https://github.com/inspect-js/hasOwn/commit/241a68e13ea1fe52bec5ba7f74144befc31fae7b) +- [Tests] increase coverage [`4125c0d`](https://github.com/inspect-js/hasOwn/commit/4125c0d6121db56ae30e38346dfb0c000b04f0a7) +- [Tests] skip `npm ls` in old node due to TS [`01b9282`](https://github.com/inspect-js/hasOwn/commit/01b92822f9971dea031eafdd14767df41d61c202) +- [types] improve predicate type [`d340f85`](https://github.com/inspect-js/hasOwn/commit/d340f85ce02e286ef61096cbbb6697081d40a12b) +- [Dev Deps] update `tape` [`70089fc`](https://github.com/inspect-js/hasOwn/commit/70089fcf544e64acc024cbe60f5a9b00acad86de) +- [Tests] use `@arethetypeswrong/cli` [`50b272c`](https://github.com/inspect-js/hasOwn/commit/50b272c829f40d053a3dd91c9796e0ac0b2af084) + +## [v2.0.1](https://github.com/inspect-js/hasOwn/compare/v2.0.0...v2.0.1) - 2024-02-10 + +### Commits + +- [types] use a handwritten d.ts file; fix exported type [`012b989`](https://github.com/inspect-js/hasOwn/commit/012b9898ccf91dc441e2ebf594ff70270a5fda58) +- [Dev Deps] update `@types/function-bind`, `@types/mock-property`, `@types/tape`, `aud`, `mock-property`, `npmignore`, `tape`, `typescript` [`977a56f`](https://github.com/inspect-js/hasOwn/commit/977a56f51a1f8b20566f3c471612137894644025) +- [meta] add `sideEffects` flag [`3a60b7b`](https://github.com/inspect-js/hasOwn/commit/3a60b7bf42fccd8c605e5f145a6fcc83b13cb46f) + +## [v2.0.0](https://github.com/inspect-js/hasOwn/compare/v1.0.1...v2.0.0) - 2023-10-19 + +### Commits + +- revamped implementation, tests, readme [`72bf8b3`](https://github.com/inspect-js/hasOwn/commit/72bf8b338e77a638f0a290c63ffaed18339c36b4) +- [meta] revamp package.json [`079775f`](https://github.com/inspect-js/hasOwn/commit/079775fb1ec72c1c6334069593617a0be3847458) +- Only apps should have lockfiles [`6640e23`](https://github.com/inspect-js/hasOwn/commit/6640e233d1bb8b65260880f90787637db157d215) + +## v1.0.1 - 2023-10-10 + +### Commits + +- Initial commit [`8dbfde6`](https://github.com/inspect-js/hasOwn/commit/8dbfde6e8fb0ebb076fab38d138f2984eb340a62) diff --git a/node_modules/hasown/LICENSE b/node_modules/hasown/LICENSE new file mode 100644 index 0000000..0314929 --- /dev/null +++ b/node_modules/hasown/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Jordan Harband and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/hasown/README.md b/node_modules/hasown/README.md new file mode 100644 index 0000000..f759b8a --- /dev/null +++ b/node_modules/hasown/README.md @@ -0,0 +1,40 @@ +# hasown [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A robust, ES3 compatible, "has own property" predicate. + +## Example + +```js +const assert = require('assert'); +const hasOwn = require('hasown'); + +assert.equal(hasOwn({}, 'toString'), false); +assert.equal(hasOwn([], 'length'), true); +assert.equal(hasOwn({ a: 42 }, 'a'), true); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/hasown +[npm-version-svg]: https://versionbadg.es/inspect-js/hasown.svg +[deps-svg]: https://david-dm.org/inspect-js/hasOwn.svg +[deps-url]: https://david-dm.org/inspect-js/hasOwn +[dev-deps-svg]: https://david-dm.org/inspect-js/hasOwn/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/hasOwn#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/hasown.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/hasown.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/hasown.svg +[downloads-url]: https://npm-stat.com/charts.html?package=hasown +[codecov-image]: https://codecov.io/gh/inspect-js/hasOwn/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/hasOwn/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/hasOwn +[actions-url]: https://github.com/inspect-js/hasOwn/actions diff --git a/node_modules/hasown/index.d.ts b/node_modules/hasown/index.d.ts new file mode 100644 index 0000000..aafdf3b --- /dev/null +++ b/node_modules/hasown/index.d.ts @@ -0,0 +1,3 @@ +declare function hasOwn(o: O, p: K): o is O & Record; + +export = hasOwn; diff --git a/node_modules/hasown/index.js b/node_modules/hasown/index.js new file mode 100644 index 0000000..34e6059 --- /dev/null +++ b/node_modules/hasown/index.js @@ -0,0 +1,8 @@ +'use strict'; + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = require('function-bind'); + +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); diff --git a/node_modules/hasown/package.json b/node_modules/hasown/package.json new file mode 100644 index 0000000..8502e13 --- /dev/null +++ b/node_modules/hasown/package.json @@ -0,0 +1,92 @@ +{ + "name": "hasown", + "version": "2.0.2", + "description": "A robust, ES3 compatible, \"has own property\" predicate.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "types": "index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "npm run tsc", + "pretest": "npm run lint", + "tsc": "tsc -p .", + "posttsc": "attw -P", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/hasOwn.git" + }, + "keywords": [ + "has", + "hasOwnProperty", + "hasOwn", + "has-own", + "own", + "has", + "property", + "in", + "javascript", + "ecmascript" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/hasOwn/issues" + }, + "homepage": "https://github.com/inspect-js/hasOwn#readme", + "dependencies": { + "function-bind": "^1.1.2" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.15.1", + "@ljharb/eslint-config": "^21.1.0", + "@ljharb/tsconfig": "^0.2.0", + "@types/function-bind": "^1.1.10", + "@types/mock-property": "^1.0.2", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "mock-property": "^1.0.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test" + ] + } +} diff --git a/node_modules/hasown/tsconfig.json b/node_modules/hasown/tsconfig.json new file mode 100644 index 0000000..0930c56 --- /dev/null +++ b/node_modules/hasown/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "@ljharb/tsconfig", + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/is-core-module/.eslintrc b/node_modules/is-core-module/.eslintrc new file mode 100644 index 0000000..f2e0726 --- /dev/null +++ b/node_modules/is-core-module/.eslintrc @@ -0,0 +1,18 @@ +{ + "extends": "@ljharb", + "root": true, + "rules": { + "func-style": 1, + }, + "overrides": [ + { + "files": "test/**", + "rules": { + "global-require": 0, + "max-depth": 0, + "max-lines-per-function": 0, + "no-negated-condition": 0, + }, + }, + ], +} diff --git a/node_modules/is-core-module/.nycrc b/node_modules/is-core-module/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-core-module/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-core-module/CHANGELOG.md b/node_modules/is-core-module/CHANGELOG.md new file mode 100644 index 0000000..ae847df --- /dev/null +++ b/node_modules/is-core-module/CHANGELOG.md @@ -0,0 +1,205 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.15.1](https://github.com/inspect-js/is-core-module/compare/v2.15.0...v2.15.1) - 2024-08-21 + +### Commits + +- [Tests] add `process.getBuiltinModule` tests [`28c7791`](https://github.com/inspect-js/is-core-module/commit/28c7791c196d58c64cfdf638b7e68ed1b62a4da0) +- [Fix] `test/mock_loader` is no longer exposed as of v22.7 [`68b08b0`](https://github.com/inspect-js/is-core-module/commit/68b08b0d7963447dbffa5142e8810dca550383af) +- [Tests] replace `aud` with `npm audit` [`32f8060`](https://github.com/inspect-js/is-core-module/commit/32f806026dac14f9016be4401a643851240c76b9) +- [Dev Deps] update `mock-property` [`f7d3c8f`](https://github.com/inspect-js/is-core-module/commit/f7d3c8f01e922be49621683eb41477c4f50522e1) +- [Dev Deps] add missing peer dep [`eaee885`](https://github.com/inspect-js/is-core-module/commit/eaee885b67238819e9c8ed5bd2098766e1d05331) + +## [v2.15.0](https://github.com/inspect-js/is-core-module/compare/v2.14.0...v2.15.0) - 2024-07-17 + +### Commits + +- [New] add `node:sea` [`2819fb3`](https://github.com/inspect-js/is-core-module/commit/2819fb3eae312fa64643bc5430ebd06ec0f3fb88) + +## [v2.14.0](https://github.com/inspect-js/is-core-module/compare/v2.13.1...v2.14.0) - 2024-06-20 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `mock-property`, `npmignore`, `tape` [`0e43200`](https://github.com/inspect-js/is-core-module/commit/0e432006d97237cc082d41e6a593e87c81068364) +- [meta] add missing `engines.node` [`4ea3af8`](https://github.com/inspect-js/is-core-module/commit/4ea3af88891a1d4f96026f0ec0ef08c67cd1bd24) +- [New] add `test/mock_loader` [`e9fbd29`](https://github.com/inspect-js/is-core-module/commit/e9fbd2951383be070aeffb9ebbf3715237282610) +- [Deps] update `hasown` [`57f1940`](https://github.com/inspect-js/is-core-module/commit/57f1940947b3e368abdf529232d2f17d88909358) + +## [v2.13.1](https://github.com/inspect-js/is-core-module/compare/v2.13.0...v2.13.1) - 2023-10-20 + +### Commits + +- [Refactor] use `hasown` instead of `has` [`0e52096`](https://github.com/inspect-js/is-core-module/commit/0e520968b0a725276b67420ab4b877486b243ae0) +- [Dev Deps] update `mock-property`, `tape` [`8736b35`](https://github.com/inspect-js/is-core-module/commit/8736b35464d0f297b55da2c6b30deee04b8303c5) + +## [v2.13.0](https://github.com/inspect-js/is-core-module/compare/v2.12.1...v2.13.0) - 2023-08-05 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `semver`, `tape` [`c75b263`](https://github.com/inspect-js/is-core-module/commit/c75b263d047cb53430c3970107e5eb64d6cd6c0c) +- [New] `node:test/reporters` and `wasi`/`node:wasi` are in v18.17 [`d76cbf8`](https://github.com/inspect-js/is-core-module/commit/d76cbf8e9b208acfd98913fed5a5f45cb15fe5dc) + +## [v2.12.1](https://github.com/inspect-js/is-core-module/compare/v2.12.0...v2.12.1) - 2023-05-16 + +### Commits + +- [Fix] `test/reporters` now requires the `node:` prefix as of v20.2 [`12183d0`](https://github.com/inspect-js/is-core-module/commit/12183d0d8e4edf56b6ce18a1b3be54bfce10175b) + +## [v2.12.0](https://github.com/inspect-js/is-core-module/compare/v2.11.0...v2.12.0) - 2023-04-10 + +### Commits + +- [actions] update rebase action to use reusable workflow [`c0a7251`](https://github.com/inspect-js/is-core-module/commit/c0a7251f734f3c621932c5fcdfd1bf966b42ca32) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`9ae8b7f`](https://github.com/inspect-js/is-core-module/commit/9ae8b7fac03c369861d0991b4a2ce8d4848e6a7d) +- [New] `test/reporters` added in v19.9, `wasi` added in v20 [`9d5341a`](https://github.com/inspect-js/is-core-module/commit/9d5341ab32053f25b7fa7db3c0e18461db24a79c) +- [Dev Deps] add missing `in-publish` dep [`5980245`](https://github.com/inspect-js/is-core-module/commit/59802456e9ac919fa748f53be9d8fbf304a197df) + +## [v2.11.0](https://github.com/inspect-js/is-core-module/compare/v2.10.0...v2.11.0) - 2022-10-18 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`3360011`](https://github.com/inspect-js/is-core-module/commit/33600118857b46177178072fba2affcdeb009d12) +- [Dev Deps] update `aud`, `tape` [`651c6b0`](https://github.com/inspect-js/is-core-module/commit/651c6b0cc2799d4130866cf43ad333dcade3d26c) +- [New] `inspector/promises` and `node:inspector/promises` is now available in node 19 [`22d332f`](https://github.com/inspect-js/is-core-module/commit/22d332fe22ac050305444e0781ff85af819abcb0) + +## [v2.10.0](https://github.com/inspect-js/is-core-module/compare/v2.9.0...v2.10.0) - 2022-08-03 + +### Commits + +- [New] `node:test` is now available in node ^16.17 [`e8fd36e`](https://github.com/inspect-js/is-core-module/commit/e8fd36e9b86c917775a07cc473b62a3294f459f2) +- [Tests] improve skip message [`c014a4c`](https://github.com/inspect-js/is-core-module/commit/c014a4c0cd6eb15fff573ae4709191775e70cab4) + +## [v2.9.0](https://github.com/inspect-js/is-core-module/compare/v2.8.1...v2.9.0) - 2022-04-19 + +### Commits + +- [New] add `node:test`, in node 18+ [`f853eca`](https://github.com/inspect-js/is-core-module/commit/f853eca801d0a7d4e1dbb670f1b6d9837d9533c5) +- [Tests] use `mock-property` [`03b3644`](https://github.com/inspect-js/is-core-module/commit/03b3644dff4417f4ba5a7d0aa0138f5f6b3e5c46) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`7c0e2d0`](https://github.com/inspect-js/is-core-module/commit/7c0e2d06ed2a89acf53abe2ab34d703ed5b03455) +- [meta] simplify "exports" [`d6ed201`](https://github.com/inspect-js/is-core-module/commit/d6ed201eba7fbba0e59814a9050fc49a6e9878c8) + +## [v2.8.1](https://github.com/inspect-js/is-core-module/compare/v2.8.0...v2.8.1) - 2022-01-05 + +### Commits + +- [actions] reuse common workflows [`cd2cf9b`](https://github.com/inspect-js/is-core-module/commit/cd2cf9b3b66c8d328f65610efe41e9325db7716d) +- [Fix] update node 0.4 results [`062195d`](https://github.com/inspect-js/is-core-module/commit/062195d89f0876a88b95d378b43f7fcc1205bc5b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0790b62`](https://github.com/inspect-js/is-core-module/commit/0790b6222848c6167132f9f73acc3520fa8d1298) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7d139a6`](https://github.com/inspect-js/is-core-module/commit/7d139a6d767709eabf0a0251e074ec1fb230c06e) +- [Tests] run `nyc` in `tests-only`, not `test` [`780e8a0`](https://github.com/inspect-js/is-core-module/commit/780e8a049951c71cf78b1707f0871c48a28bde14) + +## [v2.8.0](https://github.com/inspect-js/is-core-module/compare/v2.7.0...v2.8.0) - 2021-10-14 + +### Commits + +- [actions] update codecov uploader [`0cfe94e`](https://github.com/inspect-js/is-core-module/commit/0cfe94e106a7d005ea03e008c0a21dec13a77904) +- [New] add `readline/promises` to node v17+ [`4f78c30`](https://github.com/inspect-js/is-core-module/commit/4f78c3008b1b58b4db6dc91d99610b1bc859da7e) +- [Tests] node ^14.18 supports `node:` prefixes for CJS [`43e2f17`](https://github.com/inspect-js/is-core-module/commit/43e2f177452cea2f0eaf34f61b5407217bbdb6f4) + +## [v2.7.0](https://github.com/inspect-js/is-core-module/compare/v2.6.0...v2.7.0) - 2021-09-27 + +### Commits + +- [New] node `v14.18` added `node:`-prefixed core modules to `require` [`6d943ab`](https://github.com/inspect-js/is-core-module/commit/6d943abe81382b9bbe344384d80fbfebe1cc0526) +- [Tests] add coverage for Object.prototype pollution [`c6baf5f`](https://github.com/inspect-js/is-core-module/commit/c6baf5f942311a1945c1af41167bb80b84df2af7) +- [Dev Deps] update `@ljharb/eslint-config` [`6717f00`](https://github.com/inspect-js/is-core-module/commit/6717f000d063ea57beb772bded36c2f056ac404c) +- [eslint] fix linter warning [`594c10b`](https://github.com/inspect-js/is-core-module/commit/594c10bb7d39d7eb00925c90924199ff596184b2) +- [meta] add `sideEffects` flag [`c32cfa5`](https://github.com/inspect-js/is-core-module/commit/c32cfa5195632944c4dd4284a142b8476e75be13) + +## [v2.6.0](https://github.com/inspect-js/is-core-module/compare/v2.5.0...v2.6.0) - 2021-08-17 + +### Commits + +- [Dev Deps] update `eslint`, `tape` [`6cc928f`](https://github.com/inspect-js/is-core-module/commit/6cc928f8a4bba66aeeccc4f6beeac736d4bd3081) +- [New] add `stream/consumers` to node `>= 16.7` [`a1a423e`](https://github.com/inspect-js/is-core-module/commit/a1a423e467e4cc27df180234fad5bab45943e67d) +- [Refactor] Remove duplicated `&&` operand [`86faea7`](https://github.com/inspect-js/is-core-module/commit/86faea738213a2433c62d1098488dc9314dca832) +- [Tests] include prereleases [`a4da7a6`](https://github.com/inspect-js/is-core-module/commit/a4da7a6abf7568e2aa4fd98e69452179f1850963) + +## [v2.5.0](https://github.com/inspect-js/is-core-module/compare/v2.4.0...v2.5.0) - 2021-07-12 + +### Commits + +- [Dev Deps] update `auto-changelog`, `eslint` [`6334cc9`](https://github.com/inspect-js/is-core-module/commit/6334cc94f3af7469685bd8f236740991baaf2705) +- [New] add `stream/web` to node v16.5+ [`17ac59b`](https://github.com/inspect-js/is-core-module/commit/17ac59b662d63e220a2e5728625f005c24f177b2) + +## [v2.4.0](https://github.com/inspect-js/is-core-module/compare/v2.3.0...v2.4.0) - 2021-05-09 + +### Commits + +- [readme] add actions and codecov badges [`82b7faa`](https://github.com/inspect-js/is-core-module/commit/82b7faa12b56dbe47fbea67e1a5b9e447027ba40) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8096868`](https://github.com/inspect-js/is-core-module/commit/8096868c024a161ccd4d44110b136763e92eace8) +- [Dev Deps] update `eslint` [`6726824`](https://github.com/inspect-js/is-core-module/commit/67268249b88230018c510f6532a8046d7326346f) +- [New] add `diagnostics_channel` to node `^14.17` [`86c6563`](https://github.com/inspect-js/is-core-module/commit/86c65634201b8ff9b3e48a9a782594579c7f5c3c) +- [meta] fix prepublish script [`697a01e`](https://github.com/inspect-js/is-core-module/commit/697a01e3c9c0be074066520954f30fb28532ec57) + +## [v2.3.0](https://github.com/inspect-js/is-core-module/compare/v2.2.0...v2.3.0) - 2021-04-24 + +### Commits + +- [meta] do not publish github action workflow files [`060d4bb`](https://github.com/inspect-js/is-core-module/commit/060d4bb971a29451c19ff336eb56bee27f9fa95a) +- [New] add support for `node:` prefix, in node 16+ [`7341223`](https://github.com/inspect-js/is-core-module/commit/73412230a769f6e81c05eea50b6520cebf54ed2f) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`016269a`](https://github.com/inspect-js/is-core-module/commit/016269abae9f6657a5254adfbb813f09a05067f9) +- [patch] remove unneeded `.0` in version ranges [`cb466a6`](https://github.com/inspect-js/is-core-module/commit/cb466a6d89e52b8389e5c12715efcd550c41cea3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`c9f9c39`](https://github.com/inspect-js/is-core-module/commit/c9f9c396ace60ef81906f98059c064e6452473ed) +- [actions] update workflows [`3ee4a89`](https://github.com/inspect-js/is-core-module/commit/3ee4a89fd5a02fccd43882d905448ea6a98e9a3c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`dee4fed`](https://github.com/inspect-js/is-core-module/commit/dee4fed79690c1d43a22f7fa9426abebdc6d727f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`7d046ba`](https://github.com/inspect-js/is-core-module/commit/7d046ba07ae8c9292e43652694ca808d7b309de8) +- [meta] use `prepublishOnly` script for npm 7+ [`149e677`](https://github.com/inspect-js/is-core-module/commit/149e6771a5ede6d097e71785b467a9c4b4977cc7) +- [readme] remove travis badge [`903b51d`](https://github.com/inspect-js/is-core-module/commit/903b51d6b69b98abeabfbc3695c345b02646f19c) + +## [v2.2.0](https://github.com/inspect-js/is-core-module/compare/v2.1.0...v2.2.0) - 2020-11-26 + +### Commits + +- [Tests] migrate tests to Github Actions [`c919f57`](https://github.com/inspect-js/is-core-module/commit/c919f573c0a92d10a0acad0b650b5aecb033d426) +- [patch] `core.json`: %s/ /\t/g [`db3f685`](https://github.com/inspect-js/is-core-module/commit/db3f68581f53e73cc09cd675955eb1bdd6a5a39b) +- [Tests] run `nyc` on all tests [`b2f925f`](https://github.com/inspect-js/is-core-module/commit/b2f925f8866f210ef441f39fcc8cc42692ab89b1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`; add `safe-publish-latest` [`89f02a2`](https://github.com/inspect-js/is-core-module/commit/89f02a2b4162246dea303a6ee31bb9a550b05c72) +- [New] add `path/posix`, `path/win32`, `util/types` [`77f94f1`](https://github.com/inspect-js/is-core-module/commit/77f94f1e90ffd7c0be2a3f1aa8574ebf7fd981b3) + +## [v2.1.0](https://github.com/inspect-js/is-core-module/compare/v2.0.0...v2.1.0) - 2020-11-04 + +### Commits + +- [Dev Deps] update `eslint` [`5e0034e`](https://github.com/inspect-js/is-core-module/commit/5e0034eae57c09c8f1bd769f502486a00f56c6e4) +- [New] Add `diagnostics_channel` [`c2d83d0`](https://github.com/inspect-js/is-core-module/commit/c2d83d0a0225a1a658945d9bab7036ea347d29ec) + +## [v2.0.0](https://github.com/inspect-js/is-core-module/compare/v1.0.2...v2.0.0) - 2020-09-29 + +### Commits + +- v2 implementation [`865aeb5`](https://github.com/inspect-js/is-core-module/commit/865aeb5ca0e90248a3dfff5d7622e4751fdeb9cd) +- Only apps should have lockfiles [`5a5e660`](https://github.com/inspect-js/is-core-module/commit/5a5e660d568e37eb44e17fb1ebb12a105205fc2b) +- Initial commit for v2 [`5a51524`](https://github.com/inspect-js/is-core-module/commit/5a51524e06f92adece5fbb138c69b7b9748a2348) +- Tests [`116eae4`](https://github.com/inspect-js/is-core-module/commit/116eae4fccd01bc72c1fd3cc4b7561c387afc496) +- [meta] add `auto-changelog` [`c24388b`](https://github.com/inspect-js/is-core-module/commit/c24388bee828d223040519d1f5b226ca35beee63) +- [actions] add "Automatic Rebase" and "require allow edits" actions [`34292db`](https://github.com/inspect-js/is-core-module/commit/34292dbcbadae0868aff03c22dbd8b7b8a11558a) +- [Tests] add `npm run lint` [`4f9eeee`](https://github.com/inspect-js/is-core-module/commit/4f9eeee7ddff10698bbf528620f4dc8d4fa3e697) +- [readme] fix travis badges, https all URLs [`e516a73`](https://github.com/inspect-js/is-core-module/commit/e516a73b0dccce20938c432b1ba512eae8eff9e9) +- [meta] create FUNDING.yml [`1aabebc`](https://github.com/inspect-js/is-core-module/commit/1aabebca98d01f8a04e46bc2e2520fa93cf21ac6) +- [Fix] `domain`: domain landed sometime > v0.7.7 and <= v0.7.12 [`2df7d37`](https://github.com/inspect-js/is-core-module/commit/2df7d37595d41b15eeada732b706b926c2771655) +- [Fix] `sys`: worked in 0.6, not 0.7, and 0.8+ [`a75c134`](https://github.com/inspect-js/is-core-module/commit/a75c134229e1e9441801f6b73f6a52489346eb65) + +## [v1.0.2](https://github.com/inspect-js/is-core-module/compare/v1.0.1...v1.0.2) - 2014-09-28 + +### Commits + +- simpler [`66fe90f`](https://github.com/inspect-js/is-core-module/commit/66fe90f9771581b9adc0c3900baa52c21b5baea2) + +## [v1.0.1](https://github.com/inspect-js/is-core-module/compare/v1.0.0...v1.0.1) - 2014-09-28 + +### Commits + +- remove stupid [`f21f906`](https://github.com/inspect-js/is-core-module/commit/f21f906f882c2bd656a5fc5ed6fbe48ddaffb2ac) +- update readme [`1eff0ec`](https://github.com/inspect-js/is-core-module/commit/1eff0ec69798d1ec65771552d1562911e90a8027) + +## v1.0.0 - 2014-09-28 + +### Commits + +- init [`48e5e76`](https://github.com/inspect-js/is-core-module/commit/48e5e76cac378fddb8c1f7d4055b8dfc943d6b96) diff --git a/node_modules/is-core-module/LICENSE b/node_modules/is-core-module/LICENSE new file mode 100644 index 0000000..2e50287 --- /dev/null +++ b/node_modules/is-core-module/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Dave Justice + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/is-core-module/README.md b/node_modules/is-core-module/README.md new file mode 100644 index 0000000..062d906 --- /dev/null +++ b/node_modules/is-core-module/README.md @@ -0,0 +1,40 @@ +# is-core-module [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version. + +## Example + +```js +var isCore = require('is-core-module'); +var assert = require('assert'); +assert(isCore('fs')); +assert(!isCore('butts')); +``` + +## Tests +Clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-core-module +[2]: https://versionbadg.es/inspect-js/is-core-module.svg +[5]: https://david-dm.org/inspect-js/is-core-module.svg +[6]: https://david-dm.org/inspect-js/is-core-module +[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies +[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-core-module.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module +[codecov-image]: https://codecov.io/gh/inspect-js/is-core-module/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-core-module/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-core-module +[actions-url]: https://github.com/inspect-js/is-core-module/actions diff --git a/node_modules/is-core-module/core.json b/node_modules/is-core-module/core.json new file mode 100644 index 0000000..91890be --- /dev/null +++ b/node_modules/is-core-module/core.json @@ -0,0 +1,161 @@ +{ + "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + "async_hooks": ">= 8", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", + "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], + "child_process": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], + "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], + "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], + "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], + "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], + "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], + "freelist": "< 6", + "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], + "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], + "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], + "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], + "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], + "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], + "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], + "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], + "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], + "https": true, + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "inspector/promises": [">= 19"], + "node:inspector/promises": [">= 19"], + "_linklist": "< 8", + "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], + "net": true, + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], + "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], + "process": ">= 1", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], + "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], + "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", + "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], + "node:sea": [">= 20.12 && < 21", ">= 21.7"], + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], + "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], + "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], + "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], + "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], + "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], + "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + "string_decoder": true, + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "test/reporters": ">= 19.9 && < 20.2", + "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"], + "test/mock_loader": ">= 22.3 && < 22.7", + "node:test/mock_loader": ">= 22.3 && < 22.7", + "node:test": [">= 16.17 && < 17", ">= 18"], + "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], + "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], + "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], + "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], + "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], + "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], + "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], + "wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"], + "node:wasi": [">= 18.17 && < 19", ">= 20"], + "worker_threads": ">= 11.7", + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] +} diff --git a/node_modules/is-core-module/index.js b/node_modules/is-core-module/index.js new file mode 100644 index 0000000..423e20c --- /dev/null +++ b/node_modules/is-core-module/index.js @@ -0,0 +1,69 @@ +'use strict'; + +var hasOwn = require('hasown'); + +function specifierIncluded(current, specifier) { + var nodeParts = current.split('.'); + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = parseInt(nodeParts[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + if (op === '<') { + return cur < ver; + } + if (op === '>=') { + return cur >= ver; + } + return false; + } + return op === '>='; +} + +function matchesRange(current, range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { + return false; + } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(current, specifiers[i])) { + return false; + } + } + return true; +} + +function versionIncluded(nodeVersion, specifierValue) { + if (typeof specifierValue === 'boolean') { + return specifierValue; + } + + var current = typeof nodeVersion === 'undefined' + ? process.versions && process.versions.node + : nodeVersion; + + if (typeof current !== 'string') { + throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required'); + } + + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(current, specifierValue[i])) { + return true; + } + } + return false; + } + return matchesRange(current, specifierValue); +} + +var data = require('./core.json'); + +module.exports = function isCore(x, nodeVersion) { + return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]); +}; diff --git a/node_modules/is-core-module/package.json b/node_modules/is-core-module/package.json new file mode 100644 index 0000000..3aba4a0 --- /dev/null +++ b/node_modules/is-core-module/package.json @@ -0,0 +1,76 @@ +{ + "name": "is-core-module", + "version": "2.15.1", + "description": "Is this specifier a node.js core module?", + "main": "index.js", + "sideEffects": false, + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>=10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-core-module.git" + }, + "keywords": [ + "core", + "modules", + "module", + "npm", + "node", + "dependencies" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-core-module/issues" + }, + "homepage": "https://github.com/inspect-js/is-core-module", + "dependencies": { + "hasown": "^2.0.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.1", + "auto-changelog": "^2.4.0", + "encoding": "^0.1.13", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "mock-property": "^1.1.0", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.1", + "tape": "^5.8.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/is-core-module/test/index.js b/node_modules/is-core-module/test/index.js new file mode 100644 index 0000000..746e72a --- /dev/null +++ b/node_modules/is-core-module/test/index.js @@ -0,0 +1,154 @@ +'use strict'; + +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); +var mockProperty = require('mock-property'); + +var isCore = require('../'); +var data = require('../core.json'); + +var supportsNodePrefix = semver.satisfies(process.versions.node, '^14.18 || >= 16', { includePrerelease: true }); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(isCore('fs')); + st.ok(isCore('net')); + st.ok(isCore('http')); + + st.ok(!isCore('seq')); + st.ok(!isCore('../')); + + st.ok(!isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(data); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + if (isCore(mod)) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else { + st['throws'](requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !data.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('repl._builtinLibs does not exist'); + } else { + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(data[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !data.module }, function (st) { + var Module = require('module'); + var libs = Module.builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + } else { + var excludeList = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + + // see https://github.com/nodejs/node/issues/42785 + if (semver.satisfies(process.version, '>= 18')) { + libs = libs.concat('node:test'); + } + if (semver.satisfies(process.version, '^20.12 || >= 21.7')) { + libs = libs.concat('node:sea'); + } + + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (excludeList.indexOf(mod) === -1) { + st.ok(data[mod], mod + ' is a core module'); + + if (Module.isBuiltin) { + st.ok(Module.isBuiltin(mod), 'module.isBuiltin(' + mod + ') is true'); + } + + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + + if (process.getBuiltinModule) { + st.equal( + process.getBuiltinModule(mod), + require(mod), + 'process.getBuiltinModule(' + mod + ') === require(' + mod + ')' + ); + } + + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + } + + st.end(); + }); + + t.test('Object.prototype pollution', function (st) { + var nonKey = 'not a core module'; + st.teardown(mockProperty(Object.prototype, 'fs', { value: false })); + st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' })); + st.teardown(mockProperty(Object.prototype, 'http', { value: data.http })); + st.teardown(mockProperty(Object.prototype, nonKey, { value: true })); + + st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies'); + st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies'); + st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data'); + st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-module/.npmignore b/node_modules/is-module/.npmignore new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/node_modules/is-module/.npmignore @@ -0,0 +1 @@ +test diff --git a/node_modules/is-module/README.md b/node_modules/is-module/README.md new file mode 100644 index 0000000..a098c5d --- /dev/null +++ b/node_modules/is-module/README.md @@ -0,0 +1,41 @@ +# Is Module + +Check whether a source string looks like an ES6 module. +This doesn't actually execute the code, +and doesn't check other module types. +So source strings without any module loaders returns `false`. + +This is just what I need from https://github.com/yahoo/js-module-formats, which actually executes the sauce string in a subcontext. + +## API + +```js +var isES6Module = require('is-module'); + +console.log(isES6Module('import * from "emitter";')) // => true +``` + +## License + +(The MIT License) + +Copyright (c) 2014 segmentio <team@segment.io> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-module/component.json b/node_modules/is-module/component.json new file mode 100644 index 0000000..2258ad2 --- /dev/null +++ b/node_modules/is-module/component.json @@ -0,0 +1,11 @@ +{ + "name": "is-module", + "description": "check if a source string is an es6 module", + "keywords": ["es6", "module", "modules"], + "version": "1.0.0", + "license": "MIT", + "repo": "component/is-module", + "scripts": [ + "index.js" + ] +} diff --git a/node_modules/is-module/index.js b/node_modules/is-module/index.js new file mode 100644 index 0000000..fc7fbb9 --- /dev/null +++ b/node_modules/is-module/index.js @@ -0,0 +1,11 @@ + +// no idea what these regular expressions do, +// but i extracted it from https://github.com/yahoo/js-module-formats/blob/master/index.js#L18 +var ES6ImportExportRegExp = /(?:^\s*|[}{\(\);,\n]\s*)(import\s+['"]|(import|module)\s+[^"'\(\)\n;]+\s+from\s+['"]|export\s+(\*|\{|default|function|var|const|let|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*))/; + +var ES6AliasRegExp = /(?:^\s*|[}{\(\);,\n]\s*)(export\s*\*\s*from\s*(?:'([^']+)'|"([^"]+)"))/; + +module.exports = function (sauce) { + return ES6ImportExportRegExp.test(sauce) + || ES6AliasRegExp.test(sauce); +}; diff --git a/node_modules/is-module/package.json b/node_modules/is-module/package.json new file mode 100644 index 0000000..497d80a --- /dev/null +++ b/node_modules/is-module/package.json @@ -0,0 +1,20 @@ +{ + "name": "is-module", + "description": "check if a source string is an es6 module", + "keywords": ["es6", "module", "modules"], + "version": "1.0.0", + "author": { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com", + "twitter": "https://twitter.com/jongleberry" + }, + "license": "MIT", + "repository": "component/is-module", + "devDependencies": { + "mocha": "*" + }, + "scripts": { + "test": "mocha --reporter spec --bail" + } +} diff --git a/node_modules/mini-svg-data-uri/LICENSE b/node_modules/mini-svg-data-uri/LICENSE new file mode 100644 index 0000000..bf23b14 --- /dev/null +++ b/node_modules/mini-svg-data-uri/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Taylor Hunt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/mini-svg-data-uri/README.md b/node_modules/mini-svg-data-uri/README.md new file mode 100644 index 0000000..c6a109c --- /dev/null +++ b/node_modules/mini-svg-data-uri/README.md @@ -0,0 +1,109 @@ +Mini SVG `data:` URI +==================== + +This tool converts SVGs into the most compact, compressible `data:` URI that SVG-supporting browsers tolerate. The results look like this (169 bytes): + +```url +data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' +%3e%3cpath d='M22 38V51L32 32l19-19v12C44 26 43 10 38 0 52 15 49 39 22 38z'/%3e +%3c/svg%3e +``` + +Compare to the Base64 version (210 bytes): + +```url +data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIH +ZpZXdCb3g9IjAgMCA1MCA1MCI+PHBhdGggZD0iTTIyIDM4VjUxTDMyIDMybDE5LTE5djEyQzQ0IDI2ID +QzIDEwIDM4IDAgNTIgMTUgNDkgMzkgMjIgMzh6Ii8+PC9zdmc+ +``` + +Or the URL-encoded version other tools produce (256 bytes): + +```url +data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org% +2F2000%2Fsvg%22%20viewBox%3D%220%200%2050%2050%22%3E%3Cpath%20d%3D%22M22%2038V51 +L32%2032l19-19v12C44%2026%2043%2010%2038%200%2052%2015%2049%2039%2022%2038z%22%2 +F%3E%3C%2Fsvg%3E +``` + +For a more realistic example, I inlined the icons from the [Open Iconic](https://useiconic.com/open) project into CSS files with the 3 above methods: + +| Compression | Base64 | Basic %-encoding | `mini-svg-data-uri` | +|-------------|----------:|-----------------:|--------------------:| +| None | 96.459 kB | 103.268 kB | 76.583 kB | +| `gzip -9` | 17.902 kB | 13.780 kB | 12.974 kB | +| `brotli -Z` | 15.797 kB | 11.693 kB | 10.976 kB | + +Roughly 6% smaller compressed, but don't write off the ≈20% uncompressed savings either. [Some browser caches decompress before store](https://blogs.msdn.microsoft.com/ieinternals/2014/10/21/compressing-the-web/), and parsing time/memory usage scale linearly with uncompressed filesize. + + +Usage +----- + +```js +var svgToMiniDataURI = require('mini-svg-data-uri'); + +var svg = ''; + +var optimizedSVGDataURI = svgToMiniDataURI(svg); +// "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3e%3cpath d='M22 38V51L32 32l19-19v12C44 26 43 10 38 0 52 15 49 39 22 38z'/%3e%3c/svg%3e" +``` + +You can also [try it in your browser at RunKit](https://npm.runkit.com/mini-svg-data-uri). + +### CLI + +If you have it installed globally, or as some kind of dependency inside your project’s directory: + +```sh +mini-svg-data-uri file.svg # writes to stdout +mini-svg-data-uri file.svg file.svg.uri # writes to the given output filename +``` + +Use `--help` for more info. + +### Warning + +* This **does not optimize the SVG source file**. You’ll want [svgo](https://github.com/svg/svgo) or its brother [SVGOMG](https://jakearchibald.github.io/svgomg/) for that. + +* The default output **does not work inside `srcset` attributes**. Use the `.toSrcset` method for that: + + ```js + var srcsetExample = html` + + + + `; + ``` + +* The resulting Data URI should be wrapped with double quotes: `url("…")`, ``, etc. + +* This might change or break SVGs that use `"` in character data, like inside `` or `aria-label` or something. Try curly quotes (`“”`) or `"` instead. + + +FAQ +--- + +### Don’t you need a `charset` in the MIME Type? + +`charset` does nothing for Data URIs. The URI can only be the encoding of its parent file — it’s included in it! + +### Why lowercase the URL-encoded hex pairs? + +It compresses slightly better. No, really. Using the same files from earlier: + +| Compression | Uppercase (`%AF`) | Lowercase (`%af`) | +|-------------|------------------:|------------------:| +| `gzip -9` | 12.978 kB | 12.974 kB | +| `brotli -Z` | 10.988 kB | 10.976 kB | + +I did say *slightly*. + + +Browser support +--------------- + +* Internet Explorer 9 and up, including Edge +* Firefox, Safari, Chrome, whatever else uses their engines +* Android WebKit 3+ +* Opera Mini’s server-side Presto diff --git a/node_modules/mini-svg-data-uri/cli.js b/node_modules/mini-svg-data-uri/cli.js new file mode 100755 index 0000000..c5a47dd --- /dev/null +++ b/node_modules/mini-svg-data-uri/cli.js @@ -0,0 +1,41 @@ +#!/usr/bin/env node + +let help = ` +Usage: mini-svg-data-uri [dest] + +Options: +-v, --version Output the version number +-h, --help Display help for command + +Examples: + mini-svg-data-uri file.svg Write to stdout + mini-svg-data-uri icon.svg icon.uri Write to file +`; + +let [source, dest] = process.argv.slice(2); + +switch (source) { + case '-h': + case '--help': + case undefined: + console.log(help); + process.exit(); + + case '-v': + case '--version': + console.log(require('./package').version); + process.exit(); +} + +const fs = require('fs'); +const svgToMiniDataURI = require('.'); + +fs.readFile(source, 'utf8', (err, data) => { + if (err) { + console.error(err.message); + console.log(help); + process.exit(1); + } + const out = svgToMiniDataURI(data); + dest ? fs.writeFileSync(dest, out) : console.log(out); +}); diff --git a/node_modules/mini-svg-data-uri/index.d.ts b/node_modules/mini-svg-data-uri/index.d.ts new file mode 100644 index 0000000..e1f2686 --- /dev/null +++ b/node_modules/mini-svg-data-uri/index.d.ts @@ -0,0 +1,7 @@ +declare function svgToTinyDataUri(svgString: string): string; + +declare namespace svgToTinyDataUri { + function toSrcset(svgString: string): string; +} + +export = svgToTinyDataUri; \ No newline at end of file diff --git a/node_modules/mini-svg-data-uri/index.js b/node_modules/mini-svg-data-uri/index.js new file mode 100644 index 0000000..971cc38 --- /dev/null +++ b/node_modules/mini-svg-data-uri/index.js @@ -0,0 +1,55 @@ +var shorterNames = require('./shorter-css-color-names'); +var REGEX = { + whitespace: /\s+/g, + urlHexPairs: /%[\dA-F]{2}/g, + quotes: /"/g, +} + +function collapseWhitespace(str) { + return str.trim().replace(REGEX.whitespace, ' '); +} + +function dataURIPayload(string) { + return encodeURIComponent(string) + .replace(REGEX.urlHexPairs, specialHexEncode); +} + +// `#` gets converted to `%23`, so quite a few CSS named colors are shorter than +// their equivalent URL-encoded hex codes. +function colorCodeToShorterNames(string) { + Object.keys(shorterNames).forEach(function(key) { + if (shorterNames[key].test(string)) { + string = string.replace(shorterNames[key], key); + } + }); + + return string; +} + +function specialHexEncode(match) { + switch (match) { // Browsers tolerate these characters, and they're frequent + case '%20': return ' '; + case '%3D': return '='; + case '%3A': return ':'; + case '%2F': return '/'; + default: return match.toLowerCase(); // compresses better + } +} + +function svgToTinyDataUri(svgString) { + if (typeof svgString !== 'string') { + throw new TypeError('Expected a string, but received ' + typeof svgString); + } + // Strip the Byte-Order Mark if the SVG has one + if (svgString.charCodeAt(0) === 0xfeff) { svgString = svgString.slice(1) } + + var body = colorCodeToShorterNames(collapseWhitespace(svgString)) + .replace(REGEX.quotes, "'"); + return 'data:image/svg+xml,' + dataURIPayload(body); +} + +svgToTinyDataUri.toSrcset = function toSrcset(svgString) { + return svgToTinyDataUri(svgString).replace(/ /g, '%20'); +} + +module.exports = svgToTinyDataUri; diff --git a/node_modules/mini-svg-data-uri/index.test-d.ts b/node_modules/mini-svg-data-uri/index.test-d.ts new file mode 100644 index 0000000..740b215 --- /dev/null +++ b/node_modules/mini-svg-data-uri/index.test-d.ts @@ -0,0 +1,5 @@ +import svgToTinyDataUri from "."; + +svgToTinyDataUri('xx'); + +svgToTinyDataUri.toSrcset('xxx'); \ No newline at end of file diff --git a/node_modules/mini-svg-data-uri/package.json b/node_modules/mini-svg-data-uri/package.json new file mode 100644 index 0000000..da3b9cc --- /dev/null +++ b/node_modules/mini-svg-data-uri/package.json @@ -0,0 +1,26 @@ +{ + "name": "mini-svg-data-uri", + "version": "1.4.4", + "description": "Small, efficient encoding of SVG data URIs for CSS, HTML, etc.", + "main": "index.js", + "types": "index.d.ts", + "bin": "cli.js", + "repository": { + "type": "git", + "url": "git+https://github.com/tigt/mini-svg-data-uri.git" + }, + "keywords": [ + "svg", + "url", + "data", + "uri", + "minification", + "url encoding" + ], + "author": "Taylor “Tigt” Hunt (https://ti.gt/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/tigt/mini-svg-data-uri/issues" + }, + "homepage": "https://github.com/tigt/mini-svg-data-uri#readme" +} diff --git a/node_modules/mini-svg-data-uri/shorter-css-color-names.js b/node_modules/mini-svg-data-uri/shorter-css-color-names.js new file mode 100644 index 0000000..5e93f5d --- /dev/null +++ b/node_modules/mini-svg-data-uri/shorter-css-color-names.js @@ -0,0 +1,56 @@ +module.exports = { + aqua: /#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi, + azure: /#f0ffff(ff)?(?!\w)/gi, + beige: /#f5f5dc(ff)?(?!\w)/gi, + bisque: /#ffe4c4(ff)?(?!\w)/gi, + black: /#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi, + blue: /#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi, + brown: /#a52a2a(ff)?(?!\w)/gi, + coral: /#ff7f50(ff)?(?!\w)/gi, + cornsilk: /#fff8dc(ff)?(?!\w)/gi, + crimson: /#dc143c(ff)?(?!\w)/gi, + cyan: /#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi, + darkblue: /#00008b(ff)?(?!\w)/gi, + darkcyan: /#008b8b(ff)?(?!\w)/gi, + darkgrey: /#a9a9a9(ff)?(?!\w)/gi, + darkred: /#8b0000(ff)?(?!\w)/gi, + deeppink: /#ff1493(ff)?(?!\w)/gi, + dimgrey: /#696969(ff)?(?!\w)/gi, + gold: /#ffd700(ff)?(?!\w)/gi, + green: /#008000(ff)?(?!\w)/gi, + grey: /#808080(ff)?(?!\w)/gi, + honeydew: /#f0fff0(ff)?(?!\w)/gi, + hotpink: /#ff69b4(ff)?(?!\w)/gi, + indigo: /#4b0082(ff)?(?!\w)/gi, + ivory: /#fffff0(ff)?(?!\w)/gi, + khaki: /#f0e68c(ff)?(?!\w)/gi, + lavender: /#e6e6fa(ff)?(?!\w)/gi, + lime: /#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi, + linen: /#faf0e6(ff)?(?!\w)/gi, + maroon: /#800000(ff)?(?!\w)/gi, + moccasin: /#ffe4b5(ff)?(?!\w)/gi, + navy: /#000080(ff)?(?!\w)/gi, + oldlace: /#fdf5e6(ff)?(?!\w)/gi, + olive: /#808000(ff)?(?!\w)/gi, + orange: /#ffa500(ff)?(?!\w)/gi, + orchid: /#da70d6(ff)?(?!\w)/gi, + peru: /#cd853f(ff)?(?!\w)/gi, + pink: /#ffc0cb(ff)?(?!\w)/gi, + plum: /#dda0dd(ff)?(?!\w)/gi, + purple: /#800080(ff)?(?!\w)/gi, + red: /#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi, + salmon: /#fa8072(ff)?(?!\w)/gi, + seagreen: /#2e8b57(ff)?(?!\w)/gi, + seashell: /#fff5ee(ff)?(?!\w)/gi, + sienna: /#a0522d(ff)?(?!\w)/gi, + silver: /#c0c0c0(ff)?(?!\w)/gi, + skyblue: /#87ceeb(ff)?(?!\w)/gi, + snow: /#fffafa(ff)?(?!\w)/gi, + tan: /#d2b48c(ff)?(?!\w)/gi, + teal: /#008080(ff)?(?!\w)/gi, + thistle: /#d8bfd8(ff)?(?!\w)/gi, + tomato: /#ff6347(ff)?(?!\w)/gi, + violet: /#ee82ee(ff)?(?!\w)/gi, + wheat: /#f5deb3(ff)?(?!\w)/gi, + white: /#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi, +}; diff --git a/node_modules/path-parse/LICENSE b/node_modules/path-parse/LICENSE new file mode 100644 index 0000000..810f3db --- /dev/null +++ b/node_modules/path-parse/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Javier Blanco + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/path-parse/README.md b/node_modules/path-parse/README.md new file mode 100644 index 0000000..05097f8 --- /dev/null +++ b/node_modules/path-parse/README.md @@ -0,0 +1,42 @@ +# path-parse [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](https://travis-ci.org/jbgutierrez/path-parse) + +> Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com). + +## Install + +``` +$ npm install --save path-parse +``` + +## Usage + +```js +var pathParse = require('path-parse'); + +pathParse('/home/user/dir/file.txt'); +//=> { +// root : "/", +// dir : "/home/user/dir", +// base : "file.txt", +// ext : ".txt", +// name : "file" +// } +``` + +## API + +See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs. + +### pathParse(path) + +### pathParse.posix(path) + +The Posix specific version. + +### pathParse.win32(path) + +The Windows specific version. + +## License + +MIT © [Javier Blanco](http://jbgutierrez.info) diff --git a/node_modules/path-parse/index.js b/node_modules/path-parse/index.js new file mode 100644 index 0000000..f062d0a --- /dev/null +++ b/node_modules/path-parse/index.js @@ -0,0 +1,75 @@ +'use strict'; + +var isWindows = process.platform === 'win32'; + +// Regex to split a windows path into into [dir, root, basename, name, ext] +var splitWindowsRe = + /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/; + +var win32 = {}; + +function win32SplitPath(filename) { + return splitWindowsRe.exec(filename).slice(1); +} + +win32.parse = function(pathString) { + if (typeof pathString !== 'string') { + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); + } + var allParts = win32SplitPath(pathString); + if (!allParts || allParts.length !== 5) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + return { + root: allParts[1], + dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1), + base: allParts[2], + ext: allParts[4], + name: allParts[3] + }; +}; + + + +// Split a filename into [dir, root, basename, name, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/; +var posix = {}; + + +function posixSplitPath(filename) { + return splitPathRe.exec(filename).slice(1); +} + + +posix.parse = function(pathString) { + if (typeof pathString !== 'string') { + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); + } + var allParts = posixSplitPath(pathString); + if (!allParts || allParts.length !== 5) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + + return { + root: allParts[1], + dir: allParts[0].slice(0, -1), + base: allParts[2], + ext: allParts[4], + name: allParts[3], + }; +}; + + +if (isWindows) + module.exports = win32.parse; +else /* posix */ + module.exports = posix.parse; + +module.exports.posix = posix.parse; +module.exports.win32 = win32.parse; diff --git a/node_modules/path-parse/package.json b/node_modules/path-parse/package.json new file mode 100644 index 0000000..36c23f8 --- /dev/null +++ b/node_modules/path-parse/package.json @@ -0,0 +1,33 @@ +{ + "name": "path-parse", + "version": "1.0.7", + "description": "Node.js path.parse() ponyfill", + "main": "index.js", + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/jbgutierrez/path-parse.git" + }, + "keywords": [ + "path", + "paths", + "file", + "dir", + "parse", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim" + ], + "author": "Javier Blanco ", + "license": "MIT", + "bugs": { + "url": "https://github.com/jbgutierrez/path-parse/issues" + }, + "homepage": "https://github.com/jbgutierrez/path-parse#readme" +} diff --git a/node_modules/picomatch/LICENSE b/node_modules/picomatch/LICENSE new file mode 100644 index 0000000..3608dca --- /dev/null +++ b/node_modules/picomatch/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/picomatch/README.md b/node_modules/picomatch/README.md new file mode 100644 index 0000000..5062654 --- /dev/null +++ b/node_modules/picomatch/README.md @@ -0,0 +1,738 @@ +

    Picomatch

    + +

    + +version + + +test status + + +coverage status + + +downloads + +

    + +
    +
    + +

    +Blazing fast and accurate glob matcher written in JavaScript.
    +No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions. +

    + +
    +
    + +## Why picomatch? + +* **Lightweight** - No dependencies +* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function. +* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps) +* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files) +* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes. +* **Well tested** - Thousands of unit tests + +See the [library comparison](#library-comparisons) to other libraries. + +
    +
    + +## Table of Contents + +
    Click to expand + +- [Install](#install) +- [Usage](#usage) +- [API](#api) + * [picomatch](#picomatch) + * [.test](#test) + * [.matchBase](#matchbase) + * [.isMatch](#ismatch) + * [.parse](#parse) + * [.scan](#scan) + * [.compileRe](#compilere) + * [.makeRe](#makere) + * [.toRegex](#toregex) +- [Options](#options) + * [Picomatch options](#picomatch-options) + * [Scan Options](#scan-options) + * [Options Examples](#options-examples) +- [Globbing features](#globbing-features) + * [Basic globbing](#basic-globbing) + * [Advanced globbing](#advanced-globbing) + * [Braces](#braces) + * [Matching special characters as literals](#matching-special-characters-as-literals) +- [Library Comparisons](#library-comparisons) +- [Benchmarks](#benchmarks) +- [Philosophies](#philosophies) +- [About](#about) + * [Author](#author) + * [License](#license) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +
    + +
    +
    + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +npm install --save picomatch +``` + +
    + +## Usage + +The main export is a function that takes a glob pattern and an options object and returns a function for matching strings. + +```js +const pm = require('picomatch'); +const isMatch = pm('*.js'); + +console.log(isMatch('abcd')); //=> false +console.log(isMatch('a.js')); //=> true +console.log(isMatch('a.md')); //=> false +console.log(isMatch('a/b.js')); //=> false +``` + +
    + +## API + +### [picomatch](lib/picomatch.js#L31) + +Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information. + +**Params** + +* `globs` **{String|Array}**: One or more glob patterns. +* `options` **{Object=}** +* `returns` **{Function=}**: Returns a matcher function. + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch(glob[, options]); + +const isMatch = picomatch('*.!(*a)'); +console.log(isMatch('a.a')); //=> false +console.log(isMatch('a.b')); //=> true +``` + +**Example without node.js** + +For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection. + +```js +const picomatch = require('picomatch/posix'); +// the same API, defaulting to posix paths +const isMatch = picomatch('a/*'); +console.log(isMatch('a\\b')); //=> false +console.log(isMatch('a/b')); //=> true + +// you can still configure the matcher function to accept windows paths +const isMatch = picomatch('a/*', { options: windows }); +console.log(isMatch('a\\b')); //=> true +console.log(isMatch('a/b')); //=> true +``` + +### [.test](lib/picomatch.js#L116) + +Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string. + +**Params** + +* `input` **{String}**: String to test. +* `regex` **{RegExp}** +* `returns` **{Object}**: Returns an object with matching info. + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.test(input, regex[, options]); + +console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); +// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } +``` + +### [.matchBase](lib/picomatch.js#L160) + +Match the basename of a filepath. + +**Params** + +* `input` **{String}**: String to test. +* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe). +* `returns` **{Boolean}** + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.matchBase(input, glob[, options]); +console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true +``` + +### [.isMatch](lib/picomatch.js#L182) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* **{String|Array}**: str The string to test. +* **{String|Array}**: patterns One or more glob patterns to use for matching. +* **{Object}**: See available [options](#options). +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.isMatch(string, patterns[, options]); + +console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true +console.log(picomatch.isMatch('a.a', 'b.*')); //=> false +``` + +### [.parse](lib/picomatch.js#L198) + +Parse a glob pattern to create the source string for a regular expression. + +**Params** + +* `pattern` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string. + +**Example** + +```js +const picomatch = require('picomatch'); +const result = picomatch.parse(pattern[, options]); +``` + +### [.scan](lib/picomatch.js#L230) + +Scan a glob pattern to separate the pattern into segments. + +**Params** + +* `input` **{String}**: Glob pattern to scan. +* `options` **{Object}** +* `returns` **{Object}**: Returns an object with + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.scan(input[, options]); + +const result = picomatch.scan('!./foo/*.js'); +console.log(result); +{ prefix: '!./', + input: '!./foo/*.js', + start: 3, + base: 'foo', + glob: '*.js', + isBrace: false, + isBracket: false, + isGlob: true, + isExtglob: false, + isGlobstar: false, + negated: true } +``` + +### [.compileRe](lib/picomatch.js#L244) + +Compile a regular expression from the `state` object returned by the +[parse()](#parse) method. + +**Params** + +* `state` **{Object}** +* `options` **{Object}** +* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser. +* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. +* `returns` **{RegExp}** + +### [.makeRe](lib/picomatch.js#L285) + +Create a regular expression from a parsed glob pattern. + +**Params** + +* `state` **{String}**: The object returned from the `.parse` method. +* `options` **{Object}** +* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. +* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression. +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +const picomatch = require('picomatch'); +const state = picomatch.parse('*.js'); +// picomatch.compileRe(state[, options]); + +console.log(picomatch.compileRe(state)); +//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ +``` + +### [.toRegex](lib/picomatch.js#L320) + +Create a regular expression from the given regex source string. + +**Params** + +* `source` **{String}**: Regular expression source string. +* `options` **{Object}** +* `returns` **{RegExp}** + +**Example** + +```js +const picomatch = require('picomatch'); +// picomatch.toRegex(source[, options]); + +const { output } = picomatch.parse('*.js'); +console.log(picomatch.toRegex(output)); +//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ +``` + +
    + +## Options + +### Picomatch options + +The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API. + +| **Option** | **Type** | **Default value** | **Description** | +| --- | --- | --- | --- | +| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. | +| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). | +| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. | +| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). | +| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` | +| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. | +| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true | +| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. | +| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. | +| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. | +| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. | +| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. | +| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. | +| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. | +| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. | +| `matchBase` | `boolean` | `false` | Alias for `basename` | +| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. | +| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. | +| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. | +| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. | +| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. | +| `noext` | `boolean` | `false` | Alias for `noextglob` | +| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) | +| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) | +| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` | +| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. | +| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. | +| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. | +| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. | +| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). | +| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself | +| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. | +| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). | +| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. | +| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. | +| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. | +| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. | +| `windows` | `boolean` | `false` | Also accept backslashes as the path separator. | + +### Scan Options + +In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method. + +| **Option** | **Type** | **Default value** | **Description** | +| --- | --- | --- | --- | +| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern | +| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true | + +**Example** + +```js +const picomatch = require('picomatch'); +const result = picomatch.scan('!./foo/*.js', { tokens: true }); +console.log(result); +// { +// prefix: '!./', +// input: '!./foo/*.js', +// start: 3, +// base: 'foo', +// glob: '*.js', +// isBrace: false, +// isBracket: false, +// isGlob: true, +// isExtglob: false, +// isGlobstar: false, +// negated: true, +// maxDepth: 2, +// tokens: [ +// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true }, +// { value: 'foo', depth: 1, isGlob: false }, +// { value: '*.js', depth: 1, isGlob: true } +// ], +// slashes: [ 2, 6 ], +// parts: [ 'foo', '*.js' ] +// } +``` + +
    + +### Options Examples + +#### options.expandRange + +**Type**: `function` + +**Default**: `undefined` + +Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need. + +**Example** + +The following example shows how to create a glob that matches a folder + +```js +const fill = require('fill-range'); +const regex = pm.makeRe('foo/{01..25}/bar', { + expandRange(a, b) { + return `(${fill(a, b, { toRegex: true })})`; + } +}); + +console.log(regex); +//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/ + +console.log(regex.test('foo/00/bar')) // false +console.log(regex.test('foo/01/bar')) // true +console.log(regex.test('foo/10/bar')) // true +console.log(regex.test('foo/22/bar')) // true +console.log(regex.test('foo/25/bar')) // true +console.log(regex.test('foo/26/bar')) // false +``` + +#### options.format + +**Type**: `function` + +**Default**: `undefined` + +Custom function for formatting strings before they're matched. + +**Example** + +```js +// strip leading './' from strings +const format = str => str.replace(/^\.\//, ''); +const isMatch = picomatch('foo/*.js', { format }); +console.log(isMatch('./foo/bar.js')); //=> true +``` + +#### options.onMatch + +```js +const onMatch = ({ glob, regex, input, output }) => { + console.log({ glob, regex, input, output }); +}; + +const isMatch = picomatch('*', { onMatch }); +isMatch('foo'); +isMatch('bar'); +isMatch('baz'); +``` + +#### options.onIgnore + +```js +const onIgnore = ({ glob, regex, input, output }) => { + console.log({ glob, regex, input, output }); +}; + +const isMatch = picomatch('*', { onIgnore, ignore: 'f*' }); +isMatch('foo'); +isMatch('bar'); +isMatch('baz'); +``` + +#### options.onResult + +```js +const onResult = ({ glob, regex, input, output }) => { + console.log({ glob, regex, input, output }); +}; + +const isMatch = picomatch('*', { onResult, ignore: 'f*' }); +isMatch('foo'); +isMatch('bar'); +isMatch('baz'); +``` + +
    +
    + +## Globbing features + +* [Basic globbing](#basic-globbing) (Wildcard matching) +* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching) + +### Basic globbing + +| **Character** | **Description** | +| --- | --- | +| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. | +| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` with the `windows` option) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. | +| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. | +| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. | + +#### Matching behavior vs. Bash + +Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions: + +* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`. +* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`. + +
    + +### Advanced globbing + +* [extglobs](#extglobs) +* [POSIX brackets](#posix-brackets) +* [Braces](#brace-expansion) + +#### Extglobs + +| **Pattern** | **Description** | +| --- | --- | +| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` | +| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` | +| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` | +| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` | +| `!(pattern)` | Match _anything but_ `pattern` | + +**Examples** + +```js +const pm = require('picomatch'); + +// *(pattern) matches ZERO or more of "pattern" +console.log(pm.isMatch('a', 'a*(z)')); // true +console.log(pm.isMatch('az', 'a*(z)')); // true +console.log(pm.isMatch('azzz', 'a*(z)')); // true + +// +(pattern) matches ONE or more of "pattern" +console.log(pm.isMatch('a', 'a+(z)')); // false +console.log(pm.isMatch('az', 'a+(z)')); // true +console.log(pm.isMatch('azzz', 'a+(z)')); // true + +// supports multiple extglobs +console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false + +// supports nested extglobs +console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true +``` + +#### POSIX brackets + +POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true. + +**Enable POSIX bracket support** + +```js +console.log(pm.makeRe('[[:word:]]+', { posix: true })); +//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/ +``` + +**Supported POSIX classes** + +The following named POSIX bracket expressions are supported: + +* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]` +* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`. +* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`. +* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`. +* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`. +* `[:digit:]` - Numerical digits, equivalent to `[0-9]`. +* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`. +* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`. +* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`. +* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`. +* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`. +* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`. +* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`. +* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`. + +See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information. + +### Braces + +Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces. + +### Matching special characters as literals + +If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes: + +**Special Characters** + +Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms. + +To match any of the following characters as literals: `$^*+?()[] + +Examples: + +```js +console.log(pm.makeRe('foo/bar \\(1\\)')); +console.log(pm.makeRe('foo/bar \\(1\\)')); +``` + +
    +
    + +## Library Comparisons + +The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets). + +| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` | +| --- | --- | --- | --- | --- | --- | --- | --- | +| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - | +| Advancing globbing | ✔ | ✔ | ✔ | - | - | - | - | +| Brace _matching_ | ✔ | ✔ | ✔ | - | - | ✔ | - | +| Brace _expansion_ | ✔ | ✔ | - | - | - | ✔ | - | +| Extglobs | partial | ✔ | ✔ | - | ✔ | - | - | +| Posix brackets | - | ✔ | ✔ | - | - | - | ✔ | +| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ | +| File system operations | - | - | - | - | - | - | - | + +
    +
    + +## Benchmarks + +Performance comparison of picomatch and minimatch. + +_(Pay special attention to the last three benchmarks. Minimatch freezes on long ranges.)_ + +``` +# .makeRe star (*) + picomatch x 4,449,159 ops/sec ±0.24% (97 runs sampled) + minimatch x 632,772 ops/sec ±0.14% (98 runs sampled) + +# .makeRe star; dot=true (*) + picomatch x 3,500,079 ops/sec ±0.26% (99 runs sampled) + minimatch x 564,916 ops/sec ±0.23% (96 runs sampled) + +# .makeRe globstar (**) + picomatch x 3,261,000 ops/sec ±0.27% (98 runs sampled) + minimatch x 1,664,766 ops/sec ±0.20% (100 runs sampled) + +# .makeRe globstars (**/**/**) + picomatch x 3,284,469 ops/sec ±0.18% (97 runs sampled) + minimatch x 1,435,880 ops/sec ±0.34% (95 runs sampled) + +# .makeRe with leading star (*.txt) + picomatch x 3,100,197 ops/sec ±0.35% (99 runs sampled) + minimatch x 428,347 ops/sec ±0.42% (94 runs sampled) + +# .makeRe - basic braces ({a,b,c}*.txt) + picomatch x 443,578 ops/sec ±1.33% (89 runs sampled) + minimatch x 107,143 ops/sec ±0.35% (94 runs sampled) + +# .makeRe - short ranges ({a..z}*.txt) + picomatch x 415,484 ops/sec ±0.76% (96 runs sampled) + minimatch x 14,299 ops/sec ±0.26% (96 runs sampled) + +# .makeRe - medium ranges ({1..100000}*.txt) + picomatch x 395,020 ops/sec ±0.87% (89 runs sampled) + minimatch x 2 ops/sec ±4.59% (10 runs sampled) + +# .makeRe - long ranges ({1..10000000}*.txt) + picomatch x 400,036 ops/sec ±0.83% (90 runs sampled) + minimatch (FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory) +``` + +
    +
    + +## Philosophies + +The goal of this library is to be blazing fast, without compromising on accuracy. + +**Accuracy** + +The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`. + +Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements. + +**Performance** + +Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer. + +
    +
    + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). diff --git a/node_modules/picomatch/index.js b/node_modules/picomatch/index.js new file mode 100644 index 0000000..a753b1d --- /dev/null +++ b/node_modules/picomatch/index.js @@ -0,0 +1,17 @@ +'use strict'; + +const pico = require('./lib/picomatch'); +const utils = require('./lib/utils'); + +function picomatch(glob, options, returnState = false) { + // default to os.platform() + if (options && (options.windows === null || options.windows === undefined)) { + // don't mutate the original options object + options = { ...options, windows: utils.isWindows() }; + } + + return pico(glob, options, returnState); +} + +Object.assign(picomatch, pico); +module.exports = picomatch; diff --git a/node_modules/picomatch/lib/constants.js b/node_modules/picomatch/lib/constants.js new file mode 100644 index 0000000..27b3e20 --- /dev/null +++ b/node_modules/picomatch/lib/constants.js @@ -0,0 +1,179 @@ +'use strict'; + +const WIN_SLASH = '\\\\/'; +const WIN_NO_SLASH = `[^${WIN_SLASH}]`; + +/** + * Posix glob regex + */ + +const DOT_LITERAL = '\\.'; +const PLUS_LITERAL = '\\+'; +const QMARK_LITERAL = '\\?'; +const SLASH_LITERAL = '\\/'; +const ONE_CHAR = '(?=.)'; +const QMARK = '[^/]'; +const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; +const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; +const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; +const NO_DOT = `(?!${DOT_LITERAL})`; +const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; +const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; +const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; +const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; +const STAR = `${QMARK}*?`; +const SEP = '/'; + +const POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR, + SEP +}; + +/** + * Windows glob regex + */ + +const WINDOWS_CHARS = { + ...POSIX_CHARS, + + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)`, + SEP: '\\' +}; + +/** + * POSIX Bracket Regex + */ + +const POSIX_REGEX_SOURCE = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; + +module.exports = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE, + + // regular expressions + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + + // Replace globs with equivalent patterns to reduce parsing time. + REPLACEMENTS: { + '***': '*', + '**/**': '**', + '**/**/**': '**' + }, + + // Digits + CHAR_0: 48, /* 0 */ + CHAR_9: 57, /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 65, /* A */ + CHAR_LOWERCASE_A: 97, /* a */ + CHAR_UPPERCASE_Z: 90, /* Z */ + CHAR_LOWERCASE_Z: 122, /* z */ + + CHAR_LEFT_PARENTHESES: 40, /* ( */ + CHAR_RIGHT_PARENTHESES: 41, /* ) */ + + CHAR_ASTERISK: 42, /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: 38, /* & */ + CHAR_AT: 64, /* @ */ + CHAR_BACKWARD_SLASH: 92, /* \ */ + CHAR_CARRIAGE_RETURN: 13, /* \r */ + CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ + CHAR_COLON: 58, /* : */ + CHAR_COMMA: 44, /* , */ + CHAR_DOT: 46, /* . */ + CHAR_DOUBLE_QUOTE: 34, /* " */ + CHAR_EQUAL: 61, /* = */ + CHAR_EXCLAMATION_MARK: 33, /* ! */ + CHAR_FORM_FEED: 12, /* \f */ + CHAR_FORWARD_SLASH: 47, /* / */ + CHAR_GRAVE_ACCENT: 96, /* ` */ + CHAR_HASH: 35, /* # */ + CHAR_HYPHEN_MINUS: 45, /* - */ + CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ + CHAR_LEFT_CURLY_BRACE: 123, /* { */ + CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ + CHAR_LINE_FEED: 10, /* \n */ + CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ + CHAR_PERCENT: 37, /* % */ + CHAR_PLUS: 43, /* + */ + CHAR_QUESTION_MARK: 63, /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ + CHAR_RIGHT_CURLY_BRACE: 125, /* } */ + CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ + CHAR_SEMICOLON: 59, /* ; */ + CHAR_SINGLE_QUOTE: 39, /* ' */ + CHAR_SPACE: 32, /* */ + CHAR_TAB: 9, /* \t */ + CHAR_UNDERSCORE: 95, /* _ */ + CHAR_VERTICAL_LINE: 124, /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ + + /** + * Create EXTGLOB_CHARS + */ + + extglobChars(chars) { + return { + '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, + '?': { type: 'qmark', open: '(?:', close: ')?' }, + '+': { type: 'plus', open: '(?:', close: ')+' }, + '*': { type: 'star', open: '(?:', close: ')*' }, + '@': { type: 'at', open: '(?:', close: ')' } + }; + }, + + /** + * Create GLOB_CHARS + */ + + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } +}; diff --git a/node_modules/picomatch/lib/parse.js b/node_modules/picomatch/lib/parse.js new file mode 100644 index 0000000..8fd8ff4 --- /dev/null +++ b/node_modules/picomatch/lib/parse.js @@ -0,0 +1,1085 @@ +'use strict'; + +const constants = require('./constants'); +const utils = require('./utils'); + +/** + * Constants + */ + +const { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS +} = constants; + +/** + * Helpers + */ + +const expandRange = (args, options) => { + if (typeof options.expandRange === 'function') { + return options.expandRange(...args, options); + } + + args.sort(); + const value = `[${args.join('-')}]`; + + try { + /* eslint-disable-next-line no-new */ + new RegExp(value); + } catch (ex) { + return args.map(v => utils.escapeRegex(v)).join('..'); + } + + return value; +}; + +/** + * Create the message for a syntax error + */ + +const syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; +}; + +/** + * Parse the given input string. + * @param {String} input + * @param {Object} options + * @return {Object} + */ + +const parse = (input, options) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + input = REPLACEMENTS[input] || input; + + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + const bos = { type: 'bos', value: '', output: opts.prepend || '' }; + const tokens = [bos]; + + const capture = opts.capture ? '' : '?:'; + + // create constants based on platform, for windows or posix + const PLATFORM_CHARS = constants.globChars(opts.windows); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + + const globstar = opts => { + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const nodot = opts.dot ? '' : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + // minimatch options support + if (typeof opts.noext === 'boolean') { + opts.noextglob = opts.noext; + } + + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: '', + output: '', + prefix: '', + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + + input = utils.removePrefix(input, state); + len = input.length; + + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + + /** + * Tokenizing helpers + */ + + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ''; + const remaining = () => input.slice(state.index + 1); + const consume = (value = '', num = 0) => { + state.consumed += value; + state.index += num; + }; + + const append = token => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + + const negate = () => { + let count = 1; + + while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { + advance(); + state.start++; + count++; + } + + if (count % 2 === 0) { + return false; + } + + state.negated = true; + state.start++; + return true; + }; + + const increment = type => { + state[type]++; + stack.push(type); + }; + + const decrement = type => { + state[type]--; + stack.pop(); + }; + + /** + * Push tokens onto the tokens array. This helper speeds up + * tokenizing by 1) helping us avoid backtracking as much as possible, + * and 2) helping us avoid creating extra tokens when consecutive + * characters are plain text. This improves performance and simplifies + * lookbehinds. + */ + + const push = tok => { + if (prev.type === 'globstar') { + const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); + const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); + + if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = 'star'; + prev.value = '*'; + prev.output = star; + state.output += prev.output; + } + } + + if (extglobs.length && tok.type !== 'paren') { + extglobs[extglobs.length - 1].inner += tok.value; + } + + if (tok.value || tok.output) append(tok); + if (prev && prev.type === 'text' && tok.type === 'text') { + prev.output = (prev.output || prev.value) + tok.value; + prev.value += tok.value; + return; + } + + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + + const extglobOpen = (type, value) => { + const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; + + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? '(' : '') + token.open; + + increment('parens'); + push({ type, value, output: state.output ? '' : ONE_CHAR }); + push({ type: 'paren', extglob: true, value: advance(), output }); + extglobs.push(token); + }; + + const extglobClose = token => { + let output = token.close + (opts.capture ? ')' : ''); + let rest; + + if (token.type === 'negate') { + let extglobStar = star; + + if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { + extglobStar = globstar(opts); + } + + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + + if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { + // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. + // In this case, we need to parse the string and use it in the output of the original pattern. + // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. + // + // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. + const expression = parse(rest, { ...options, fastpaths: false }).output; + + output = token.close = `)${expression})${extglobStar})`; + } + + if (token.prev.type === 'bos') { + state.negatedExtglob = true; + } + } + + push({ type: 'paren', extglob: true, value, output }); + decrement('parens'); + }; + + /** + * Fast paths + */ + + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === '\\') { + backslashes = true; + return m; + } + + if (first === '?') { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ''); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); + } + return QMARK.repeat(chars.length); + } + + if (first === '.') { + return DOT_LITERAL.repeat(chars.length); + } + + if (first === '*') { + if (esc) { + return esc + first + (rest ? star : ''); + } + return star; + } + return esc ? m : `\\${m}`; + }); + + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ''); + } else { + output = output.replace(/\\+/g, m => { + return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); + }); + } + } + + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + + state.output = utils.wrapOutput(output, state, options); + return state; + } + + /** + * Tokenize input until we reach end-of-string + */ + + while (!eos()) { + value = advance(); + + if (value === '\u0000') { + continue; + } + + /** + * Escaped characters + */ + + if (value === '\\') { + const next = peek(); + + if (next === '/' && opts.bash !== true) { + continue; + } + + if (next === '.' || next === ';') { + continue; + } + + if (!next) { + value += '\\'; + push({ type: 'text', value }); + continue; + } + + // collapse slashes to reduce potential for exploits + const match = /^\\+/.exec(remaining()); + let slashes = 0; + + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += '\\'; + } + } + + if (opts.unescape === true) { + value = advance(); + } else { + value += advance(); + } + + if (state.brackets === 0) { + push({ type: 'text', value }); + continue; + } + } + + /** + * If we're inside a regex character class, continue + * until we reach the closing bracket. + */ + + if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { + if (opts.posix !== false && value === ':') { + const inner = prev.value.slice(1); + if (inner.includes('[')) { + prev.posix = true; + + if (inner.includes(':')) { + const idx = prev.value.lastIndexOf('['); + const pre = prev.value.slice(0, idx); + const rest = prev.value.slice(idx + 2); + const posix = POSIX_REGEX_SOURCE[rest]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + + if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { + value = `\\${value}`; + } + + if (value === ']' && (prev.value === '[' || prev.value === '[^')) { + value = `\\${value}`; + } + + if (opts.posix === true && value === '!' && prev.value === '[') { + value = '^'; + } + + prev.value += value; + append({ value }); + continue; + } + + /** + * If we're inside a quoted string, continue + * until we reach the closing double quote. + */ + + if (state.quotes === 1 && value !== '"') { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + + /** + * Double quotes + */ + + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: 'text', value }); + } + continue; + } + + /** + * Parentheses + */ + + if (value === '(') { + increment('parens'); + push({ type: 'paren', value }); + continue; + } + + if (value === ')') { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '(')); + } + + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + + push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); + decrement('parens'); + continue; + } + + /** + * Square brackets + */ + + if (value === '[') { + if (opts.nobracket === true || !remaining().includes(']')) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('closing', ']')); + } + + value = `\\${value}`; + } else { + increment('brackets'); + } + + push({ type: 'bracket', value }); + continue; + } + + if (value === ']') { + if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '[')); + } + + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + decrement('brackets'); + + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { + value = `/${value}`; + } + + prev.value += value; + append({ value }); + + // when literal brackets are explicitly disabled + // assume we should match with a regex character class + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { + continue; + } + + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + + // when literal brackets are explicitly enabled + // assume we should escape the brackets to match literal characters + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + + // when the user specifies nothing, try to match both + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + + /** + * Braces + */ + + if (value === '{' && opts.nobrace !== true) { + increment('braces'); + + const open = { + type: 'brace', + value, + output: '(', + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + + braces.push(open); + push(open); + continue; + } + + if (value === '}') { + const brace = braces[braces.length - 1]; + + if (opts.nobrace === true || !brace) { + push({ type: 'text', value, output: value }); + continue; + } + + let output = ')'; + + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === 'brace') { + break; + } + if (arr[i].type !== 'dots') { + range.unshift(arr[i].value); + } + } + + output = expandRange(range, opts); + state.backtrack = true; + } + + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = '\\{'; + value = output = '\\}'; + state.output = out; + for (const t of toks) { + state.output += (t.output || t.value); + } + } + + push({ type: 'brace', value, output }); + decrement('braces'); + braces.pop(); + continue; + } + + /** + * Pipes + */ + + if (value === '|') { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: 'text', value }); + continue; + } + + /** + * Commas + */ + + if (value === ',') { + let output = value; + + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === 'braces') { + brace.comma = true; + output = '|'; + } + + push({ type: 'comma', value, output }); + continue; + } + + /** + * Slashes + */ + + if (value === '/') { + // if the beginning of the glob is "./", advance the start + // to the current index, and don't add the "./" characters + // to the state. This greatly simplifies lookbehinds when + // checking for BOS characters like "!" and "." (not "./") + if (prev.type === 'dot' && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ''; + state.output = ''; + tokens.pop(); + prev = bos; // reset "prev" to the first token + continue; + } + + push({ type: 'slash', value, output: SLASH_LITERAL }); + continue; + } + + /** + * Dots + */ + + if (value === '.') { + if (state.braces > 0 && prev.type === 'dot') { + if (prev.value === '.') prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = 'dots'; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + + if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { + push({ type: 'text', value, output: DOT_LITERAL }); + continue; + } + + push({ type: 'dot', value, output: DOT_LITERAL }); + continue; + } + + /** + * Question marks + */ + + if (value === '?') { + const isGroup = prev && prev.value === '('; + if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('qmark', value); + continue; + } + + if (prev && prev.type === 'paren') { + const next = peek(); + let output = value; + + if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { + output = `\\${value}`; + } + + push({ type: 'text', value, output }); + continue; + } + + if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { + push({ type: 'qmark', value, output: QMARK_NO_DOT }); + continue; + } + + push({ type: 'qmark', value, output: QMARK }); + continue; + } + + /** + * Exclamation + */ + + if (value === '!') { + if (opts.noextglob !== true && peek() === '(') { + if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { + extglobOpen('negate', value); + continue; + } + } + + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + + /** + * Plus + */ + + if (value === '+') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('plus', value); + continue; + } + + if ((prev && prev.value === '(') || opts.regex === false) { + push({ type: 'plus', value, output: PLUS_LITERAL }); + continue; + } + + if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { + push({ type: 'plus', value }); + continue; + } + + push({ type: 'plus', value: PLUS_LITERAL }); + continue; + } + + /** + * Plain text + */ + + if (value === '@') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + push({ type: 'at', extglob: true, value, output: '' }); + continue; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Plain text + */ + + if (value !== '*') { + if (value === '$' || value === '^') { + value = `\\${value}`; + } + + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Stars + */ + + if (prev && (prev.type === 'globstar' || prev.star === true)) { + prev.type = 'star'; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen('star', value); + continue; + } + + if (prev.type === 'star') { + if (opts.noglobstar === true) { + consume(value); + continue; + } + + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === 'slash' || prior.type === 'bos'; + const afterStar = before && (before.type === 'star' || before.type === 'globstar'); + + if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { + push({ type: 'star', value, output: '' }); + continue; + } + + const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); + const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); + if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { + push({ type: 'star', value, output: '' }); + continue; + } + + // strip consecutive `/**/` + while (rest.slice(0, 3) === '/**') { + const after = input[state.index + 4]; + if (after && after !== '/') { + break; + } + rest = rest.slice(3); + consume('/**', 3); + } + + if (prior.type === 'bos' && eos()) { + prev.type = 'globstar'; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { + const end = rest[1] !== void 0 ? '|$' : ''; + + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + + state.output += prior.output + prev.output; + state.globstar = true; + + consume(value + advance()); + + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + if (prior.type === 'bos' && rest[0] === '/') { + prev.type = 'globstar'; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + // remove single star from output + state.output = state.output.slice(0, -prev.output.length); + + // reset previous token to globstar + prev.type = 'globstar'; + prev.output = globstar(opts); + prev.value += value; + + // reset output with globstar + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + + const token = { type: 'star', value, output: star }; + + if (opts.bash === true) { + token.output = '.*?'; + if (prev.type === 'bos' || prev.type === 'slash') { + token.output = nodot + token.output; + } + push(token); + continue; + } + + if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { + token.output = value; + push(token); + continue; + } + + if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { + if (prev.type === 'dot') { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + + } else { + state.output += nodot; + prev.output += nodot; + } + + if (peek() !== '*') { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + + push(token); + } + + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); + state.output = utils.escapeLast(state.output, '['); + decrement('brackets'); + } + + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); + state.output = utils.escapeLast(state.output, '('); + decrement('parens'); + } + + while (state.braces > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); + state.output = utils.escapeLast(state.output, '{'); + decrement('braces'); + } + + if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { + push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); + } + + // rebuild the output if we had to backtrack at any point + if (state.backtrack === true) { + state.output = ''; + + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + + if (token.suffix) { + state.output += token.suffix; + } + } + } + + return state; +}; + +/** + * Fast paths for creating regular expressions for common glob patterns. + * This can significantly speed up processing and has very little downside + * impact when none of the fast paths match. + */ + +parse.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + input = REPLACEMENTS[input] || input; + + // create constants based on platform, for windows or posix + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(opts.windows); + + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? '' : '?:'; + const state = { negated: false, prefix: '' }; + let star = opts.bash === true ? '.*?' : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + const globstar = opts => { + if (opts.noglobstar === true) return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const create = str => { + switch (str) { + case '*': + return `${nodot}${ONE_CHAR}${star}`; + + case '.*': + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*.*': + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*/*': + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + + case '**': + return nodot + globstar(opts); + + case '**/*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + + case '**/*.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '**/.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) return; + + const source = create(match[1]); + if (!source) return; + + return source + DOT_LITERAL + match[2]; + } + } + }; + + const output = utils.removePrefix(input, state); + let source = create(output); + + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + + return source; +}; + +module.exports = parse; diff --git a/node_modules/picomatch/lib/picomatch.js b/node_modules/picomatch/lib/picomatch.js new file mode 100644 index 0000000..d0ebd9f --- /dev/null +++ b/node_modules/picomatch/lib/picomatch.js @@ -0,0 +1,341 @@ +'use strict'; + +const scan = require('./scan'); +const parse = require('./parse'); +const utils = require('./utils'); +const constants = require('./constants'); +const isObject = val => val && typeof val === 'object' && !Array.isArray(val); + +/** + * Creates a matcher function from one or more glob patterns. The + * returned function takes a string to match as its first argument, + * and returns true if the string is a match. The returned matcher + * function also takes a boolean as the second argument that, when true, + * returns an object with additional information. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch(glob[, options]); + * + * const isMatch = picomatch('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @name picomatch + * @param {String|Array} `globs` One or more glob patterns. + * @param {Object=} `options` + * @return {Function=} Returns a matcher function. + * @api public + */ + +const picomatch = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map(input => picomatch(input, options, returnState)); + const arrayMatcher = str => { + for (const isMatch of fns) { + const state = isMatch(str); + if (state) return state; + } + return false; + }; + return arrayMatcher; + } + + const isState = isObject(glob) && glob.tokens && glob.input; + + if (glob === '' || (typeof glob !== 'string' && !isState)) { + throw new TypeError('Expected pattern to be a non-empty string'); + } + + const opts = options || {}; + const posix = opts.windows; + const regex = isState + ? picomatch.compileRe(glob, options) + : picomatch.makeRe(glob, options, false, true); + + const state = regex.state; + delete regex.state; + + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); + } + + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match, isMatch }; + + if (typeof opts.onResult === 'function') { + opts.onResult(result); + } + + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + + if (isIgnored(input)) { + if (typeof opts.onIgnore === 'function') { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + + if (typeof opts.onMatch === 'function') { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + + if (returnState) { + matcher.state = state; + } + + return matcher; +}; + +/** + * Test `input` with the given `regex`. This is used by the main + * `picomatch()` function to test the input string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.test(input, regex[, options]); + * + * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); + * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } + * ``` + * @param {String} `input` String to test. + * @param {RegExp} `regex` + * @return {Object} Returns an object with matching info. + * @api public + */ + +picomatch.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected input to be a string'); + } + + if (input === '') { + return { isMatch: false, output: '' }; + } + + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = (match && format) ? format(input) : input; + + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch.matchBase(input, regex, options, posix); + } else { + match = regex.exec(output); + } + } + + return { isMatch: Boolean(match), match, output }; +}; + +/** + * Match the basename of a filepath. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.matchBase(input, glob[, options]); + * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true + * ``` + * @param {String} `input` String to test. + * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). + * @return {Boolean} + * @api public + */ + +picomatch.matchBase = (input, glob, options) => { + const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); + return regex.test(utils.basename(input)); +}; + +/** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.isMatch(string, patterns[, options]); + * + * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String|Array} str The string to test. + * @param {String|Array} patterns One or more glob patterns to use for matching. + * @param {Object} [options] See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + +/** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const picomatch = require('picomatch'); + * const result = picomatch.parse(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as a regex source string. + * @api public + */ + +picomatch.parse = (pattern, options) => { + if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); + return parse(pattern, { ...options, fastpaths: false }); +}; + +/** + * Scan a glob pattern to separate the pattern into segments. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.scan(input[, options]); + * + * const result = picomatch.scan('!./foo/*.js'); + * console.log(result); + * { prefix: '!./', + * input: '!./foo/*.js', + * start: 3, + * base: 'foo', + * glob: '*.js', + * isBrace: false, + * isBracket: false, + * isGlob: true, + * isExtglob: false, + * isGlobstar: false, + * negated: true } + * ``` + * @param {String} `input` Glob pattern to scan. + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + +picomatch.scan = (input, options) => scan(input, options); + +/** + * Compile a regular expression from the `state` object returned by the + * [parse()](#parse) method. + * + * @param {Object} `state` + * @param {Object} `options` + * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. + * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. + * @return {RegExp} + * @api public + */ + +picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return state.output; + } + + const opts = options || {}; + const prepend = opts.contains ? '' : '^'; + const append = opts.contains ? '' : '$'; + + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) { + source = `^(?!${source}).*$`; + } + + const regex = picomatch.toRegex(source, options); + if (returnState === true) { + regex.state = state; + } + + return regex; +}; + +/** + * Create a regular expression from a parsed glob pattern. + * + * ```js + * const picomatch = require('picomatch'); + * const state = picomatch.parse('*.js'); + * // picomatch.compileRe(state[, options]); + * + * console.log(picomatch.compileRe(state)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `state` The object returned from the `.parse` method. + * @param {Object} `options` + * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. + * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== 'string') { + throw new TypeError('Expected a non-empty string'); + } + + let parsed = { negated: false, fastpaths: true }; + + if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { + parsed.output = parse.fastpaths(input, options); + } + + if (!parsed.output) { + parsed = parse(input, options); + } + + return picomatch.compileRe(parsed, options, returnOutput, returnState); +}; + +/** + * Create a regular expression from the given regex source string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.toRegex(source[, options]); + * + * const { output } = picomatch.parse('*.js'); + * console.log(picomatch.toRegex(output)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `source` Regular expression source string. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +picomatch.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); + } catch (err) { + if (options && options.debug === true) throw err; + return /$^/; + } +}; + +/** + * Picomatch constants. + * @return {Object} + */ + +picomatch.constants = constants; + +/** + * Expose "picomatch" + */ + +module.exports = picomatch; diff --git a/node_modules/picomatch/lib/scan.js b/node_modules/picomatch/lib/scan.js new file mode 100644 index 0000000..e59cd7a --- /dev/null +++ b/node_modules/picomatch/lib/scan.js @@ -0,0 +1,391 @@ +'use strict'; + +const utils = require('./utils'); +const { + CHAR_ASTERISK, /* * */ + CHAR_AT, /* @ */ + CHAR_BACKWARD_SLASH, /* \ */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_EXCLAMATION_MARK, /* ! */ + CHAR_FORWARD_SLASH, /* / */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_PLUS, /* + */ + CHAR_QUESTION_MARK, /* ? */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_RIGHT_SQUARE_BRACKET /* ] */ +} = require('./constants'); + +const isPathSeparator = code => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; +}; + +const depth = token => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } +}; + +/** + * Quickly scans a glob pattern and returns an object with a handful of + * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), + * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not + * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). + * + * ```js + * const pm = require('picomatch'); + * console.log(pm.scan('foo/bar/*.js')); + * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an object with tokens and regex source string. + * @api public + */ + +const scan = (input, options) => { + const opts = options || {}; + + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: '', depth: 0, isGlob: false }; + + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + + while (index < length) { + code = advance(); + let next; + + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { value: '', depth: 0, isGlob: false }; + + if (finished === true) continue; + if (prev === CHAR_DOT && index === (start + 1)) { + start += 2; + continue; + } + + lastIndex = index + 1; + continue; + } + + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS + || code === CHAR_AT + || code === CHAR_ASTERISK + || code === CHAR_QUESTION_MARK + || code === CHAR_EXCLAMATION_MARK; + + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) { + negatedExtglob = true; + } + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + break; + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + + if (isGlob === true) { + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + } + + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + + let base = str; + let prefix = ''; + let glob = ''; + + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ''; + glob = str; + } else { + base = str; + } + + if (base && base !== '' && base !== '/' && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + + if (opts.unescape === true) { + if (glob) glob = utils.removeBackslashes(glob); + + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== '') { + parts.push(value); + } + prevIndex = i; + } + + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + + state.slashes = slashes; + state.parts = parts; + } + + return state; +}; + +module.exports = scan; diff --git a/node_modules/picomatch/lib/utils.js b/node_modules/picomatch/lib/utils.js new file mode 100644 index 0000000..9c97cae --- /dev/null +++ b/node_modules/picomatch/lib/utils.js @@ -0,0 +1,72 @@ +/*global navigator*/ +'use strict'; + +const { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL +} = require('./constants'); + +exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); +exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); +exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); +exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); +exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); + +exports.isWindows = () => { + if (typeof navigator !== 'undefined' && navigator.platform) { + const platform = navigator.platform.toLowerCase(); + return platform === 'win32' || platform === 'windows'; + } + + if (typeof process !== 'undefined' && process.platform) { + return process.platform === 'win32'; + } + + return false; +}; + +exports.removeBackslashes = str => { + return str.replace(REGEX_REMOVE_BACKSLASH, match => { + return match === '\\' ? '' : match; + }); +}; + +exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; +}; + +exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith('./')) { + output = output.slice(2); + state.prefix = './'; + } + return output; +}; + +exports.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? '' : '^'; + const append = options.contains ? '' : '$'; + + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; +}; + +exports.basename = (path, { windows } = {}) => { + const segs = path.split(windows ? /[\\/]/ : '/'); + const last = segs[segs.length - 1]; + + if (last === '') { + return segs[segs.length - 2]; + } + + return last; +}; diff --git a/node_modules/picomatch/package.json b/node_modules/picomatch/package.json new file mode 100644 index 0000000..703a83d --- /dev/null +++ b/node_modules/picomatch/package.json @@ -0,0 +1,83 @@ +{ + "name": "picomatch", + "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", + "version": "4.0.2", + "homepage": "https://github.com/micromatch/picomatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "funding": "https://github.com/sponsors/jonschlinkert", + "repository": "micromatch/picomatch", + "bugs": { + "url": "https://github.com/micromatch/picomatch/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "posix.js", + "lib" + ], + "sideEffects": false, + "main": "index.js", + "engines": { + "node": ">=12" + }, + "scripts": { + "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", + "mocha": "mocha --reporter dot", + "test": "npm run lint && npm run mocha", + "test:ci": "npm run test:cover", + "test:cover": "nyc npm run mocha" + }, + "devDependencies": { + "eslint": "^8.57.0", + "fill-range": "^7.0.1", + "gulp-format-md": "^2.0.0", + "mocha": "^10.4.0", + "nyc": "^15.1.0", + "time-require": "github:jonschlinkert/time-require" + }, + "keywords": [ + "glob", + "match", + "picomatch" + ], + "nyc": { + "reporter": [ + "html", + "lcov", + "text-summary" + ] + }, + "verb": { + "toc": { + "render": true, + "method": "preWrite", + "maxdepth": 3 + }, + "layout": "empty", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "braces", + "micromatch" + ] + }, + "reflinks": [ + "braces", + "expand-brackets", + "extglob", + "fill-range", + "micromatch", + "minimatch", + "nanomatch", + "picomatch" + ] + } +} diff --git a/node_modules/picomatch/posix.js b/node_modules/picomatch/posix.js new file mode 100644 index 0000000..d2f2bc5 --- /dev/null +++ b/node_modules/picomatch/posix.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/picomatch'); diff --git a/node_modules/resolve/.editorconfig b/node_modules/resolve/.editorconfig new file mode 100644 index 0000000..d63f0bb --- /dev/null +++ b/node_modules/resolve/.editorconfig @@ -0,0 +1,37 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 200 + +[*.js] +block_comment_start = /* +block_comment = * +block_comment_end = */ + +[*.yml] +indent_size = 1 + +[package.json] +indent_style = tab + +[lib/core.json] +indent_style = tab + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[{*.json,Makefile}] +max_line_length = off + +[test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*] +indent_style = off +indent_size = off +max_line_length = off +insert_final_newline = off diff --git a/node_modules/resolve/.eslintrc b/node_modules/resolve/.eslintrc new file mode 100644 index 0000000..ad05dd8 --- /dev/null +++ b/node_modules/resolve/.eslintrc @@ -0,0 +1,65 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "indent": [2, 4], + "strict": 0, + "complexity": 0, + "consistent-return": 0, + "curly": 0, + "dot-notation": [2, { "allowKeywords": true }], + "func-name-matching": 0, + "func-style": 0, + "global-require": 1, + "id-length": [2, { "min": 1, "max": 40 }], + "max-lines": [2, 350], + "max-lines-per-function": 0, + "max-nested-callbacks": 0, + "max-params": 0, + "max-statements-per-line": [2, { "max": 2 }], + "max-statements": 0, + "no-magic-numbers": 0, + "no-shadow": 0, + "no-use-before-define": 0, + "sort-keys": 0, + }, + "overrides": [ + { + "files": "bin/**", + "rules": { + "no-process-exit": "off", + }, + }, + { + "files": "example/**", + "rules": { + "no-console": 0, + }, + }, + { + "files": "test/resolver/nested_symlinks/mylib/*.js", + "rules": { + "no-throw-literal": 0, + }, + }, + { + "files": "test/**", + "parserOptions": { + "ecmaVersion": 5, + "allowReserved": false, + }, + "rules": { + "dot-notation": [2, { "allowPattern": "throws" }], + "max-lines": 0, + "max-lines-per-function": 0, + "no-unused-vars": [2, { "vars": "all", "args": "none" }], + }, + }, + ], + + "ignorePatterns": [ + "./test/resolver/malformed_package_json/package.json", + ], +} diff --git a/node_modules/resolve/.github/FUNDING.yml b/node_modules/resolve/.github/FUNDING.yml new file mode 100644 index 0000000..d9c0595 --- /dev/null +++ b/node_modules/resolve/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/resolve +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/resolve/LICENSE b/node_modules/resolve/LICENSE new file mode 100644 index 0000000..ff4fce2 --- /dev/null +++ b/node_modules/resolve/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2012 James Halliday + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/resolve/SECURITY.md b/node_modules/resolve/SECURITY.md new file mode 100644 index 0000000..82e4285 --- /dev/null +++ b/node_modules/resolve/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/resolve/async.js b/node_modules/resolve/async.js new file mode 100644 index 0000000..f38c581 --- /dev/null +++ b/node_modules/resolve/async.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/async'); diff --git a/node_modules/resolve/bin/resolve b/node_modules/resolve/bin/resolve new file mode 100755 index 0000000..21d1a87 --- /dev/null +++ b/node_modules/resolve/bin/resolve @@ -0,0 +1,50 @@ +#!/usr/bin/env node + +'use strict'; + +var path = require('path'); +var fs = require('fs'); + +if ( + String(process.env.npm_lifecycle_script).slice(0, 8) !== 'resolve ' + && ( + !process.argv + || process.argv.length < 2 + || (process.argv[1] !== __filename && fs.statSync(process.argv[1]).ino !== fs.statSync(__filename).ino) + || (process.env.npm_lifecycle_event !== 'npx' && process.env._ && fs.realpathSync(path.resolve(process.env._)) !== __filename) + ) +) { + console.error('Error: `resolve` must be run directly as an executable'); + process.exit(1); +} + +var supportsPreserveSymlinkFlag = require('supports-preserve-symlinks-flag'); + +var preserveSymlinks = false; +for (var i = 2; i < process.argv.length; i += 1) { + if (process.argv[i].slice(0, 2) === '--') { + if (supportsPreserveSymlinkFlag && process.argv[i] === '--preserve-symlinks') { + preserveSymlinks = true; + } else if (process.argv[i].length > 2) { + console.error('Unknown argument ' + process.argv[i].replace(/[=].*$/, '')); + process.exit(2); + } + process.argv.splice(i, 1); + i -= 1; + if (process.argv[i] === '--') { break; } // eslint-disable-line no-restricted-syntax + } +} + +if (process.argv.length < 3) { + console.error('Error: `resolve` expects a specifier'); + process.exit(2); +} + +var resolve = require('../'); + +var result = resolve.sync(process.argv[2], { + basedir: process.cwd(), + preserveSymlinks: preserveSymlinks +}); + +console.log(result); diff --git a/node_modules/resolve/example/async.js b/node_modules/resolve/example/async.js new file mode 100644 index 0000000..20e65dc --- /dev/null +++ b/node_modules/resolve/example/async.js @@ -0,0 +1,5 @@ +var resolve = require('../'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); diff --git a/node_modules/resolve/example/sync.js b/node_modules/resolve/example/sync.js new file mode 100644 index 0000000..54b2cc1 --- /dev/null +++ b/node_modules/resolve/example/sync.js @@ -0,0 +1,3 @@ +var resolve = require('../'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); diff --git a/node_modules/resolve/index.js b/node_modules/resolve/index.js new file mode 100644 index 0000000..125d814 --- /dev/null +++ b/node_modules/resolve/index.js @@ -0,0 +1,6 @@ +var async = require('./lib/async'); +async.core = require('./lib/core'); +async.isCore = require('./lib/is-core'); +async.sync = require('./lib/sync'); + +module.exports = async; diff --git a/node_modules/resolve/lib/async.js b/node_modules/resolve/lib/async.js new file mode 100644 index 0000000..60d2555 --- /dev/null +++ b/node_modules/resolve/lib/async.js @@ -0,0 +1,329 @@ +var fs = require('fs'); +var getHomedir = require('./homedir'); +var path = require('path'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); +var isCore = require('is-core-module'); + +var realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; + +var defaultIsFile = function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultIsDir = function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultRealpath = function realpath(x, cb) { + realpathFS(x, function (realpathErr, realPath) { + if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr); + else cb(null, realpathErr ? x : realPath); + }); +}; + +var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) { + if (opts && opts.preserveSymlinks === false) { + realpath(x, cb); + } else { + cb(null, x); + } +}; + +var defaultReadPackage = function defaultReadPackage(readFile, pkgfile, cb) { + readFile(pkgfile, function (readFileErr, body) { + if (readFileErr) cb(readFileErr); + else { + try { + var pkg = JSON.parse(body); + cb(null, pkg); + } catch (jsonErr) { + cb(null); + } + } + }); +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolve(x, options, callback) { + var cb = callback; + var opts = options; + if (typeof options === 'function') { + cb = opts; + opts = {}; + } + if (typeof x !== 'string') { + var err = new TypeError('Path must be a string.'); + return process.nextTick(function () { + cb(err); + }); + } + + opts = normalizeOptions(x, opts); + + var isFile = opts.isFile || defaultIsFile; + var isDirectory = opts.isDirectory || defaultIsDir; + var readFile = opts.readFile || fs.readFile; + var realpath = opts.realpath || defaultRealpath; + var readPackage = opts.readPackage || defaultReadPackage; + if (opts.readFile && opts.readPackage) { + var conflictErr = new TypeError('`readFile` and `readPackage` are mutually exclusive.'); + return process.nextTick(function () { + cb(conflictErr); + }); + } + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || defaultPaths(); + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = path.resolve(basedir); + + maybeRealpath( + realpath, + absoluteStart, + opts, + function (err, realStart) { + if (err) cb(err); + else init(realStart); + } + ); + + var res; + function init(basedir) { + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + res = path.resolve(basedir, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + if ((/\/$/).test(x) && res === basedir) { + loadAsDirectory(res, opts.package, onfile); + } else loadAsFile(res, opts.package, onfile); + } else if (includeCoreModules && isCore(x)) { + return cb(null, x); + } else loadNodeModules(x, basedir, function (err, n, pkg) { + if (err) cb(err); + else if (n) { + return maybeRealpath(realpath, n, opts, function (err, realN) { + if (err) { + cb(err); + } else { + cb(null, realN, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function onfile(err, m, pkg) { + if (err) cb(err); + else if (m) cb(null, m, pkg); + else loadAsDirectory(res, function (err, d, pkg) { + if (err) cb(err); + else if (d) { + maybeRealpath(realpath, d, opts, function (err, realD) { + if (err) { + cb(err); + } else { + cb(null, realD, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function loadAsFile(x, thePackage, callback) { + var loadAsFilePackage = thePackage; + var cb = callback; + if (typeof loadAsFilePackage === 'function') { + cb = loadAsFilePackage; + loadAsFilePackage = undefined; + } + + var exts = [''].concat(extensions); + load(exts, x, loadAsFilePackage); + + function load(exts, x, loadPackage) { + if (exts.length === 0) return cb(null, undefined, loadPackage); + var file = x + exts[0]; + + var pkg = loadPackage; + if (pkg) onpkg(null, pkg); + else loadpkg(path.dirname(file), onpkg); + + function onpkg(err, pkg_, dir) { + pkg = pkg_; + if (err) return cb(err); + if (dir && pkg && opts.pathFilter) { + var rfile = path.relative(dir, file); + var rel = rfile.slice(0, rfile.length - exts[0].length); + var r = opts.pathFilter(pkg, x, rel); + if (r) return load( + [''].concat(extensions.slice()), + path.resolve(dir, r), + pkg + ); + } + isFile(file, onex); + } + function onex(err, ex) { + if (err) return cb(err); + if (ex) return cb(null, file, pkg); + load(exts.slice(1), x, pkg); + } + } + } + + function loadpkg(dir, cb) { + if (dir === '' || dir === '/') return cb(null); + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return cb(null); + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null); + + maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return loadpkg(path.dirname(dir), cb); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + // on err, ex is false + if (!ex) return loadpkg(path.dirname(dir), cb); + + readPackage(readFile, pkgfile, function (err, pkgParam) { + if (err) cb(err); + + var pkg = pkgParam; + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + cb(null, pkg, dir); + }); + }); + }); + } + + function loadAsDirectory(x, loadAsDirectoryPackage, callback) { + var cb = callback; + var fpkg = loadAsDirectoryPackage; + if (typeof fpkg === 'function') { + cb = fpkg; + fpkg = opts.package; + } + + maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return cb(unwrapErr); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); + + readPackage(readFile, pkgfile, function (err, pkgParam) { + if (err) return cb(err); + + var pkg = pkgParam; + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + return cb(mainError); + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); + + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, pkg, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + loadAsFile(path.join(x, 'index'), pkg, cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + }); + } + + function processDirs(cb, dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + + isDirectory(path.dirname(dir), isdir); + + function isdir(err, isdir) { + if (err) return cb(err); + if (!isdir) return processDirs(cb, dirs.slice(1)); + loadAsFile(dir, opts.package, onfile); + } + + function onfile(err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + loadAsDirectory(dir, opts.package, ondir); + } + + function ondir(err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + processDirs(cb, dirs.slice(1)); + } + } + function loadNodeModules(x, start, cb) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + processDirs( + cb, + packageIterator ? packageIterator(x, start, thunk, opts) : thunk() + ); + } +}; diff --git a/node_modules/resolve/lib/caller.js b/node_modules/resolve/lib/caller.js new file mode 100644 index 0000000..b14a280 --- /dev/null +++ b/node_modules/resolve/lib/caller.js @@ -0,0 +1,8 @@ +module.exports = function () { + // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + var origPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack; }; + var stack = (new Error()).stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; diff --git a/node_modules/resolve/lib/core.js b/node_modules/resolve/lib/core.js new file mode 100644 index 0000000..57b048f --- /dev/null +++ b/node_modules/resolve/lib/core.js @@ -0,0 +1,12 @@ +'use strict'; + +var isCoreModule = require('is-core-module'); +var data = require('./core.json'); + +var core = {}; +for (var mod in data) { // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core[mod] = isCoreModule(mod); + } +} +module.exports = core; diff --git a/node_modules/resolve/lib/core.json b/node_modules/resolve/lib/core.json new file mode 100644 index 0000000..3cda693 --- /dev/null +++ b/node_modules/resolve/lib/core.json @@ -0,0 +1,158 @@ +{ + "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + "async_hooks": ">= 8", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", + "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], + "child_process": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], + "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], + "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], + "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], + "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], + "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], + "freelist": "< 6", + "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], + "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], + "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], + "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], + "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], + "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], + "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], + "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], + "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], + "https": true, + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "inspector/promises": [">= 19"], + "node:inspector/promises": [">= 19"], + "_linklist": "< 8", + "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], + "net": true, + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], + "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], + "process": ">= 1", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], + "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], + "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", + "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], + "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], + "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], + "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], + "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], + "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], + "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + "string_decoder": true, + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "test/reporters": ">= 19.9 && < 20.2", + "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"], + "node:test": [">= 16.17 && < 17", ">= 18"], + "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], + "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], + "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], + "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], + "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], + "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], + "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], + "wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"], + "node:wasi": [">= 18.17 && < 19", ">= 20"], + "worker_threads": ">= 11.7", + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] +} diff --git a/node_modules/resolve/lib/homedir.js b/node_modules/resolve/lib/homedir.js new file mode 100644 index 0000000..5ffdf73 --- /dev/null +++ b/node_modules/resolve/lib/homedir.js @@ -0,0 +1,24 @@ +'use strict'; + +var os = require('os'); + +// adapted from https://github.com/sindresorhus/os-homedir/blob/11e089f4754db38bb535e5a8416320c4446e8cfd/index.js + +module.exports = os.homedir || function homedir() { + var home = process.env.HOME; + var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME; + + if (process.platform === 'win32') { + return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null; + } + + if (process.platform === 'darwin') { + return home || (user ? '/Users/' + user : null); + } + + if (process.platform === 'linux') { + return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); // eslint-disable-line no-extra-parens + } + + return home || null; +}; diff --git a/node_modules/resolve/lib/is-core.js b/node_modules/resolve/lib/is-core.js new file mode 100644 index 0000000..537f5c7 --- /dev/null +++ b/node_modules/resolve/lib/is-core.js @@ -0,0 +1,5 @@ +var isCoreModule = require('is-core-module'); + +module.exports = function isCore(x) { + return isCoreModule(x); +}; diff --git a/node_modules/resolve/lib/node-modules-paths.js b/node_modules/resolve/lib/node-modules-paths.js new file mode 100644 index 0000000..1cff010 --- /dev/null +++ b/node_modules/resolve/lib/node-modules-paths.js @@ -0,0 +1,42 @@ +var path = require('path'); +var parse = path.parse || require('path-parse'); // eslint-disable-line global-require + +var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { + var prefix = '/'; + if ((/^([A-Za-z]:)/).test(absoluteStart)) { + prefix = ''; + } else if ((/^\\\\/).test(absoluteStart)) { + prefix = '\\\\'; + } + + var paths = [absoluteStart]; + var parsed = parse(absoluteStart); + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse(parsed.dir); + } + + return paths.reduce(function (dirs, aPath) { + return dirs.concat(modules.map(function (moduleDir) { + return path.resolve(prefix, aPath, moduleDir); + })); + }, []); +}; + +module.exports = function nodeModulesPaths(start, opts, request) { + var modules = opts && opts.moduleDirectory + ? [].concat(opts.moduleDirectory) + : ['node_modules']; + + if (opts && typeof opts.paths === 'function') { + return opts.paths( + request, + start, + function () { return getNodeModulesDirs(start, modules); }, + opts + ); + } + + var dirs = getNodeModulesDirs(start, modules); + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; +}; diff --git a/node_modules/resolve/lib/normalize-options.js b/node_modules/resolve/lib/normalize-options.js new file mode 100644 index 0000000..4b56904 --- /dev/null +++ b/node_modules/resolve/lib/normalize-options.js @@ -0,0 +1,10 @@ +module.exports = function (x, opts) { + /** + * This file is purposefully a passthrough. It's expected that third-party + * environments will override it at runtime in order to inject special logic + * into `resolve` (by manipulating the options). One such example is the PnP + * code path in Yarn. + */ + + return opts || {}; +}; diff --git a/node_modules/resolve/lib/sync.js b/node_modules/resolve/lib/sync.js new file mode 100644 index 0000000..0b6cd58 --- /dev/null +++ b/node_modules/resolve/lib/sync.js @@ -0,0 +1,208 @@ +var isCore = require('is-core-module'); +var fs = require('fs'); +var path = require('path'); +var getHomedir = require('./homedir'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); + +var realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; + +var defaultIsFile = function isFile(file) { + try { + var stat = fs.statSync(file, { throwIfNoEntry: false }); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return !!stat && (stat.isFile() || stat.isFIFO()); +}; + +var defaultIsDir = function isDirectory(dir) { + try { + var stat = fs.statSync(dir, { throwIfNoEntry: false }); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return !!stat && stat.isDirectory(); +}; + +var defaultRealpathSync = function realpathSync(x) { + try { + return realpathFS(x); + } catch (realpathErr) { + if (realpathErr.code !== 'ENOENT') { + throw realpathErr; + } + } + return x; +}; + +var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) { + if (opts && opts.preserveSymlinks === false) { + return realpathSync(x); + } + return x; +}; + +var defaultReadPackageSync = function defaultReadPackageSync(readFileSync, pkgfile) { + var body = readFileSync(pkgfile); + try { + var pkg = JSON.parse(body); + return pkg; + } catch (jsonErr) {} +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolveSync(x, options) { + if (typeof x !== 'string') { + throw new TypeError('Path must be a string.'); + } + var opts = normalizeOptions(x, options); + + var isFile = opts.isFile || defaultIsFile; + var readFileSync = opts.readFileSync || fs.readFileSync; + var isDirectory = opts.isDirectory || defaultIsDir; + var realpathSync = opts.realpathSync || defaultRealpathSync; + var readPackageSync = opts.readPackageSync || defaultReadPackageSync; + if (opts.readFileSync && opts.readPackageSync) { + throw new TypeError('`readFileSync` and `readPackageSync` are mutually exclusive.'); + } + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || defaultPaths(); + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts); + + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + var res = path.resolve(absoluteStart, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + var m = loadAsFileSync(res) || loadAsDirectorySync(res); + if (m) return maybeRealpathSync(realpathSync, m, opts); + } else if (includeCoreModules && isCore(x)) { + return x; + } else { + var n = loadNodeModulesSync(x, absoluteStart); + if (n) return maybeRealpathSync(realpathSync, n, opts); + } + + var err = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + + function loadAsFileSync(x) { + var pkg = loadpkg(path.dirname(x)); + + if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) { + var rfile = path.relative(pkg.dir, x); + var r = opts.pathFilter(pkg.pkg, x, rfile); + if (r) { + x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign + } + } + + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + if (isFile(file)) { + return file; + } + } + } + + function loadpkg(dir) { + if (dir === '' || dir === '/') return; + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return; + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return; + + var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json'); + + if (!isFile(pkgfile)) { + return loadpkg(path.dirname(dir)); + } + + var pkg = readPackageSync(readFileSync, pkgfile); + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment + } + + return { pkg: pkg, dir: dir }; + } + + function loadAsDirectorySync(x) { + var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json'); + if (isFile(pkgfile)) { + try { + var pkg = readPackageSync(readFileSync, pkgfile); + } catch (e) {} + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + throw mainError; + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + try { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } catch (e) {} + } + } + + return loadAsFileSync(path.join(x, '/index')); + } + + function loadNodeModulesSync(x, start) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk(); + + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + if (isDirectory(path.dirname(dir))) { + var m = loadAsFileSync(dir); + if (m) return m; + var n = loadAsDirectorySync(dir); + if (n) return n; + } + } + } +}; diff --git a/node_modules/resolve/package.json b/node_modules/resolve/package.json new file mode 100644 index 0000000..537388d --- /dev/null +++ b/node_modules/resolve/package.json @@ -0,0 +1,72 @@ +{ + "name": "resolve", + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", + "version": "1.22.8", + "repository": { + "type": "git", + "url": "git://github.com/browserify/resolve.git" + }, + "bin": { + "resolve": "./bin/resolve" + }, + "main": "index.js", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated && cp node_modules/is-core-module/core.json ./lib/ ||:", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs --no-eslintrc -c .eslintrc . 'bin/**'", + "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", + "tests-only": "tape test/*.js", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "posttest": "npm run test:multirepo && aud --production", + "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "array.prototype.map": "^1.0.6", + "aud": "^2.0.3", + "copy-dir": "^1.3.0", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "mkdirp": "^0.5.5", + "mv": "^2.1.1", + "npmignore": "^0.3.0", + "object-keys": "^1.1.1", + "rimraf": "^2.7.1", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.1", + "tap": "0.4.13", + "tape": "^5.7.0", + "tmp": "^0.0.31" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "appveyor.yml", + "test/resolver/malformed_package_json" + ] + } +} diff --git a/node_modules/resolve/readme.markdown b/node_modules/resolve/readme.markdown new file mode 100644 index 0000000..ad34d60 --- /dev/null +++ b/node_modules/resolve/readme.markdown @@ -0,0 +1,301 @@ +# resolve [![Version Badge][2]][1] + +implements the [node `require.resolve()` algorithm](https://nodejs.org/api/modules.html#modules_all_together) such that you can `require.resolve()` on behalf of a file asynchronously and synchronously + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +# example + +asynchronously resolve: + +```js +var resolve = require('resolve/async'); // or, require('resolve') +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); +``` + +``` +$ node example/async.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +synchronously resolve: + +```js +var resolve = require('resolve/sync'); // or, `require('resolve').sync +var res = resolve('tap', { basedir: __dirname }); +console.log(res); +``` + +``` +$ node example/sync.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +# methods + +```js +var resolve = require('resolve'); +var async = require('resolve/async'); +var sync = require('resolve/sync'); +``` + +For both the synchronous and asynchronous methods, errors may have any of the following `err.code` values: + +- `MODULE_NOT_FOUND`: the given path string (`id`) could not be resolved to a module +- `INVALID_BASEDIR`: the specified `opts.basedir` doesn't exist, or is not a directory +- `INVALID_PACKAGE_MAIN`: a `package.json` was encountered with an invalid `main` property (eg. not a string) + +## resolve(id, opts={}, cb) + +Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.package - `package.json` data applicable to the module being loaded + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFile - how to read files asynchronously + +* opts.isFile - function to asynchronously test whether a file exists + +* opts.isDirectory - function to asynchronously test whether a file exists and is a directory + +* opts.realpath - function to asynchronously resolve a potential symlink to its real path + +* `opts.readPackage(readFile, pkgfile, cb)` - function to asynchronously read and parse a package.json file + * readFile - the passed `opts.readFile` or `fs.readFile` if not specified + * pkgfile - path to package.json + * cb - callback + +* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * pkgfile - path to package.json + * dir - directory that contains package.json + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFile: fs.readFile, + isFile: function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + isDirectory: function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + realpath: function realpath(file, cb) { + var realpath = typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + realpath(file, function (realPathErr, realPath) { + if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr); + else cb(null, realPathErr ? file : realPath); + }); + }, + readPackage: function defaultReadPackage(readFile, pkgfile, cb) { + readFile(pkgfile, function (readFileErr, body) { + if (readFileErr) cb(readFileErr); + else { + try { + var pkg = JSON.parse(body); + cb(null, pkg); + } catch (jsonErr) { + cb(null); + } + } + }); + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +## resolve.sync(id, opts) + +Synchronously resolve the module path string `id`, returning the result and +throwing an error when `id` can't be resolved. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFileSync - how to read files synchronously + +* opts.isFile - function to synchronously test whether a file exists + +* opts.isDirectory - function to synchronously test whether a file exists and is a directory + +* opts.realpathSync - function to synchronously resolve a potential symlink to its real path + +* `opts.readPackageSync(readFileSync, pkgfile)` - function to synchronously read and parse a package.json file + * readFileSync - the passed `opts.readFileSync` or `fs.readFileSync` if not specified + * pkgfile - path to package.json + +* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * dir - directory that contains package.json (Note: the second argument will change to "pkgfile" in v2) + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFileSync: fs.readFileSync, + isFile: function isFile(file) { + try { + var stat = fs.statSync(file); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isFile() || stat.isFIFO(); + }, + isDirectory: function isDirectory(dir) { + try { + var stat = fs.statSync(dir); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isDirectory(); + }, + realpathSync: function realpathSync(file) { + try { + var realpath = typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + return realpath(file); + } catch (realPathErr) { + if (realPathErr.code !== 'ENOENT') { + throw realPathErr; + } + } + return file; + }, + readPackageSync: function defaultReadPackageSync(readFileSync, pkgfile) { + var body = readFileSync(pkgfile); + try { + var pkg = JSON.parse(body); + return pkg; + } catch (jsonErr) {} + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +# install + +With [npm](https://npmjs.org) do: + +```sh +npm install resolve +``` + +# license + +MIT + +[1]: https://npmjs.org/package/resolve +[2]: https://versionbadg.es/browserify/resolve.svg +[5]: https://david-dm.org/browserify/resolve.svg +[6]: https://david-dm.org/browserify/resolve +[7]: https://david-dm.org/browserify/resolve/dev-status.svg +[8]: https://david-dm.org/browserify/resolve#info=devDependencies +[11]: https://nodei.co/npm/resolve.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/resolve.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/resolve.svg +[downloads-url]: https://npm-stat.com/charts.html?package=resolve +[codecov-image]: https://codecov.io/gh/browserify/resolve/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/browserify/resolve/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/browserify/resolve +[actions-url]: https://github.com/browserify/resolve/actions diff --git a/node_modules/resolve/sync.js b/node_modules/resolve/sync.js new file mode 100644 index 0000000..cd0ee04 --- /dev/null +++ b/node_modules/resolve/sync.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/sync'); diff --git a/node_modules/resolve/test/core.js b/node_modules/resolve/test/core.js new file mode 100644 index 0000000..a477adc --- /dev/null +++ b/node_modules/resolve/test/core.js @@ -0,0 +1,88 @@ +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); + +var resolve = require('../'); + +var brokenNode = semver.satisfies(process.version, '11.11 - 11.13'); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(resolve.isCore('fs')); + st.ok(resolve.isCore('net')); + st.ok(resolve.isCore('http')); + + st.ok(!resolve.isCore('seq')); + st.ok(!resolve.isCore('../')); + + st.ok(!resolve.isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(resolve.core); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + // note: this must be require, not require.resolve, due to https://github.com/nodejs/node/issues/43274 + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + t.comment(mod + ': ' + resolve.core[mod]); + if (resolve.core[mod]) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else if (brokenNode) { + st.ok(true, 'this version of node is broken: attempting to require things that fail to resolve breaks "home_paths" tests'); + } else { + st.throws(requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !resolve.core.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('module.builtinModules does not exist'); + return st.end(); + } + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(resolve.core[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !resolve.core.module }, function (st) { + var libs = require('module').builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + return st.end(); + } + var blacklist = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (blacklist.indexOf(mod) === -1) { + st.ok(resolve.core[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + } + } + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/dotdot.js b/node_modules/resolve/test/dotdot.js new file mode 100644 index 0000000..3080665 --- /dev/null +++ b/node_modules/resolve/test/dotdot.js @@ -0,0 +1,29 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('dotdot', function (t) { + t.plan(4); + var dir = path.join(__dirname, '/dotdot/abc'); + + resolve('..', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'dotdot/index.js')); + }); + + resolve('.', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('dotdot sync', function (t) { + t.plan(2); + var dir = path.join(__dirname, '/dotdot/abc'); + + var a = resolve.sync('..', { basedir: dir }); + t.equal(a, path.join(__dirname, 'dotdot/index.js')); + + var b = resolve.sync('.', { basedir: dir }); + t.equal(b, path.join(dir, 'index.js')); +}); diff --git a/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/resolve/test/dotdot/abc/index.js new file mode 100644 index 0000000..67f2534 --- /dev/null +++ b/node_modules/resolve/test/dotdot/abc/index.js @@ -0,0 +1,2 @@ +var x = require('..'); +console.log(x); diff --git a/node_modules/resolve/test/dotdot/index.js b/node_modules/resolve/test/dotdot/index.js new file mode 100644 index 0000000..643f9fc --- /dev/null +++ b/node_modules/resolve/test/dotdot/index.js @@ -0,0 +1 @@ +module.exports = 'whatever'; diff --git a/node_modules/resolve/test/faulty_basedir.js b/node_modules/resolve/test/faulty_basedir.js new file mode 100644 index 0000000..5f2141a --- /dev/null +++ b/node_modules/resolve/test/faulty_basedir.js @@ -0,0 +1,29 @@ +var test = require('tape'); +var path = require('path'); +var resolve = require('../'); + +test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) { + t.plan(1); + + var resolverDir = 'C:\\a\\b\\c\\d'; + + resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(!!err, true); + }); +}); + +test('non-existent basedir should not throw when preserveSymlinks is false', function (t) { + t.plan(2); + + var opts = { + basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'), + preserveSymlinks: false + }; + + var module = './dotdot/abc'; + + resolve(module, opts, function (err, res) { + t.equal(err.code, 'MODULE_NOT_FOUND'); + t.equal(res, undefined); + }); +}); diff --git a/node_modules/resolve/test/filter.js b/node_modules/resolve/test/filter.js new file mode 100644 index 0000000..8f8cccd --- /dev/null +++ b/node_modules/resolve/test/filter.js @@ -0,0 +1,34 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + var packageFilterArgs; + resolve('./baz', { + basedir: dir, + packageFilter: function (pkg, pkgfile) { + pkg.main = 'doom'; // eslint-disable-line no-param-reassign + packageFilterArgs = [pkg, pkgfile]; + return pkg; + } + }, function (err, res, pkg) { + if (err) t.fail(err); + + t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); + + var packageData = packageFilterArgs[0]; + t.equal(pkg, packageData, 'first packageFilter argument is "pkg"'); + t.equal(packageData.main, 'doom', 'package "main" was altered'); + + var packageFile = packageFilterArgs[1]; + t.equal( + packageFile, + path.join(dir, 'baz/package.json'), + 'second packageFilter argument is "pkgfile"' + ); + + t.end(); + }); +}); diff --git a/node_modules/resolve/test/filter_sync.js b/node_modules/resolve/test/filter_sync.js new file mode 100644 index 0000000..8a43b98 --- /dev/null +++ b/node_modules/resolve/test/filter_sync.js @@ -0,0 +1,33 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + var dir = path.join(__dirname, 'resolver'); + var packageFilterArgs; + var res = resolve.sync('./baz', { + basedir: dir, + // NOTE: in v2.x, this will be `pkg, pkgfile, dir`, but must remain "broken" here in v1.x for compatibility + packageFilter: function (pkg, /*pkgfile,*/ dir) { // eslint-disable-line spaced-comment + pkg.main = 'doom'; // eslint-disable-line no-param-reassign + packageFilterArgs = 'is 1.x' ? [pkg, dir] : [pkg, pkgfile, dir]; // eslint-disable-line no-constant-condition, no-undef + return pkg; + } + }); + + t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); + + var packageData = packageFilterArgs[0]; + t.equal(packageData.main, 'doom', 'package "main" was altered'); + + if (!'is 1.x') { // eslint-disable-line no-constant-condition + var packageFile = packageFilterArgs[1]; + t.equal(packageFile, path.join(dir, 'baz', 'package.json'), 'package.json path is correct'); + } + + var packageDir = packageFilterArgs['is 1.x' ? 1 : 2]; // eslint-disable-line no-constant-condition + // eslint-disable-next-line no-constant-condition + t.equal(packageDir, path.join(dir, 'baz'), ('is 1.x' ? 'second' : 'third') + ' packageFilter argument is "dir"'); + + t.end(); +}); diff --git a/node_modules/resolve/test/home_paths.js b/node_modules/resolve/test/home_paths.js new file mode 100644 index 0000000..3b8c9b3 --- /dev/null +++ b/node_modules/resolve/test/home_paths.js @@ -0,0 +1,127 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../async'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazPkg = { name: 'baz', main: 'quux.js' }; + var dotMainPkg = { main: 'index' }; + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + var dotSlashMainPkg = { main: 'index' }; + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('dot_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_main`'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + s2t.deepEqual(pkg, dotMainPkg); + }); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(3); + + resolve('dot_slash_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_slash_main`'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + s2t.deepEqual(pkg, dotSlashMainPkg); + }); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('baz', function (err, res, pkg) { + s2t.error(err, 'no error resolving `baz`'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + s2t.deepEqual(pkg, bazPkg); + }); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/home_paths_sync.js b/node_modules/resolve/test/home_paths_sync.js new file mode 100644 index 0000000..5d2c56f --- /dev/null +++ b/node_modules/resolve/test/home_paths_sync.js @@ -0,0 +1,114 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../sync'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_main'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_slash_main'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('baz'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/mock.js b/node_modules/resolve/test/mock.js new file mode 100644 index 0000000..6116275 --- /dev/null +++ b/node_modules/resolve/test/mock.js @@ -0,0 +1,315 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock from package', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, file)); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[file]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('mock package from package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('symlinked', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + dirs[path.resolve('/foo/bar/symlinked')] = true; + + function opts(basedir) { + return { + preserveSymlinks: false, + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + var resolved = path.resolve(file); + + if (resolved.indexOf('symlinked') >= 0) { + cb(null, resolved); + return; + } + + var ext = path.extname(resolved); + + if (ext) { + var dir = path.dirname(resolved); + var base = path.basename(resolved); + cb(null, path.join(dir, 'symlinked', base)); + } else { + cb(null, path.join(resolved, 'symlinked')); + } + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/symlinked/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/symlinked/baz.js')); + t.equal(pkg, undefined); + }); +}); + +test('readPackage', function (t) { + t.plan(3); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop'; + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + t.test('with readFile', function (st) { + st.plan(3); + + resolve('bar', opts('/foo'), function (err, res, pkg) { + st.error(err); + st.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + st.equal(pkg && pkg.main, './baz.js'); + }); + }); + + var readPackage = function (readFile, file, cb) { + var barPackage = path.join('bar', 'package.json'); + if (file.slice(-barPackage.length) === barPackage) { + cb(null, { main: './something-else.js' }); + } else { + cb(null, JSON.parse(files[path.resolve(file)])); + } + }; + + t.test('with readPackage', function (st) { + st.plan(3); + + var options = opts('/foo'); + delete options.readFile; + options.readPackage = readPackage; + resolve('bar', options, function (err, res, pkg) { + st.error(err); + st.equal(res, path.resolve('/foo/node_modules/bar/something-else.js')); + st.equal(pkg && pkg.main, './something-else.js'); + }); + }); + + t.test('with readFile and readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + options.readPackage = readPackage; + resolve('bar', options, function (err) { + st.throws(function () { throw err; }, TypeError, 'errors when both readFile and readPackage are provided'); + }); + }); +}); diff --git a/node_modules/resolve/test/mock_sync.js b/node_modules/resolve/test/mock_sync.js new file mode 100644 index 0000000..c5a7e2a --- /dev/null +++ b/node_modules/resolve/test/mock_sync.js @@ -0,0 +1,214 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.throws(function () { + resolve.sync('baz', opts('/foo/bar')); + }); + + t.throws(function () { + resolve.sync('../baz', opts('/foo/bar')); + }); +}); + +test('mock package', function (t) { + t.plan(1); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + + t.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); +}); + +test('symlinked', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + dirs[path.resolve('/foo/bar/symlinked')] = true; + + function opts(basedir) { + return { + preserveSymlinks: false, + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + var resolved = path.resolve(file); + + if (resolved.indexOf('symlinked') >= 0) { + return resolved; + } + + var ext = path.extname(resolved); + + if (ext) { + var dir = path.dirname(resolved); + var base = path.basename(resolved); + return path.join(dir, 'symlinked', base); + } + return path.join(resolved, 'symlinked'); + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/symlinked/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/symlinked/baz.js') + ); +}); + +test('readPackageSync', function (t) { + t.plan(3); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop'; + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir, useReadPackage) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: useReadPackage ? null : function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + t.test('with readFile', function (st) { + st.plan(1); + + st.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); + }); + + var readPackageSync = function (readFileSync, file) { + if (file.indexOf(path.join('bar', 'package.json')) >= 0) { + return { main: './something-else.js' }; + } + return JSON.parse(files[path.resolve(file)]); + }; + + t.test('with readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + delete options.readFileSync; + options.readPackageSync = readPackageSync; + + st.equal( + resolve.sync('bar', options), + path.resolve('/foo/node_modules/bar/something-else.js') + ); + }); + + t.test('with readFile and readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + options.readPackageSync = readPackageSync; + st.throws( + function () { resolve.sync('bar', options); }, + TypeError, + 'errors when both readFile and readPackage are provided' + ); + }); +}); + diff --git a/node_modules/resolve/test/module_dir.js b/node_modules/resolve/test/module_dir.js new file mode 100644 index 0000000..b50e5bb --- /dev/null +++ b/node_modules/resolve/test/module_dir.js @@ -0,0 +1,56 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('moduleDirectory strings', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'module_dir'); + var xopts = { + basedir: dir, + moduleDirectory: 'xmodules' + }; + resolve('aaa', xopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var yopts = { + basedir: dir, + moduleDirectory: 'ymodules' + }; + resolve('aaa', yopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); +}); + +test('moduleDirectory array', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'module_dir'); + var aopts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('aaa', aopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var bopts = { + basedir: dir, + moduleDirectory: ['zmodules', 'ymodules', 'xmodules'] + }; + resolve('aaa', bopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); + + var copts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('bbb', copts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/zmodules/bbb/main.js')); + }); +}); diff --git a/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js new file mode 100644 index 0000000..dd7cf7b --- /dev/null +++ b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x * 100; }; diff --git a/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js new file mode 100644 index 0000000..ef2d4d4 --- /dev/null +++ b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x + 100; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js new file mode 100644 index 0000000..e8ba629 --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js @@ -0,0 +1 @@ +module.exports = function (n) { return n * 111; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json new file mode 100644 index 0000000..c13b8cf --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json @@ -0,0 +1,3 @@ +{ + "main": "main.js" +} diff --git a/node_modules/resolve/test/node-modules-paths.js b/node_modules/resolve/test/node-modules-paths.js new file mode 100644 index 0000000..675441d --- /dev/null +++ b/node_modules/resolve/test/node-modules-paths.js @@ -0,0 +1,143 @@ +var test = require('tape'); +var path = require('path'); +var parse = path.parse || require('path-parse'); +var keys = require('object-keys'); + +var nodeModulesPaths = require('../lib/node-modules-paths'); + +var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) { + var moduleDirs = [].concat(moduleDirectories || 'node_modules'); + if (paths) { + for (var k = 0; k < paths.length; ++k) { + moduleDirs.push(path.basename(paths[k])); + } + } + + var foundModuleDirs = {}; + var uniqueDirs = {}; + var parsedDirs = {}; + for (var i = 0; i < dirs.length; ++i) { + var parsed = parse(dirs[i]); + if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; } + foundModuleDirs[parsed.base] += 1; + parsedDirs[parsed.dir] = true; + uniqueDirs[dirs[i]] = true; + } + t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has'); + var foundModuleDirNames = keys(foundModuleDirs); + t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found'); + t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique'); + + var counts = {}; + for (var j = 0; j < foundModuleDirNames.length; ++j) { + counts[foundModuleDirs[j]] = true; + } + t.equal(keys(counts).length, 1, 'all found module directories had the same count'); +}; + +test('node-modules-paths', function (t) { + t.test('no options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('empty options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, {}); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('with paths=array option', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var dirs = nodeModulesPaths(start, { paths: paths }); + + verifyDirs(t, start, dirs, null, paths); + + t.end(); + }); + + t.test('with paths=function option', function (t) { + var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { + return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request)); + }; + + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg'); + + verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]); + + t.end(); + }); + + t.test('with paths=function skipping node modules resolution', function (t) { + var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { + return []; + }; + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, { paths: paths }); + t.deepEqual(dirs, [], 'no node_modules was computed'); + t.end(); + }); + + t.test('with moduleDirectory option', function (t) { + var start = path.join(__dirname, 'resolver'); + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory); + + t.end(); + }); + + t.test('with 1 moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory, paths); + + t.end(); + }); + + t.test('with 1+ moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectories = ['not node modules', 'other modules']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + verifyDirs(t, start, dirs, moduleDirectories, paths); + + t.end(); + }); + + t.test('combine paths correctly on Windows', function (t) { + var start = 'C:\\Users\\username\\myProject\\src'; + var paths = []; + var moduleDirectories = ['node_modules', start]; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); + + t.end(); + }); + + t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) { + var start = '/Users/username/git/myProject/src'; + var paths = []; + var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); + + t.end(); + }); +}); diff --git a/node_modules/resolve/test/node_path.js b/node_modules/resolve/test/node_path.js new file mode 100644 index 0000000..e463d6c --- /dev/null +++ b/node_modules/resolve/test/node_path.js @@ -0,0 +1,70 @@ +var fs = require('fs'); +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('$NODE_PATH', function (t) { + t.plan(8); + + var isDir = function (dir, cb) { + if (dir === '/node_path' || dir === 'node_path/x') { + return cb(null, true); + } + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }; + + resolve('aaa', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js'), 'aaa resolves'); + }); + + resolve('bbb', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'), 'bbb resolves'); + }); + + resolve('ccc', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'), 'ccc resolves'); + }); + + // ensure that relative paths still resolve against the regular `node_modules` correctly + resolve('tap', { + paths: [ + 'node_path' + ], + basedir: path.join(__dirname, 'node_path/x'), + isDirectory: isDir + }, function (err, res) { + var root = require('tap/package.json').main; // eslint-disable-line global-require + t.error(err); + t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves'); + }); +}); diff --git a/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/resolve/test/node_path/x/aaa/index.js new file mode 100644 index 0000000..ad70d0b --- /dev/null +++ b/node_modules/resolve/test/node_path/x/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'A'; diff --git a/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/resolve/test/node_path/x/ccc/index.js new file mode 100644 index 0000000..a64132e --- /dev/null +++ b/node_modules/resolve/test/node_path/x/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'C'; diff --git a/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/resolve/test/node_path/y/bbb/index.js new file mode 100644 index 0000000..4d0f32e --- /dev/null +++ b/node_modules/resolve/test/node_path/y/bbb/index.js @@ -0,0 +1 @@ +module.exports = 'B'; diff --git a/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/resolve/test/node_path/y/ccc/index.js new file mode 100644 index 0000000..793315e --- /dev/null +++ b/node_modules/resolve/test/node_path/y/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'CY'; diff --git a/node_modules/resolve/test/nonstring.js b/node_modules/resolve/test/nonstring.js new file mode 100644 index 0000000..ef63c40 --- /dev/null +++ b/node_modules/resolve/test/nonstring.js @@ -0,0 +1,9 @@ +var test = require('tape'); +var resolve = require('../'); + +test('nonstring', function (t) { + t.plan(1); + resolve(555, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/pathfilter.js b/node_modules/resolve/test/pathfilter.js new file mode 100644 index 0000000..16519ae --- /dev/null +++ b/node_modules/resolve/test/pathfilter.js @@ -0,0 +1,75 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +var resolverDir = path.join(__dirname, '/pathfilter/deep_ref'); + +var pathFilterFactory = function (t) { + return function (pkg, x, remainder) { + t.equal(pkg.version, '1.2.3'); + t.equal(x, path.join(resolverDir, 'node_modules/deep/ref')); + t.equal(remainder, 'ref'); + return 'alt'; + }; +}; + +test('#62: deep module references and the pathFilter', function (t) { + t.test('deep/ref.js', function (st) { + st.plan(3); + + resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) { + if (err) st.fail(err); + + st.equal(pkg.version, '1.2.3'); + st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + var res = resolve.sync('deep/ref', { basedir: resolverDir }); + st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + t.test('deep/deeper/ref', function (st) { + st.plan(4); + + resolve( + 'deep/deeper/ref', + { basedir: resolverDir }, + function (err, res, pkg) { + if (err) t.fail(err); + st.notEqual(pkg, undefined); + st.equal(pkg.version, '1.2.3'); + st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + } + ); + + var res = resolve.sync( + 'deep/deeper/ref', + { basedir: resolverDir } + ); + st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + }); + + t.test('deep/ref alt', function (st) { + st.plan(8); + + var pathFilter = pathFilterFactory(st); + + var res = resolve.sync( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter } + ); + st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + + resolve( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter }, + function (err, res, pkg) { + if (err) st.fail(err); + st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + st.end(); + } + ); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/resolve/test/pathfilter/deep_ref/main.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/precedence.js b/node_modules/resolve/test/precedence.js new file mode 100644 index 0000000..2febb59 --- /dev/null +++ b/node_modules/resolve/test/precedence.js @@ -0,0 +1,23 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('precedence', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'precedence/aaa'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg.name, 'resolve'); + }); +}); + +test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string + t.plan(1); + var dir = path.join(__dirname, 'precedence/bbb'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/precedence/aaa.js b/node_modules/resolve/test/precedence/aaa.js new file mode 100644 index 0000000..b83a3e7 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa.js @@ -0,0 +1 @@ +module.exports = 'wtf'; diff --git a/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/resolve/test/precedence/aaa/index.js new file mode 100644 index 0000000..e0f8f6a --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'okok'; diff --git a/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/resolve/test/precedence/aaa/main.js new file mode 100644 index 0000000..93542a9 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/main.js @@ -0,0 +1 @@ +console.log(require('./')); diff --git a/node_modules/resolve/test/precedence/bbb.js b/node_modules/resolve/test/precedence/bbb.js new file mode 100644 index 0000000..2298f47 --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb.js @@ -0,0 +1 @@ +module.exports = '>_<'; diff --git a/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/resolve/test/precedence/bbb/main.js new file mode 100644 index 0000000..716b81d --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb/main.js @@ -0,0 +1 @@ +console.log(require('./')); // should throw diff --git a/node_modules/resolve/test/resolver.js b/node_modules/resolve/test/resolver.js new file mode 100644 index 0000000..df8211a --- /dev/null +++ b/node_modules/resolve/test/resolver.js @@ -0,0 +1,597 @@ +var path = require('path'); +var fs = require('fs'); +var test = require('tape'); +var resolve = require('../'); +var async = require('../async'); + +test('`./async` entry point', function (t) { + t.equal(resolve, async, '`./async` entry point is the same as `main`'); + t.end(); +}); + +test('async foo', function (t) { + t.plan(12); + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo.js', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.main, 'resolver'); + }); + + resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg.main, 'resolver'); + }); + + resolve('./foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + }); + + resolve('foo', { basedir: dir }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + // Test that filename is reported as the "from" value when passed. + resolve('foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.join(dir, 'baz.js') + "'"); + }); +}); + +test('bar', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'resolver'); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg.main, 'bar'); + }); +}); + +test('baz', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + + resolve('./baz', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); + + resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); +}); + +test('biz', function (t) { + t.plan(24); + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + + resolve('./grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'biz'); + }); + + resolve('./garply', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg.main, 'grux'); + }); + + resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'tiv'); + }); + + resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); +}); + +test('quux', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/quux'); + + resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo/index.js')); + t.equal(pkg.main, 'quux'); + }); +}); + +test('normalize', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + + resolve('../grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg, undefined); + }); +}); + +test('cup', function (t) { + t.plan(5); + var dir = path.join(__dirname, 'resolver'); + + resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup.coffee', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + // Test that filename is reported as the "from" value when passed. + resolve('./cup', { basedir: dir, extensions: ['.js'], filename: path.join(dir, 'cupboard.js') }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.join(dir, 'cupboard.js') + "'"); + }); +}); + +test('mug', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'resolver'); + + resolve('./mug', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'mug.js')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, '/mug.coffee')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + t.equal(res, path.join(dir, '/mug.js')); + }); +}); + +test('other path', function (t) { + t.plan(6); + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/root.js')); + }); + + resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js')); + }); + + resolve('root', { basedir: dir }, function (err, res) { + t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) { + t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('path iterator', function (t) { + t.plan(2); + + var resolverDir = path.join(__dirname, 'resolver'); + + var exactIterator = function (x, start, getPackageCandidates, opts) { + return [path.join(resolverDir, x)]; + }; + + resolve('baz', { packageIterator: exactIterator }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'baz/quux.js')); + t.equal(pkg && pkg.name, 'baz'); + }); +}); + +test('incorrect main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('missing index', function (t) { + t.plan(2); + + var resolverDir = path.join(__dirname, 'resolver'); + resolve('./missing_index', { basedir: resolverDir }, function (err, res, pkg) { + t.ok(err instanceof Error); + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('missing main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./missing_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('null main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./null_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('main: false', function (t) { + t.plan(2); + + var basedir = path.join(__dirname, 'resolver'); + var dir = path.join(basedir, 'false_main'); + resolve('./false_main', { basedir: basedir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal( + res, + path.join(dir, 'index.js'), + '`"main": false`: resolves to `index.js`' + ); + t.deepEqual(pkg, { + name: 'false_main', + main: false + }); + }); +}); + +test('without basedir', function (t) { + t.plan(1); + + var dir = path.join(__dirname, 'resolver/without_basedir'); + var tester = require(path.join(dir, 'main.js')); // eslint-disable-line global-require + + tester(t, function (err, res, pkg) { + if (err) { + t.fail(err); + } else { + t.equal(res, path.join(dir, 'node_modules/mymodule.js')); + } + }); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo.js')); + }); + + resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); + + resolve('.', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('async: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.plan(1); + resolve('./' + testFile, function (err, res, pkg) { + if (err) t.fail(err); + st.equal(res, __filename, 'sanity check'); + }); + }); + + t.test('with a fake directory', function (st) { + st.plan(4); + + resolve('./' + testFile + '/blah', function (err, res, pkg) { + st.ok(err, 'there is an error'); + st.notOk(res, 'no result'); + + st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + err && err.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + st.end(); + }); + }); + + t.end(); +}); + +test('async dot main', function (t) { + var start = new Date(); + t.plan(3); + resolve('./resolver/dot_main', function (err, ret) { + t.notOk(err); + t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js')); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); + }); +}); + +test('async dot slash main', function (t) { + var start = new Date(); + t.plan(3); + resolve('./resolver/dot_slash_main', function (err, ret) { + t.notOk(err); + t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js')); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); + }); +}); + +test('not a directory', function (t) { + t.plan(6); + var path = './foo'; + resolve(path, { basedir: __filename }, function (err, res, pkg) { + t.ok(err, 'a non-directory errors'); + t.equal(arguments.length, 1); + t.equal(res, undefined); + t.equal(pkg, undefined); + + t.equal(err && err.message, 'Cannot find module \'' + path + '\' from \'' + __filename + '\''); + t.equal(err && err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('non-string "main" field in package.json', function (t) { + t.plan(5); + + var dir = path.join(__dirname, 'resolver'); + resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + t.equal(res, undefined, 'res is undefined'); + t.equal(pkg, undefined, 'pkg is undefined'); + }); +}); + +test('non-string "main" field in package.json', function (t) { + t.plan(5); + + var dir = path.join(__dirname, 'resolver'); + resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + t.equal(res, undefined, 'res is undefined'); + t.equal(pkg, undefined, 'pkg is undefined'); + }); +}); + +test('browser field in package.json', function (t) { + t.plan(3); + + var dir = path.join(__dirname, 'resolver'); + resolve( + './browser_field', + { + basedir: dir, + packageFilter: function packageFilter(pkg) { + if (pkg.browser) { + pkg.main = pkg.browser; // eslint-disable-line no-param-reassign + delete pkg.browser; // eslint-disable-line no-param-reassign + } + return pkg; + } + }, + function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'browser_field', 'b.js')); + t.equal(pkg && pkg.main, 'b'); + t.equal(pkg && pkg.browser, undefined); + } + ); +}); + +test('absolute paths', function (t) { + t.plan(4); + + var extensionless = __filename.slice(0, -path.extname(__filename).length); + + resolve(__filename, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file resolves' + ); + }); + resolve(extensionless, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file resolves' + ); + }); + resolve(__filename, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file with a basedir resolves' + ); + }); + resolve(extensionless, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file with a basedir resolves' + ); + }); +}); + +var malformedDir = path.join(__dirname, 'resolver/malformed_package_json'); +test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) { + /* eslint operator-linebreak: ["error", "before"], function-paren-newline: "off" */ + t.plan( + (3 * 3) // 3 sets of 3 assertions in the final callback + + 2 // 1 readPackage call with malformed package.json + ); + + var basedir = malformedDir; + var expected = path.join(basedir, 'index.js'); + + resolve('./index.js', { basedir: basedir }, function (err, res, pkg) { + t.error(err, 'no error'); + t.equal(res, expected, 'malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'malformed package.json gives an undefined `pkg` argument'); + }); + + resolve( + './index.js', + { + basedir: basedir, + packageFilter: function (pkg, pkgfile, dir) { + t.fail('should not reach here'); + } + }, + function (err, res, pkg) { + t.error(err, 'with packageFilter: no error'); + t.equal(res, expected, 'with packageFilter: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with packageFilter: malformed package.json gives an undefined `pkg` argument'); + } + ); + + resolve( + './index.js', + { + basedir: basedir, + readPackage: function (readFile, pkgfile, cb) { + t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); + readFile(pkgfile, function (err, result) { + try { + cb(null, JSON.parse(result)); + } catch (e) { + t.ok(e instanceof SyntaxError, 'readPackage: malformed package.json parses as a syntax error'); + cb(null); + } + }); + } + }, + function (err, res, pkg) { + t.error(err, 'with readPackage: no error'); + t.equal(res, expected, 'with readPackage: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with readPackage: malformed package.json gives an undefined `pkg` argument'); + } + ); +}); diff --git a/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/resolve/test/resolver/baz/doom.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/baz/package.json b/node_modules/resolve/test/resolver/baz/package.json new file mode 100644 index 0000000..2f77720 --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/package.json @@ -0,0 +1,4 @@ +{ + "name": "baz", + "main": "quux.js" +} diff --git a/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/resolve/test/resolver/baz/quux.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/quux.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/browser_field/a.js b/node_modules/resolve/test/resolver/browser_field/a.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/browser_field/b.js b/node_modules/resolve/test/resolver/browser_field/b.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/browser_field/package.json b/node_modules/resolve/test/resolver/browser_field/package.json new file mode 100644 index 0000000..bf406f0 --- /dev/null +++ b/node_modules/resolve/test/resolver/browser_field/package.json @@ -0,0 +1,5 @@ +{ + "name": "browser_field", + "main": "a", + "browser": "b" +} diff --git a/node_modules/resolve/test/resolver/cup.coffee b/node_modules/resolve/test/resolver/cup.coffee new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/node_modules/resolve/test/resolver/cup.coffee @@ -0,0 +1 @@ + diff --git a/node_modules/resolve/test/resolver/dot_main/index.js b/node_modules/resolve/test/resolver/dot_main/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_main/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_main/package.json b/node_modules/resolve/test/resolver/dot_main/package.json new file mode 100644 index 0000000..d7f4fc8 --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "." +} diff --git a/node_modules/resolve/test/resolver/dot_slash_main/index.js b/node_modules/resolve/test/resolver/dot_slash_main/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_slash_main/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_slash_main/package.json b/node_modules/resolve/test/resolver/dot_slash_main/package.json new file mode 100644 index 0000000..f51287b --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_slash_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "./" +} diff --git a/node_modules/resolve/test/resolver/false_main/index.js b/node_modules/resolve/test/resolver/false_main/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/false_main/package.json b/node_modules/resolve/test/resolver/false_main/package.json new file mode 100644 index 0000000..a7416c0 --- /dev/null +++ b/node_modules/resolve/test/resolver/false_main/package.json @@ -0,0 +1,4 @@ +{ + "name": "false_main", + "main": false +} diff --git a/node_modules/resolve/test/resolver/foo.js b/node_modules/resolve/test/resolver/foo.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/foo.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/resolve/test/resolver/incorrect_main/index.js new file mode 100644 index 0000000..bc1fb0a --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/index.js @@ -0,0 +1,2 @@ +// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/resolve/test/resolver/incorrect_main/package.json new file mode 100644 index 0000000..b718804 --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "wrong.js" +} diff --git a/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/resolve/test/resolver/invalid_main/package.json new file mode 100644 index 0000000..0590748 --- /dev/null +++ b/node_modules/resolve/test/resolver/invalid_main/package.json @@ -0,0 +1,7 @@ +{ + "name": "invalid_main", + "main": [ + "why is this a thing", + "srsly omg wtf" + ] +} diff --git a/node_modules/resolve/test/resolver/mug.coffee b/node_modules/resolve/test/resolver/mug.coffee new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/mug.js b/node_modules/resolve/test/resolver/mug.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/multirepo/lerna.json b/node_modules/resolve/test/resolver/multirepo/lerna.json new file mode 100644 index 0000000..d6707ca --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/lerna.json @@ -0,0 +1,6 @@ +{ + "packages": [ + "packages/*" + ], + "version": "0.0.0" +} diff --git a/node_modules/resolve/test/resolver/multirepo/package.json b/node_modules/resolve/test/resolver/multirepo/package.json new file mode 100644 index 0000000..4391d39 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/package.json @@ -0,0 +1,20 @@ +{ + "name": "ljharb-monorepo-symlink-test", + "private": true, + "version": "0.0.0", + "description": "", + "main": "index.js", + "scripts": { + "postinstall": "lerna bootstrap", + "test": "node packages/package-a" + }, + "author": "", + "license": "MIT", + "dependencies": { + "jquery": "^3.3.1", + "resolve": "../../../" + }, + "devDependencies": { + "lerna": "^3.4.3" + } +} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js new file mode 100644 index 0000000..8875a32 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var assert = require('assert'); +var path = require('path'); +var resolve = require('resolve'); + +var basedir = __dirname + '/node_modules/@my-scope/package-b'; + +var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js'); + +/* + * preserveSymlinks === false + * will search NPM package from + * - packages/package-b/node_modules + * - packages/node_modules + * - node_modules + */ +assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected); +assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected); + +/* + * preserveSymlinks === true + * will search NPM package from + * - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules + * - packages/package-a/node_modules/@my-scope/packages/node_modules + * - packages/package-a/node_modules/@my-scope/node_modules + * - packages/package-a/node_modules/node_modules + * - packages/package-a/node_modules + * - packages/node_modules + * - node_modules + */ +assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected); +assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected); + +console.log(' * all monorepo paths successfully resolved through symlinks'); diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json new file mode 100644 index 0000000..204de51 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json @@ -0,0 +1,14 @@ +{ + "name": "@my-scope/package-a", + "version": "0.0.0", + "private": true, + "description": "", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "echo \"Error: run tests from root\" && exit 1" + }, + "dependencies": { + "@my-scope/package-b": "^0.0.0" + } +} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json new file mode 100644 index 0000000..f57c3b5 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json @@ -0,0 +1,14 @@ +{ + "name": "@my-scope/package-b", + "private": true, + "version": "0.0.0", + "description": "", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "echo \"Error: run tests from root\" && exit 1" + }, + "dependencies": { + "@my-scope/package-a": "^0.0.0" + } +} diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js new file mode 100644 index 0000000..9b4846a --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js @@ -0,0 +1,26 @@ +var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); +var b; +var c; + +var test = function test() { + console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); + console.log(b, ': preserveSymlinks true'); + console.log(c, ': preserveSymlinks false'); + + if (a !== b && a !== c) { + throw 'async: no match'; + } + console.log('async: success! a matched either b or c\n'); +}; + +require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) { + if (err) { throw err; } + b = result.replace(process.cwd(), '$CWD'); + if (b && c) { test(); } +}); +require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) { + if (err) { throw err; } + c = result.replace(process.cwd(), '$CWD'); + if (b && c) { test(); } +}); + diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json new file mode 100644 index 0000000..acfe9e9 --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json @@ -0,0 +1,15 @@ +{ + "name": "mylib", + "version": "0.0.0", + "description": "", + "private": true, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "buffer": "*" + } +} diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js new file mode 100644 index 0000000..3283efc --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js @@ -0,0 +1,12 @@ +var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); +var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD'); +var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD'); + +console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); +console.log(b, ': preserveSymlinks true'); +console.log(c, ': preserveSymlinks false'); + +if (a !== b && a !== c) { + throw 'sync: no match'; +} +console.log('sync: success! a matched either b or c\n'); diff --git a/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/resolve/test/resolver/other_path/lib/other-lib.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/resolve/test/resolver/other_path/root.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/resolve/test/resolver/quux/foo/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/quux/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/same_names/foo.js b/node_modules/resolve/test/resolver/same_names/foo.js new file mode 100644 index 0000000..888cae3 --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/node_modules/resolve/test/resolver/same_names/foo/index.js b/node_modules/resolve/test/resolver/same_names/foo/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js b/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep b/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/symlinked/package/bar.js b/node_modules/resolve/test/resolver/symlinked/package/bar.js new file mode 100644 index 0000000..cb1c2c0 --- /dev/null +++ b/node_modules/resolve/test/resolver/symlinked/package/bar.js @@ -0,0 +1 @@ +module.exports = 'bar'; diff --git a/node_modules/resolve/test/resolver/symlinked/package/package.json b/node_modules/resolve/test/resolver/symlinked/package/package.json new file mode 100644 index 0000000..8e1b585 --- /dev/null +++ b/node_modules/resolve/test/resolver/symlinked/package/package.json @@ -0,0 +1,3 @@ +{ + "main": "bar.js" +} \ No newline at end of file diff --git a/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/resolve/test/resolver/without_basedir/main.js new file mode 100644 index 0000000..5b31975 --- /dev/null +++ b/node_modules/resolve/test/resolver/without_basedir/main.js @@ -0,0 +1,5 @@ +var resolve = require('../../../'); + +module.exports = function (t, cb) { + resolve('mymodule', null, cb); +}; diff --git a/node_modules/resolve/test/resolver_sync.js b/node_modules/resolve/test/resolver_sync.js new file mode 100644 index 0000000..a6df8ce --- /dev/null +++ b/node_modules/resolve/test/resolver_sync.js @@ -0,0 +1,730 @@ +var path = require('path'); +var fs = require('fs'); +var test = require('tape'); + +var resolve = require('../'); +var sync = require('../sync'); + +var requireResolveSupportsPaths = require.resolve.length > 1 + && !(/^v12\.[012]\./).test(process.version); // broken in v12.0-12.2, see https://github.com/nodejs/node/issues/27794 + +var requireResolveDefaultPathsBroken = (/^v8\.9\.|^v9\.[01]\.0|^v9\.2\./).test(process.version); +// broken in node v8.9.x, v9.0, v9.1, v9.2.x. see https://github.com/nodejs/node/pull/17113 + +test('`./sync` entry point', function (t) { + t.equal(resolve.sync, sync, '`./sync` entry point is the same as `.sync` on `main`'); + t.end(); +}); + +test('foo', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./foo', { basedir: dir }), + path.join(dir, 'foo.js'), + './foo' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo', { basedir: dir }), + require.resolve('./foo', { paths: [dir] }), + './foo: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo.js', { basedir: dir }), + path.join(dir, 'foo.js'), + './foo.js' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo.js', { basedir: dir }), + require.resolve('./foo.js', { paths: [dir] }), + './foo.js: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }), + path.join(dir, 'foo.js') + ); + + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }); + + // Test that filename is reported as the "from" value when passed. + t.throws( + function () { + resolve.sync('foo', { basedir: dir, filename: path.join(dir, 'bar.js') }); + }, + { + name: 'Error', + message: "Cannot find module 'foo' from '" + path.join(dir, 'bar.js') + "'" + } + ); + + t.end(); +}); + +test('bar', function (t) { + var dir = path.join(__dirname, 'resolver'); + + var basedir = path.join(dir, 'bar'); + + t.equal( + resolve.sync('foo', { basedir: basedir }), + path.join(dir, 'bar/node_modules/foo/index.js'), + 'foo in bar' + ); + if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { + t.equal( + resolve.sync('foo', { basedir: basedir }), + require.resolve('foo', { paths: [basedir] }), + 'foo in bar: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('baz', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./baz', { basedir: dir }), + path.join(dir, 'baz/quux.js'), + './baz' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./baz', { basedir: dir }), + require.resolve('./baz', { paths: [dir] }), + './baz: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('biz', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + + t.equal( + resolve.sync('./grux', { basedir: dir }), + path.join(dir, 'grux/index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./grux', { basedir: dir }), + require.resolve('./grux', { paths: [dir] }), + './grux: resolve.sync === require.resolve' + ); + } + + var tivDir = path.join(dir, 'grux'); + t.equal( + resolve.sync('tiv', { basedir: tivDir }), + path.join(dir, 'tiv/index.js') + ); + if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { + t.equal( + resolve.sync('tiv', { basedir: tivDir }), + require.resolve('tiv', { paths: [tivDir] }), + 'tiv: resolve.sync === require.resolve' + ); + } + + var gruxDir = path.join(dir, 'tiv'); + t.equal( + resolve.sync('grux', { basedir: gruxDir }), + path.join(dir, 'grux/index.js') + ); + if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { + t.equal( + resolve.sync('grux', { basedir: gruxDir }), + require.resolve('grux', { paths: [gruxDir] }), + 'grux: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('normalize', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + + t.equal( + resolve.sync('../grux', { basedir: dir }), + path.join(dir, 'index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('../grux', { basedir: dir }), + require.resolve('../grux', { paths: [dir] }), + '../grux: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('cup', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'cup.coffee'), + './cup -> ./cup.coffee' + ); + + t.equal( + resolve.sync('./cup.coffee', { basedir: dir }), + path.join(dir, 'cup.coffee'), + './cup.coffee' + ); + + t.throws(function () { + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js'] + }); + }); + + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./cup.coffee', { basedir: dir, extensions: ['.js', '.coffee'] }), + require.resolve('./cup.coffee', { paths: [dir] }), + './cup.coffee: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('mug', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./mug', { basedir: dir }), + path.join(dir, 'mug.js'), + './mug -> ./mug.js' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./mug', { basedir: dir }), + require.resolve('./mug', { paths: [dir] }), + './mug: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.coffee', '.js'] + }), + path.join(dir, 'mug.coffee'), + './mug -> ./mug.coffee' + ); + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'mug.js'), + './mug -> ./mug.js' + ); + + t.end(); +}); + +test('other path', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + t.equal( + resolve.sync('root', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/root.js') + ); + + t.equal( + resolve.sync('lib/other-lib', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/lib/other-lib.js') + ); + + t.throws(function () { + resolve.sync('root', { basedir: dir }); + }); + + t.throws(function () { + resolve.sync('zzz', { + basedir: dir, + paths: [otherDir] + }); + }); + + t.end(); +}); + +test('path iterator', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + var exactIterator = function (x, start, getPackageCandidates, opts) { + return [path.join(resolverDir, x)]; + }; + + t.equal( + resolve.sync('baz', { packageIterator: exactIterator }), + path.join(resolverDir, 'baz/quux.js') + ); + + t.end(); +}); + +test('incorrect main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + t.equal( + resolve.sync('./incorrect_main', { basedir: resolverDir }), + path.join(dir, 'index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./incorrect_main', { basedir: resolverDir }), + require.resolve('./incorrect_main', { paths: [resolverDir] }), + './incorrect_main: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('missing index', function (t) { + t.plan(requireResolveSupportsPaths ? 2 : 1); + + var resolverDir = path.join(__dirname, 'resolver'); + try { + resolve.sync('./missing_index', { basedir: resolverDir }); + t.fail('did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + require.resolve('./missing_index', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } +}); + +test('missing main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + try { + resolve.sync('./missing_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + resolve.sync('./missing_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } + + t.end(); +}); + +test('null main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + try { + resolve.sync('./null_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + resolve.sync('./null_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } + + t.end(); +}); + +test('main: false', function (t) { + var basedir = path.join(__dirname, 'resolver'); + var dir = path.join(basedir, 'false_main'); + t.equal( + resolve.sync('./false_main', { basedir: basedir }), + path.join(dir, 'index.js'), + '`"main": false`: resolves to `index.js`' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./false_main', { basedir: basedir }), + require.resolve('./false_main', { paths: [basedir] }), + '`"main": false`: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +var stubStatSync = function stubStatSync(fn) { + var statSync = fs.statSync; + try { + fs.statSync = function () { + throw new EvalError('Unknown Error'); + }; + return fn(); + } finally { + fs.statSync = statSync; + } +}; + +test('#79 - re-throw non ENOENT errors from stat', function (t) { + var dir = path.join(__dirname, 'resolver'); + + stubStatSync(function () { + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }, /Unknown Error/); + }); + + t.end(); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + var dir = path.join(__dirname, 'resolver'); + var basedir = path.join(dir, 'same_names'); + + t.equal( + resolve.sync('./foo', { basedir: basedir }), + path.join(dir, 'same_names/foo.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo', { basedir: basedir }), + require.resolve('./foo', { paths: [basedir] }), + './foo: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo/', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo/', { basedir: basedir }), + require.resolve('./foo/', { paths: [basedir] }), + './foo/: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { + var dir = path.join(__dirname, 'resolver'); + var basedir = path.join(dir, 'same_names/foo'); + + t.equal( + resolve.sync('./', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js'), + './' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./', { basedir: basedir }), + require.resolve('./', { paths: [basedir] }), + './: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('.', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js'), + '.' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('.', { basedir: basedir }), + require.resolve('.', { paths: [basedir] }), + '.: resolve.sync === require.resolve', + { todo: true } + ); + } + + t.end(); +}); + +test('sync: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.equal( + resolve.sync('./' + testFile), + __filename, + 'sanity check' + ); + st.equal( + resolve.sync('./' + testFile), + require.resolve('./' + testFile), + 'sanity check: resolve.sync === require.resolve' + ); + + st.end(); + }); + + t.test('with a fake directory', function (st) { + function run() { return resolve.sync('./' + testFile + '/blah'); } + + st.throws(run, 'throws an error'); + + try { + run(); + } catch (e) { + st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + e.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + } + + st.end(); + }); + + t.end(); +}); + +test('sync dot main', function (t) { + var start = new Date(); + + t.equal( + resolve.sync('./resolver/dot_main'), + path.join(__dirname, 'resolver/dot_main/index.js'), + './resolver/dot_main' + ); + t.equal( + resolve.sync('./resolver/dot_main'), + require.resolve('./resolver/dot_main'), + './resolver/dot_main: resolve.sync === require.resolve' + ); + + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + + t.end(); +}); + +test('sync dot slash main', function (t) { + var start = new Date(); + + t.equal( + resolve.sync('./resolver/dot_slash_main'), + path.join(__dirname, 'resolver/dot_slash_main/index.js') + ); + t.equal( + resolve.sync('./resolver/dot_slash_main'), + require.resolve('./resolver/dot_slash_main'), + './resolver/dot_slash_main: resolve.sync === require.resolve' + ); + + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + + t.end(); +}); + +test('not a directory', function (t) { + var path = './foo'; + try { + resolve.sync(path, { basedir: __filename }); + t.fail(); + } catch (err) { + t.ok(err, 'a non-directory errors'); + t.equal(err && err.message, 'Cannot find module \'' + path + "' from '" + __filename + "'"); + t.equal(err && err.code, 'MODULE_NOT_FOUND'); + } + t.end(); +}); + +test('non-string "main" field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + try { + var result = resolve.sync('./invalid_main', { basedir: dir }); + t.equal(result, undefined, 'result should not exist'); + t.fail('should not get here'); + } catch (err) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + } + t.end(); +}); + +test('non-string "main" field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + try { + var result = resolve.sync('./invalid_main', { basedir: dir }); + t.equal(result, undefined, 'result should not exist'); + t.fail('should not get here'); + } catch (err) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + } + t.end(); +}); + +test('browser field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + var res = resolve.sync('./browser_field', { + basedir: dir, + packageFilter: function packageFilter(pkg) { + if (pkg.browser) { + pkg.main = pkg.browser; // eslint-disable-line no-param-reassign + delete pkg.browser; // eslint-disable-line no-param-reassign + } + return pkg; + } + }); + t.equal(res, path.join(dir, 'browser_field', 'b.js')); + t.end(); +}); + +test('absolute paths', function (t) { + var extensionless = __filename.slice(0, -path.extname(__filename).length); + + t.equal( + resolve.sync(__filename), + __filename, + 'absolute path to this file resolves' + ); + t.equal( + resolve.sync(__filename), + require.resolve(__filename), + 'absolute path to this file: resolve.sync === require.resolve' + ); + + t.equal( + resolve.sync(extensionless), + __filename, + 'extensionless absolute path to this file resolves' + ); + t.equal( + resolve.sync(__filename), + require.resolve(__filename), + 'absolute path to this file: resolve.sync === require.resolve' + ); + + t.equal( + resolve.sync(__filename, { basedir: process.cwd() }), + __filename, + 'absolute path to this file with a basedir resolves' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync(__filename, { basedir: process.cwd() }), + require.resolve(__filename, { paths: [process.cwd()] }), + 'absolute path to this file + basedir: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync(extensionless, { basedir: process.cwd() }), + __filename, + 'extensionless absolute path to this file with a basedir resolves' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync(extensionless, { basedir: process.cwd() }), + require.resolve(extensionless, { paths: [process.cwd()] }), + 'extensionless absolute path to this file + basedir: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +var malformedDir = path.join(__dirname, 'resolver/malformed_package_json'); +test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) { + t.plan(5 + (requireResolveSupportsPaths ? 1 : 0)); + + var basedir = malformedDir; + var expected = path.join(basedir, 'index.js'); + + t.equal( + resolve.sync('./index.js', { basedir: basedir }), + expected, + 'malformed package.json is silently ignored' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./index.js', { basedir: basedir }), + require.resolve('./index.js', { paths: [basedir] }), + 'malformed package.json: resolve.sync === require.resolve' + ); + } + + var res1 = resolve.sync( + './index.js', + { + basedir: basedir, + packageFilter: function (pkg, pkgfile, dir) { + t.fail('should not reach here'); + } + } + ); + + t.equal( + res1, + expected, + 'with packageFilter: malformed package.json is silently ignored' + ); + + var res2 = resolve.sync( + './index.js', + { + basedir: basedir, + readPackageSync: function (readFileSync, pkgfile) { + t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); + var result = String(readFileSync(pkgfile)); + try { + return JSON.parse(result); + } catch (e) { + t.ok(e instanceof SyntaxError, 'readPackageSync: malformed package.json parses as a syntax error'); + } + } + } + ); + + t.equal( + res2, + expected, + 'with readPackageSync: malformed package.json is silently ignored' + ); +}); diff --git a/node_modules/resolve/test/shadowed_core.js b/node_modules/resolve/test/shadowed_core.js new file mode 100644 index 0000000..3a5f4fc --- /dev/null +++ b/node_modules/resolve/test/shadowed_core.js @@ -0,0 +1,54 @@ +var test = require('tape'); +var resolve = require('../'); +var path = require('path'); + +test('shadowed core modules still return core module', function (t) { + t.plan(2); + + resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { + t.ifError(err); + t.equal(res, 'util'); + }); +}); + +test('shadowed core modules still return core module [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') }); + + t.equal(res, 'util'); +}); + +test('shadowed core modules return shadow when appending `/`', function (t) { + t.plan(2); + + resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); + }); +}); + +test('shadowed core modules return shadow when appending `/` [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') }); + + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); +}); + +test('shadowed core modules return shadow with `includeCoreModules: false`', function (t) { + t.plan(2); + + resolve('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); + }); +}); + +test('shadowed core modules return shadow with `includeCoreModules: false` [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }); + + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); +}); diff --git a/node_modules/resolve/test/shadowed_core/node_modules/util/index.js b/node_modules/resolve/test/shadowed_core/node_modules/util/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/subdirs.js b/node_modules/resolve/test/subdirs.js new file mode 100644 index 0000000..b7b8450 --- /dev/null +++ b/node_modules/resolve/test/subdirs.js @@ -0,0 +1,13 @@ +var test = require('tape'); +var resolve = require('../'); +var path = require('path'); + +test('subdirs', function (t) { + t.plan(2); + + var dir = path.join(__dirname, '/subdirs'); + resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); + }); +}); diff --git a/node_modules/resolve/test/symlinks.js b/node_modules/resolve/test/symlinks.js new file mode 100644 index 0000000..35f881a --- /dev/null +++ b/node_modules/resolve/test/symlinks.js @@ -0,0 +1,176 @@ +var path = require('path'); +var fs = require('fs'); +var test = require('tape'); +var map = require('array.prototype.map'); +var resolve = require('../'); + +var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink'); +var packageDir = path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'package'); +var modADir = path.join(__dirname, 'symlinks', 'source', 'node_modules', 'mod-a'); +var symlinkModADir = path.join(__dirname, 'symlinks', 'dest', 'node_modules', 'mod-a'); +try { + fs.unlinkSync(symlinkDir); +} catch (err) {} +try { + fs.unlinkSync(packageDir); +} catch (err) {} +try { + fs.unlinkSync(modADir); +} catch (err) {} +try { + fs.unlinkSync(symlinkModADir); +} catch (err) {} + +try { + fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction'); +} +try { + fs.symlinkSync('../../package', packageDir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, '..', '..', 'package') + '\\', packageDir, 'junction'); +} +try { + fs.symlinkSync('../../source/node_modules/mod-a', symlinkModADir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, '..', '..', 'source', 'node_modules', 'mod-a') + '\\', symlinkModADir, 'junction'); +} + +test('symlink', function (t) { + t.plan(2); + + resolve('foo', { basedir: symlinkDir, preserveSymlinks: false }, function (err, res, pkg) { + t.error(err); + t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')); + }); +}); + +test('sync symlink when preserveSymlinks = true', function (t) { + t.plan(4); + + resolve('foo', { basedir: symlinkDir }, function (err, res, pkg) { + t.ok(err, 'there is an error'); + t.notOk(res, 'no result'); + + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + t.equal( + err && err.message, + 'Cannot find module \'foo\' from \'' + symlinkDir + '\'', + 'can not find nonexistent module' + ); + }); +}); + +test('sync symlink', function (t) { + var start = new Date(); + t.doesNotThrow(function () { + t.equal( + resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }), + path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js') + ); + }); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); +}); + +test('sync symlink when preserveSymlinks = true', function (t) { + t.throws(function () { + resolve.sync('foo', { basedir: symlinkDir }); + }, /Cannot find module 'foo'/); + t.end(); +}); + +test('sync symlink from node_modules to other dir when preserveSymlinks = false', function (t) { + var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); + var fn = resolve.sync('package', { basedir: basedir, preserveSymlinks: false }); + + t.equal(fn, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); + t.end(); +}); + +test('async symlink from node_modules to other dir when preserveSymlinks = false', function (t) { + t.plan(2); + var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); + resolve('package', { basedir: basedir, preserveSymlinks: false }, function (err, result) { + t.notOk(err, 'no error'); + t.equal(result, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); + }); +}); + +test('packageFilter', function (t) { + function relative(x) { + return path.relative(__dirname, x); + } + + function testPackageFilter(preserveSymlinks) { + return function (st) { + st.plan('is 1.x' ? 3 : 5); // eslint-disable-line no-constant-condition + + var destMain = 'symlinks/dest/node_modules/mod-a/index.js'; + var destPkg = 'symlinks/dest/node_modules/mod-a/package.json'; + var sourceMain = 'symlinks/source/node_modules/mod-a/index.js'; + var sourcePkg = 'symlinks/source/node_modules/mod-a/package.json'; + var destDir = path.join(__dirname, 'symlinks', 'dest'); + + /* eslint multiline-comment-style: 0 */ + /* v2.x will restore these tests + var packageFilterPath = []; + var actualPath = resolve.sync('mod-a', { + basedir: destDir, + preserveSymlinks: preserveSymlinks, + packageFilter: function (pkg, pkgfile, dir) { + packageFilterPath.push(pkgfile); + } + }); + st.equal( + relative(actualPath), + path.normalize(preserveSymlinks ? destMain : sourceMain), + 'sync: actual path is correct' + ); + st.deepEqual( + map(packageFilterPath, relative), + map(preserveSymlinks ? [destPkg, destPkg] : [sourcePkg, sourcePkg], path.normalize), + 'sync: packageFilter pkgfile arg is correct' + ); + */ + + var asyncPackageFilterPath = []; + resolve( + 'mod-a', + { + basedir: destDir, + preserveSymlinks: preserveSymlinks, + packageFilter: function (pkg, pkgfile) { + asyncPackageFilterPath.push(pkgfile); + } + }, + function (err, actualPath) { + st.error(err, 'no error'); + st.equal( + relative(actualPath), + path.normalize(preserveSymlinks ? destMain : sourceMain), + 'async: actual path is correct' + ); + st.deepEqual( + map(asyncPackageFilterPath, relative), + map( + preserveSymlinks ? [destPkg, destPkg, destPkg] : [sourcePkg, sourcePkg, sourcePkg], + path.normalize + ), + 'async: packageFilter pkgfile arg is correct' + ); + } + ); + }; + } + + t.test('preserveSymlinks: false', testPackageFilter(false)); + + t.test('preserveSymlinks: true', testPackageFilter(true)); + + t.end(); +}); diff --git a/node_modules/supports-preserve-symlinks-flag/.eslintrc b/node_modules/supports-preserve-symlinks-flag/.eslintrc new file mode 100644 index 0000000..346ffec --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "browser": true, + "node": true, + }, + + "rules": { + "id-length": "off", + }, +} diff --git a/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml new file mode 100644 index 0000000..e8d64f3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/supports-preserve-symlink-flag +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/supports-preserve-symlinks-flag/.nycrc b/node_modules/supports-preserve-symlinks-flag/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md new file mode 100644 index 0000000..61f607f --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2022-01-02 + +### Commits + +- Tests [`e2f59ad`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/e2f59ad74e2ae0f5f4899fcde6a6f693ab7cc074) +- Initial commit [`dc222aa`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/dc222aad3c0b940d8d3af1ca9937d108bd2dc4b9) +- [meta] do not publish workflow files [`5ef77f7`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/5ef77f7cb6946d16ee38672be9ec0f1bbdf63262) +- npm init [`992b068`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/992b068503a461f7e8676f40ca2aab255fd8d6ff) +- read me [`6c9afa9`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c9afa9fabc8eaf0814aaed6dd01e6df0931b76d) +- Initial implementation [`2f98925`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2f9892546396d4ab0ad9f1ff83e76c3f01234ae8) +- [meta] add `auto-changelog` [`6c476ae`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c476ae1ed7ce68b0480344f090ac2844f35509d) +- [Dev Deps] add `eslint`, `@ljharb/eslint-config` [`d0fffc8`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/d0fffc886d25fba119355520750a909d64da0087) +- Only apps should have lockfiles [`ab318ed`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/ab318ed7ae62f6c2c0e80a50398d40912afd8f69) +- [meta] add `safe-publish-latest` [`2bb23b3`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2bb23b3ebab02dc4135c4cdf0217db82835b9fca) +- [meta] add `sideEffects` flag [`600223b`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/600223ba24f30779f209d9097721eff35ed62741) diff --git a/node_modules/supports-preserve-symlinks-flag/LICENSE b/node_modules/supports-preserve-symlinks-flag/LICENSE new file mode 100644 index 0000000..2e7b9a3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/supports-preserve-symlinks-flag/README.md b/node_modules/supports-preserve-symlinks-flag/README.md new file mode 100644 index 0000000..eb05b12 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/README.md @@ -0,0 +1,42 @@ +# node-supports-preserve-symlinks-flag [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Determine if the current node version supports the `--preserve-symlinks` flag. + +## Example + +```js +var supportsPreserveSymlinks = require('node-supports-preserve-symlinks-flag'); +var assert = require('assert'); + +assert.equal(supportsPreserveSymlinks, null); // in a browser +assert.equal(supportsPreserveSymlinks, false); // in node < v6.2 +assert.equal(supportsPreserveSymlinks, true); // in node v6.2+ +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/node-supports-preserve-symlinks-flag +[npm-version-svg]: https://versionbadg.es/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag +[dev-deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/node-supports-preserve-symlinks-flag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/node-supports-preserve-symlinks-flag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/node-supports-preserve-symlinks-flag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=node-supports-preserve-symlinks-flag +[codecov-image]: https://codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-supports-preserve-symlinks-flag +[actions-url]: https://github.com/inspect-js/node-supports-preserve-symlinks-flag/actions diff --git a/node_modules/supports-preserve-symlinks-flag/browser.js b/node_modules/supports-preserve-symlinks-flag/browser.js new file mode 100644 index 0000000..087be1f --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/browser.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = null; diff --git a/node_modules/supports-preserve-symlinks-flag/index.js b/node_modules/supports-preserve-symlinks-flag/index.js new file mode 100644 index 0000000..86fd5d3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/index.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = ( +// node 12+ + process.allowedNodeEnvironmentFlags && process.allowedNodeEnvironmentFlags.has('--preserve-symlinks') +) || ( +// node v6.2 - v11 + String(module.constructor._findPath).indexOf('preserveSymlinks') >= 0 // eslint-disable-line no-underscore-dangle +); diff --git a/node_modules/supports-preserve-symlinks-flag/package.json b/node_modules/supports-preserve-symlinks-flag/package.json new file mode 100644 index 0000000..56edadc --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/package.json @@ -0,0 +1,70 @@ +{ + "name": "supports-preserve-symlinks-flag", + "version": "1.0.0", + "description": "Determine if the current node version supports the `--preserve-symlinks` flag.", + "main": "./index.js", + "browser": "./browser.js", + "exports": { + ".": [ + { + "browser": "./browser.js", + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git" + }, + "keywords": [ + "node", + "flag", + "symlink", + "symlinks", + "preserve-symlinks" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag/issues" + }, + "homepage": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.1.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.6.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tape": "^5.4.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/supports-preserve-symlinks-flag/test/index.js b/node_modules/supports-preserve-symlinks-flag/test/index.js new file mode 100644 index 0000000..9938d67 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/test/index.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); +var semver = require('semver'); + +var supportsPreserveSymlinks = require('../'); +var browser = require('../browser'); + +test('supportsPreserveSymlinks', function (t) { + t.equal(typeof supportsPreserveSymlinks, 'boolean', 'is a boolean'); + + t.equal(browser, null, 'browser file is `null`'); + t.equal( + supportsPreserveSymlinks, + null, + 'in a browser, is null', + { skip: typeof window === 'undefined' } + ); + + var expected = semver.satisfies(process.version, '>= 6.2'); + t.equal( + supportsPreserveSymlinks, + expected, + 'is true in node v6.2+, false otherwise (actual: ' + supportsPreserveSymlinks + ', expected ' + expected + ')', + { skip: typeof window !== 'undefined' } + ); + + t.end(); +}); diff --git a/package-lock.json b/package-lock.json index 0416adf..d0c1206 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2,5 +2,195 @@ "name": "finance", "lockfileVersion": 3, "requires": true, - "packages": {} + "packages": { + "": { + "dependencies": { + "flowbite": "^2.5.2" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz", + "integrity": "sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", + "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/flowbite": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/flowbite/-/flowbite-2.5.2.tgz", + "integrity": "sha512-kwFD3n8/YW4EG8GlY3Od9IoKND97kitO+/ejISHSqpn3vw2i5K/+ZI8Jm2V+KC4fGdnfi0XZ+TzYqQb4Q1LshA==", + "dependencies": { + "@popperjs/core": "^2.9.3", + "flowbite-datepicker": "^1.3.0", + "mini-svg-data-uri": "^1.4.3" + } + }, + "node_modules/flowbite-datepicker": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flowbite-datepicker/-/flowbite-datepicker-1.3.0.tgz", + "integrity": "sha512-CLVqzuoE2vkUvWYK/lJ6GzT0be5dlTbH3uuhVwyB67+PjqJWABm2wv68xhBf5BqjpBxvTSQ3mrmLHpPJ2tvrSQ==", + "dependencies": { + "@rollup/plugin-node-resolve": "^15.2.3", + "flowbite": "^2.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==" + }, + "node_modules/mini-svg-data-uri": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", + "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", + "bin": { + "mini-svg-data-uri": "cli.js" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + } + } } diff --git a/package.json b/package.json new file mode 100644 index 0000000..b91c03a --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "flowbite": "^2.5.2" + } +}