@ozdao/prometheus-framework 0.2.86 → 0.2.88
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +0 -16
- package/dist/auth.server.mjs +0 -16
- package/dist/community.server.js +0 -24
- package/dist/community.server.mjs +0 -24
- package/dist/events.server.js +0 -16
- package/dist/events.server.mjs +0 -16
- package/dist/files.server.js +0 -8
- package/dist/files.server.mjs +0 -8
- package/dist/gallery.server.js +0 -8
- package/dist/gallery.server.mjs +0 -8
- package/dist/main-Bw0PvTs-.mjs +13616 -0
- package/dist/main-D8gNZLSa.js +92 -0
- package/dist/main.css +1 -1
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.cjs +1 -1
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.js +180 -180
- package/dist/node_modules/@googlemaps/js-api-loader/dist/index.cjs +1 -1
- package/dist/node_modules/@googlemaps/js-api-loader/dist/index.js +5 -5
- package/dist/node_modules/@noble/hashes/esm/_u64.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/_u64.js +16 -61
- package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.cjs +1 -1
- package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.js +9 -10
- package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs +1 -1
- package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +1 -1
- package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs +3 -3
- package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js +9 -9
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.js +33 -33
- package/dist/node_modules/web3-eth-abi/lib/esm/utils.cjs +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/utils.js +24 -24
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.cjs +1 -1
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.js +30 -30
- package/dist/node_modules/web3-validator/lib/esm/validation/string.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/validation/string.js +9 -9
- package/dist/organizations.server.js +0 -32
- package/dist/organizations.server.mjs +0 -32
- package/dist/products.server.js +0 -20
- package/dist/products.server.mjs +0 -20
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +3046 -2899
- package/dist/prometheus-framework/node_modules/axios/lib/axios.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/axios.js +1 -2
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.js +1 -2
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.js +18 -19
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.cjs +2 -2
- package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.js +66 -67
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.js +38 -39
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.js +1 -2
- package/dist/prometheus-framework/node_modules/date-fns/eachDayOfInterval.cjs +1 -1
- package/dist/prometheus-framework/node_modules/date-fns/eachDayOfInterval.js +13 -16
- package/dist/prometheus-framework/node_modules/date-fns/eachQuarterOfInterval.cjs +1 -1
- package/dist/prometheus-framework/node_modules/date-fns/eachQuarterOfInterval.js +13 -16
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/ParseError.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/ParseError.js +45 -51
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/PhoneNumber.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/PhoneNumber.js +56 -56
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/format.cjs +2 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/format.js +14 -14
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +8 -16
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +4 -6
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +5 -9
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.cjs +2 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +4 -4
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs +2 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +35 -35
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.js +13 -13
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs +2 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +9 -16
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +29 -29
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +31 -31
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +15 -14
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +15 -15
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +6 -5
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +20 -20
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +20 -20
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/reports.server.js +0 -8
- package/dist/reports.server.mjs +0 -8
- package/dist/style.css +1 -1
- package/dist/users.server.js +0 -8
- package/dist/users.server.mjs +0 -8
- package/dist/wallet.server.js +0 -4
- package/dist/wallet.server.mjs +0 -4
- package/dist/web-CciQvENI.js +1 -0
- package/dist/web-nVxTNRH4.mjs +54 -0
- package/package.json +1 -1
- package/src/modules/auth/routes/auth.routes.js +2 -2
- package/src/modules/organizations/routes/memberships.routes.js +0 -1
package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),se=require("../../../date-fns/getMonth.cjs"),Qa=require("../../../date-fns/getDay.cjs"),ue=require("../../../date-fns/getYear.cjs"),ba=require("../../../date-fns/eachDayOfInterval.cjs"),Ja=require("../../../date-fns/differenceInCalendarDays.cjs"),$e=require("../../../date-fns/format.cjs"),mt=require("../../../date-fns/isBefore.cjs"),lt=require("../../../date-fns/isEqual.cjs"),pt=require("../../../date-fns/isAfter.cjs"),me=require("../../../date-fns/set.cjs"),_a=require("../../../date-fns/startOfWeek.cjs"),Xa=require("../../../date-fns/endOfWeek.cjs"),_t=require("../../../date-fns/isValid.cjs"),Ua=require("../../../date-fns/addHours.cjs"),Ve=require("../../../date-fns/setYear.cjs"),Ca=require("../../../date-fns/add.cjs"),xe=require("../../../date-fns/getHours.cjs"),Re=require("../../../date-fns/getMinutes.cjs"),nt=require("../../../date-fns/getSeconds.cjs"),Ue=require("../../../date-fns/addMonths.cjs"),sa=require("../../../date-fns/isSameQuarter.cjs"),Za=require("../../../date-fns/eachQuarterOfInterval.cjs"),el=require("../../../date-fns/startOfYear.cjs"),tl=require("../../../date-fns/endOfYear.cjs"),al=require("../../../date-fns/startOfQuarter.cjs"),da=require("../../../date-fns/endOfQuarter.cjs"),Ma=require("../../../date-fns/setHours.cjs"),Ba=require("../../../date-fns/setMinutes.cjs"),Qt=require("../../../date-fns/setSeconds.cjs"),Jt=require("../../../date-fns/setMilliseconds.cjs"),Wt=require("../../../date-fns/parse.cjs"),vt=require("../../../date-fns/subMonths.cjs"),ca=require("../../../date-fns/getQuarter.cjs"),ll=require("../../../date-fns/setMonth.cjs"),Sa=require("../../../date-fns/addYears.cjs"),nl=require("../../../date-fns/getWeek.cjs"),rl=require("../../../date-fns/getISOWeek.cjs"),Xe=require("../../../date-fns/addDays.cjs"),ol=require("../../../date-fns/isDate.cjs"),Da=require("../../../date-fns/subYears.cjs"),ul=require("../../../date-fns/sub.cjs");function ut(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),e.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),e.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),e.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}ut.compatConfig={MODE:3};function Aa(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),e.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Aa.compatConfig={MODE:3};function Xt(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Xt.compatConfig={MODE:3};function Ut(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}Ut.compatConfig={MODE:3};function Zt(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),e.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}Zt.compatConfig={MODE:3};function ea(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}ea.compatConfig={MODE:3};function ta(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}ta.compatConfig={MODE:3};function ma(t){return a=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${a}T00:00:00+00:00`)).slice(0,2)}function il(t){return a=>$e.formatDate(new Date(`2017-01-0${a}T00:00:00+00:00`),"EEEEEE",{locale:t})}const sl=(t,a,u)=>{const n=[1,2,3,4,5,6,7];let l;if(t!==null)try{l=n.map(il(t))}catch{l=n.map(ma(a))}else l=n.map(ma(a));const m=l.slice(0,u),s=l.slice(u+1,l.length);return[l[u]].concat(...s).concat(...m)},aa=(t,a,u)=>{const n=[];for(let l=+t[0];l<=+t[1];l++)n.push({value:+l,text:Na(l,a)});return u?n.reverse():n},xa=(t,a,u)=>{const n=[1,2,3,4,5,6,7,8,9,10,11,12].map(m=>{const s=m<10?`0${m}`:m;return new Date(`2017-${s}-01T00:00:00+00:00`)});if(t!==null)try{const m=u==="long"?"MMMM":"MMM";return n.map((s,c)=>{const A=$e.formatDate(s,m,{locale:t});return{text:A.charAt(0).toUpperCase()+A.substring(1),value:c}})}catch{}const l=new Intl.DateTimeFormat(a,{month:u,timeZone:"UTC"});return n.map((m,s)=>{const c=l.format(m);return{text:c.charAt(0).toUpperCase()+c.substring(1),value:s}})},dl=t=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][t],ke=t=>{const a=e.unref(t);return a!=null&&a.$el?a==null?void 0:a.$el:a},cl=t=>({type:"dot",...t??{}}),Ta=t=>Array.isArray(t)?!!t[0]&&!!t[1]:!1,la={prop:t=>`"${t}" prop must be enabled!`,dateArr:t=>`You need to use array as "model-value" binding in order to support "${t}"`},be=t=>t,pa=t=>t===0?t:!t||isNaN(+t)?null:+t,va=t=>t===null,Pa=t=>{if(t)return[...t.querySelectorAll("input, button, select, textarea, a[href]")][0]},ml=t=>{const a=[],u=n=>n.filter(l=>l);for(let n=0;n<t.length;n+=3){const l=[t[n],t[n+1],t[n+2]];a.push(u(l))}return a},ft=(t,a,u)=>{const n=u!=null,l=a!=null;if(!n&&!l)return!1;const m=+u,s=+a;return n&&l?+t>m||+t<s:n?+t>m:l?+t<s:!1},rt=(t,a)=>ml(t).map(u=>u.map(n=>{const{active:l,disabled:m,isBetween:s,highlighted:c}=a(n);return{...n,active:l,disabled:m,className:{dp__overlay_cell_active:l,dp__overlay_cell:!l,dp__overlay_cell_disabled:m,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:m&&l,dp__cell_in_between:s,"dp--highlighted":c}}})),qe=(t,a,u=!1)=>{t&&a.allowStopPropagation&&(u&&t.stopImmediatePropagation(),t.stopPropagation())},pl=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function vl(t,a){let u=[...document.querySelectorAll(pl())];u=u.filter(l=>!t.contains(l)||l.hasAttribute("data-datepicker-instance"));const n=u.indexOf(t);if(n>=0&&(a?n-1>=0:n+1<=u.length))return u[n+(a?-1:1)]}const fl=(t,a)=>t==null?void 0:t.querySelector(`[data-dp-element="${a}"]`),Na=(t,a)=>new Intl.NumberFormat(a,{useGrouping:!1,style:"decimal"}).format(t),na=t=>$e.formatDate(t,"dd-MM-yyyy"),Rt=t=>Array.isArray(t),Ct=(t,a)=>a.get(na(t)),yl=(t,a)=>t?a?a instanceof Map?!!Ct(t,a):a(R(t)):!1:!0,fa=(t,a,u,n,l,m)=>{const s=Wt.parse(t,a.slice(0,t.length),new Date,{locale:m});return _t.isValid(s)&&ol.isDate(s)?n||l?s:me.set(s,{hours:+u.hours,minutes:+(u==null?void 0:u.minutes),seconds:+(u==null?void 0:u.seconds),milliseconds:0}):null},hl=(t,a,u,n,l,m)=>{const s=Array.isArray(u)?u[0]:u;if(typeof a=="string")return fa(t,a,s,n,l,m);if(Array.isArray(a)){let c=null;for(const A of a)if(c=fa(t,A,s,n,l,m),c)break;return c}return typeof a=="function"?a(t):null},R=t=>t?new Date(t):new Date,gl=(t,a,u)=>{if(a){const l=(t.getMonth()+1).toString().padStart(2,"0"),m=t.getDate().toString().padStart(2,"0"),s=t.getHours().toString().padStart(2,"0"),c=t.getMinutes().toString().padStart(2,"0"),A=u?t.getSeconds().toString().padStart(2,"0"):"00";return`${t.getFullYear()}-${l}-${m}T${s}:${c}:${A}.000Z`}const n=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds());return new Date(n).toISOString()},Be=t=>{let a=R(JSON.parse(JSON.stringify(t)));return a=Ma.setHours(a,0),a=Ba.setMinutes(a,0),a=Qt.setSeconds(a,0),a=Jt.setMilliseconds(a,0),a},Ke=(t,a,u,n)=>{let l=t?R(t):R();return(a||a===0)&&(l=Ma.setHours(l,+a)),(u||u===0)&&(l=Ba.setMinutes(l,+u)),(n||n===0)&&(l=Qt.setSeconds(l,+n)),Jt.setMilliseconds(l,0)},fe=(t,a)=>!t||!a?!1:mt.isBefore(Be(t),Be(a)),de=(t,a)=>!t||!a?!1:lt.isEqual(Be(t),Be(a)),he=(t,a)=>!t||!a?!1:pt.isAfter(Be(t),Be(a)),Mt=(t,a,u)=>t!=null&&t[0]&&t!=null&&t[1]?he(u,t[0])&&fe(u,t[1]):t!=null&&t[0]&&a?he(u,t[0])&&fe(u,a)||fe(u,t[0])&&he(u,a):!1,Ae=t=>{const a=me.set(new Date(t),{date:1});return Be(a)},Et=(t,a,u)=>a&&(u||u===0)?Object.fromEntries(["hours","minutes","seconds"].map(n=>n===a?[n,u]:[n,isNaN(+t[n])?void 0:+t[n]])):{hours:isNaN(+t.hours)?void 0:+t.hours,minutes:isNaN(+t.minutes)?void 0:+t.minutes,seconds:isNaN(+t.seconds)?void 0:+t.seconds},Ze=t=>({hours:xe.getHours(t),minutes:Re.getMinutes(t),seconds:nt.getSeconds(t)}),Va=(t,a)=>{if(a){const u=ue.getYear(R(a));if(u>t)return 12;if(u===t)return se.getMonth(R(a))}},$a=(t,a)=>{if(a){const u=ue.getYear(R(a));return u<t?-1:u===t?se.getMonth(R(a)):void 0}},ot=t=>{if(t)return ue.getYear(R(t))},Ra=(t,a)=>{const u=he(t,a)?a:t,n=he(a,t)?a:t;return ba.eachDayOfInterval({start:u,end:n})},kl=t=>{const a=Ue.addMonths(t,1);return{month:se.getMonth(a),year:ue.getYear(a)}},Oe=(t,a)=>{const u=_a.startOfWeek(t,{weekStartsOn:+a}),n=Xa.endOfWeek(t,{weekStartsOn:+a});return[u,n]},Ea=(t,a)=>{const u={hours:xe.getHours(R()),minutes:Re.getMinutes(R()),seconds:a?nt.getSeconds(R()):0};return Object.assign(u,t)},He=(t,a,u)=>[me.set(R(t),{date:1}),me.set(R(),{month:a,year:u,date:1})],Ie=(t,a,u)=>{let n=t?R(t):R();return(a||a===0)&&(n=ll.setMonth(n,a)),u&&(n=Ve.setYear(n,u)),n},Ya=(t,a,u,n,l)=>{if(!n||l&&!a||!l&&!u)return!1;const m=l?Ue.addMonths(t,1):vt.subMonths(t,1),s=[se.getMonth(m),ue.getYear(m)];return l?!bl(...s,a):!wl(...s,u)},wl=(t,a,u)=>fe(...He(u,t,a))||de(...He(u,t,a)),bl=(t,a,u)=>he(...He(u,t,a))||de(...He(u,t,a)),Oa=(t,a,u,n,l,m,s)=>{if(typeof a=="function"&&!s)return a(t);const c=u?{locale:u}:void 0;return Array.isArray(t)?`${$e.formatDate(t[0],m,c)}${l&&!t[1]?"":n}${t[1]?$e.formatDate(t[1],m,c):""}`:$e.formatDate(t,m,c)},tt=t=>{if(t)return null;throw new Error(la.prop("partial-range"))},wt=(t,a)=>{if(a)return t();throw new Error(la.prop("range"))},jt=t=>Array.isArray(t)?_t.isValid(t[0])&&(t[1]?_t.isValid(t[1]):!0):t?_t.isValid(t):!1,_l=(t,a)=>me.set(a??R(),{hours:+t.hours||0,minutes:+t.minutes||0,seconds:+t.seconds||0}),Yt=(t,a,u,n)=>{if(!t)return!0;if(n){const l=u==="max"?mt.isBefore(t,a):pt.isAfter(t,a),m={seconds:0,milliseconds:0};return l||lt.isEqual(me.set(t,m),me.set(a,m))}return u==="max"?t.getTime()<=a.getTime():t.getTime()>=a.getTime()},Ot=(t,a,u)=>t?_l(t,a):R(u??a),ya=(t,a,u,n,l)=>{if(Array.isArray(n)){const s=Ot(t,n[0],a),c=Ot(t,n[1],a);return Yt(n[0],s,u,!!a)&&Yt(n[1],c,u,!!a)&&l}const m=Ot(t,n,a);return Yt(n,m,u,!!a)&&l},It=t=>me.set(R(),Ze(t)),Cl=(t,a)=>t instanceof Map?Array.from(t.values()).filter(u=>ue.getYear(R(u))===a).map(u=>se.getMonth(u)):[],Ia=(t,a,u)=>typeof t=="function"?t({month:a,year:u}):!!t.months.find(n=>n.month===a&&n.year===u),ra=(t,a)=>typeof t=="function"?t(a):t.years.includes(a),dt=e.reactive({menuFocused:!1,shiftKeyInMenu:!1}),za=()=>{const t=u=>{dt.menuFocused=u},a=u=>{dt.shiftKeyInMenu!==u&&(dt.shiftKeyInMenu=u)};return{control:e.computed(()=>({shiftKeyInMenu:dt.shiftKeyInMenu,menuFocused:dt.menuFocused})),setMenuFocused:t,setShiftKey:a}},pe=e.reactive({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),zt=e.ref(null),bt=e.ref(!1),Ft=e.ref(!1),Lt=e.ref(!1),Ht=e.ref(!1),_e=e.ref(0),ye=e.ref(0),We=()=>{const t=e.computed(()=>bt.value?[...pe.selectionGrid,pe.actionRow].filter(p=>p.length):Ft.value?[...pe.timePicker[0],...pe.timePicker[1],Ht.value?[]:[zt.value],pe.actionRow].filter(p=>p.length):Lt.value?[...pe.monthPicker,pe.actionRow]:[pe.monthYear,...pe.calendar,pe.time,pe.actionRow].filter(p=>p.length)),a=p=>{_e.value=p?_e.value+1:_e.value-1;let k=null;t.value[ye.value]&&(k=t.value[ye.value][_e.value]),!k&&t.value[ye.value+(p?1:-1)]?(ye.value=ye.value+(p?1:-1),_e.value=p?0:t.value[ye.value].length-1):k||(_e.value=p?_e.value-1:_e.value+1)},u=p=>{ye.value===0&&!p||ye.value===t.value.length&&p||(ye.value=p?ye.value+1:ye.value-1,t.value[ye.value]?t.value[ye.value]&&!t.value[ye.value][_e.value]&&_e.value!==0&&(_e.value=t.value[ye.value].length-1):ye.value=p?ye.value-1:ye.value+1)},n=p=>{let k=null;t.value[ye.value]&&(k=t.value[ye.value][_e.value]),k?k.focus({preventScroll:!bt.value}):_e.value=p?_e.value-1:_e.value+1},l=()=>{a(!0),n(!0)},m=()=>{a(!1),n(!1)},s=()=>{u(!1),n(!0)},c=()=>{u(!0),n(!0)},A=(p,k)=>{pe[k]=p},B=(p,k)=>{pe[k]=p},g=()=>{_e.value=0,ye.value=0};return{buildMatrix:A,buildMultiLevelMatrix:B,setTimePickerBackRef:p=>{zt.value=p},setSelectionGrid:p=>{bt.value=p,g(),p||(pe.selectionGrid=[])},setTimePicker:(p,k=!1)=>{Ft.value=p,Ht.value=k,g(),p||(pe.timePicker[0]=[],pe.timePicker[1]=[])},setTimePickerElements:(p,k=0)=>{pe.timePicker[k]=p},arrowRight:l,arrowLeft:m,arrowUp:s,arrowDown:c,clearArrowNav:()=>{pe.monthYear=[],pe.calendar=[],pe.time=[],pe.actionRow=[],pe.selectionGrid=[],pe.timePicker[0]=[],pe.timePicker[1]=[],bt.value=!1,Ft.value=!1,Ht.value=!1,Lt.value=!1,g(),zt.value=null},setMonthPicker:p=>{Lt.value=p,g()},refSets:pe}},ze=(t,a)=>a?new Date(t.toLocaleString("en-US",{timeZone:a})):new Date(t),Fa=(t,a)=>Gt(t,a)||R(),Ml=(t,a)=>a.dateInTz?ze(new Date(t),a.dateInTz):R(t),Gt=(t,a)=>{if(!t)return null;if(!a)return R(t);const u=R(t);return a.exactMatch?Ml(t,a):ze(u,a.timezone)},Bl=t=>{if(!t)return 0;const a=new Date,u=new Date(a.toLocaleString("en-US",{timeZone:"UTC"})),n=new Date(a.toLocaleString("en-US",{timeZone:t})),l=n.getTimezoneOffset()/60;return(+u-+n)/(1e3*60*60)-l},ha=t=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...t??{}}),Sl=t=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",calendarWrap:"Calendar wrapper",calendarDays:"Calendar days",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:a=>`Increment ${a}`,decrementValue:a=>`Decrement ${a}`,openTpOverlay:a=>`Open ${a} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,...t??{}}),ga=t=>t?typeof t=="boolean"?t?2:0:+t>=2?+t:2:0,Dl=t=>{const a=typeof t=="object"&&t,u={static:!0,solo:!1};if(!t)return{...u,count:ga(!1)};const n=a?t:{},l=a?n.count??!0:t,m=ga(l);return Object.assign(u,n,{count:m})},Al=(t,a,u)=>t||(typeof u=="string"?u:a),xl=t=>typeof t=="boolean"?t?ha({}):!1:ha(t),Tl=t=>{const a={enterSubmit:!0,tabSubmit:!0,openMenu:!0,selectOnFocus:!1,rangeSeparator:" - "};return typeof t=="object"?{...a,...t??{},enabled:!0}:{...a,enabled:t}},Pl=t=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...t??{}}),Nl=t=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...t??{}}),Vl=t=>{const a={input:!1};return typeof t=="object"?{...a,...t??{},enabled:!0}:{enabled:t,...a}},$l=t=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,...t??{}}),Rl=t=>{const a={dates:Array.isArray(t)?t.map(u=>R(u)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof t=="function"?t:{...a,...t??{}}},El=t=>typeof t=="object"?{type:(t==null?void 0:t.type)??"local",hideOnOffsetDates:(t==null?void 0:t.hideOnOffsetDates)??!1}:{type:t,hideOnOffsetDates:!1},Yl=(t,a)=>typeof t=="object"?{enabled:!0,...{noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1},...t}:{enabled:t,noDisabledRange:a.noDisabledRange,showLastInRange:a.showLastInRange,minMaxRawRange:a.minMaxRawRange,partialRange:a.partialRange,disableTimeRangeValidation:a.disableTimeRangeValidation,maxRange:a.maxRange,minRange:a.minRange,autoRange:a.autoRange,fixedStart:a.fixedStart,fixedEnd:a.fixedEnd},Ol=(t,a)=>t?typeof t=="string"?{timezone:t,exactMatch:!1,dateInTz:void 0,emitTimezone:a,convertModel:!0}:{timezone:t.timezone,exactMatch:t.exactMatch??!1,dateInTz:t.dateInTz??void 0,emitTimezone:a??t.emitTimezone,convertModel:t.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:a},qt=(t,a)=>new Map(t.map(u=>{const n=Fa(u,a);return[na(n),n]})),Il=(t,a)=>t.length?new Map(t.map(u=>{const n=Fa(u.date,a);return[na(n),u]})):null,zl=(t,a,u,n,l,m,s)=>({minDate:Gt(t,s),maxDate:Gt(a,s),disabledDates:Rt(u)?qt(u,s):u,allowedDates:Rt(n)?qt(n,s):null,highlight:typeof l=="object"&&Rt(l==null?void 0:l.dates)?qt(l.dates,s):l,markers:Il(m,s)}),Fl=(t,a)=>typeof t=="boolean"?{enabled:t,dragSelect:!0,limit:+a}:{enabled:!!t,limit:t.limit?+t.limit:null,dragSelect:t.dragSelect??!0},ve=t=>{const a=()=>{const I=t.enableSeconds?":ss":"";return t.is24?`HH:mm${I}`:`hh:mm${I} aa`},u=()=>{var I;return t.format?t.format:t.monthPicker?"MM/yyyy":t.timePicker?a():t.weekPicker?`${((I=L.value)==null?void 0:I.type)==="iso"?"RR":"ww"}-yyyy`:t.yearPicker?"yyyy":t.quarterPicker?"QQQ/yyyy":t.enableTimePicker?`MM/dd/yyyy, ${a()}`:"MM/dd/yyyy"},n=I=>Ea(I,t.enableSeconds),l=()=>N.value.enabled?t.startTime&&Array.isArray(t.startTime)?[n(t.startTime[0]),n(t.startTime[1])]:null:t.startTime&&!Array.isArray(t.startTime)?n(t.startTime):null,m=e.computed(()=>Dl(t.multiCalendars)),s=e.computed(()=>l()),c=e.computed(()=>Sl(t.ariaLabels)),A=e.computed(()=>Pl(t.filters)),B=e.computed(()=>xl(t.transitions)),g=e.computed(()=>Nl(t.actionRow)),p=e.computed(()=>Al(t.previewFormat,t.format,u())),k=e.computed(()=>Tl(t.textInput)),P=e.computed(()=>Vl(t.inline)),C=e.computed(()=>$l(t.config)),M=e.computed(()=>Rl(t.highlight)),L=e.computed(()=>El(t.weekNumbers)),W=e.computed(()=>Ol(t.timezone,t.emitTimezone)),K=e.computed(()=>Fl(t.multiDates,t.multiDatesLimit)),_=e.computed(()=>zl(t.minDate,t.maxDate,t.disabledDates,t.allowedDates,M.value,t.markers,W.value)),N=e.computed(()=>Yl(t.range,{minMaxRawRange:!1,maxRange:t.maxRange,minRange:t.minRange,noDisabledRange:t.noDisabledRange,showLastInRange:t.showLastInRange,partialRange:t.partialRange,disableTimeRangeValidation:t.disableTimeRangeValidation,autoRange:t.autoRange,fixedStart:t.fixedStart,fixedEnd:t.fixedEnd}));return{defaultedTransitions:B,defaultedMultiCalendars:m,defaultedStartTime:s,defaultedAriaLabels:c,defaultedFilters:A,defaultedActionRow:g,defaultedPreviewFormat:p,defaultedTextInput:k,defaultedInline:P,defaultedConfig:C,defaultedHighlight:M,defaultedWeekNumbers:L,defaultedRange:N,propDates:_,defaultedTz:W,defaultedMultiDates:K,getDefaultPattern:u,getDefaultStartTime:l}},Ll=(t,a,u)=>{const n=e.ref(),{defaultedTextInput:l,defaultedRange:m,defaultedTz:s,defaultedMultiDates:c,getDefaultPattern:A}=ve(a),B=e.ref(""),g=e.toRef(a,"format");e.watch(n,()=>{t("internal-model-change",n.value)},{deep:!0}),e.watch(g,()=>{S()});const p=o=>s.value.timezone&&s.value.convertModel?ze(o,s.value.timezone):o,k=o=>{if(s.value.timezone&&s.value.convertModel){const b=Bl(s.value.timezone);return Ua.addHours(o,b)}return o},P=(o,b,T=!1)=>Oa(o,a.format,a.formatLocale,l.value.rangeSeparator,a.modelAuto,b??A(),T),C=o=>o?a.modelType?X(o):{hours:xe.getHours(o),minutes:Re.getMinutes(o),seconds:a.enableSeconds?nt.getSeconds(o):0}:null,M=o=>a.modelType?X(o):{month:se.getMonth(o),year:ue.getYear(o)},L=o=>Array.isArray(o)?c.value.enabled?o.map(b=>W(b,Ve.setYear(R(),b))):wt(()=>[Ve.setYear(R(),o[0]),o[1]?Ve.setYear(R(),o[1]):tt(m.value.partialRange)],m.value.enabled):Ve.setYear(R(),+o),W=(o,b)=>(typeof o=="string"||typeof o=="number")&&a.modelType?F(o):b,K=o=>Array.isArray(o)?[W(o[0],Ke(null,+o[0].hours,+o[0].minutes,o[0].seconds)),W(o[1],Ke(null,+o[1].hours,+o[1].minutes,o[1].seconds))]:W(o,Ke(null,o.hours,o.minutes,o.seconds)),_=o=>{const b=me.set(R(),{date:1});return Array.isArray(o)?c.value.enabled?o.map(T=>W(T,Ie(b,+T.month,+T.year))):wt(()=>[W(o[0],Ie(b,+o[0].month,+o[0].year)),W(o[1],o[1]?Ie(b,+o[1].month,+o[1].year):tt(m.value.partialRange))],m.value.enabled):W(o,Ie(b,+o.month,+o.year))},N=o=>{if(Array.isArray(o))return o.map(b=>F(b));throw new Error(la.dateArr("multi-dates"))},I=o=>{if(Array.isArray(o)&&m.value.enabled){const b=o[0],T=o[1];return[R(Array.isArray(b)?b[0]:null),R(Array.isArray(T)?T[0]:null)]}return R(o[0])},$=o=>a.modelAuto?Array.isArray(o)?[F(o[0]),F(o[1])]:a.autoApply?[F(o)]:[F(o),null]:Array.isArray(o)?wt(()=>o[1]?[F(o[0]),o[1]?F(o[1]):tt(m.value.partialRange)]:[F(o[0])],m.value.enabled):F(o),V=()=>{Array.isArray(n.value)&&m.value.enabled&&n.value.length===1&&n.value.push(tt(m.value.partialRange))},H=()=>{const o=n.value;return[X(o[0]),o[1]?X(o[1]):tt(m.value.partialRange)]},G=()=>n.value[1]?H():X(be(n.value[0])),J=()=>(n.value||[]).map(o=>X(o)),U=()=>(V(),a.modelAuto?G():c.value.enabled?J():Array.isArray(n.value)?wt(()=>H(),m.value.enabled):X(be(n.value))),x=o=>!o||Array.isArray(o)&&!o.length?null:a.timePicker?K(be(o)):a.monthPicker?_(be(o)):a.yearPicker?L(be(o)):c.value.enabled?N(be(o)):a.weekPicker?I(be(o)):$(be(o)),E=o=>{const b=x(o);jt(be(b))?(n.value=be(b),S()):(n.value=null,B.value="")},Q=()=>{const o=b=>$e.formatDate(b,l.value.format);return`${o(n.value[0])} ${l.value.rangeSeparator} ${n.value[1]?o(n.value[1]):""}`},d=()=>u.value&&n.value?Array.isArray(n.value)?Q():$e.formatDate(n.value,l.value.format):P(n.value),i=()=>n.value?c.value.enabled?n.value.map(o=>P(o)).join("; "):l.value.enabled&&typeof l.value.format=="string"?d():P(n.value):"",S=()=>{!a.format||typeof a.format=="string"||l.value.enabled&&typeof l.value.format=="string"?B.value=i():B.value=a.format(n.value)},F=o=>{if(a.utc){const b=new Date(o);return a.utc==="preserve"?new Date(b.getTime()+b.getTimezoneOffset()*6e4):b}return a.modelType?a.modelType==="date"||a.modelType==="timestamp"?p(new Date(o)):a.modelType==="format"&&(typeof a.format=="string"||!a.format)?p(Wt.parse(o,A(),new Date)):p(Wt.parse(o,a.modelType,new Date)):p(new Date(o))},X=o=>o?a.utc?gl(o,a.utc==="preserve",a.enableSeconds):a.modelType?a.modelType==="timestamp"?+k(o):a.modelType==="format"&&(typeof a.format=="string"||!a.format)?P(k(o)):P(k(o),a.modelType,!0):k(o):"",z=(o,b=!1)=>{if(t("update:model-value",o),s.value.emitTimezone&&b){const T=Array.isArray(o)?o.map(ie=>ze(be(ie),s.value.emitTimezone)):ze(be(o),s.value.emitTimezone);t("update:model-timezone-value",T)}},f=o=>Array.isArray(n.value)?c.value.enabled?n.value.map(b=>o(b)):[o(n.value[0]),n.value[1]?o(n.value[1]):tt(m.value.partialRange)]:o(be(n.value)),w=()=>{if(Array.isArray(n.value)){const o=Oe(n.value[0],a.weekStart),b=n.value[1]?Oe(n.value[1],a.weekStart):[];return[o.map(T=>R(T)),b.map(T=>R(T))]}return Oe(n.value,a.weekStart).map(o=>R(o))},r=o=>z(be(f(o)));return{inputValue:B,internalModelValue:n,checkBeforeEmit:()=>n.value?m.value.enabled?m.value.partialRange?n.value.length>=1:n.value.length===2:!!n.value:!1,parseExternalModelValue:E,formatInputValue:S,emitModelValue:()=>(S(),a.monthPicker?r(M):a.timePicker?r(C):a.yearPicker?r(ue.getYear):a.weekPicker?t("update:model-value",w()):z(U(),!0))}},Hl=(t,a)=>{const{defaultedFilters:u,propDates:n}=ve(t),{validateMonthYearInRange:l}=je(t),m=(g,p)=>{let k=g;return u.value.months.includes(se.getMonth(k))?(k=p?Ue.addMonths(g,1):vt.subMonths(g,1),m(k,p)):k},s=(g,p)=>{let k=g;return u.value.years.includes(ue.getYear(k))?(k=p?Sa.addYears(g,1):Da.subYears(g,1),s(k,p)):k},c=(g,p=!1)=>{const k=me.set(R(),{month:t.month,year:t.year});let P=g?Ue.addMonths(k,1):vt.subMonths(k,1);t.disableYearSelect&&(P=Ve.setYear(P,t.year));let C=se.getMonth(P),M=ue.getYear(P);u.value.months.includes(C)&&(P=m(P,g),C=se.getMonth(P),M=ue.getYear(P)),u.value.years.includes(M)&&(P=s(P,g),M=ue.getYear(P)),l(C,M,g,t.preventMinMaxNavigation)&&A(C,M,p)},A=(g,p,k)=>{a("update-month-year",{month:g,year:p,fromNav:k})},B=e.computed(()=>g=>Ya(me.set(R(),{month:t.month,year:t.year}),n.value.maxDate,n.value.minDate,t.preventMinMaxNavigation,g));return{handleMonthYearChange:c,isDisabled:B,updateMonthYear:A}};var at=(t=>(t.center="center",t.left="left",t.right="right",t))(at||{}),De=(t=>(t.month="month",t.year="year",t))(De||{}),Je=(t=>(t.top="top",t.bottom="bottom",t))(Je||{}),et=(t=>(t.header="header",t.calendar="calendar",t.timePicker="timePicker",t))(et||{}),Ne=(t=>(t.month="month",t.year="year",t.calendar="calendar",t.time="time",t.minutes="minutes",t.hours="hours",t.seconds="seconds",t))(Ne||{});const ql=({menuRef:t,menuRefInner:a,inputRef:u,pickerWrapperRef:n,inline:l,emit:m,props:s,slots:c})=>{const A=e.ref({}),B=e.ref(!1),g=e.ref({top:"0",left:"0"}),p=e.ref(!1),k=e.toRef(s,"teleportCenter");e.watch(k,()=>{g.value=JSON.parse(JSON.stringify({})),N()});const P=d=>{if(s.teleport){const i=d.getBoundingClientRect();return{left:i.left+window.scrollX,top:i.top+window.scrollY}}return{top:0,left:0}},C=(d,i)=>{g.value.left=`${d+i-A.value.width}px`},M=d=>{g.value.left=`${d}px`},L=(d,i)=>{s.position===at.left&&M(d),s.position===at.right&&C(d,i),s.position===at.center&&(g.value.left=`${d+i/2-A.value.width/2}px`)},W=d=>{const{width:i,height:S}=d.getBoundingClientRect(),{top:F,left:X}=s.altPosition?s.altPosition(d):P(d);return{top:+F,left:+X,width:i,height:S}},K=()=>{g.value.left="50%",g.value.top="50%",g.value.transform="translate(-50%, -50%)",g.value.position="fixed",delete g.value.opacity},_=()=>{const d=ke(u),{top:i,left:S,transform:F}=s.altPosition(d);g.value={top:`${i}px`,left:`${S}px`,transform:F??""}},N=(d=!0)=>{var i;if(!l.value.enabled){if(k.value)return K();if(s.altPosition!==null)return _();if(d){const S=s.teleport?(i=a.value)==null?void 0:i.$el:t.value;S&&(A.value=S.getBoundingClientRect()),m("recalculate-position")}return U()}},I=({inputEl:d,left:i,width:S})=>{window.screen.width>768&&!B.value&&L(i,S),H(d)},$=d=>{const{top:i,left:S,height:F,width:X}=W(d);g.value.top=`${F+i+ +s.offset}px`,p.value=!1,B.value||(g.value.left=`${S+X/2-A.value.width/2}px`),I({inputEl:d,left:S,width:X})},V=d=>{const{top:i,left:S,width:F}=W(d);g.value.top=`${i-+s.offset-A.value.height}px`,p.value=!0,I({inputEl:d,left:S,width:F})},H=d=>{if(s.autoPosition){const{left:i,width:S}=W(d),{left:F,right:X}=A.value;if(!B.value){if(Math.abs(F)!==Math.abs(X)){if(F<=0)return B.value=!0,M(i);if(X>=document.documentElement.clientWidth)return B.value=!0,C(i,S)}return L(i,S)}}},G=()=>{const d=ke(u);if(d){const{height:i}=A.value,{top:S,height:F}=d.getBoundingClientRect(),X=window.innerHeight-S-F,z=S;return i<=X?Je.bottom:i>X&&i<=z?Je.top:X>=z?Je.bottom:Je.top}return Je.bottom},J=d=>G()===Je.bottom?$(d):V(d),U=()=>{const d=ke(u);if(d)return s.autoPosition?J(d):$(d)},x=function(d){if(d){const i=d.scrollHeight>d.clientHeight,S=window.getComputedStyle(d).overflowY.indexOf("hidden")!==-1;return i&&!S}return!0},E=function(d){return!d||d===document.body||d.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:x(d)?d:E(d.parentNode)},Q=d=>{if(d)switch(s.position){case at.left:return{left:0,transform:"translateX(0)"};case at.right:return{left:`${d.width}px`,transform:"translateX(-100%)"};default:return{left:`${d.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:p,menuStyle:g,xCorrect:B,setMenuPosition:N,getScrollableParent:E,shadowRender:(d,i)=>{var S,F,X;const z=document.createElement("div"),f=(S=ke(u))==null?void 0:S.getBoundingClientRect();z.setAttribute("id","dp--temp-container");const w=(F=n.value)!=null&&F.clientWidth?n.value:document.body;w.append(z);const r=Q(f),o=e.h(d,{...i,shadow:!0,style:{opacity:0,position:"absolute",...r}},Object.fromEntries(Object.keys(c).filter(b=>["right-sidebar","left-sidebar"].includes(b)).map(b=>[b,c[b]])));e.render(o,z),A.value=(X=o.el)==null?void 0:X.getBoundingClientRect(),e.render(null,z),w.removeChild(z)}}},Le=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]}],Kl=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],Wl={all:()=>Le,monthYear:()=>Le.filter(t=>t.use.includes("month-year")),input:()=>Kl,timePicker:()=>Le.filter(t=>t.use.includes("time")),action:()=>Le.filter(t=>t.use.includes("action")),calendar:()=>Le.filter(t=>t.use.includes("calendar")),menu:()=>Le.filter(t=>t.use.includes("menu")),shared:()=>Le.filter(t=>t.use.includes("shared")),yearMode:()=>Le.filter(t=>t.use.includes("year-mode"))},Me=(t,a,u)=>{const n=[];return Wl[a]().forEach(l=>{t[l.name]&&n.push(l.name)}),u!=null&&u.length&&u.forEach(l=>{l.slot&&n.push(l.slot)}),n},yt=t=>{const a=e.computed(()=>n=>t.value?n?t.value.open:t.value.close:""),u=e.computed(()=>n=>t.value?n?t.value.menuAppearTop:t.value.menuAppearBottom:"");return{transitionName:a,showTransition:!!t.value,menuTransition:u}},ht=(t,a)=>{const{defaultedRange:u,defaultedTz:n}=ve(t),l=R(ze(R(),n.value.timezone)),m=e.ref([{month:se.getMonth(l),year:ue.getYear(l)}]),s=e.reactive({hours:u.value.enabled?[xe.getHours(l),xe.getHours(l)]:xe.getHours(l),minutes:u.value.enabled?[Re.getMinutes(l),Re.getMinutes(l)]:Re.getMinutes(l),seconds:u.value.enabled?[0,0]:0}),c=e.computed({get:()=>t.internalModelValue,set:g=>{!t.readonly&&!t.disabled&&a("update:internal-model-value",g)}}),A=e.computed(()=>g=>m.value[g]?m.value[g].month:0),B=e.computed(()=>g=>m.value[g]?m.value[g].year:0);return{calendars:m,time:s,modelValue:c,month:A,year:B}},jl=(t,a)=>{const{defaultedMultiCalendars:u,defaultedMultiDates:n,defaultedHighlight:l,defaultedTz:m,propDates:s,defaultedRange:c}=ve(a),{isDisabled:A}=je(a),B=e.ref(null),g=e.ref(ze(new Date,m.value.timezone)),p=r=>{!r.current&&a.hideOffsetDates||(B.value=r.value)},k=()=>{B.value=null},P=r=>Array.isArray(t.value)&&c.value.enabled&&t.value[0]&&B.value?r?he(B.value,t.value[0]):fe(B.value,t.value[0]):!0,C=(r,o)=>{const b=()=>t.value?o?t.value[0]||null:t.value[1]:null,T=t.value&&Array.isArray(t.value)?b():null;return de(R(r.value),T)},M=r=>{const o=Array.isArray(t.value)?t.value[0]:null;return r?!fe(B.value??null,o):!0},L=(r,o=!0)=>(c.value.enabled||a.weekPicker)&&Array.isArray(t.value)&&t.value.length===2?a.hideOffsetDates&&!r.current?!1:de(R(r.value),t.value[o?0:1]):c.value.enabled?C(r,o)&&M(o)||de(r.value,Array.isArray(t.value)?t.value[0]:null)&&P(o):!1,W=(r,o,b)=>Array.isArray(t.value)&&t.value[0]&&t.value.length===1?r?!1:b?he(t.value[0],o.value):fe(t.value[0],o.value):!1,K=r=>!t.value||a.hideOffsetDates&&!r.current?!1:c.value.enabled?a.modelAuto&&Array.isArray(t.value)?de(r.value,t.value[0]?t.value[0]:g.value):!1:n.value.enabled&&Array.isArray(t.value)?t.value.some(o=>de(o,r.value)):de(r.value,t.value?t.value:g.value),_=r=>{if(c.value.autoRange||a.weekPicker){if(B.value){if(a.hideOffsetDates&&!r.current)return!1;const o=Xe.addDays(B.value,+c.value.autoRange),b=Oe(R(B.value),a.weekStart);return a.weekPicker?de(b[1],R(r.value)):de(o,R(r.value))}return!1}return!1},N=r=>{if(c.value.autoRange||a.weekPicker){if(B.value){const o=Xe.addDays(B.value,+c.value.autoRange);if(a.hideOffsetDates&&!r.current)return!1;const b=Oe(R(B.value),a.weekStart);return a.weekPicker?he(r.value,b[0])&&fe(r.value,b[1]):he(r.value,B.value)&&fe(r.value,o)}return!1}return!1},I=r=>{if(c.value.autoRange||a.weekPicker){if(B.value){if(a.hideOffsetDates&&!r.current)return!1;const o=Oe(R(B.value),a.weekStart);return a.weekPicker?de(o[0],r.value):de(B.value,r.value)}return!1}return!1},$=r=>Mt(t.value,B.value,r.value),V=()=>a.modelAuto&&Array.isArray(a.internalModelValue)?!!a.internalModelValue[0]:!1,H=()=>a.modelAuto?Ta(a.internalModelValue):!0,G=r=>{if(a.weekPicker)return!1;const o=c.value.enabled?!L(r)&&!L(r,!1):!0;return!A(r.value)&&!K(r)&&!(!r.current&&a.hideOffsetDates)&&o},J=r=>c.value.enabled?a.modelAuto?V()&&K(r):!1:K(r),U=r=>l.value?yl(r.value,s.value.highlight):!1,x=r=>{const o=A(r.value);return o&&(typeof l.value=="function"?!l.value(r.value,o):!l.value.options.highlightDisabled)},E=r=>{var o;return typeof l.value=="function"?l.value(r.value):(o=l.value.weekdays)==null?void 0:o.includes(r.value.getDay())},Q=r=>(c.value.enabled||a.weekPicker)&&(!(u.value.count>0)||r.current)&&H()&&!(!r.current&&a.hideOffsetDates)&&!K(r)?$(r):!1,d=r=>{const{isRangeStart:o,isRangeEnd:b}=X(r),T=c.value.enabled?o||b:!1;return{dp__cell_offset:!r.current,dp__pointer:!a.disabled&&!(!r.current&&a.hideOffsetDates)&&!A(r.value),dp__cell_disabled:A(r.value),dp__cell_highlight:!x(r)&&(U(r)||E(r))&&!J(r)&&!T&&!I(r)&&!(Q(r)&&a.weekPicker)&&!b,dp__cell_highlight_active:!x(r)&&(U(r)||E(r))&&J(r),dp__today:!a.noToday&&de(r.value,g.value)&&r.current,"dp--past":fe(r.value,g.value),"dp--future":he(r.value,g.value)}},i=r=>({dp__active_date:J(r),dp__date_hover:G(r)}),S=r=>{if(t.value&&!Array.isArray(t.value)){const o=Oe(t.value,a.weekStart);return{...f(r),dp__range_start:de(o[0],r.value),dp__range_end:de(o[1],r.value),dp__range_between_week:he(r.value,o[0])&&fe(r.value,o[1])}}return{...f(r)}},F=r=>{if(t.value&&Array.isArray(t.value)){const o=Oe(t.value[0],a.weekStart),b=t.value[1]?Oe(t.value[1],a.weekStart):[];return{...f(r),dp__range_start:de(o[0],r.value)||de(b[0],r.value),dp__range_end:de(o[1],r.value)||de(b[1],r.value),dp__range_between_week:he(r.value,o[0])&&fe(r.value,o[1])||he(r.value,b[0])&&fe(r.value,b[1]),dp__range_between:he(r.value,o[1])&&fe(r.value,b[0])}}return{...f(r)}},X=r=>{const o=u.value.count>0?r.current&&L(r)&&H():L(r)&&H(),b=u.value.count>0?r.current&&L(r,!1)&&H():L(r,!1)&&H();return{isRangeStart:o,isRangeEnd:b}},z=r=>{const{isRangeStart:o,isRangeEnd:b}=X(r);return{dp__range_start:o,dp__range_end:b,dp__range_between:Q(r),dp__date_hover:G(r),dp__date_hover_start:W(G(r),r,!0),dp__date_hover_end:W(G(r),r,!1)}},f=r=>({...z(r),dp__cell_auto_range:N(r),dp__cell_auto_range_start:I(r),dp__cell_auto_range_end:_(r)}),w=r=>c.value.enabled?c.value.autoRange?f(r):a.modelAuto?{...i(r),...z(r)}:a.weekPicker?F(r):z(r):a.weekPicker?S(r):i(r);return{setHoverDate:p,clearHoverDate:k,getDayClassData:r=>a.hideOffsetDates&&!r.current?{}:{...d(r),...w(r),[a.dayClass?a.dayClass(r.value):""]:!0,[a.calendarCellClassName]:!!a.calendarCellClassName}}},je=t=>{const{defaultedFilters:a,defaultedRange:u,propDates:n,defaultedMultiDates:l}=ve(t),m=x=>n.value.disabledDates?typeof n.value.disabledDates=="function"?n.value.disabledDates(R(x)):!!Ct(x,n.value.disabledDates):!1,s=x=>{const E=n.value.maxDate?he(x,n.value.maxDate):!1,Q=n.value.minDate?fe(x,n.value.minDate):!1,d=m(x),i=a.value.months.map(f=>+f).includes(se.getMonth(x)),S=t.disabledWeekDays.length?t.disabledWeekDays.some(f=>+f===Qa.getDay(x)):!1,F=p(x),X=ue.getYear(x),z=X<+t.yearRange[0]||X>+t.yearRange[1];return!(E||Q||d||i||z||S||F)},c=(x,E)=>fe(...He(n.value.minDate,x,E))||de(...He(n.value.minDate,x,E)),A=(x,E)=>he(...He(n.value.maxDate,x,E))||de(...He(n.value.maxDate,x,E)),B=(x,E,Q)=>{let d=!1;return n.value.maxDate&&Q&&A(x,E)&&(d=!0),n.value.minDate&&!Q&&c(x,E)&&(d=!0),d},g=(x,E,Q,d)=>{let i=!1;return d?n.value.minDate&&n.value.maxDate?i=B(x,E,Q):(n.value.minDate&&c(x,E)||n.value.maxDate&&A(x,E))&&(i=!0):i=!0,i},p=x=>Array.isArray(n.value.allowedDates)&&!n.value.allowedDates.length?!0:n.value.allowedDates?!Ct(x,n.value.allowedDates):!1,k=x=>!s(x),P=x=>u.value.noDisabledRange?!ba.eachDayOfInterval({start:x[0],end:x[1]}).some(E=>k(E)):!0,C=x=>{if(x){const E=ue.getYear(x);return E>=+t.yearRange[0]&&E<=t.yearRange[1]}return!0},M=(x,E)=>!!(Array.isArray(x)&&x[E]&&(u.value.maxRange||u.value.minRange)&&C(x[E])),L=(x,E,Q=0)=>{if(M(E,Q)&&C(x)){const d=Ja.differenceInCalendarDays(x,E[Q]),i=Ra(E[Q],x),S=i.length===1?0:i.filter(X=>k(X)).length,F=Math.abs(d)-(u.value.minMaxRawRange?0:S);if(u.value.minRange&&u.value.maxRange)return F>=+u.value.minRange&&F<=+u.value.maxRange;if(u.value.minRange)return F>=+u.value.minRange;if(u.value.maxRange)return F<=+u.value.maxRange}return!0},W=()=>!t.enableTimePicker||t.monthPicker||t.yearPicker||t.ignoreTimeValidation,K=x=>Array.isArray(x)?[x[0]?It(x[0]):null,x[1]?It(x[1]):null]:It(x),_=(x,E,Q)=>x.find(d=>+d.hours===xe.getHours(E)&&d.minutes==="*"?!0:+d.minutes===Re.getMinutes(E)&&+d.hours===xe.getHours(E))&&Q,N=(x,E,Q)=>{const[d,i]=x,[S,F]=E;return!_(d,S,Q)&&!_(i,F,Q)&&Q},I=(x,E)=>{const Q=Array.isArray(E)?E:[E];return Array.isArray(t.disabledTimes)?Array.isArray(t.disabledTimes[0])?N(t.disabledTimes,Q,x):!Q.some(d=>_(t.disabledTimes,d,x)):x},$=(x,E)=>{const Q=Array.isArray(E)?[Ze(E[0]),E[1]?Ze(E[1]):void 0]:Ze(E),d=!t.disabledTimes(Q);return x&&d},V=(x,E)=>t.disabledTimes?Array.isArray(t.disabledTimes)?I(E,x):$(E,x):E,H=x=>{let E=!0;if(!x||W())return!0;const Q=!n.value.minDate&&!n.value.maxDate?K(x):x;return(t.maxTime||n.value.maxDate)&&(E=ya(t.maxTime,n.value.maxDate,"max",be(Q),E)),(t.minTime||n.value.minDate)&&(E=ya(t.minTime,n.value.minDate,"min",be(Q),E)),V(x,E)},G=x=>{if(!t.monthPicker)return!0;let E=!0;const Q=R(Ae(x));if(n.value.minDate&&n.value.maxDate){const d=R(Ae(n.value.minDate)),i=R(Ae(n.value.maxDate));return he(Q,d)&&fe(Q,i)||de(Q,d)||de(Q,i)}if(n.value.minDate){const d=R(Ae(n.value.minDate));E=he(Q,d)||de(Q,d)}if(n.value.maxDate){const d=R(Ae(n.value.maxDate));E=fe(Q,d)||de(Q,d)}return E},J=e.computed(()=>x=>!t.enableTimePicker||t.ignoreTimeValidation?!0:H(x)),U=e.computed(()=>x=>t.monthPicker?Array.isArray(x)&&(u.value.enabled||l.value.enabled)?!x.filter(E=>!G(E)).length:G(x):!0);return{isDisabled:k,validateDate:s,validateMonthYearInRange:g,isDateRangeAllowed:P,checkMinMaxRange:L,isValidTime:H,isTimeValid:J,isMonthValid:U}},Bt=()=>{const t=e.computed(()=>(n,l)=>n==null?void 0:n.includes(l)),a=e.computed(()=>(n,l)=>n.count?n.solo?!0:l===0:!0),u=e.computed(()=>(n,l)=>n.count?n.solo?!0:l===n.count-1:!0);return{hideNavigationButtons:t,showLeftIcon:a,showRightIcon:u}},Gl=(t,a,u)=>{const n=e.ref(0),l=e.reactive({[et.timePicker]:!t.enableTimePicker||t.timePicker||t.monthPicker,[et.calendar]:!1,[et.header]:!1}),m=e.computed(()=>t.monthPicker),s=p=>{var k;if((k=t.flow)!=null&&k.length){if(!p&&m.value)return g();l[p]=!0,Object.keys(l).filter(P=>!l[P]).length||g()}},c=()=>{var p;(p=t.flow)!=null&&p.length&&n.value!==-1&&(n.value+=1,a("flow-step",n.value),g())},A=()=>{n.value=-1},B=(p,k,...P)=>{var C,M;t.flow[n.value]===p&&u.value&&((M=(C=u.value)[k])==null||M.call(C,...P))},g=()=>{B(Ne.month,"toggleMonthPicker",!0),B(Ne.year,"toggleYearPicker",!0),B(Ne.calendar,"toggleTimePicker",!1,!0),B(Ne.time,"toggleTimePicker",!0,!0);const p=t.flow[n.value];(p===Ne.hours||p===Ne.minutes||p===Ne.seconds)&&B(p,"toggleTimePicker",!0,!0,p)};return{childMount:s,updateFlowStep:c,resetFlow:A,flowStep:n}},St={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},emitTimezone:{type:String,default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},menuClassName:{type:String,default:null},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},calendarCellClassName:{type:String,default:null},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},autoRange:{type:[Number,String],default:null},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},minRange:{type:[Number,String],default:null},maxRange:{type:[Number,String],default:null},multiDatesLimit:{type:[Number,String],default:null},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},disableTimeRangeValidation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[String,Boolean,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},calendarClassName:{type:String,default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},partialRange:{type:Boolean,default:!0},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},inputClassName:{type:String,default:null},fixedStart:{type:Boolean,default:!1},fixedEnd:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},noDisabledRange:{type:Boolean,default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},showLastInRange:{type:Boolean,default:!0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},Te={...St,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null}},Ql={key:1,class:"dp__input_wrap"},Jl=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],Xl={key:2,class:"dp__clear_icon"},Ul=e.defineComponent({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...St},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur"],setup(t,{expose:a,emit:u}){const n=u,l=t,{defaultedTextInput:m,defaultedAriaLabels:s,defaultedInline:c,defaultedConfig:A,defaultedRange:B,defaultedMultiDates:g,getDefaultPattern:p,getDefaultStartTime:k}=ve(l),{checkMinMaxRange:P}=je(l),C=e.ref(),M=e.ref(null),L=e.ref(!1),W=e.ref(!1),K=e.computed(()=>({dp__pointer:!l.disabled&&!l.readonly&&!m.value.enabled,dp__disabled:l.disabled,dp__input_readonly:!m.value.enabled,dp__input:!0,dp__input_icon_pad:!l.hideInputIcon,dp__input_valid:!!l.state,dp__input_invalid:l.state===!1,dp__input_focus:L.value||l.isMenuOpen,dp__input_reg:!m.value.enabled,[l.inputClassName]:!!l.inputClassName})),_=()=>{n("set-input-date",null),l.autoApply&&(n("set-empty-date"),C.value=null)},N=i=>{const S=k();return hl(i,m.value.format??p(),S??Ea({},l.enableSeconds),l.inputValue,W.value,l.formatLocale)},I=i=>{const{rangeSeparator:S}=m.value,[F,X]=i.split(`${S}`);if(F){const z=N(F.trim()),f=X?N(X.trim()):null,w=z&&f?[z,f]:[z];P(f,w,0)&&(C.value=z?w:null)}},$=()=>{W.value=!0},V=i=>{if(B.value.enabled)I(i);else if(g.value.enabled){const S=i.split(";");C.value=S.map(F=>N(F.trim())).filter(F=>F)}else C.value=N(i)},H=i=>{var S;const F=typeof i=="string"?i:(S=i.target)==null?void 0:S.value;F!==""?(m.value.openMenu&&!l.isMenuOpen&&n("open"),V(F),n("set-input-date",C.value)):_(),W.value=!1,n("update:input-value",F)},G=i=>{m.value.enabled?(V(i.target.value),m.value.enterSubmit&&jt(C.value)&&l.inputValue!==""?(n("set-input-date",C.value,!0),C.value=null):m.value.enterSubmit&&l.inputValue===""&&(C.value=null,n("clear"))):x(i)},J=i=>{m.value.enabled&&m.value.tabSubmit&&V(i.target.value),m.value.tabSubmit&&jt(C.value)&&l.inputValue!==""?(n("set-input-date",C.value,!0,!0),C.value=null):m.value.tabSubmit&&l.inputValue===""&&(C.value=null,n("clear",!0))},U=()=>{L.value=!0,n("focus"),e.nextTick().then(()=>{var i;m.value.enabled&&m.value.selectOnFocus&&((i=M.value)==null||i.select())})},x=i=>{i.preventDefault(),qe(i,A.value,!0),m.value.enabled&&m.value.openMenu&&!c.value.input&&!l.isMenuOpen?n("open"):m.value.enabled||n("toggle")},E=()=>{n("real-blur"),L.value=!1,(!l.isMenuOpen||c.value.enabled&&c.value.input)&&n("blur"),l.autoApply&&m.value.enabled&&C.value&&!l.isMenuOpen&&(n("set-input-date",C.value),n("select-date"),C.value=null)},Q=i=>{qe(i,A.value,!0),n("clear")},d=i=>{if(!m.value.enabled){if(i.code==="Tab")return;i.preventDefault()}};return a({focusInput:()=>{var i;(i=M.value)==null||i.focus({preventScroll:!0})},setParsedDate:i=>{C.value=i}}),(i,S)=>{var F;return e.openBlock(),e.createElementBlock("div",{onClick:x},[i.$slots.trigger&&!i.$slots["dp-input"]&&!e.unref(c).enabled?e.renderSlot(i.$slots,"trigger",{key:0}):e.createCommentVNode("",!0),!i.$slots.trigger&&(!e.unref(c).enabled||e.unref(c).input)?(e.openBlock(),e.createElementBlock("div",Ql,[i.$slots["dp-input"]&&!i.$slots.trigger&&(!e.unref(c).enabled||e.unref(c).enabled&&e.unref(c).input)?e.renderSlot(i.$slots,"dp-input",{key:0,value:t.inputValue,isMenuOpen:t.isMenuOpen,onInput:H,onEnter:G,onTab:J,onClear:Q,onBlur:E,onKeypress:d,onPaste:$,openMenu:()=>i.$emit("open"),closeMenu:()=>i.$emit("close"),toggleMenu:()=>i.$emit("toggle")}):e.createCommentVNode("",!0),i.$slots["dp-input"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("input",{key:1,id:i.uid?`dp-input-${i.uid}`:void 0,ref_key:"inputRef",ref:M,name:i.name,class:e.normalizeClass(K.value),inputmode:e.unref(m).enabled?"text":"none",placeholder:i.placeholder,disabled:i.disabled,readonly:i.readonly,required:i.required,value:t.inputValue,autocomplete:i.autocomplete,"aria-label":(F=e.unref(s))==null?void 0:F.input,"aria-disabled":i.disabled||void 0,"aria-invalid":i.state===!1?!0:void 0,onInput:H,onKeydown:[e.withKeys(G,["enter"]),e.withKeys(J,["tab"]),d],onBlur:E,onFocus:U,onKeypress:d,onPaste:$},null,42,Jl)),e.createElementVNode("div",{onClick:S[2]||(S[2]=X=>n("toggle"))},[i.$slots["input-icon"]&&!i.hideInputIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:S[0]||(S[0]=X=>n("toggle"))},[e.renderSlot(i.$slots,"input-icon")])):e.createCommentVNode("",!0),!i.$slots["input-icon"]&&!i.hideInputIcon&&!i.$slots["dp-input"]?(e.openBlock(),e.createBlock(e.unref(ut),{key:1,class:"dp__input_icon dp__input_icons",onClick:S[1]||(S[1]=X=>n("toggle"))})):e.createCommentVNode("",!0)]),i.$slots["clear-icon"]&&t.inputValue&&i.clearable&&!i.disabled&&!i.readonly?(e.openBlock(),e.createElementBlock("span",Xl,[e.renderSlot(i.$slots,"clear-icon",{clear:Q})])):e.createCommentVNode("",!0),i.clearable&&!i.$slots["clear-icon"]&&t.inputValue&&!i.disabled&&!i.readonly?(e.openBlock(),e.createBlock(e.unref(Aa),{key:3,class:"dp__clear_icon dp__input_icons",onClick:S[3]||(S[3]=e.withModifiers(X=>Q(X),["prevent"]))})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])}}}),Zl=["title"],en=["disabled"],tn=e.defineComponent({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...Te},emits:["close-picker","select-date","select-now","invalid-select"],setup(t,{emit:a}){const u=a,n=t,{defaultedActionRow:l,defaultedPreviewFormat:m,defaultedMultiCalendars:s,defaultedTextInput:c,defaultedInline:A,defaultedRange:B,defaultedMultiDates:g,getDefaultPattern:p}=ve(n),{isTimeValid:k,isMonthValid:P}=je(n),{buildMatrix:C}=We(),M=e.ref(null),L=e.ref(null),W=e.ref(!1),K=e.ref({}),_=e.ref(null),N=e.ref(null);e.onMounted(()=>{n.arrowNavigation&&C([ke(M),ke(L)],"actionRow"),I(),window.addEventListener("resize",I)}),e.onUnmounted(()=>{window.removeEventListener("resize",I)});const I=()=>{W.value=!1,setTimeout(()=>{var d,i;const S=(d=_.value)==null?void 0:d.getBoundingClientRect(),F=(i=N.value)==null?void 0:i.getBoundingClientRect();S&&F&&(K.value.maxWidth=`${F.width-S.width-20}px`),W.value=!0},0)},$=e.computed(()=>B.value.enabled&&!B.value.partialRange&&n.internalModelValue?n.internalModelValue.length===2:!0),V=e.computed(()=>!k.value(n.internalModelValue)||!P.value(n.internalModelValue)||!$.value),H=()=>{const d=m.value;return n.timePicker||n.monthPicker,d(be(n.internalModelValue))},G=()=>{const d=n.internalModelValue;return s.value.count>0?`${J(d[0])} - ${J(d[1])}`:[J(d[0]),J(d[1])]},J=d=>Oa(d,m.value,n.formatLocale,c.value.rangeSeparator,n.modelAuto,p()),U=e.computed(()=>!n.internalModelValue||!n.menuMount?"":typeof m.value=="string"?Array.isArray(n.internalModelValue)?n.internalModelValue.length===2&&n.internalModelValue[1]?G():g.value.enabled?n.internalModelValue.map(d=>`${J(d)}`):n.modelAuto?`${J(n.internalModelValue[0])}`:`${J(n.internalModelValue[0])} -`:J(n.internalModelValue):H()),x=()=>g.value.enabled?"; ":" - ",E=e.computed(()=>Array.isArray(U.value)?U.value.join(x()):U.value),Q=()=>{k.value(n.internalModelValue)&&P.value(n.internalModelValue)&&$.value?u("select-date"):u("invalid-select")};return(d,i)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"actionRowRef",ref:N,class:"dp__action_row"},[d.$slots["action-row"]?e.renderSlot(d.$slots,"action-row",e.normalizeProps(e.mergeProps({key:0},{internalModelValue:d.internalModelValue,disabled:V.value,selectDate:()=>d.$emit("select-date"),closePicker:()=>d.$emit("close-picker")}))):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(l).showPreview?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dp__selection_preview",title:E.value,style:e.normalizeStyle(K.value)},[d.$slots["action-preview"]&&W.value?e.renderSlot(d.$slots,"action-preview",{key:0,value:d.internalModelValue}):e.createCommentVNode("",!0),!d.$slots["action-preview"]&&W.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(E.value),1)],64)):e.createCommentVNode("",!0)],12,Zl)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"actionBtnContainer",ref:_,class:"dp__action_buttons","data-dp-element":"action-row"},[d.$slots["action-buttons"]?e.renderSlot(d.$slots,"action-buttons",{key:0,value:d.internalModelValue}):e.createCommentVNode("",!0),d.$slots["action-buttons"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!e.unref(A).enabled&&e.unref(l).showCancel?(e.openBlock(),e.createElementBlock("button",{key:0,ref_key:"cancelButtonRef",ref:M,type:"button",class:"dp__action_button dp__action_cancel",onClick:i[0]||(i[0]=S=>d.$emit("close-picker")),onKeydown:[i[1]||(i[1]=e.withKeys(S=>d.$emit("close-picker"),["enter"])),i[2]||(i[2]=e.withKeys(S=>d.$emit("close-picker"),["space"]))]},e.toDisplayString(d.cancelText),545)):e.createCommentVNode("",!0),e.unref(l).showNow?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:i[3]||(i[3]=S=>d.$emit("select-now")),onKeydown:[i[4]||(i[4]=e.withKeys(S=>d.$emit("select-now"),["enter"])),i[5]||(i[5]=e.withKeys(S=>d.$emit("select-now"),["space"]))]},e.toDisplayString(d.nowButtonLabel),33)):e.createCommentVNode("",!0),e.unref(l).showSelect?(e.openBlock(),e.createElementBlock("button",{key:2,ref_key:"selectButtonRef",ref:L,type:"button",class:"dp__action_button dp__action_select",disabled:V.value,onKeydown:[e.withKeys(Q,["enter"]),e.withKeys(Q,["space"])],onClick:Q},e.toDisplayString(d.selectText),41,en)):e.createCommentVNode("",!0)],64))],512)],64))],512))}}),an=["onKeydown"],ln={class:"dp__selection_grid_header"},nn=["aria-selected","aria-disabled","onClick","onKeydown","onMouseover"],rn=["aria-label"],gt=e.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(t,{expose:a,emit:u}){const{setSelectionGrid:n,buildMultiLevelMatrix:l,setMonthPicker:m}=We(),s=u,c=t,{defaultedAriaLabels:A,defaultedTextInput:B,defaultedConfig:g}=ve(c),{hideNavigationButtons:p}=Bt(),k=e.ref(!1),P=e.ref(null),C=e.ref(null),M=e.ref([]),L=e.ref(),W=e.ref(null),K=e.ref(0),_=e.ref(null);e.onBeforeUpdate(()=>{P.value=null}),e.onMounted(()=>{e.nextTick().then(()=>U()),c.noOverlayFocus||I(),N(!0)}),e.onUnmounted(()=>N(!1));const N=z=>{var f;c.arrowNavigation&&((f=c.headerRefs)!=null&&f.length?m(z):n(z))},I=()=>{var z;const f=ke(C);f&&(B.value.enabled||(P.value?(z=P.value)==null||z.focus({preventScroll:!0}):f.focus({preventScroll:!0})),k.value=f.clientHeight<f.scrollHeight)},$=e.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!c.useRelative,"dp--overlay-relative":c.useRelative})),V=e.computed(()=>c.useRelative?{height:`${c.height}px`,width:"260px"}:void 0),H=e.computed(()=>({dp__overlay_col:!0})),G=e.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:k.value,dp__button_bottom:c.isLast})),J=e.computed(()=>{var z,f;return{dp__overlay_container:!0,dp__container_flex:((z=c.items)==null?void 0:z.length)<=6,dp__container_block:((f=c.items)==null?void 0:f.length)>6}});e.watch(()=>c.items,()=>U(!1),{deep:!0});const U=(z=!0)=>{e.nextTick().then(()=>{const f=ke(P),w=ke(C),r=ke(W),o=ke(_),b=r?r.getBoundingClientRect().height:0;w&&(w.getBoundingClientRect().height?K.value=w.getBoundingClientRect().height-b:K.value=g.value.modeHeight-b),f&&o&&z&&(o.scrollTop=f.offsetTop-o.offsetTop-(K.value/2-f.getBoundingClientRect().height)-b)})},x=z=>{z.disabled||s("selected",z.value)},E=()=>{s("toggle"),s("reset-flow")},Q=()=>{c.escClose&&E()},d=(z,f,w,r)=>{z&&((f.active||f.value===c.focusValue)&&(P.value=z),c.arrowNavigation&&(Array.isArray(M.value[w])?M.value[w][r]=z:M.value[w]=[z],i()))},i=()=>{var z,f;const w=(z=c.headerRefs)!=null&&z.length?[c.headerRefs].concat(M.value):M.value.concat([c.skipButtonRef?[]:[W.value]]);l(be(w),(f=c.headerRefs)!=null&&f.length?"monthPicker":"selectionGrid")},S=z=>{c.arrowNavigation||qe(z,g.value,!0)},F=z=>{L.value=z,s("hover-value",z)},X=()=>{if(E(),!c.isLast){const z=fl(c.menuWrapRef??null,"action-row");if(z){const f=Pa(z);f==null||f.focus()}}};return a({focusGrid:I}),(z,f)=>{var w;return e.openBlock(),e.createElementBlock("div",{ref_key:"gridWrapRef",ref:C,class:e.normalizeClass($.value),style:e.normalizeStyle(V.value),role:"dialog",tabindex:"0",onKeydown:[e.withKeys(e.withModifiers(Q,["prevent"]),["esc"]),f[0]||(f[0]=e.withKeys(e.withModifiers(r=>S(r),["prevent"]),["left"])),f[1]||(f[1]=e.withKeys(e.withModifiers(r=>S(r),["prevent"]),["up"])),f[2]||(f[2]=e.withKeys(e.withModifiers(r=>S(r),["prevent"]),["down"])),f[3]||(f[3]=e.withKeys(e.withModifiers(r=>S(r),["prevent"]),["right"]))]},[e.createElementVNode("div",{ref_key:"containerRef",ref:_,class:e.normalizeClass(J.value),role:"grid",style:e.normalizeStyle({height:`${K.value}px`})},[e.createElementVNode("div",ln,[e.renderSlot(z.$slots,"header")]),z.$slots.overlay?e.renderSlot(z.$slots,"overlay",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(z.items,(r,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:e.normalizeClass(["dp__overlay_row",{dp__flex_row:z.items.length>=3}]),role:"row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(b,T)=>(e.openBlock(),e.createElementBlock("div",{key:b.value,ref_for:!0,ref:ie=>d(ie,b,o,T),role:"gridcell",class:e.normalizeClass(H.value),"aria-selected":b.active||void 0,"aria-disabled":b.disabled||void 0,tabindex:"0",onClick:ie=>x(b),onKeydown:[e.withKeys(e.withModifiers(ie=>x(b),["prevent"]),["enter"]),e.withKeys(e.withModifiers(ie=>x(b),["prevent"]),["space"])],onMouseover:ie=>F(b.value)},[e.createElementVNode("div",{class:e.normalizeClass(b.className)},[z.$slots.item?e.renderSlot(z.$slots,"item",{key:0,item:b}):e.createCommentVNode("",!0),z.$slots.item?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(b.text),1)],64))],2)],42,nn))),128))],2))),128))],6),z.$slots["button-icon"]?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,ref_key:"toggleButton",ref:W,type:"button","aria-label":(w=e.unref(A))==null?void 0:w.toggleOverlay,class:e.normalizeClass(G.value),tabindex:"0",onClick:E,onKeydown:[e.withKeys(E,["enter"]),e.withKeys(X,["tab"])]},[e.renderSlot(z.$slots,"button-icon")],42,rn)),[[e.vShow,!e.unref(p)(z.hideNavigation,z.type)]]):e.createCommentVNode("",!0)],46,an)}}}),Dt=e.defineComponent({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(t){const a=t,u=e.computed(()=>a.multiCalendars>0?[...Array(a.multiCalendars).keys()]:[0]),n=e.computed(()=>({dp__instance_calendar:a.multiCalendars>0}));return(l,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({dp__menu_inner:!l.stretch,"dp--menu--inner-stretched":l.stretch,dp__flex_display:l.multiCalendars>0,"dp--flex-display-collapsed":l.collapse})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(s,c)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:e.normalizeClass(n.value)},[e.renderSlot(l.$slots,"default",{instance:s,index:c})],2))),128))],2))}}),on=["aria-label","aria-disabled"],ct=e.defineComponent({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:a}){const u=a,n=e.ref(null);return e.onMounted(()=>u("set-ref",n)),(l,m)=>(e.openBlock(),e.createElementBlock("button",{ref_key:"elRef",ref:n,type:"button",class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":l.ariaLabel,"aria-disabled":l.disabled||void 0,onClick:m[0]||(m[0]=s=>l.$emit("activate")),onKeydown:[m[1]||(m[1]=e.withKeys(e.withModifiers(s=>l.$emit("activate"),["prevent"]),["enter"])),m[2]||(m[2]=e.withKeys(e.withModifiers(s=>l.$emit("activate"),["prevent"]),["space"]))]},[e.createElementVNode("span",{class:e.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:l.disabled}])},[e.renderSlot(l.$slots,"default")],2)],40,on))}}),un={class:"dp--year-mode-picker"},sn=["aria-label"],La=e.defineComponent({__name:"YearModePicker",props:{...Te,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(t,{emit:a}){const u=a,n=t,{showRightIcon:l,showLeftIcon:m}=Bt(),{defaultedConfig:s,defaultedMultiCalendars:c,defaultedAriaLabels:A,defaultedTransitions:B}=ve(n),{showTransition:g,transitionName:p}=yt(B),k=(M=!1,L)=>{u("toggle-year-picker",{flow:M,show:L})},P=M=>{u("year-select",M)},C=(M=!1)=>{u("handle-year",M)};return(M,L)=>{var W,K,_;return e.openBlock(),e.createElementBlock("div",un,[e.unref(m)(e.unref(c),t.instance)?(e.openBlock(),e.createBlock(ct,{key:0,ref:"mpPrevIconRef","aria-label":(W=e.unref(A))==null?void 0:W.prevYear,disabled:t.isDisabled(!1),onActivate:L[0]||(L[0]=N=>C(!1))},{default:e.withCtx(()=>[M.$slots["arrow-left"]?e.renderSlot(M.$slots,"arrow-left",{key:0}):e.createCommentVNode("",!0),M.$slots["arrow-left"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(Xt),{key:1}))]),_:3},8,["aria-label","disabled"])):e.createCommentVNode("",!0),e.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":(K=e.unref(A))==null?void 0:K.openYearsOverlay,onClick:L[1]||(L[1]=()=>k(!1)),onKeydown:L[2]||(L[2]=e.withKeys(()=>k(!1),["enter"]))},[M.$slots.year?e.renderSlot(M.$slots,"year",{key:0,year:t.year}):e.createCommentVNode("",!0),M.$slots.year?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.year),1)],64))],40,sn),e.unref(l)(e.unref(c),t.instance)?(e.openBlock(),e.createBlock(ct,{key:1,ref:"mpNextIconRef","aria-label":(_=e.unref(A))==null?void 0:_.nextYear,disabled:t.isDisabled(!0),onActivate:L[3]||(L[3]=N=>C(!0))},{default:e.withCtx(()=>[M.$slots["arrow-right"]?e.renderSlot(M.$slots,"arrow-right",{key:0}):e.createCommentVNode("",!0),M.$slots["arrow-right"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(Ut),{key:1}))]),_:3},8,["aria-label","disabled"])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:e.unref(p)(t.showYearPicker),css:e.unref(g)},{default:e.withCtx(()=>[t.showYearPicker?(e.openBlock(),e.createBlock(gt,{key:0,items:t.items,"text-input":M.textInput,"esc-close":M.escClose,config:M.config,"is-last":M.autoApply&&!e.unref(s).keepActionRow,"hide-navigation":M.hideNavigation,"aria-labels":M.ariaLabels,type:"year",onToggle:k,onSelected:L[4]||(L[4]=N=>P(N))},e.createSlots({"button-icon":e.withCtx(()=>[M.$slots["calendar-icon"]?e.renderSlot(M.$slots,"calendar-icon",{key:0}):e.createCommentVNode("",!0),M.$slots["calendar-icon"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ut),{key:1}))]),_:2},[M.$slots["year-overlay-value"]?{name:"item",fn:e.withCtx(({item:N})=>[e.renderSlot(M.$slots,"year-overlay-value",{text:N.text,value:N.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels"])):e.createCommentVNode("",!0)]),_:3},8,["name","css"])])}}}),oa=(t,a,u)=>{if(a.value&&Array.isArray(a.value))if(a.value.some(n=>de(t,n))){const n=a.value.filter(l=>!de(l,t));a.value=n.length?n:null}else(u&&+u>a.value.length||!u)&&a.value.push(t);else a.value=[t]},ua=(t,a,u)=>{let n=t.value?t.value.slice():[];return n.length===2&&n[1]!==null&&(n=[]),n.length?fe(a,n[0])?(n.unshift(a),u("range-start",n[0]),u("range-start",n[1])):(n[1]=a,u("range-end",a)):(n=[a],u("range-start",a)),n},At=(t,a,u,n)=>{t&&(t[0]&&t[1]&&u&&a("auto-apply"),t[0]&&!t[1]&&n&&u&&a("auto-apply"))},Ha=t=>{Array.isArray(t.value)&&t.value.length<=2&&t.range?t.modelValue.value=t.value.map(a=>ze(R(a),t.timezone)):Array.isArray(t.value)||(t.modelValue.value=ze(R(t.value),t.timezone))},qa=(t,a,u,n)=>Array.isArray(a.value)&&(a.value.length===2||a.value.length===1&&n.value.partialRange)?n.value.fixedStart&&(he(t,a.value[0])||de(t,a.value[0]))?[a.value[0],t]:n.value.fixedEnd&&(fe(t,a.value[1])||de(t,a.value[1]))?[t,a.value[1]]:(u("invalid-fixed-range",t),a.value):[],Ka=({multiCalendars:t,highlight:a,propDates:u,calendars:n,modelValue:l,props:m,filters:s,year:c,month:A,emit:B})=>{const g=e.computed(()=>aa(m.yearRange,m.locale,m.reverseYears)),p=e.ref([!1]),k=e.computed(()=>($,V)=>{const H=me.set(Ae(new Date),{month:A.value($),year:c.value($)});return Ya(H,u.value.maxDate,u.value.minDate,m.preventMinMaxNavigation,V)}),P=()=>{for(let $=0;$<t.value.count;$++)if($===0)n.value[$]=n.value[0];else{const V=me.set(R(),n.value[$-1]);n.value[$]={month:se.getMonth(V),year:ue.getYear(Sa.addYears(V,1))}}},C=$=>{if(!$)return P();const V=me.set(R(),n.value[$]);return n.value[0].year=ue.getYear(Da.subYears(V,t.value.count-1)),P()},M=$=>m.focusStartDate?$[0]:$[1]?$[1]:$[0],L=()=>{if(l.value){const $=Array.isArray(l.value)?M(l.value):l.value;n.value[0]={month:se.getMonth($),year:ue.getYear($)}}};e.onMounted(()=>{L(),t.value.count&&P()});const W=($,V)=>{n.value[V].year=$,t.value.count&&!t.value.solo&&C(V)},K=e.computed(()=>$=>rt(g.value,V=>{var H;const G=c.value($)===V.value,J=ft(V.value,ot(u.value.minDate),ot(u.value.maxDate))||((H=s.value.years)==null?void 0:H.includes(c.value($))),U=ra(a.value,V.value);return{active:G,disabled:J,highlighted:U}})),_=($,V)=>{W($,V),I(V)},N=($,V=!1)=>{if(!k.value($,V)){const H=V?c.value($)+1:c.value($)-1;W(H,$)}},I=($,V=!1,H)=>{V||B("reset-flow"),H!==void 0?p.value[$]=H:p.value[$]=!p.value[$],p.value||B("overlay-closed")};return{isDisabled:k,groupedYears:K,showYearPicker:p,selectYear:W,toggleYearPicker:I,handleYearSelect:_,handleYear:N}},dn=(t,a)=>{const{defaultedMultiCalendars:u,defaultedAriaLabels:n,defaultedTransitions:l,defaultedConfig:m,defaultedRange:s,defaultedHighlight:c,propDates:A,defaultedTz:B,defaultedFilters:g,defaultedMultiDates:p}=ve(t),{modelValue:k,year:P,month:C,calendars:M}=ht(t,a),L=e.computed(()=>xa(t.formatLocale,t.locale,t.monthNameFormat)),W=e.ref(null),{checkMinMaxRange:K}=je(t),{selectYear:_,groupedYears:N,showYearPicker:I,toggleYearPicker:$,handleYearSelect:V,handleYear:H,isDisabled:G}=Ka({modelValue:k,multiCalendars:u,highlight:c,calendars:M,year:P,propDates:A,month:C,filters:g,props:t,emit:a});e.onMounted(()=>{t.startDate&&(k.value&&t.focusStartDate||!k.value)&&_(ue.getYear(R(t.startDate)),0)});const J=r=>r?{month:se.getMonth(r),year:ue.getYear(r)}:{month:null,year:null},U=()=>k.value?Array.isArray(k.value)?k.value.map(r=>J(r)):J(k.value):J(),x=(r,o)=>{const b=M.value[r],T=U();return Array.isArray(T)?T.some(ie=>ie.year===(b==null?void 0:b.year)&&ie.month===o):(b==null?void 0:b.year)===T.year&&o===T.month},E=(r,o,b)=>{var T,ie;const ce=U();return Array.isArray(ce)?P.value(o)===((T=ce[b])==null?void 0:T.year)&&r===((ie=ce[b])==null?void 0:ie.month):!1},Q=(r,o)=>{if(s.value.enabled){const b=U();if(Array.isArray(k.value)&&Array.isArray(b)){const T=E(r,o,0)||E(r,o,1),ie=Ie(Ae(R()),r,P.value(o));return Mt(k.value,W.value,ie)&&!T}return!1}return!1},d=e.computed(()=>r=>rt(L.value,o=>{var b;const T=x(r,o.value),ie=ft(o.value,Va(P.value(r),A.value.minDate),$a(P.value(r),A.value.maxDate))||Cl(A.value.disabledDates,P.value(r)).includes(o.value)||((b=g.value.months)==null?void 0:b.includes(o.value)),ce=Q(o.value,r),y=Ia(c.value,o.value,P.value(r));return{active:T,disabled:ie,isBetween:ce,highlighted:y}})),i=(r,o)=>Ie(Ae(R()),r,P.value(o)),S=(r,o)=>{const b=k.value?k.value:Ae(new Date);k.value=Ie(b,r,P.value(o)),a("auto-apply"),a("update-flow-step")},F=(r,o)=>{const b=i(r,o);s.value.fixedEnd||s.value.fixedStart?k.value=qa(b,k,a,s):k.value?K(b,k.value)&&(k.value=ua(k,i(r,o),a)):k.value=[i(r,o)],At(k.value,a,t.autoApply,t.modelAuto)},X=(r,o)=>{oa(i(r,o),k,p.value.limit),a("auto-apply",!0)},z=(r,o)=>(M.value[o].month=r,w(o,M.value[o].year,r),p.value.enabled?X(r,o):s.value.enabled?F(r,o):S(r,o)),f=(r,o)=>{_(r,o),w(o,r,null)},w=(r,o,b)=>{let T=b;if(!T&&T!==0){const ie=U();T=Array.isArray(ie)?ie[r].month:ie.month}a("update-month-year",{instance:r,year:o,month:T})};return{groupedMonths:d,groupedYears:N,year:P,isDisabled:G,defaultedMultiCalendars:u,defaultedAriaLabels:n,defaultedTransitions:l,defaultedConfig:m,showYearPicker:I,modelValue:k,presetDate:(r,o)=>{Ha({value:r,modelValue:k,range:s.value.enabled,timezone:o?void 0:B.value.timezone}),a("auto-apply")},setHoverDate:(r,o)=>{W.value=i(r,o)},selectMonth:z,selectYear:f,toggleYearPicker:$,handleYearSelect:V,handleYear:H,getModelMonthYear:U}},cn=e.defineComponent({compatConfig:{MODE:3},__name:"MonthPicker",props:{...Te},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range"],setup(t,{expose:a,emit:u}){const n=u,l=e.useSlots(),m=Me(l,"yearMode"),s=t;e.onMounted(()=>{s.shadow||n("mount",null)});const{groupedMonths:c,groupedYears:A,year:B,isDisabled:g,defaultedMultiCalendars:p,defaultedConfig:k,showYearPicker:P,modelValue:C,presetDate:M,setHoverDate:L,selectMonth:W,selectYear:K,toggleYearPicker:_,handleYearSelect:N,handleYear:I,getModelMonthYear:$}=dn(s,n);return a({getSidebarProps:()=>({modelValue:C,year:B,getModelMonthYear:$,selectMonth:W,selectYear:K,handleYear:I}),presetDate:M,toggleYearPicker:V=>_(0,V)}),(V,H)=>(e.openBlock(),e.createBlock(Dt,{"multi-calendars":e.unref(p).count,collapse:V.collapse,stretch:""},{default:e.withCtx(({instance:G})=>[V.$slots["month-year"]?e.renderSlot(V.$slots,"month-year",e.normalizeProps(e.mergeProps({key:0},{year:e.unref(B),months:e.unref(c)(G),years:e.unref(A)(G),selectMonth:e.unref(W),selectYear:e.unref(K),instance:G}))):(e.openBlock(),e.createBlock(gt,{key:1,items:e.unref(c)(G),"arrow-navigation":V.arrowNavigation,"is-last":V.autoApply&&!e.unref(k).keepActionRow,"esc-close":V.escClose,height:e.unref(k).modeHeight,config:V.config,"no-overlay-focus":!!(V.noOverlayFocus||V.textInput),"use-relative":"",type:"month",onSelected:J=>e.unref(W)(J,G),onHoverValue:J=>e.unref(L)(J,G)},{header:e.withCtx(()=>[e.createVNode(La,e.mergeProps(V.$props,{items:e.unref(A)(G),instance:G,"show-year-picker":e.unref(P)[G],year:e.unref(B)(G),"is-disabled":J=>e.unref(g)(G,J),onHandleYear:J=>e.unref(I)(G,J),onYearSelect:J=>e.unref(N)(J,G),onToggleYearPicker:J=>e.unref(_)(G,J==null?void 0:J.flow,J==null?void 0:J.show)}),e.createSlots({_:2},[e.renderList(e.unref(m),(J,U)=>({name:J,fn:e.withCtx(x=>[e.renderSlot(V.$slots,J,e.normalizeProps(e.guardReactiveProps(x)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),mn=(t,a)=>{const{modelValue:u}=ht(t,a),n=e.ref(null),{defaultedHighlight:l,defaultedMultiDates:m,defaultedFilters:s,defaultedRange:c,propDates:A}=ve(t),B=e.ref();e.onMounted(()=>{t.startDate&&(u.value&&t.focusStartDate||!u.value)&&(B.value=ue.getYear(R(t.startDate)))});const g=C=>Array.isArray(u.value)?u.value.some(M=>ue.getYear(M)===C):u.value?ue.getYear(u.value)===C:!1,p=C=>c.value.enabled&&Array.isArray(u.value)?Mt(u.value,n.value,P(C)):!1,k=e.computed(()=>rt(aa(t.yearRange,t.locale,t.reverseYears),C=>{const M=g(C.value),L=ft(C.value,ot(A.value.minDate),ot(A.value.maxDate))||s.value.years.includes(C.value),W=p(C.value)&&!M,K=ra(l.value,C.value);return{active:M,disabled:L,isBetween:W,highlighted:K}})),P=C=>Ve.setYear(Ae(new Date),C);return{groupedYears:k,modelValue:u,focusYear:B,setHoverValue:C=>{n.value=Ve.setYear(Ae(new Date),C)},selectYear:C=>{var M;if(a("update-month-year",{instance:0,year:C}),m.value.enabled)return u.value?Array.isArray(u.value)&&(((M=u.value)==null?void 0:M.map(L=>ue.getYear(L))).includes(C)?u.value=u.value.filter(L=>ue.getYear(L)!==C):u.value.push(Ve.setYear(Be(R()),C))):u.value=[Ve.setYear(Be(R()),C)],a("auto-apply",!0);if(c.value.enabled)return u.value=ua(u,P(C),a),At(u.value,a,t.autoApply,t.modelAuto);u.value=P(C),a("auto-apply")}}},pn=e.defineComponent({compatConfig:{MODE:3},__name:"YearPicker",props:{...Te},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(t,{expose:a,emit:u}){const n=u,l=t,{groupedYears:m,modelValue:s,focusYear:c,selectYear:A,setHoverValue:B}=mn(l,n),{defaultedConfig:g}=ve(l);return a({getSidebarProps:()=>({modelValue:s,selectYear:A})}),(p,k)=>(e.openBlock(),e.createElementBlock("div",null,[p.$slots["month-year"]?e.renderSlot(p.$slots,"month-year",e.normalizeProps(e.mergeProps({key:0},{years:e.unref(m),selectYear:e.unref(A)}))):(e.openBlock(),e.createBlock(gt,{key:1,items:e.unref(m),"is-last":p.autoApply&&!e.unref(g).keepActionRow,height:e.unref(g).modeHeight,config:p.config,"no-overlay-focus":!!(p.noOverlayFocus||p.textInput),"focus-value":e.unref(c),type:"year","use-relative":"",onSelected:e.unref(A),onHoverValue:e.unref(B)},e.createSlots({_:2},[p.$slots["year-overlay-value"]?{name:"item",fn:e.withCtx(({item:P})=>[e.renderSlot(p.$slots,"year-overlay-value",{text:P.text,value:P.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),vn={key:0,class:"dp__time_input"},fn=["aria-label","onKeydown","onClick"],yn=e.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),hn=e.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),gn=["aria-label","disabled","onKeydown","onClick"],kn=["aria-label","onKeydown","onClick"],wn=e.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),bn=e.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),_n={key:0},Cn=["aria-label","onKeydown"],Mn=e.defineComponent({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...Te},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","am-pm-change"],setup(t,{expose:a,emit:u}){const n=u,l=t,{setTimePickerElements:m,setTimePickerBackRef:s}=We(),{defaultedAriaLabels:c,defaultedTransitions:A,defaultedFilters:B,defaultedConfig:g,defaultedRange:p}=ve(l),{transitionName:k,showTransition:P}=yt(A),C=e.reactive({hours:!1,minutes:!1,seconds:!1}),M=e.ref("AM"),L=e.ref(null),W=e.ref([]);e.onMounted(()=>{n("mounted")});const K=y=>me.set(new Date,{hours:y.hours,minutes:y.minutes,seconds:l.enableSeconds?y.seconds:0,milliseconds:0}),_=e.computed(()=>y=>d(y,l[y])||I(y,l[y])),N=e.computed(()=>({hours:l.hours,minutes:l.minutes,seconds:l.seconds})),I=(y,D)=>p.value.enabled&&!p.value.disableTimeRangeValidation?!l.validateTime(y,D):!1,$=(y,D)=>{if(p.value.enabled&&!p.value.disableTimeRangeValidation){const ae=D?+l[`${y}Increment`]:-+l[`${y}Increment`],v=l[y]+ae;return!l.validateTime(y,v)}return!1},V=e.computed(()=>y=>!X(+l[y]+ +l[`${y}Increment`],y)||$(y,!0)),H=e.computed(()=>y=>!X(+l[y]-+l[`${y}Increment`],y)||$(y,!1)),G=(y,D)=>Ca.add(me.set(R(),y),D),J=(y,D)=>ul.sub(me.set(R(),y),D),U=e.computed(()=>({dp__time_col:!0,dp__time_col_block:!l.timePickerInline,dp__time_col_reg_block:!l.enableSeconds&&l.is24&&!l.timePickerInline,dp__time_col_reg_inline:!l.enableSeconds&&l.is24&&l.timePickerInline,dp__time_col_reg_with_button:!l.enableSeconds&&!l.is24,dp__time_col_sec:l.enableSeconds&&l.is24,dp__time_col_sec_with_button:l.enableSeconds&&!l.is24})),x=e.computed(()=>{const y=[{type:"hours"},{type:"",separator:!0},{type:"minutes"}];return l.enableSeconds?y.concat([{type:"",separator:!0},{type:"seconds"}]):y}),E=e.computed(()=>x.value.filter(y=>!y.separator)),Q=e.computed(()=>y=>{if(y==="hours"){const D=o(+l.hours);return{text:D<10?`0${D}`:`${D}`,value:D}}return{text:l[y]<10?`0${l[y]}`:`${l[y]}`,value:l[y]}}),d=(y,D)=>{var ae;if(!l.disabledTimesConfig)return!1;const v=l.disabledTimesConfig(l.order,y==="hours"?D:void 0);return v[y]?!!((ae=v[y])!=null&&ae.includes(D)):!0},i=y=>{const D=l.is24?24:12,ae=y==="hours"?D:60,v=+l[`${y}GridIncrement`],Y=y==="hours"&&!l.is24?v:0,te=[];for(let re=Y;re<ae;re+=v)te.push({value:re,text:re<10?`0${re}`:`${re}`});return y==="hours"&&!l.is24&&te.push({value:0,text:"12"}),rt(te,re=>({active:!1,disabled:B.value.times[y].includes(re.value)||!X(re.value,y)||d(y,re.value)||I(y,re.value)}))},S=y=>y>=0?y:59,F=y=>y>=0?y:23,X=(y,D)=>{const ae=l.minTime?K(Et(l.minTime)):null,v=l.maxTime?K(Et(l.maxTime)):null,Y=K(Et(N.value,D,D==="minutes"||D==="seconds"?S(y):F(y)));return ae&&v?(mt.isBefore(Y,v)||lt.isEqual(Y,v))&&(pt.isAfter(Y,ae)||lt.isEqual(Y,ae)):ae?pt.isAfter(Y,ae)||lt.isEqual(Y,ae):v?mt.isBefore(Y,v)||lt.isEqual(Y,v):!0},z=y=>l[`no${y[0].toUpperCase()+y.slice(1)}Overlay`],f=y=>{z(y)||(C[y]=!C[y],C[y]||n("overlay-closed"))},w=y=>y==="hours"?xe.getHours:y==="minutes"?Re.getMinutes:nt.getSeconds,r=(y,D=!0)=>{const ae=D?G:J,v=D?+l[`${y}Increment`]:-+l[`${y}Increment`];X(+l[y]+v,y)&&n(`update:${y}`,w(y)(ae({[y]:+l[y]},{[y]:+l[`${y}Increment`]})))},o=y=>l.is24?y:(y>=12?M.value="PM":M.value="AM",dl(y)),b=()=>{M.value==="PM"?(M.value="AM",n("update:hours",l.hours-12)):(M.value="PM",n("update:hours",l.hours+12)),n("am-pm-change",M.value)},T=y=>{C[y]=!0},ie=(y,D,ae)=>{if(y&&l.arrowNavigation){Array.isArray(W.value[D])?W.value[D][ae]=y:W.value[D]=[y];const v=W.value.reduce((Y,te)=>te.map((re,Z)=>[...Y[Z]||[],te[Z]]),[]);s(l.closeTimePickerBtn),L.value&&(v[1]=v[1].concat(L.value)),m(v,l.order)}},ce=(y,D)=>(f(y),y==="hours"&&!l.is24?n(`update:${y}`,M.value==="PM"?D+12:D):n(`update:${y}`,D));return a({openChildCmp:T}),(y,D)=>{var ae;return y.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(v,Y)=>{var te,re,Z;return e.openBlock(),e.createElementBlock("div",{key:Y,class:e.normalizeClass(U.value)},[v.separator?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" : ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("button",{ref_for:!0,ref:j=>ie(j,Y,0),type:"button",class:e.normalizeClass({dp__btn:!0,dp__inc_dec_button:!y.timePickerInline,dp__inc_dec_button_inline:y.timePickerInline,dp__tp_inline_btn_top:y.timePickerInline,dp__inc_dec_button_disabled:V.value(v.type)}),"aria-label":(te=e.unref(c))==null?void 0:te.incrementValue(v.type),tabindex:"0",onKeydown:[e.withKeys(e.withModifiers(j=>r(v.type),["prevent"]),["enter"]),e.withKeys(e.withModifiers(j=>r(v.type),["prevent"]),["space"])],onClick:j=>r(v.type)},[l.timePickerInline?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[yn,hn],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[y.$slots["arrow-up"]?e.renderSlot(y.$slots,"arrow-up",{key:0}):e.createCommentVNode("",!0),y.$slots["arrow-up"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ea),{key:1}))],64))],42,fn),e.createElementVNode("button",{ref_for:!0,ref:j=>ie(j,Y,1),type:"button","aria-label":(re=e.unref(c))==null?void 0:re.openTpOverlay(v.type),class:e.normalizeClass({dp__time_display:!0,dp__time_display_block:!y.timePickerInline,dp__time_display_inline:y.timePickerInline,"dp--time-invalid":_.value(v.type),"dp--time-overlay-btn":!_.value(v.type)}),disabled:z(v.type),tabindex:"0",onKeydown:[e.withKeys(e.withModifiers(j=>f(v.type),["prevent"]),["enter"]),e.withKeys(e.withModifiers(j=>f(v.type),["prevent"]),["space"])],onClick:j=>f(v.type)},[y.$slots[v.type]?e.renderSlot(y.$slots,v.type,{key:0,text:Q.value(v.type).text,value:Q.value(v.type).value}):e.createCommentVNode("",!0),y.$slots[v.type]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(Q.value(v.type).text),1)],64))],42,gn),e.createElementVNode("button",{ref_for:!0,ref:j=>ie(j,Y,2),type:"button",class:e.normalizeClass({dp__btn:!0,dp__inc_dec_button:!y.timePickerInline,dp__inc_dec_button_inline:y.timePickerInline,dp__tp_inline_btn_bottom:y.timePickerInline,dp__inc_dec_button_disabled:H.value(v.type)}),"aria-label":(Z=e.unref(c))==null?void 0:Z.decrementValue(v.type),tabindex:"0",onKeydown:[e.withKeys(e.withModifiers(j=>r(v.type,!1),["prevent"]),["enter"]),e.withKeys(e.withModifiers(j=>r(v.type,!1),["prevent"]),["space"])],onClick:j=>r(v.type,!1)},[l.timePickerInline?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[wn,bn],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[y.$slots["arrow-down"]?e.renderSlot(y.$slots,"arrow-down",{key:0}):e.createCommentVNode("",!0),y.$slots["arrow-down"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ta),{key:1}))],64))],42,kn)],64))],2)}),128)),y.is24?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",_n,[y.$slots["am-pm-button"]?e.renderSlot(y.$slots,"am-pm-button",{key:0,toggle:b,value:M.value}):e.createCommentVNode("",!0),y.$slots["am-pm-button"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,ref_key:"amPmButton",ref:L,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(ae=e.unref(c))==null?void 0:ae.amPmButton,tabindex:"0",onClick:b,onKeydown:[e.withKeys(e.withModifiers(b,["prevent"]),["enter"]),e.withKeys(e.withModifiers(b,["prevent"]),["space"])]},e.toDisplayString(M.value),41,Cn))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(v,Y)=>(e.openBlock(),e.createBlock(e.Transition,{key:Y,name:e.unref(k)(C[v.type]),css:e.unref(P)},{default:e.withCtx(()=>[C[v.type]?(e.openBlock(),e.createBlock(gt,{key:0,items:i(v.type),"is-last":y.autoApply&&!e.unref(g).keepActionRow,"esc-close":y.escClose,type:v.type,"text-input":y.textInput,config:y.config,"arrow-navigation":y.arrowNavigation,"aria-labels":y.ariaLabels,onSelected:te=>ce(v.type,te),onToggle:te=>f(v.type),onResetFlow:D[0]||(D[0]=te=>y.$emit("reset-flow"))},e.createSlots({"button-icon":e.withCtx(()=>[y.$slots["clock-icon"]?e.renderSlot(y.$slots,"clock-icon",{key:0}):e.createCommentVNode("",!0),y.$slots["clock-icon"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.timePickerInline?e.unref(ut):e.unref(Zt)),{key:1}))]),_:2},[y.$slots[`${v.type}-overlay-value`]?{name:"item",fn:e.withCtx(({item:te})=>[e.renderSlot(y.$slots,`${v.type}-overlay-value`,{text:te.text,value:te.value})]),key:"0"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","onSelected","onToggle"])):e.createCommentVNode("",!0)]),_:2},1032,["name","css"]))),128))]))}}}),Bn={class:"dp--tp-wrap"},Sn=["aria-label","tabindex"],Dn=["tabindex"],An=["aria-label"],Wa=e.defineComponent({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...Te},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(t,{expose:a,emit:u}){const n=u,l=t,{buildMatrix:m,setTimePicker:s}=We(),c=e.useSlots(),{defaultedTransitions:A,defaultedAriaLabels:B,defaultedTextInput:g,defaultedConfig:p,defaultedRange:k}=ve(l),{transitionName:P,showTransition:C}=yt(A),{hideNavigationButtons:M}=Bt(),L=e.ref(null),W=e.ref(null),K=e.ref([]),_=e.ref(null);e.onMounted(()=>{n("mount"),!l.timePicker&&l.arrowNavigation?m([ke(L.value)],"time"):s(!0,l.timePicker)});const N=e.computed(()=>k.value.enabled&&l.modelAuto?Ta(l.internalModelValue):!0),I=e.ref(!1),$=i=>({hours:Array.isArray(l.hours)?l.hours[i]:l.hours,minutes:Array.isArray(l.minutes)?l.minutes[i]:l.minutes,seconds:Array.isArray(l.seconds)?l.seconds[i]:l.seconds}),V=e.computed(()=>{const i=[];if(k.value.enabled)for(let S=0;S<2;S++)i.push($(S));else i.push($(0));return i}),H=(i,S=!1,F="")=>{S||n("reset-flow"),I.value=i,n(i?"overlay-opened":"overlay-closed"),l.arrowNavigation&&s(i),e.nextTick(()=>{F!==""&&K.value[0]&&K.value[0].openChildCmp(F)})},G=e.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:l.autoApply&&!p.value.keepActionRow})),J=Me(c,"timePicker"),U=(i,S,F)=>k.value.enabled?S===0?[i,V.value[1][F]]:[V.value[0][F],i]:i,x=i=>{n("update:hours",i)},E=i=>{n("update:minutes",i)},Q=i=>{n("update:seconds",i)},d=()=>{if(_.value&&!g.value.enabled&&!l.noOverlayFocus){const i=Pa(_.value);i&&i.focus({preventScroll:!0})}};return a({toggleTimePicker:H}),(i,S)=>{var F;return e.openBlock(),e.createElementBlock("div",Bn,[!i.timePicker&&!i.timePickerInline?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,ref_key:"openTimePickerBtn",ref:L,type:"button",class:e.normalizeClass(G.value),"aria-label":(F=e.unref(B))==null?void 0:F.openTimePicker,tabindex:i.noOverlayFocus?void 0:0,onKeydown:[S[0]||(S[0]=e.withKeys(X=>H(!0),["enter"])),S[1]||(S[1]=e.withKeys(X=>H(!0),["space"]))],onClick:S[2]||(S[2]=X=>H(!0))},[i.$slots["clock-icon"]?e.renderSlot(i.$slots,"clock-icon",{key:0}):e.createCommentVNode("",!0),i.$slots["clock-icon"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(Zt),{key:1}))],42,Sn)),[[e.vShow,!e.unref(M)(i.hideNavigation,"time")]]):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:e.unref(P)(I.value),css:e.unref(C)&&!i.timePickerInline},{default:e.withCtx(()=>{var X;return[I.value||i.timePicker||i.timePickerInline?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:_,class:e.normalizeClass({dp__overlay:!i.timePickerInline,"dp--overlay-absolute":!l.timePicker&&!i.timePickerInline,"dp--overlay-relative":l.timePicker}),style:e.normalizeStyle(i.timePicker?{height:`${e.unref(p).modeHeight}px`}:void 0),tabindex:i.timePickerInline?void 0:0},[e.createElementVNode("div",{class:e.normalizeClass(i.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[i.$slots["time-picker-overlay"]?e.renderSlot(i.$slots,"time-picker-overlay",{key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:x,setMinutes:E,setSeconds:Q}):e.createCommentVNode("",!0),i.$slots["time-picker-overlay"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(i.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(z,f)=>e.withDirectives((e.openBlock(),e.createBlock(Mn,e.mergeProps({key:f},{...i.$props,order:f,hours:z.hours,minutes:z.minutes,seconds:z.seconds,closeTimePickerBtn:W.value,disabledTimesConfig:t.disabledTimesConfig,disabled:f===0?i.fixedStart:i.fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:K,"validate-time":(w,r)=>t.validateTime(w,U(r,f,w)),"onUpdate:hours":w=>x(U(w,f,"hours")),"onUpdate:minutes":w=>E(U(w,f,"minutes")),"onUpdate:seconds":w=>Q(U(w,f,"seconds")),onMounted:d,onOverlayClosed:d,onAmPmChange:S[3]||(S[3]=w=>i.$emit("am-pm-change",w))}),e.createSlots({_:2},[e.renderList(e.unref(J),(w,r)=>({name:w,fn:e.withCtx(o=>[e.renderSlot(i.$slots,w,e.normalizeProps(e.guardReactiveProps(o)))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[e.vShow,f===0?!0:N.value]])),128))],2)),!i.timePicker&&!i.timePickerInline?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:2,ref_key:"closeTimePickerBtn",ref:W,type:"button",class:e.normalizeClass(G.value),"aria-label":(X=e.unref(B))==null?void 0:X.closeTimePicker,tabindex:"0",onKeydown:[S[4]||(S[4]=e.withKeys(z=>H(!1),["enter"])),S[5]||(S[5]=e.withKeys(z=>H(!1),["space"]))],onClick:S[6]||(S[6]=z=>H(!1))},[i.$slots["calendar-icon"]?e.renderSlot(i.$slots,"calendar-icon",{key:0}):e.createCommentVNode("",!0),i.$slots["calendar-icon"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ut),{key:1}))],42,An)),[[e.vShow,!e.unref(M)(i.hideNavigation,"time")]]):e.createCommentVNode("",!0)],2)],14,Dn)):e.createCommentVNode("",!0)]}),_:3},8,["name","css"])])}}}),ja=(t,a,u,n)=>{const{defaultedRange:l}=ve(t),m=(_,N)=>Array.isArray(a[_])?a[_][N]:a[_],s=_=>t.enableSeconds?Array.isArray(a.seconds)?a.seconds[_]:a.seconds:0,c=(_,N)=>_?N!==void 0?Ke(_,m("hours",N),m("minutes",N),s(N)):Ke(_,a.hours,a.minutes,s()):Qt.setSeconds(R(),s(N)),A=(_,N)=>{a[_]=N},B=e.computed(()=>t.modelAuto&&l.value.enabled?Array.isArray(u.value)?u.value.length>1:!1:l.value.enabled),g=(_,N)=>{const I=Object.fromEntries(Object.keys(a).map($=>$===_?[$,N]:[$,a[$]].slice()));if(B.value&&!l.value.disableTimeRangeValidation){const $=H=>u.value?Ke(u.value[H],I.hours[H],I.minutes[H],I.seconds[H]):null,V=H=>Jt.setMilliseconds(u.value[H],0);return!(de($(0),$(1))&&(pt.isAfter($(0),V(1))||mt.isBefore($(1),V(0))))}return!0},p=(_,N)=>{g(_,N)&&(A(_,N),n&&n())},k=_=>{p("hours",_)},P=_=>{p("minutes",_)},C=_=>{p("seconds",_)},M=(_,N,I,$)=>{N&&k(_),!N&&!I&&P(_),I&&C(_),u.value&&$(u.value)},L=_=>{if(_){const N=Array.isArray(_),I=N?[+_[0].hours,+_[1].hours]:+_.hours,$=N?[+_[0].minutes,+_[1].minutes]:+_.minutes,V=N?[+_[0].seconds,+_[1].seconds]:+_.seconds;A("hours",I),A("minutes",$),t.enableSeconds&&A("seconds",V)}},W=(_,N)=>{const I={hours:Array.isArray(a.hours)?a.hours[_]:a.hours,disabledArr:[]};return(N||N===0)&&(I.hours=N),Array.isArray(t.disabledTimes)&&(I.disabledArr=l.value.enabled&&Array.isArray(t.disabledTimes[_])?t.disabledTimes[_]:t.disabledTimes),I},K=e.computed(()=>(_,N)=>{var I;if(Array.isArray(t.disabledTimes)){const{disabledArr:$,hours:V}=W(_,N),H=$.filter(G=>+G.hours===V);return((I=H[0])==null?void 0:I.minutes)==="*"?{hours:[V],minutes:void 0,seconds:void 0}:{hours:[],minutes:(H==null?void 0:H.map(G=>+G.minutes))??[],seconds:(H==null?void 0:H.map(G=>G.seconds?+G.seconds:void 0))??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:A,updateHours:k,updateMinutes:P,updateSeconds:C,getSetDateTime:c,updateTimeValues:M,getSecondsValue:s,assignStartTime:L,validateTime:g,disabledTimesConfig:K}},xn=(t,a)=>{const{modelValue:u,time:n}=ht(t,a),{defaultedStartTime:l,defaultedRange:m}=ve(t),{updateTimeValues:s,getSetDateTime:c,setTime:A,assignStartTime:B,disabledTimesConfig:g,validateTime:p}=ja(t,n,u),k=_=>{const{hours:N,minutes:I,seconds:$}=_;return{hours:+N,minutes:+I,seconds:$?+$:0}},P=()=>{if(t.startTime){if(Array.isArray(t.startTime)){const N=k(t.startTime[0]),I=k(t.startTime[1]);return[me.set(R(),N),me.set(R(),I)]}const _=k(t.startTime);return me.set(R(),_)}return m.value.enabled?[null,null]:null},C=()=>{if(m.value.enabled){const[_,N]=P();u.value=[c(_,0),c(N,1)]}else u.value=c(P())},M=_=>Array.isArray(_)?[Ze(R(_[0])),Ze(R(_[1]))]:[Ze(_??R())],L=(_,N,I)=>{A("hours",_),A("minutes",N),A("seconds",t.enableSeconds?I:0)},W=()=>{const[_,N]=M(u.value);return m.value.enabled?L([_.hours,N.hours],[_.minutes,N.minutes],[_.seconds,N.seconds]):L(_.hours,_.minutes,_.seconds)};e.onMounted(()=>{if(!t.shadow)return B(l.value),u.value?W():C()});const K=()=>{Array.isArray(u.value)?u.value=u.value.map((_,N)=>_&&c(_,N)):u.value=c(u.value),a("time-update")};return{modelValue:u,time:n,disabledTimesConfig:g,updateTime:(_,N=!0,I=!1)=>{s(_,N,I,K)},validateTime:p}},Tn=e.defineComponent({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...Te},emits:["update:internal-model-value","time-update","am-pm-change"],setup(t,{expose:a,emit:u}){const n=u,l=t,m=e.useSlots(),s=Me(m,"timePicker"),{time:c,modelValue:A,disabledTimesConfig:B,updateTime:g,validateTime:p}=xn(l,n);return a({getSidebarProps:()=>({modelValue:A,time:c,updateTime:g})}),(k,P)=>(e.openBlock(),e.createBlock(Dt,{"multi-calendars":0,stretch:""},{default:e.withCtx(()=>[e.createVNode(Wa,e.mergeProps(k.$props,{hours:e.unref(c).hours,minutes:e.unref(c).minutes,seconds:e.unref(c).seconds,"internal-model-value":k.internalModelValue,"disabled-times-config":e.unref(B),"validate-time":e.unref(p),"onUpdate:hours":P[0]||(P[0]=C=>e.unref(g)(C)),"onUpdate:minutes":P[1]||(P[1]=C=>e.unref(g)(C,!1)),"onUpdate:seconds":P[2]||(P[2]=C=>e.unref(g)(C,!1,!0)),onAmPmChange:P[3]||(P[3]=C=>k.$emit("am-pm-change",C))}),e.createSlots({_:2},[e.renderList(e.unref(s),(C,M)=>({name:C,fn:e.withCtx(L=>[e.renderSlot(k.$slots,C,e.normalizeProps(e.guardReactiveProps(L)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),Pn={class:"dp__month_year_row"},Nn=["aria-label","onClick","onKeydown"],Vn=e.defineComponent({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...Te},emits:["update-month-year","mount","reset-flow","overlay-closed"],setup(t,{expose:a,emit:u}){const n=u,l=t,{defaultedTransitions:m,defaultedAriaLabels:s,defaultedMultiCalendars:c,defaultedFilters:A,defaultedConfig:B,defaultedHighlight:g,propDates:p}=ve(l),{transitionName:k,showTransition:P}=yt(m),{buildMatrix:C}=We(),{handleMonthYearChange:M,isDisabled:L,updateMonthYear:W}=Hl(l,n),{showLeftIcon:K,showRightIcon:_}=Bt(),N=e.ref(!1),I=e.ref(!1),$=e.ref([null,null,null,null]);e.onMounted(()=>{n("mount")});const V=f=>({get:()=>l[f],set:w=>{const r=f===De.month?De.year:De.month;n("update-month-year",{[f]:w,[r]:l[r]}),f===De.month?d(!0):i(!0)}}),H=e.computed(V(De.month)),G=e.computed(V(De.year)),J=e.computed(()=>f=>({month:l.month,year:l.year,items:f===De.month?l.months:l.years,instance:l.instance,updateMonthYear:W,toggle:f===De.month?d:i})),U=e.computed(()=>l.months.find(w=>w.value===l.month)||{text:"",value:0}),x=e.computed(()=>rt(l.months,f=>{const w=l.month===f.value,r=ft(f.value,Va(l.year,p.value.minDate),$a(l.year,p.value.maxDate))||A.value.months.includes(f.value),o=Ia(g.value,f.value,l.year);return{active:w,disabled:r,highlighted:o}})),E=e.computed(()=>rt(l.years,f=>{const w=l.year===f.value,r=ft(f.value,ot(p.value.minDate),ot(p.value.maxDate))||A.value.years.includes(f.value),o=ra(g.value,f.value);return{active:w,disabled:r,highlighted:o}})),Q=(f,w)=>{w!==void 0?f.value=w:f.value=!f.value,f.value||n("overlay-closed")},d=(f=!1,w)=>{S(f),Q(N,w)},i=(f=!1,w)=>{S(f),Q(I,w)},S=f=>{f||n("reset-flow")},F=(f,w)=>{l.arrowNavigation&&($.value[w]=ke(f),C($.value,"monthYear"))},X=e.computed(()=>{var f,w;return[{type:De.month,index:1,toggle:d,modelValue:H.value,updateModelValue:r=>H.value=r,text:U.value.text,showSelectionGrid:N.value,items:x.value,ariaLabel:(f=s.value)==null?void 0:f.openMonthsOverlay},{type:De.year,index:2,toggle:i,modelValue:G.value,updateModelValue:r=>G.value=r,text:Na(l.year,l.locale),showSelectionGrid:I.value,items:E.value,ariaLabel:(w=s.value)==null?void 0:w.openYearsOverlay}]}),z=e.computed(()=>l.disableYearSelect?[X.value[0]]:l.yearFirst?[...X.value].reverse():X.value);return a({toggleMonthPicker:d,toggleYearPicker:i,handleMonthYearChange:M}),(f,w)=>{var r,o,b;return e.openBlock(),e.createElementBlock("div",Pn,[f.$slots["month-year"]?e.renderSlot(f.$slots,"month-year",e.normalizeProps(e.mergeProps({key:0},{month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:e.unref(W),handleMonthYearChange:e.unref(M),instance:t.instance}))):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(K)(e.unref(c),t.instance)&&!f.vertical?(e.openBlock(),e.createBlock(ct,{key:0,"aria-label":(r=e.unref(s))==null?void 0:r.prevMonth,disabled:e.unref(L)(!1),onActivate:w[0]||(w[0]=T=>e.unref(M)(!1,!0)),onSetRef:w[1]||(w[1]=T=>F(T,0))},{default:e.withCtx(()=>[f.$slots["arrow-left"]?e.renderSlot(f.$slots,"arrow-left",{key:0}):e.createCommentVNode("",!0),f.$slots["arrow-left"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(Xt),{key:1}))]),_:3},8,["aria-label","disabled"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:f.disableYearSelect}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,(T,ie)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:T.type},[e.createElementVNode("button",{ref_for:!0,ref:ce=>F(ce,ie+1),type:"button",class:"dp__btn dp__month_year_select",tabindex:"0","aria-label":T.ariaLabel,onClick:T.toggle,onKeydown:[e.withKeys(e.withModifiers(T.toggle,["prevent"]),["enter"]),e.withKeys(e.withModifiers(T.toggle,["prevent"]),["space"])]},[f.$slots[T.type]?e.renderSlot(f.$slots,T.type,{key:0,text:T.text,value:l[T.type]}):e.createCommentVNode("",!0),f.$slots[T.type]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(T.text),1)],64))],40,Nn),e.createVNode(e.Transition,{name:e.unref(k)(T.showSelectionGrid),css:e.unref(P)},{default:e.withCtx(()=>[T.showSelectionGrid?(e.openBlock(),e.createBlock(gt,{key:0,items:T.items,"arrow-navigation":f.arrowNavigation,"hide-navigation":f.hideNavigation,"is-last":f.autoApply&&!e.unref(B).keepActionRow,"skip-button-ref":!1,config:f.config,type:T.type,"header-refs":[],"esc-close":f.escClose,"menu-wrap-ref":f.menuWrapRef,"text-input":f.textInput,"aria-labels":f.ariaLabels,onSelected:T.updateModelValue,onToggle:T.toggle},e.createSlots({"button-icon":e.withCtx(()=>[f.$slots["calendar-icon"]?e.renderSlot(f.$slots,"calendar-icon",{key:0}):e.createCommentVNode("",!0),f.$slots["calendar-icon"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ut),{key:1}))]),_:2},[f.$slots[`${T.type}-overlay-value`]?{name:"item",fn:e.withCtx(({item:ce})=>[e.renderSlot(f.$slots,`${T.type}-overlay-value`,{text:ce.text,value:ce.value})]),key:"0"}:void 0,f.$slots[`${T.type}-overlay`]?{name:"overlay",fn:e.withCtx(()=>[e.renderSlot(f.$slots,`${T.type}-overlay`,e.normalizeProps(e.guardReactiveProps(J.value(T.type))))]),key:"1"}:void 0,f.$slots[`${T.type}-overlay-header`]?{name:"header",fn:e.withCtx(()=>[e.renderSlot(f.$slots,`${T.type}-overlay-header`,{toggle:T.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","onSelected","onToggle"])):e.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),e.unref(K)(e.unref(c),t.instance)&&f.vertical?(e.openBlock(),e.createBlock(ct,{key:1,"aria-label":(o=e.unref(s))==null?void 0:o.prevMonth,disabled:e.unref(L)(!1),onActivate:w[2]||(w[2]=T=>e.unref(M)(!1,!0))},{default:e.withCtx(()=>[f.$slots["arrow-up"]?e.renderSlot(f.$slots,"arrow-up",{key:0}):e.createCommentVNode("",!0),f.$slots["arrow-up"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ea),{key:1}))]),_:3},8,["aria-label","disabled"])):e.createCommentVNode("",!0),e.unref(_)(e.unref(c),t.instance)?(e.openBlock(),e.createBlock(ct,{key:2,ref:"rightIcon",disabled:e.unref(L)(!0),"aria-label":(b=e.unref(s))==null?void 0:b.nextMonth,onActivate:w[3]||(w[3]=T=>e.unref(M)(!0,!0)),onSetRef:w[4]||(w[4]=T=>F(T,f.disableYearSelect?2:3))},{default:e.withCtx(()=>[f.$slots[f.vertical?"arrow-down":"arrow-right"]?e.renderSlot(f.$slots,f.vertical?"arrow-down":"arrow-right",{key:0}):e.createCommentVNode("",!0),f.$slots[f.vertical?"arrow-down":"arrow-right"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.vertical?e.unref(ta):e.unref(Ut)),{key:1}))]),_:3},8,["disabled","aria-label"])):e.createCommentVNode("",!0)],64))])}}}),$n=["aria-label"],Rn={class:"dp__calendar_header",role:"row"},En={key:0,class:"dp__calendar_header_item",role:"gridcell"},Yn=["aria-label"],On=e.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1),In=["aria-label"],zn={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},Fn={class:"dp__cell_inner"},Ln=["id","aria-selected","aria-disabled","aria-label","onClick","onKeydown","onMouseenter","onMouseleave","onMousedown"],Hn=e.defineComponent({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...Te},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(t,{expose:a,emit:u}){const n=u,l=t,{buildMultiLevelMatrix:m}=We(),{defaultedTransitions:s,defaultedConfig:c,defaultedAriaLabels:A,defaultedMultiCalendars:B,defaultedWeekNumbers:g,defaultedMultiDates:p}=ve(l),k=e.ref(null),P=e.ref({bottom:"",left:"",transform:""}),C=e.ref([]),M=e.ref(null),L=e.ref(!0),W=e.ref(""),K=e.ref({startX:0,endX:0,startY:0,endY:0}),_=e.ref([]),N=e.ref({left:"50%"}),I=e.ref(!1),$=e.computed(()=>l.calendar?l.calendar(l.mappedDates):l.mappedDates),V=e.computed(()=>l.dayNames?Array.isArray(l.dayNames)?l.dayNames:l.dayNames(l.locale,+l.weekStart):sl(l.formatLocale,l.locale,+l.weekStart));e.onMounted(()=>{n("mount",{cmp:"calendar",refs:C}),c.value.noSwipe||M.value&&(M.value.addEventListener("touchstart",X,{passive:!1}),M.value.addEventListener("touchend",z,{passive:!1}),M.value.addEventListener("touchmove",f,{passive:!1})),l.monthChangeOnScroll&&M.value&&M.value.addEventListener("wheel",o,{passive:!1})});const H=D=>D?l.vertical?"vNext":"next":l.vertical?"vPrevious":"previous",G=(D,ae)=>{if(l.transitions){const v=Be(Ie(R(),l.month,l.year));W.value=he(Be(Ie(R(),D,ae)),v)?s.value[H(!0)]:s.value[H(!1)],L.value=!1,e.nextTick(()=>{L.value=!0})}},J=e.computed(()=>({[l.calendarClassName]:!!l.calendarClassName})),U=e.computed(()=>D=>{const ae=cl(D);return{dp__marker_dot:ae.type==="dot",dp__marker_line:ae.type==="line"}}),x=e.computed(()=>D=>de(D,k.value)),E=e.computed(()=>({dp__calendar:!0,dp__calendar_next:B.value.count>0&&l.instance!==0})),Q=e.computed(()=>D=>l.hideOffsetDates?D.current:!0),d=D=>$e.formatDate(D,"yyyy-MM-dd"),i=async(D,ae,v)=>{const Y=ke(C.value[ae][v]);if(Y){const{width:te,height:re}=Y.getBoundingClientRect();k.value=D.value;let Z={left:`${te/2}px`},j=-50;if(await e.nextTick(),_.value[0]){const{left:Ce,width:we}=_.value[0].getBoundingClientRect();Ce<0&&(Z={left:"0"},j=0,N.value.left=`${te/2}px`),window.innerWidth<Ce+we&&(Z={right:"0"},j=0,N.value.left=`${we-te/2}px`)}P.value={bottom:`${re}px`,...Z,transform:`translateX(${j}%)`},n("tooltip-open",D.marker)}},S=async(D,ae,v)=>{var Y,te;if(I.value&&p.value.enabled&&p.value.dragSelect)return n("select-date",D);n("set-hover-date",D),(te=(Y=D.marker)==null?void 0:Y.tooltip)!=null&&te.length&&await i(D,ae,v)},F=D=>{k.value&&(k.value=null,P.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),n("tooltip-close",D.marker))},X=D=>{K.value.startX=D.changedTouches[0].screenX,K.value.startY=D.changedTouches[0].screenY},z=D=>{K.value.endX=D.changedTouches[0].screenX,K.value.endY=D.changedTouches[0].screenY,w()},f=D=>{l.vertical&&!l.inline&&D.preventDefault()},w=()=>{const D=l.vertical?"Y":"X";Math.abs(K.value[`start${D}`]-K.value[`end${D}`])>10&&n("handle-swipe",K.value[`start${D}`]>K.value[`end${D}`]?"right":"left")},r=(D,ae,v)=>{D&&(Array.isArray(C.value[ae])?C.value[ae][v]=D:C.value[ae]=[D]),l.arrowNavigation&&m(C.value,"calendar")},o=D=>{l.monthChangeOnScroll&&(D.preventDefault(),n("handle-scroll",D))},b=D=>g.value.type==="local"?nl.getWeek(D.value,{weekStartsOn:+l.weekStart}):g.value.type==="iso"?rl.getISOWeek(D.value):typeof g.value.type=="function"?g.value.type(D.value):"",T=D=>{const ae=D[0];return g.value.hideOnOffsetDates?D.some(v=>v.current)?b(ae):"":b(ae)},ie=(D,ae)=>{p.value.enabled||(qe(D,c.value),n("select-date",ae))},ce=D=>{qe(D,c.value)},y=D=>{p.value.enabled&&p.value.dragSelect?(I.value=!0,n("select-date",D)):p.value.enabled&&n("select-date",D)};return a({triggerTransition:G}),(D,ae)=>{var v;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(E.value)},[e.createElementVNode("div",{ref_key:"calendarWrapRef",ref:M,role:"grid",class:e.normalizeClass(J.value),"aria-label":(v=e.unref(A))==null?void 0:v.calendarWrap},[e.createElementVNode("div",Rn,[D.weekNumbers?(e.openBlock(),e.createElementBlock("div",En,e.toDisplayString(D.weekNumName),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(Y,te)=>{var re,Z;return e.openBlock(),e.createElementBlock("div",{key:te,class:"dp__calendar_header_item",role:"gridcell","aria-label":(Z=(re=e.unref(A))==null?void 0:re.weekDay)==null?void 0:Z.call(re,te)},[D.$slots["calendar-header"]?e.renderSlot(D.$slots,"calendar-header",{key:0,day:Y,index:te}):e.createCommentVNode("",!0),D.$slots["calendar-header"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(Y),1)],64))],8,Yn)}),128))]),On,e.createVNode(e.Transition,{name:W.value,css:!!D.transitions},{default:e.withCtx(()=>{var Y;return[L.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup","aria-label":((Y=e.unref(A))==null?void 0:Y.calendarDays)||void 0,onMouseleave:ae[1]||(ae[1]=te=>I.value=!1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(te,re)=>(e.openBlock(),e.createElementBlock("div",{key:re,class:"dp__calendar_row",role:"row"},[D.weekNumbers?(e.openBlock(),e.createElementBlock("div",zn,[e.createElementVNode("div",Fn,e.toDisplayString(T(te.days)),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.days,(Z,j)=>{var Ce,we,Ee;return e.openBlock(),e.createElementBlock("div",{id:d(Z.value),ref_for:!0,ref:ge=>r(ge,re,j),key:j+re,role:"gridcell",class:"dp__calendar_item","aria-selected":(Z.classData.dp__active_date||Z.classData.dp__range_start||Z.classData.dp__range_start)??void 0,"aria-disabled":Z.classData.dp__cell_disabled||void 0,"aria-label":(we=(Ce=e.unref(A))==null?void 0:Ce.day)==null?void 0:we.call(Ce,Z),tabindex:"0",onClick:e.withModifiers(ge=>ie(ge,Z),["prevent"]),onKeydown:[e.withKeys(ge=>D.$emit("select-date",Z),["enter"]),e.withKeys(ge=>D.$emit("handle-space",Z),["space"])],onMouseenter:ge=>S(Z,re,j),onMouseleave:ge=>F(Z),onMousedown:ge=>y(Z),onMouseup:ae[0]||(ae[0]=ge=>I.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["dp__cell_inner",Z.classData])},[D.$slots.day&&Q.value(Z)?e.renderSlot(D.$slots,"day",{key:0,day:+Z.text,date:Z.value}):e.createCommentVNode("",!0),D.$slots.day?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(Z.text),1)],64)),Z.marker&&Q.value(Z)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[D.$slots.marker?e.renderSlot(D.$slots,"marker",{key:0,marker:Z.marker,day:+Z.text,date:Z.value}):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(U.value(Z.marker)),style:e.normalizeStyle(Z.marker.color?{backgroundColor:Z.marker.color}:{})},null,6))],64)):e.createCommentVNode("",!0),x.value(Z.value)?(e.openBlock(),e.createElementBlock("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:_,class:"dp__marker_tooltip",style:e.normalizeStyle(P.value)},[(Ee=Z.marker)!=null&&Ee.tooltip?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:ce},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.marker.tooltip,(ge,Ge)=>(e.openBlock(),e.createElementBlock("div",{key:Ge,class:"dp__tooltip_text"},[D.$slots["marker-tooltip"]?e.renderSlot(D.$slots,"marker-tooltip",{key:0,tooltip:ge,day:Z.value}):e.createCommentVNode("",!0),D.$slots["marker-tooltip"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"dp__tooltip_mark",style:e.normalizeStyle(ge.color?{backgroundColor:ge.color}:{})},null,4),e.createElementVNode("div",null,e.toDisplayString(ge.text),1)],64))]))),128)),e.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:e.normalizeStyle(N.value)},null,4)])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],2)],40,Ln)}),128))]))),128))],40,In)):e.createCommentVNode("",!0)]}),_:3},8,["name","css"])],10,$n)],2)}}}),ka=t=>Array.isArray(t),qn=(t,a,u,n)=>{const l=e.ref([]),m=e.ref(new Date),{modelValue:s,calendars:c,time:A}=ht(t,a),{defaultedMultiCalendars:B,defaultedStartTime:g,defaultedRange:p,defaultedTz:k,propDates:P,defaultedMultiDates:C}=ve(t),{validateMonthYearInRange:M,isDisabled:L,isDateRangeAllowed:W,checkMinMaxRange:K}=je(t),{updateTimeValues:_,getSetDateTime:N,setTime:I,assignStartTime:$,validateTime:V,disabledTimesConfig:H}=ja(t,A,s,n),G=e.computed(()=>h=>c.value[h]?c.value[h].month:0),J=e.computed(()=>h=>c.value[h]?c.value[h].year:0),U=(h,q,ee)=>{var oe,O;c.value[h]||(c.value[h]={month:0,year:0}),c.value[h].month=va(q)?(oe=c.value[h])==null?void 0:oe.month:q,c.value[h].year=va(ee)?(O=c.value[h])==null?void 0:O.year:ee},x=()=>{t.autoApply&&a("select-date")};e.watch(s,(h,q)=>{JSON.stringify(h)!==JSON.stringify(q)&&d()},{deep:!0}),e.onMounted(()=>{t.shadow||(s.value||(T(),g.value&&$(g.value)),d(!0),t.focusStartDate&&t.startDate&&T())});const E=e.computed(()=>{var h;return(h=t.flow)!=null&&h.length&&!t.partialFlow?t.flowStep===t.flow.length:!0}),Q=()=>{t.autoApply&&E.value&&a("auto-apply")},d=(h=!1)=>{if(s.value)return Array.isArray(s.value)?(l.value=s.value,w(h)):F(s.value,h);if(B.value.count&&h&&!t.startDate)return S(R(),h)},i=()=>Array.isArray(s.value)&&p.value.enabled?se.getMonth(s.value[0])===se.getMonth(s.value[1]??s.value[0]):!1,S=(h,q=!1)=>{if((!B.value.count||!B.value.static||q)&&U(0,se.getMonth(h),ue.getYear(h)),B.value.count&&(!B.value.solo||!s.value||i()))for(let ee=1;ee<B.value.count;ee++){const oe=me.set(R(),{month:G.value(ee-1),year:J.value(ee-1)}),O=Ca.add(oe,{months:1});c.value[ee]={month:se.getMonth(O),year:ue.getYear(O)}}},F=(h,q)=>{S(h),I("hours",xe.getHours(h)),I("minutes",Re.getMinutes(h)),I("seconds",nt.getSeconds(h)),B.value.count&&q&&b()},X=h=>{if(B.value.count){if(B.value.solo)return 0;const q=se.getMonth(h[0]),ee=se.getMonth(h[1]);return Math.abs(ee-q)<B.value.count?0:1}return 1},z=(h,q)=>{h[1]&&p.value.showLastInRange?S(h[X(h)],q):S(h[0],q);const ee=(oe,O)=>[oe(h[0]),h[1]?oe(h[1]):A[O][1]];I("hours",ee(xe.getHours,"hours")),I("minutes",ee(Re.getMinutes,"minutes")),I("seconds",ee(nt.getSeconds,"seconds"))},f=(h,q)=>{if((p.value.enabled||t.weekPicker)&&!C.value.enabled)return z(h,q);if(C.value.enabled&&q){const ee=h[h.length-1];return F(ee,q)}},w=h=>{const q=s.value;f(q,h),B.value.count&&B.value.solo&&b()},r=(h,q)=>{const ee=me.set(R(),{month:G.value(q),year:J.value(q)}),oe=h<0?Ue.addMonths(ee,1):vt.subMonths(ee,1);M(se.getMonth(oe),ue.getYear(oe),h<0,t.preventMinMaxNavigation)&&(U(q,se.getMonth(oe),ue.getYear(oe)),a("update-month-year",{instance:q,month:se.getMonth(oe),year:ue.getYear(oe)}),B.value.count&&!B.value.solo&&o(q),u())},o=h=>{for(let q=h-1;q>=0;q--){const ee=vt.subMonths(me.set(R(),{month:G.value(q+1),year:J.value(q+1)}),1);U(q,se.getMonth(ee),ue.getYear(ee))}for(let q=h+1;q<=B.value.count-1;q++){const ee=Ue.addMonths(me.set(R(),{month:G.value(q-1),year:J.value(q-1)}),1);U(q,se.getMonth(ee),ue.getYear(ee))}},b=()=>{if(Array.isArray(s.value)&&s.value.length===2){const h=R(R(s.value[1]?s.value[1]:Ue.addMonths(s.value[0],1))),[q,ee]=[se.getMonth(s.value[0]),ue.getYear(s.value[0])],[oe,O]=[se.getMonth(s.value[1]),ue.getYear(s.value[1])];(q!==oe||q===oe&&ee!==O)&&B.value.solo&&U(1,se.getMonth(h),ue.getYear(h))}else s.value&&!Array.isArray(s.value)&&(U(0,se.getMonth(s.value),ue.getYear(s.value)),S(R()))},T=()=>{t.startDate&&(U(0,se.getMonth(R(t.startDate)),ue.getYear(R(t.startDate))),B.value.count&&o(0))},ie=(h,q)=>{if(t.monthChangeOnScroll){const ee=new Date().getTime()-m.value.getTime(),oe=Math.abs(h.deltaY);let O=500;oe>1&&(O=100),oe>100&&(O=0),ee>O&&(m.value=new Date,r(t.monthChangeOnScroll!=="inverse"?-h.deltaY:h.deltaY,q))}},ce=(h,q,ee=!1)=>{t.monthChangeOnArrows&&t.vertical===ee&&y(h,q)},y=(h,q)=>{r(h==="right"?-1:1,q)},D=h=>{if(P.value.markers)return Ct(h.value,P.value.markers)},ae=(h,q)=>{switch(t.sixWeeks===!0?"append":t.sixWeeks){case"prepend":return[!0,!1];case"center":return[h==0,!0];case"fair":return[h==0||q>h,!0];case"append":return[!1,!1];default:return[!1,!1]}},v=(h,q,ee,oe)=>{if(t.sixWeeks&&h.length<6){const O=6-h.length,le=(q.getDay()+7-oe)%7,ne=6-(ee.getDay()+7-oe)%7,[Ye,Pe]=ae(le,ne);for(let Qe=1;Qe<=O;Qe++)if(Pe?!!(Qe%2)==Ye:Ye){const Fe=h[0].days[0],$t=Y(Xe.addDays(Fe.value,-7),se.getMonth(q));h.unshift({days:$t})}else{const Fe=h[h.length-1],$t=Fe.days[Fe.days.length-1],Ga=Y(Xe.addDays($t.value,1),se.getMonth(q));h.push({days:Ga})}}return h},Y=(h,q)=>{const ee=R(h),oe=[];for(let O=0;O<7;O++){const le=Xe.addDays(ee,O),ne=se.getMonth(le)!==q;oe.push({text:t.hideOffsetDates&&ne?"":le.getDate(),value:le,current:!ne,classData:{}})}return oe},te=(h,q)=>{const ee=[],oe=new Date(q,h),O=new Date(q,h+1,0),le=t.weekStart,ne=_a.startOfWeek(oe,{weekStartsOn:le}),Ye=Pe=>{const Qe=Y(Pe,h);if(ee.push({days:Qe}),!ee[ee.length-1].days.some(Fe=>de(Be(Fe.value),Be(O)))){const Fe=Xe.addDays(Pe,7);Ye(Fe)}};return Ye(ne),v(ee,oe,O,le)},re=h=>{const q=Ke(R(h.value),A.hours,A.minutes,Ge());a("date-update",q),C.value.enabled?oa(q,s,C.value.limit):s.value=q,n(),e.nextTick().then(()=>{Q()})},Z=h=>p.value.noDisabledRange?Ra(l.value[0],h).some(q=>L(q)):!1,j=()=>{l.value=s.value?s.value.slice():[],l.value.length===2&&!(p.value.fixedStart||p.value.fixedEnd)&&(l.value=[])},Ce=(h,q)=>{const ee=[R(h.value),Xe.addDays(R(h.value),+p.value.autoRange)];W(ee)?(q&&we(h.value),l.value=ee):a("invalid-date",h.value)},we=h=>{const q=se.getMonth(R(h)),ee=ue.getYear(R(h));if(U(0,q,ee),B.value.count>0)for(let oe=1;oe<B.value.count;oe++){const O=kl(me.set(R(h),{year:G.value(oe-1),month:J.value(oe-1)}));U(oe,O.month,O.year)}},Ee=h=>{if(Z(h.value)||!K(h.value,s.value,p.value.fixedStart?0:1))return a("invalid-date",h.value);l.value=qa(R(h.value),s,a,p)},ge=(h,q)=>{if(j(),p.value.autoRange)return Ce(h,q);if(p.value.fixedStart||p.value.fixedEnd)return Ee(h);l.value[0]?K(R(h.value),s.value)&&!Z(h.value)?fe(R(h.value),R(l.value[0]))?(l.value.unshift(R(h.value)),a("range-end",l.value[0])):(l.value[1]=R(h.value),a("range-end",l.value[1])):(t.autoApply&&a("auto-apply-invalid",h.value),a("invalid-date",h.value)):(l.value[0]=R(h.value),a("range-start",l.value[0]))},Ge=(h=!0)=>t.enableSeconds?Array.isArray(A.seconds)?h?A.seconds[0]:A.seconds[1]:A.seconds:0,it=h=>{l.value[h]=Ke(l.value[h],A.hours[h],A.minutes[h],Ge(h!==1))},st=()=>{var h,q;l.value[0]&&l.value[1]&&+((h=l.value)==null?void 0:h[0])>+((q=l.value)==null?void 0:q[1])&&(l.value.reverse(),a("range-start",l.value[0]),a("range-end",l.value[1]))},Se=()=>{l.value.length&&(l.value[0]&&!l.value[1]?it(0):(it(0),it(1),n()),st(),s.value=l.value.slice(),At(l.value,a,t.autoApply,t.modelAuto))},xt=(h,q=!1)=>{if(L(h.value)||!h.current&&t.hideOffsetDates)return a("invalid-date",h.value);if(!p.value.enabled)return re(h);ka(A.hours)&&ka(A.minutes)&&!C.value.enabled&&(ge(h,q),Se())},Tt=(h,q)=>{var ee;U(h,q.month,q.year),B.value.count&&!B.value.solo&&o(h),a("update-month-year",{instance:h,month:q.month,year:q.year}),u(B.value.solo?h:void 0);const oe=(ee=t.flow)!=null&&ee.length?t.flow[t.flowStep]:void 0;!q.fromNav&&(oe===Ne.month||oe===Ne.year)&&n()},kt=(h,q)=>{Ha({value:h,modelValue:s,range:p.value.enabled,timezone:q?void 0:k.value.timezone}),x(),t.multiCalendars&&e.nextTick().then(()=>d(!0))},Pt=()=>{p.value.enabled?s.value&&Array.isArray(s.value)&&s.value[0]?s.value=fe(R(),s.value[0])?[R(),s.value[0]]:[s.value[0],R()]:s.value=[R()]:s.value=R(),x()},Nt=()=>{if(Array.isArray(s.value))if(C.value.enabled){const h=Vt();s.value[s.value.length-1]=N(h)}else s.value=s.value.map((h,q)=>h&&N(h,q));else s.value=N(s.value);a("time-update")},Vt=()=>Array.isArray(s.value)&&s.value.length?s.value[s.value.length-1]:null;return{calendars:c,modelValue:s,month:G,year:J,time:A,disabledTimesConfig:H,validateTime:V,getCalendarDays:te,getMarker:D,handleScroll:ie,handleSwipe:y,handleArrow:ce,selectDate:xt,updateMonthYear:Tt,presetDate:kt,selectCurrentDate:Pt,updateTime:(h,q=!0,ee=!1)=>{_(h,q,ee,Nt)}}},Kn={key:0},Wn=e.defineComponent({__name:"DatePicker",props:{...Te},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date"],setup(t,{expose:a,emit:u}){const n=u,l=t,{calendars:m,month:s,year:c,modelValue:A,time:B,disabledTimesConfig:g,validateTime:p,getCalendarDays:k,getMarker:P,handleArrow:C,handleScroll:M,handleSwipe:L,selectDate:W,updateMonthYear:K,presetDate:_,selectCurrentDate:N,updateTime:I}=qn(l,n,X,z),$=e.useSlots(),{setHoverDate:V,getDayClassData:H,clearHoverDate:G}=jl(A,l),{defaultedMultiCalendars:J}=ve(l),U=e.ref([]),x=e.ref([]),E=e.ref(null),Q=Me($,"calendar"),d=Me($,"monthYear"),i=Me($,"timePicker"),S=w=>{l.shadow||n("mount",w)};e.watch(m,()=>{l.shadow||setTimeout(()=>{n("recalculate-position")},0)},{deep:!0});const F=e.computed(()=>w=>k(s.value(w),c.value(w)).map(r=>({...r,days:r.days.map(o=>(o.marker=P(o),o.classData=H(o),o))})));function X(w){var r;w||w===0?(r=x.value[w])==null||r.triggerTransition(s.value(w),c.value(w)):x.value.forEach((o,b)=>o.triggerTransition(s.value(b),c.value(b)))}function z(){n("update-flow-step")}const f=(w,r=!1)=>{W(w,r),l.spaceConfirm&&n("select-date")};return a({clearHoverDate:G,presetDate:_,selectCurrentDate:N,toggleMonthPicker:(w,r,o=0)=>{var b;(b=U.value[o])==null||b.toggleMonthPicker(w,r)},toggleYearPicker:(w,r,o=0)=>{var b;(b=U.value[o])==null||b.toggleYearPicker(w,r)},toggleTimePicker:(w,r,o)=>{var b;(b=E.value)==null||b.toggleTimePicker(w,r,o)},handleArrow:C,updateMonthYear:K,getSidebarProps:()=>({modelValue:A,month:s,year:c,time:B,updateTime:I,updateMonthYear:K,selectDate:W,presetDate:_})}),(w,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Dt,{"multi-calendars":e.unref(J).count,collapse:w.collapse},{default:e.withCtx(({instance:o,index:b})=>[w.disableMonthYearSelect?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Vn,e.mergeProps({key:0,ref:T=>{T&&(U.value[b]=T)},months:e.unref(xa)(w.formatLocale,w.locale,w.monthNameFormat),years:e.unref(aa)(w.yearRange,w.locale,w.reverseYears),month:e.unref(s)(o),year:e.unref(c)(o),instance:o},w.$props,{onMount:r[0]||(r[0]=T=>S(e.unref(et).header)),onResetFlow:r[1]||(r[1]=T=>w.$emit("reset-flow")),onUpdateMonthYear:T=>e.unref(K)(o,T),onOverlayClosed:r[2]||(r[2]=T=>w.$emit("focus-menu"))}),e.createSlots({_:2},[e.renderList(e.unref(d),(T,ie)=>({name:T,fn:e.withCtx(ce=>[e.renderSlot(w.$slots,T,e.normalizeProps(e.guardReactiveProps(ce)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),e.createVNode(Hn,e.mergeProps({ref:T=>{T&&(x.value[b]=T)},"mapped-dates":F.value(o),month:e.unref(s)(o),year:e.unref(c)(o),instance:o},w.$props,{onSelectDate:T=>e.unref(W)(T,o!==1),onHandleSpace:T=>f(T,o!==1),onSetHoverDate:r[3]||(r[3]=T=>e.unref(V)(T)),onHandleScroll:T=>e.unref(M)(T,o),onHandleSwipe:T=>e.unref(L)(T,o),onMount:r[4]||(r[4]=T=>S(e.unref(et).calendar)),onResetFlow:r[5]||(r[5]=T=>w.$emit("reset-flow")),onTooltipOpen:r[6]||(r[6]=T=>w.$emit("tooltip-open",T)),onTooltipClose:r[7]||(r[7]=T=>w.$emit("tooltip-close",T))}),e.createSlots({_:2},[e.renderList(e.unref(Q),(T,ie)=>({name:T,fn:e.withCtx(ce=>[e.renderSlot(w.$slots,T,e.normalizeProps(e.guardReactiveProps({...ce})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),w.enableTimePicker?(e.openBlock(),e.createElementBlock("div",Kn,[w.$slots["time-picker"]?e.renderSlot(w.$slots,"time-picker",e.normalizeProps(e.mergeProps({key:0},{time:e.unref(B),updateTime:e.unref(I)}))):(e.openBlock(),e.createBlock(Wa,e.mergeProps({key:1,ref_key:"timePickerRef",ref:E},w.$props,{hours:e.unref(B).hours,minutes:e.unref(B).minutes,seconds:e.unref(B).seconds,"internal-model-value":w.internalModelValue,"disabled-times-config":e.unref(g),"validate-time":e.unref(p),onMount:r[8]||(r[8]=o=>S(e.unref(et).timePicker)),"onUpdate:hours":r[9]||(r[9]=o=>e.unref(I)(o)),"onUpdate:minutes":r[10]||(r[10]=o=>e.unref(I)(o,!1)),"onUpdate:seconds":r[11]||(r[11]=o=>e.unref(I)(o,!1,!0)),onResetFlow:r[12]||(r[12]=o=>w.$emit("reset-flow")),onOverlayClosed:r[13]||(r[13]=o=>w.$emit("time-picker-close")),onOverlayOpened:r[14]||(r[14]=o=>w.$emit("time-picker-open",o)),onAmPmChange:r[15]||(r[15]=o=>w.$emit("am-pm-change",o))}),e.createSlots({_:2},[e.renderList(e.unref(i),(o,b)=>({name:o,fn:e.withCtx(T=>[e.renderSlot(w.$slots,o,e.normalizeProps(e.guardReactiveProps(T)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):e.createCommentVNode("",!0)],64))}}),jn=(t,a)=>{const u=e.ref(),{defaultedMultiCalendars:n,defaultedConfig:l,defaultedHighlight:m,defaultedRange:s,propDates:c,defaultedFilters:A,defaultedMultiDates:B}=ve(t),{modelValue:g,year:p,month:k,calendars:P}=ht(t,a),{isDisabled:C}=je(t),{selectYear:M,groupedYears:L,showYearPicker:W,isDisabled:K,toggleYearPicker:_,handleYearSelect:N,handleYear:I}=Ka({modelValue:g,multiCalendars:n,highlight:m,calendars:P,propDates:c,month:k,year:p,filters:A,props:t,emit:a}),$=(d,i)=>[d,i].map(S=>$e.formatDate(S,"MMMM",{locale:t.formatLocale})).join("-"),V=e.computed(()=>d=>g.value?Array.isArray(g.value)?g.value.some(i=>sa.isSameQuarter(d,i)):sa.isSameQuarter(g.value,d):!1),H=d=>{if(s.value.enabled){if(Array.isArray(g.value)){const i=de(d,g.value[0])||de(d,g.value[1]);return Mt(g.value,u.value,d)&&!i}return!1}return!1},G=(d,i)=>d.quarter===ca.getQuarter(i)&&d.year===ue.getYear(i),J=d=>typeof m.value=="function"?m.value({quarter:ca.getQuarter(d),year:ue.getYear(d)}):!!m.value.quarters.find(i=>G(i,d)),U=e.computed(()=>d=>{const i=me.set(new Date,{year:p.value(d)});return Za.eachQuarterOfInterval({start:el.startOfYear(i),end:tl.endOfYear(i)}).map(S=>{const F=al.startOfQuarter(S),X=da.endOfQuarter(S),z=C(S),f=H(F),w=J(F);return{text:$(F,X),value:F,active:V.value(F),highlighted:w,disabled:z,isBetween:f}})}),x=d=>{oa(d,g,B.value.limit),a("auto-apply",!0)},E=d=>{g.value=ua(g,d,a),At(g.value,a,t.autoApply,t.modelAuto)},Q=d=>{g.value=d,a("auto-apply")};return{defaultedConfig:l,defaultedMultiCalendars:n,groupedYears:L,year:p,isDisabled:K,quarters:U,showYearPicker:W,modelValue:g,setHoverDate:d=>{u.value=d},selectYear:M,selectQuarter:(d,i,S)=>{if(!S)return P.value[i].month=se.getMonth(da.endOfQuarter(d)),B.value.enabled?x(d):s.value.enabled?E(d):Q(d)},toggleYearPicker:_,handleYearSelect:N,handleYear:I}},Gn={class:"dp--quarter-items"},Qn=["disabled","onClick","onMouseover"],Jn=e.defineComponent({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...Te},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end"],setup(t,{expose:a,emit:u}){const n=u,l=t,m=e.useSlots(),s=Me(m,"yearMode"),{defaultedMultiCalendars:c,defaultedConfig:A,groupedYears:B,year:g,isDisabled:p,quarters:k,modelValue:P,showYearPicker:C,setHoverDate:M,selectQuarter:L,toggleYearPicker:W,handleYearSelect:K,handleYear:_}=jn(l,n);return a({getSidebarProps:()=>({modelValue:P,year:g,selectQuarter:L,handleYearSelect:K,handleYear:_})}),(N,I)=>(e.openBlock(),e.createBlock(Dt,{"multi-calendars":e.unref(c).count,collapse:N.collapse,stretch:""},{default:e.withCtx(({instance:$})=>[e.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:e.normalizeStyle({minHeight:`${e.unref(A).modeHeight}px`})},[e.createElementVNode("div",null,[e.createVNode(La,e.mergeProps(N.$props,{items:e.unref(B)($),instance:$,"show-year-picker":e.unref(C)[$],year:e.unref(g)($),"is-disabled":V=>e.unref(p)($,V),onHandleYear:V=>e.unref(_)($,V),onYearSelect:V=>e.unref(K)(V,$),onToggleYearPicker:V=>e.unref(W)($,V==null?void 0:V.flow,V==null?void 0:V.show)}),e.createSlots({_:2},[e.renderList(e.unref(s),(V,H)=>({name:V,fn:e.withCtx(G=>[e.renderSlot(N.$slots,V,e.normalizeProps(e.guardReactiveProps(G)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),e.createElementVNode("div",Gn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k)($),(V,H)=>(e.openBlock(),e.createElementBlock("div",{key:H},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":V.active,"dp--qr-btn-between":V.isBetween,"dp--qr-btn-disabled":V.disabled,"dp--highlighted":V.highlighted}]),disabled:V.disabled,onClick:G=>e.unref(L)(V.value,$,V.disabled),onMouseover:G=>e.unref(M)(V.value)},[N.$slots.quarter?e.renderSlot(N.$slots,"quarter",{key:0,value:V.value,text:V.text}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(V.text),1)],64))],42,Qn)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),Xn=["id","aria-label"],Un={key:0,class:"dp--menu-load-container"},Zn=e.createElementVNode("span",{class:"dp--menu-loader"},null,-1),er=[Zn],tr={key:0,class:"dp__sidebar_left"},ar=["onClick","onKeydown"],lr={key:2,class:"dp__sidebar_right"},nr={key:3,class:"dp__action_extra"},wa=e.defineComponent({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...St,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date"],setup(t,{expose:a,emit:u}){const n=u,l=t,m=e.ref(null),s=e.computed(()=>{const{openOnTop:v,...Y}=l;return{...Y,flowStep:H.value,collapse:l.collapse,noOverlayFocus:l.noOverlayFocus,menuWrapRef:m.value}}),{setMenuFocused:c,setShiftKey:A,control:B}=za(),g=e.useSlots(),{defaultedTextInput:p,defaultedInline:k,defaultedConfig:P}=ve(l),C=e.ref(null),M=e.ref(0),L=e.ref(null),W=e.ref(!1),K=e.ref(null);e.onMounted(()=>{if(!l.shadow){W.value=!0,_(),window.addEventListener("resize",_);const v=ke(m);if(v&&!p.value.enabled&&!k.value.enabled&&(c(!0),E()),v){const Y=te=>{P.value.allowPreventDefault&&te.preventDefault(),qe(te,P.value,!0)};v.addEventListener("pointerdown",Y),v.addEventListener("mousedown",Y)}}}),e.onUnmounted(()=>{window.removeEventListener("resize",_)});const _=()=>{const v=ke(L);v&&(M.value=v.getBoundingClientRect().width)},{arrowRight:N,arrowLeft:I,arrowDown:$,arrowUp:V}=We(),{flowStep:H,updateFlowStep:G,childMount:J,resetFlow:U}=Gl(l,n,K),x=e.computed(()=>l.monthPicker?cn:l.yearPicker?pn:l.timePicker?Tn:l.quarterPicker?Jn:Wn),E=()=>{const v=ke(m);v&&v.focus({preventScroll:!0})},Q=e.computed(()=>{var v;return((v=K.value)==null?void 0:v.getSidebarProps())||{}}),d=()=>{l.openOnTop&&n("recalculate-position")},i=Me(g,"action"),S=e.computed(()=>l.monthPicker||l.yearPicker?Me(g,"monthYear"):l.timePicker?Me(g,"timePicker"):Me(g,"shared")),F=e.computed(()=>l.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),X=e.computed(()=>({dp__menu_disabled:l.disabled,dp__menu_readonly:l.readonly,"dp-menu-loading":l.loading})),z=e.computed(()=>({dp__menu:!0,dp__menu_index:!k.value.enabled,dp__relative:k.value.enabled,[l.menuClassName]:!!l.menuClassName})),f=v=>{qe(v,P.value,!0)},w=()=>{l.escClose&&n("close-picker")},r=v=>{if(l.arrowNavigation){if(v==="up")return V();if(v==="down")return $();if(v==="left")return I();if(v==="right")return N()}else v==="left"||v==="up"?ce("handleArrow","left",0,v==="up"):ce("handleArrow","right",0,v==="down")},o=v=>{A(v.shiftKey),!l.disableMonthYearSelect&&v.code==="Tab"&&v.target.classList.contains("dp__menu")&&B.value.shiftKeyInMenu&&(v.preventDefault(),qe(v,P.value,!0),n("close-picker"))},b=()=>{E(),n("time-picker-close")},T=v=>{var Y,te,re;(Y=K.value)==null||Y.toggleTimePicker(!1,!1),(te=K.value)==null||te.toggleMonthPicker(!1,!1,v),(re=K.value)==null||re.toggleYearPicker(!1,!1,v)},ie=(v,Y=0)=>{var te,re,Z;return v==="month"?(te=K.value)==null?void 0:te.toggleMonthPicker(!1,!0,Y):v==="year"?(re=K.value)==null?void 0:re.toggleYearPicker(!1,!0,Y):v==="time"?(Z=K.value)==null?void 0:Z.toggleTimePicker(!0,!1):T(Y)},ce=(v,...Y)=>{var te,re;(te=K.value)!=null&&te[v]&&((re=K.value)==null||re[v](...Y))},y=()=>{ce("selectCurrentDate")},D=(v,Y)=>{ce("presetDate",v,Y)},ae=()=>{ce("clearHoverDate")};return a({updateMonthYear:(v,Y)=>{ce("updateMonthYear",v,Y)},switchView:ie}),(v,Y)=>{var te,re,Z;return e.openBlock(),e.createElementBlock("div",{id:v.uid?`dp-menu-${v.uid}`:void 0,ref_key:"dpMenuRef",ref:m,tabindex:"0",role:"dialog","aria-label":(te=v.ariaLabels)==null?void 0:te.menu,class:e.normalizeClass(z.value),onMouseleave:ae,onClick:f,onKeydown:[e.withKeys(w,["esc"]),Y[18]||(Y[18]=e.withKeys(e.withModifiers(j=>r("left"),["prevent"]),["left"])),Y[19]||(Y[19]=e.withKeys(e.withModifiers(j=>r("up"),["prevent"]),["up"])),Y[20]||(Y[20]=e.withKeys(e.withModifiers(j=>r("down"),["prevent"]),["down"])),Y[21]||(Y[21]=e.withKeys(e.withModifiers(j=>r("right"),["prevent"]),["right"])),o]},[(v.disabled||v.readonly)&&e.unref(k).enabled||v.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(X.value)},[v.loading?(e.openBlock(),e.createElementBlock("div",Un,er)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),!e.unref(k).enabled&&!v.teleportCenter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(F.value)},null,2)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"innerMenuRef",ref:L,class:e.normalizeClass({dp__menu_content_wrapper:((re=v.presetDates)==null?void 0:re.length)||!!v.$slots["left-sidebar"]||!!v.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":t.collapse&&((Z=v.presetDates)==null?void 0:Z.length)||!!v.$slots["left-sidebar"]||!!v.$slots["right-sidebar"]}),style:e.normalizeStyle({"--dp-menu-width":`${M.value}px`})},[v.$slots["left-sidebar"]?(e.openBlock(),e.createElementBlock("div",tr,[e.renderSlot(v.$slots,"left-sidebar",e.normalizeProps(e.guardReactiveProps(Q.value)))])):e.createCommentVNode("",!0),v.presetDates.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({"dp--preset-dates-collapsed":t.collapse,"dp--preset-dates":!0})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.presetDates,(j,Ce)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:Ce},[j.slot?e.renderSlot(v.$slots,j.slot,{key:0,presetDate:D,label:j.label,value:j.value}):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",style:e.normalizeStyle(j.style||{}),class:e.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":t.collapse}]),onClick:e.withModifiers(we=>D(j.value,j.noTz),["prevent"]),onKeydown:[e.withKeys(e.withModifiers(we=>D(j.value,j.noTz),["prevent"]),["enter"]),e.withKeys(e.withModifiers(we=>D(j.value,j.noTz),["prevent"]),["space"])]},e.toDisplayString(j.label),47,ar))],64))),128))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"calendarWrapperRef",ref:C,class:"dp__instance_calendar",role:"document"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.value),e.mergeProps({ref_key:"dynCmpRef",ref:K},s.value,{"flow-step":e.unref(H),onMount:e.unref(J),onUpdateFlowStep:e.unref(G),onResetFlow:e.unref(U),onFocusMenu:E,onSelectDate:Y[0]||(Y[0]=j=>v.$emit("select-date")),onDateUpdate:Y[1]||(Y[1]=j=>v.$emit("date-update",j)),onTooltipOpen:Y[2]||(Y[2]=j=>v.$emit("tooltip-open",j)),onTooltipClose:Y[3]||(Y[3]=j=>v.$emit("tooltip-close",j)),onAutoApply:Y[4]||(Y[4]=j=>v.$emit("auto-apply",j)),onRangeStart:Y[5]||(Y[5]=j=>v.$emit("range-start",j)),onRangeEnd:Y[6]||(Y[6]=j=>v.$emit("range-end",j)),onInvalidFixedRange:Y[7]||(Y[7]=j=>v.$emit("invalid-fixed-range",j)),onTimeUpdate:Y[8]||(Y[8]=j=>v.$emit("time-update")),onAmPmChange:Y[9]||(Y[9]=j=>v.$emit("am-pm-change",j)),onTimePickerOpen:Y[10]||(Y[10]=j=>v.$emit("time-picker-open",j)),onTimePickerClose:b,onRecalculatePosition:d,onUpdateMonthYear:Y[11]||(Y[11]=j=>v.$emit("update-month-year",j)),onAutoApplyInvalid:Y[12]||(Y[12]=j=>v.$emit("auto-apply-invalid",j)),onInvalidDate:Y[13]||(Y[13]=j=>v.$emit("invalid-date",j)),"onUpdate:internalModelValue":Y[14]||(Y[14]=j=>v.$emit("update:internal-model-value",j))}),e.createSlots({_:2},[e.renderList(S.value,(j,Ce)=>({name:j,fn:e.withCtx(we=>[e.renderSlot(v.$slots,j,e.normalizeProps(e.guardReactiveProps({...we})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),v.$slots["right-sidebar"]?(e.openBlock(),e.createElementBlock("div",lr,[e.renderSlot(v.$slots,"right-sidebar",e.normalizeProps(e.guardReactiveProps(Q.value)))])):e.createCommentVNode("",!0),v.$slots["action-extra"]?(e.openBlock(),e.createElementBlock("div",nr,[v.$slots["action-extra"]?e.renderSlot(v.$slots,"action-extra",{key:0,selectCurrentDate:y}):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6),!v.autoApply||e.unref(P).keepActionRow?(e.openBlock(),e.createBlock(tn,e.mergeProps({key:2,"menu-mount":W.value},s.value,{"calendar-width":M.value,onClosePicker:Y[15]||(Y[15]=j=>v.$emit("close-picker")),onSelectDate:Y[16]||(Y[16]=j=>v.$emit("select-date")),onInvalidSelect:Y[17]||(Y[17]=j=>v.$emit("invalid-select")),onSelectNow:y}),e.createSlots({_:2},[e.renderList(e.unref(i),(j,Ce)=>({name:j,fn:e.withCtx(we=>[e.renderSlot(v.$slots,j,e.normalizeProps(e.guardReactiveProps({...we})))])}))]),1040,["menu-mount","calendar-width"])):e.createCommentVNode("",!0)],42,Xn)}}}),rr=typeof window<"u"?window:void 0,Kt=()=>{},or=t=>e.getCurrentScope()?(e.onScopeDispose(t),!0):!1,ur=(t,a,u,n)=>{if(!t)return Kt;let l=Kt;const m=e.watch(()=>e.unref(t),c=>{l(),c&&(c.addEventListener(a,u,n),l=()=>{c.removeEventListener(a,u,n),l=Kt})},{immediate:!0,flush:"post"}),s=()=>{m(),l()};return or(s),s},ir=(t,a,u,n={})=>{const{window:l=rr,event:m="pointerdown"}=n;return l?ur(l,m,s=>{const c=ke(t),A=ke(a);!c||!A||c===s.target||s.composedPath().includes(c)||s.composedPath().includes(A)||u(s)},{passive:!0}):void 0},sr=e.defineComponent({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...St},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date"],setup(t,{expose:a,emit:u}){const n=u,l=t,m=e.useSlots(),s=e.ref(!1),c=e.toRef(l,"modelValue"),A=e.toRef(l,"timezone"),B=e.ref(null),g=e.ref(null),p=e.ref(null),k=e.ref(!1),P=e.ref(null),C=e.ref(!1),M=e.ref(!1),L=e.ref(!1),{setMenuFocused:W,setShiftKey:K}=za(),{clearArrowNav:_}=We(),{validateDate:N,isValidTime:I}=je(l),{defaultedTransitions:$,defaultedTextInput:V,defaultedInline:H,defaultedConfig:G,defaultedRange:J,defaultedMultiDates:U}=ve(l),{menuTransition:x,showTransition:E}=yt($);e.onMounted(()=>{o(l.modelValue),e.nextTick().then(()=>{if(!H.value.enabled){const O=z(P.value);O==null||O.addEventListener("scroll",Y),window==null||window.addEventListener("resize",te)}}),H.value.enabled&&(s.value=!0),window==null||window.addEventListener("keyup",re),window==null||window.addEventListener("keydown",Z)}),e.onUnmounted(()=>{if(!H.value.enabled){const O=z(P.value);O==null||O.removeEventListener("scroll",Y),window==null||window.removeEventListener("resize",te)}window==null||window.removeEventListener("keyup",re),window==null||window.removeEventListener("keydown",Z)});const Q=Me(m,"all",l.presetDates),d=Me(m,"input");e.watch([c,A],()=>{o(c.value)},{deep:!0});const{openOnTop:i,menuStyle:S,xCorrect:F,setMenuPosition:X,getScrollableParent:z,shadowRender:f}=ql({menuRef:B,menuRefInner:g,inputRef:p,pickerWrapperRef:P,inline:H,emit:n,props:l,slots:m}),{inputValue:w,internalModelValue:r,parseExternalModelValue:o,emitModelValue:b,formatInputValue:T,checkBeforeEmit:ie}=Ll(n,l,k),ce=e.computed(()=>({dp__main:!0,dp__theme_dark:l.dark,dp__theme_light:!l.dark,dp__flex_display:H.value.enabled,"dp--flex-display-collapsed":L.value,dp__flex_display_with_input:H.value.input})),y=e.computed(()=>l.dark?"dp__theme_dark":"dp__theme_light"),D=e.computed(()=>({to:typeof l.teleport=="boolean"?"body":l.teleport,disabled:!l.teleport||H.value.enabled})),ae=e.computed(()=>({class:"dp__outer_menu_wrap"})),v=e.computed(()=>H.value.enabled&&(l.timePicker||l.monthPicker||l.yearPicker||l.quarterPicker)),Y=()=>{s.value&&(G.value.closeOnScroll?Se():X())},te=()=>{var O;s.value&&X();const le=(O=g.value)==null?void 0:O.$el.getBoundingClientRect().width;L.value=document.body.offsetWidth<=le},re=O=>{O.key==="Tab"&&!H.value.enabled&&!l.teleport&&G.value.tabOutClosesMenu&&(P.value.contains(document.activeElement)||Se()),M.value=O.shiftKey},Z=O=>{M.value=O.shiftKey},j=()=>{!l.disabled&&!l.readonly&&(f(wa,l),X(!1),s.value=!0,s.value&&n("open"),s.value||st(),o(l.modelValue))},Ce=()=>{var O;w.value="",st(),(O=p.value)==null||O.setParsedDate(null),n("update:model-value",null),n("update:model-timezone-value",null),n("cleared"),G.value.closeOnClearValue&&Se()},we=()=>{const O=r.value;return!O||!Array.isArray(O)&&N(O)?!0:Array.isArray(O)?U.value.enabled||O.length===2&&N(O[0])&&N(O[1])?!0:J.value.partialRange&&!l.timePicker?N(O[0]):!1:!1},Ee=()=>{ie()&&we()?(b(),Se()):n("invalid-select",r.value)},ge=O=>{Ge(),b(),G.value.closeOnAutoApply&&!O&&Se()},Ge=()=>{p.value&&V.value.enabled&&p.value.setParsedDate(r.value)},it=(O=!1)=>{l.autoApply&&I(r.value)&&we()&&(J.value.enabled&&Array.isArray(r.value)?(J.value.partialRange||r.value.length===2)&&ge(O):ge(O))},st=()=>{V.value.enabled||(r.value=null)},Se=()=>{H.value.enabled||(s.value&&(s.value=!1,F.value=!1,W(!1),K(!1),_(),n("closed"),w.value&&o(c.value)),st(),n("blur"))},xt=(O,le,ne=!1)=>{if(!O){r.value=null;return}const Ye=Array.isArray(O)?!O.some(Qe=>!N(Qe)):N(O),Pe=I(O);Ye&&Pe&&(r.value=O,le&&(C.value=ne,Ee(),n("text-submit")))},Tt=()=>{l.autoApply&&I(r.value)&&b(),Ge()},kt=()=>s.value?Se():j(),Pt=O=>{r.value=O},Nt=()=>{V.value.enabled&&(k.value=!0,T()),n("focus")},Vt=()=>{if(V.value.enabled&&(k.value=!1,o(l.modelValue),C.value)){const O=vl(P.value,M.value);O==null||O.focus()}n("blur")},h=O=>{g.value&&g.value.updateMonthYear(0,{month:pa(O.month),year:pa(O.year)})},q=O=>{o(O??l.modelValue)},ee=(O,le)=>{var ne;(ne=g.value)==null||ne.switchView(O,le)},oe=O=>G.value.onClickOutside?G.value.onClickOutside(O):Se();return ir(B,p,()=>oe(we)),a({closeMenu:Se,selectDate:Ee,clearValue:Ce,openMenu:j,onScroll:Y,formatInputValue:T,updateInternalModelValue:Pt,setMonthYear:h,parseModel:q,switchView:ee,toggleMenu:kt}),(O,le)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"pickerWrapperRef",ref:P,class:e.normalizeClass(ce.value),"data-datepicker-instance":""},[e.createVNode(Ul,e.mergeProps({ref_key:"inputRef",ref:p,"input-value":e.unref(w),"onUpdate:inputValue":le[0]||(le[0]=ne=>e.isRef(w)?w.value=ne:null),"is-menu-open":s.value},O.$props,{onClear:Ce,onOpen:j,onSetInputDate:xt,onSetEmptyDate:e.unref(b),onSelectDate:Ee,onToggle:kt,onClose:Se,onFocus:Nt,onBlur:Vt,onRealBlur:le[1]||(le[1]=ne=>k.value=!1)}),e.createSlots({_:2},[e.renderList(e.unref(d),(ne,Ye)=>({name:ne,fn:e.withCtx(Pe=>[e.renderSlot(O.$slots,ne,e.normalizeProps(e.guardReactiveProps(Pe)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.teleport?e.Teleport:"div"),e.normalizeProps(e.guardReactiveProps(D.value)),{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:e.unref(x)(e.unref(i)),css:e.unref(E)&&!e.unref(H).enabled},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,ref_key:"dpWrapMenuRef",ref:B},ae.value,{class:{"dp--menu-wrapper":!e.unref(H).enabled},style:e.unref(H).enabled?void 0:e.unref(S)}),[e.createVNode(wa,e.mergeProps({ref_key:"dpMenuRef",ref:g},O.$props,{"internal-model-value":e.unref(r),"onUpdate:internalModelValue":le[2]||(le[2]=ne=>e.isRef(r)?r.value=ne:null),class:{[y.value]:!0,"dp--menu-wrapper":O.teleport},"open-on-top":e.unref(i),"no-overlay-focus":v.value,collapse:L.value,onClosePicker:Se,onSelectDate:Ee,onAutoApply:it,onTimeUpdate:Tt,onFlowStep:le[3]||(le[3]=ne=>O.$emit("flow-step",ne)),onUpdateMonthYear:le[4]||(le[4]=ne=>O.$emit("update-month-year",ne)),onInvalidSelect:le[5]||(le[5]=ne=>O.$emit("invalid-select",e.unref(r))),onAutoApplyInvalid:le[6]||(le[6]=ne=>O.$emit("invalid-select",ne)),onInvalidFixedRange:le[7]||(le[7]=ne=>O.$emit("invalid-fixed-range",ne)),onRecalculatePosition:e.unref(X),onTooltipOpen:le[8]||(le[8]=ne=>O.$emit("tooltip-open",ne)),onTooltipClose:le[9]||(le[9]=ne=>O.$emit("tooltip-close",ne)),onTimePickerOpen:le[10]||(le[10]=ne=>O.$emit("time-picker-open",ne)),onTimePickerClose:le[11]||(le[11]=ne=>O.$emit("time-picker-close",ne)),onAmPmChange:le[12]||(le[12]=ne=>O.$emit("am-pm-change",ne)),onRangeStart:le[13]||(le[13]=ne=>O.$emit("range-start",ne)),onRangeEnd:le[14]||(le[14]=ne=>O.$emit("range-end",ne)),onDateUpdate:le[15]||(le[15]=ne=>O.$emit("date-update",ne)),onInvalidDate:le[16]||(le[16]=ne=>O.$emit("invalid-date",ne))}),e.createSlots({_:2},[e.renderList(e.unref(Q),(ne,Ye)=>({name:ne,fn:e.withCtx(Pe=>[e.renderSlot(O.$slots,ne,e.normalizeProps(e.guardReactiveProps({...Pe})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","onRecalculatePosition"])],16)):e.createCommentVNode("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),ia=(()=>{const t=sr;return t.install=a=>{a.component("Vue3DatePicker",t)},t})(),dr=Object.freeze(Object.defineProperty({__proto__:null,default:ia},Symbol.toStringTag,{value:"Module"}));Object.entries(dr).forEach(([t,a])=>{t!=="default"&&(ia[t]=a)});exports.default=ia;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),ne=require("../../../date-fns/getYear.cjs"),se=require("../../../date-fns/getMonth.cjs"),el=require("../../../date-fns/getDay.cjs"),Sa=require("../../../date-fns/eachDayOfInterval.cjs"),tl=require("../../../date-fns/differenceInCalendarDays.cjs"),Zt=require("../../../date-fns/startOfWeek.cjs"),Da=require("../../../date-fns/endOfWeek.cjs"),Ae=require("../../../date-fns/format.cjs"),mt=require("../../../date-fns/isBefore.cjs"),et=require("../../../date-fns/isEqual.cjs"),tt=require("../../../date-fns/isAfter.cjs"),me=require("../../../date-fns/set.cjs"),Ct=require("../../../date-fns/isValid.cjs"),al=require("../../../date-fns/addHours.cjs"),$e=require("../../../date-fns/getHours.cjs"),Ee=require("../../../date-fns/getMinutes.cjs"),at=require("../../../date-fns/getSeconds.cjs"),Pe=require("../../../date-fns/setYear.cjs"),xa=require("../../../date-fns/add.cjs"),Ge=require("../../../date-fns/addMonths.cjs"),va=require("../../../date-fns/isSameQuarter.cjs"),ll=require("../../../date-fns/eachQuarterOfInterval.cjs"),nl=require("../../../date-fns/startOfYear.cjs"),rl=require("../../../date-fns/endOfYear.cjs"),ol=require("../../../date-fns/startOfQuarter.cjs"),fa=require("../../../date-fns/endOfQuarter.cjs"),Ta=require("../../../date-fns/setHours.cjs"),$a=require("../../../date-fns/setMinutes.cjs"),ea=require("../../../date-fns/setSeconds.cjs"),ta=require("../../../date-fns/setMilliseconds.cjs"),Jt=require("../../../date-fns/parse.cjs"),pt=require("../../../date-fns/subMonths.cjs"),ya=require("../../../date-fns/getQuarter.cjs"),il=require("../../../date-fns/setMonth.cjs"),Va=require("../../../date-fns/addYears.cjs"),ul=require("../../../date-fns/getWeek.cjs"),sl=require("../../../date-fns/getISOWeek.cjs"),We=require("../../../date-fns/addDays.cjs"),dl=require("../../../date-fns/isDate.cjs"),Na=require("../../../date-fns/subYears.cjs"),cl=require("../../../date-fns/sub.cjs");function rt(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),e.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),e.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),e.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}rt.compatConfig={MODE:3};function Pa(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),e.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Pa.compatConfig={MODE:3};function aa(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}aa.compatConfig={MODE:3};function la(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}la.compatConfig={MODE:3};function na(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),e.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}na.compatConfig={MODE:3};function ra(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}ra.compatConfig={MODE:3};function oa(){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[e.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}oa.compatConfig={MODE:3};const Re=(t,a)=>a?new Date(t.toLocaleString("en-US",{timeZone:a})):new Date(t),Aa=(t,a)=>Qt(t,a)||R(),ml=(t,a)=>a.dateInTz?Re(new Date(t),a.dateInTz):R(t),Qt=(t,a)=>{if(!t)return null;if(!a)return R(t);const o=R(t);return a.exactMatch?ml(t,a):Re(o,a.timezone)},pl=t=>{if(!t)return 0;const a=new Date,o=new Date(a.toLocaleString("en-US",{timeZone:"UTC"})),n=new Date(a.toLocaleString("en-US",{timeZone:t})),l=n.getTimezoneOffset()/60;return(+o-+n)/(1e3*60*60)-l};function ha(t){return a=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${a}T00:00:00+00:00`)).slice(0,2)}function vl(t){return a=>Ae.formatDate(new Date(`2017-01-0${a}T00:00:00+00:00`),"EEEEEE",{locale:t})}const fl=(t,a,o)=>{const n=[1,2,3,4,5,6,7];let l;if(t!==null)try{l=n.map(vl(t))}catch{l=n.map(ha(a))}else l=n.map(ha(a));const f=l.slice(0,o),v=l.slice(o+1,l.length);return[l[o]].concat(...v).concat(...f)},ia=(t,a,o)=>{const n=[];for(let l=+t[0];l<=+t[1];l++)n.push({value:+l,text:Oa(l,a)});return o?n.reverse():n},Ea=(t,a,o)=>{const n=[1,2,3,4,5,6,7,8,9,10,11,12].map(f=>{const v=f<10?`0${f}`:f;return new Date(`2017-${v}-01T00:00:00+00:00`)});if(t!==null)try{const f=o==="long"?"MMMM":"MMM";return n.map((v,u)=>{const $=Ae.formatDate(Re(v,"UTC"),f,{locale:t});return{text:$.charAt(0).toUpperCase()+$.substring(1),value:u}})}catch{}const l=new Intl.DateTimeFormat(a,{month:o,timeZone:"UTC"});return n.map((f,v)=>{const u=l.format(f);return{text:u.charAt(0).toUpperCase()+u.substring(1),value:v}})},yl=t=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][t],ke=t=>{const a=e.unref(t);return a!=null&&a.$el?a==null?void 0:a.$el:a},hl=t=>({type:"dot",...t??{}}),Ra=t=>Array.isArray(t)?!!t[0]&&!!t[1]:!1,ua={prop:t=>`"${t}" prop must be enabled!`,dateArr:t=>`You need to use array as "model-value" binding in order to support "${t}"`},we=t=>t,ga=t=>t===0?t:!t||isNaN(+t)?null:+t,ka=t=>t===null,Ya=t=>{if(t)return[...t.querySelectorAll("input, button, select, textarea, a[href]")][0]},gl=t=>{const a=[],o=n=>n.filter(l=>l);for(let n=0;n<t.length;n+=3){const l=[t[n],t[n+1],t[n+2]];a.push(o(l))}return a},vt=(t,a,o)=>{const n=o!=null,l=a!=null;if(!n&&!l)return!1;const f=+o,v=+a;return n&&l?+t>f||+t<v:n?+t>f:l?+t<v:!1},lt=(t,a)=>gl(t).map(o=>o.map(n=>{const{active:l,disabled:f,isBetween:v,highlighted:u}=a(n);return{...n,active:l,disabled:f,className:{dp__overlay_cell_active:l,dp__overlay_cell:!l,dp__overlay_cell_disabled:f,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:f&&l,dp__cell_in_between:v,"dp--highlighted":u}}})),Ke=(t,a,o=!1)=>{t&&a.allowStopPropagation&&(o&&t.stopImmediatePropagation(),t.stopPropagation())},kl=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function wl(t,a){let o=[...document.querySelectorAll(kl())];o=o.filter(l=>!t.contains(l)||l.hasAttribute("data-datepicker-instance"));const n=o.indexOf(t);if(n>=0&&(a?n-1>=0:n+1<=o.length))return o[n+(a?-1:1)]}const bl=(t,a)=>t==null?void 0:t.querySelector(`[data-dp-element="${a}"]`),Oa=(t,a)=>new Intl.NumberFormat(a,{useGrouping:!1,style:"decimal"}).format(t),sa=t=>Ae.formatDate(t,"dd-MM-yyyy"),Ft=t=>Array.isArray(t),Bt=(t,a)=>a.get(sa(t)),_l=(t,a)=>t?a?a instanceof Map?!!Bt(t,a):a(R(t)):!1:!0,wa=(t,a,o,n,l,f)=>{const v=Jt.parse(t,a.slice(0,t.length),new Date,{locale:f});return Ct.isValid(v)&&dl.isDate(v)?n||l?v:me.set(v,{hours:+o.hours,minutes:+(o==null?void 0:o.minutes),seconds:+(o==null?void 0:o.seconds),milliseconds:0}):null},Cl=(t,a,o,n,l,f)=>{const v=Array.isArray(o)?o[0]:o;if(typeof a=="string")return wa(t,a,v,n,l,f);if(Array.isArray(a)){let u=null;for(const $ of a)if(u=wa(t,$,v,n,l,f),u)break;return u}return typeof a=="function"?a(t):null},R=t=>t?new Date(t):new Date,Bl=(t,a,o)=>{if(a){const l=(t.getMonth()+1).toString().padStart(2,"0"),f=t.getDate().toString().padStart(2,"0"),v=t.getHours().toString().padStart(2,"0"),u=t.getMinutes().toString().padStart(2,"0"),$=o?t.getSeconds().toString().padStart(2,"0"):"00";return`${t.getFullYear()}-${l}-${f}T${v}:${u}:${$}.000Z`}const n=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds());return new Date(n).toISOString()},De=t=>{let a=R(JSON.parse(JSON.stringify(t)));return a=Ta.setHours(a,0),a=$a.setMinutes(a,0),a=ea.setSeconds(a,0),a=ta.setMilliseconds(a,0),a},qe=(t,a,o,n)=>{let l=t?R(t):R();return(a||a===0)&&(l=Ta.setHours(l,+a)),(o||o===0)&&(l=$a.setMinutes(l,+o)),(n||n===0)&&(l=ea.setSeconds(l,+n)),ta.setMilliseconds(l,0)},ye=(t,a)=>!t||!a?!1:mt.isBefore(De(t),De(a)),de=(t,a)=>!t||!a?!1:et.isEqual(De(t),De(a)),ge=(t,a)=>!t||!a?!1:tt.isAfter(De(t),De(a)),Mt=(t,a,o)=>t!=null&&t[0]&&t!=null&&t[1]?ge(o,t[0])&&ye(o,t[1]):t!=null&&t[0]&&a?ge(o,t[0])&&ye(o,a)||ye(o,t[0])&&ge(o,a):!1,Te=t=>{const a=me.set(new Date(t),{date:1});return De(a)},It=(t,a,o)=>a&&(o||o===0)?Object.fromEntries(["hours","minutes","seconds"].map(n=>n===a?[n,o]:[n,isNaN(+t[n])?void 0:+t[n]])):{hours:isNaN(+t.hours)?void 0:+t.hours,minutes:isNaN(+t.minutes)?void 0:+t.minutes,seconds:isNaN(+t.seconds)?void 0:+t.seconds},Je=t=>({hours:$e.getHours(t),minutes:Ee.getMinutes(t),seconds:at.getSeconds(t)}),Fa=(t,a)=>{if(a){const o=ne.getYear(R(a));if(o>t)return 12;if(o===t)return se.getMonth(R(a))}},Ia=(t,a)=>{if(a){const o=ne.getYear(R(a));return o<t?-1:o===t?se.getMonth(R(a)):void 0}},nt=t=>{if(t)return ne.getYear(R(t))},La=(t,a)=>{const o=ge(t,a)?a:t,n=ge(a,t)?a:t;return Sa.eachDayOfInterval({start:o,end:n})},Ml=t=>{const a=Ge.addMonths(t,1);return{month:se.getMonth(a),year:ne.getYear(a)}},Ye=(t,a)=>{const o=Zt.startOfWeek(t,{weekStartsOn:+a}),n=Da.endOfWeek(t,{weekStartsOn:+a});return[o,n]},za=(t,a)=>{const o={hours:$e.getHours(R()),minutes:Ee.getMinutes(R()),seconds:a?at.getSeconds(R()):0};return Object.assign(o,t)},ze=(t,a,o)=>[me.set(R(t),{date:1}),me.set(R(),{month:a,year:o,date:1})],Oe=(t,a,o)=>{let n=t?R(t):R();return(a||a===0)&&(n=il.setMonth(n,a)),o&&(n=Pe.setYear(n,o)),n},Ka=(t,a,o,n,l)=>{if(!n||l&&!a||!l&&!o)return!1;const f=l?Ge.addMonths(t,1):pt.subMonths(t,1),v=[se.getMonth(f),ne.getYear(f)];return l?!Dl(...v,a):!Sl(...v,o)},Sl=(t,a,o)=>ye(...ze(o,t,a))||de(...ze(o,t,a)),Dl=(t,a,o)=>ge(...ze(o,t,a))||de(...ze(o,t,a)),qa=(t,a,o,n,l,f,v)=>{if(typeof a=="function"&&!v)return a(t);const u=o?{locale:o}:void 0;return Array.isArray(t)?`${Ae.formatDate(t[0],f,u)}${l&&!t[1]?"":n}${t[1]?Ae.formatDate(t[1],f,u):""}`:Ae.formatDate(t,f,u)},Xe=t=>{if(t)return null;throw new Error(ua.prop("partial-range"))},bt=(t,a)=>{if(a)return t();throw new Error(ua.prop("range"))},Xt=t=>Array.isArray(t)?Ct.isValid(t[0])&&(t[1]?Ct.isValid(t[1]):!0):t?Ct.isValid(t):!1,xl=(t,a)=>me.set(a??R(),{hours:+t.hours||0,minutes:+t.minutes||0,seconds:+t.seconds||0}),Lt=(t,a,o,n)=>{if(!t)return!0;if(n){const l=o==="max"?mt.isBefore(t,a):tt.isAfter(t,a),f={seconds:0,milliseconds:0};return l||et.isEqual(me.set(t,f),me.set(a,f))}return o==="max"?t.getTime()<=a.getTime():t.getTime()>=a.getTime()},zt=(t,a,o)=>t?xl(t,a):R(o??a),ba=(t,a,o,n,l)=>{if(Array.isArray(n)){const v=zt(t,n[0],a),u=zt(t,n[1],a);return Lt(n[0],v,o,!!a)&&Lt(n[1],u,o,!!a)&&l}const f=zt(t,n,a);return Lt(n,f,o,!!a)&&l},Kt=t=>me.set(R(),Je(t)),Tl=(t,a)=>t instanceof Map?Array.from(t.values()).filter(o=>ne.getYear(R(o))===a).map(o=>se.getMonth(o)):[],Ua=(t,a,o)=>typeof t=="function"?t({month:a,year:o}):!!t.months.find(n=>n.month===a&&n.year===o),da=(t,a)=>typeof t=="function"?t(a):t.years.includes(a),dt=e.reactive({menuFocused:!1,shiftKeyInMenu:!1}),Ha=()=>{const t=o=>{dt.menuFocused=o},a=o=>{dt.shiftKeyInMenu!==o&&(dt.shiftKeyInMenu=o)};return{control:e.computed(()=>({shiftKeyInMenu:dt.shiftKeyInMenu,menuFocused:dt.menuFocused})),setMenuFocused:t,setShiftKey:a}},ve=e.reactive({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),qt=e.ref(null),_t=e.ref(!1),Ut=e.ref(!1),Ht=e.ref(!1),jt=e.ref(!1),Ce=e.ref(0),he=e.ref(0),Ue=()=>{const t=e.computed(()=>_t.value?[...ve.selectionGrid,ve.actionRow].filter(p=>p.length):Ut.value?[...ve.timePicker[0],...ve.timePicker[1],jt.value?[]:[qt.value],ve.actionRow].filter(p=>p.length):Ht.value?[...ve.monthPicker,ve.actionRow]:[ve.monthYear,...ve.calendar,ve.time,ve.actionRow].filter(p=>p.length)),a=p=>{Ce.value=p?Ce.value+1:Ce.value-1;let _=null;t.value[he.value]&&(_=t.value[he.value][Ce.value]),!_&&t.value[he.value+(p?1:-1)]?(he.value=he.value+(p?1:-1),Ce.value=p?0:t.value[he.value].length-1):_||(Ce.value=p?Ce.value-1:Ce.value+1)},o=p=>{he.value===0&&!p||he.value===t.value.length&&p||(he.value=p?he.value+1:he.value-1,t.value[he.value]?t.value[he.value]&&!t.value[he.value][Ce.value]&&Ce.value!==0&&(Ce.value=t.value[he.value].length-1):he.value=p?he.value-1:he.value+1)},n=p=>{let _=null;t.value[he.value]&&(_=t.value[he.value][Ce.value]),_?_.focus({preventScroll:!_t.value}):Ce.value=p?Ce.value-1:Ce.value+1},l=()=>{a(!0),n(!0)},f=()=>{a(!1),n(!1)},v=()=>{o(!1),n(!0)},u=()=>{o(!0),n(!0)},$=(p,_)=>{ve[_]=p},N=(p,_)=>{ve[_]=p},w=()=>{Ce.value=0,he.value=0};return{buildMatrix:$,buildMultiLevelMatrix:N,setTimePickerBackRef:p=>{qt.value=p},setSelectionGrid:p=>{_t.value=p,w(),p||(ve.selectionGrid=[])},setTimePicker:(p,_=!1)=>{Ut.value=p,jt.value=_,w(),p||(ve.timePicker[0]=[],ve.timePicker[1]=[])},setTimePickerElements:(p,_=0)=>{ve.timePicker[_]=p},arrowRight:l,arrowLeft:f,arrowUp:v,arrowDown:u,clearArrowNav:()=>{ve.monthYear=[],ve.calendar=[],ve.time=[],ve.actionRow=[],ve.selectionGrid=[],ve.timePicker[0]=[],ve.timePicker[1]=[],_t.value=!1,Ut.value=!1,jt.value=!1,Ht.value=!1,w(),qt.value=null},setMonthPicker:p=>{Ht.value=p,w()},refSets:ve}},_a=t=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...t??{}}),$l=t=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",calendarWrap:"Calendar wrapper",calendarDays:"Calendar days",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:a=>`Increment ${a}`,decrementValue:a=>`Decrement ${a}`,openTpOverlay:a=>`Open ${a} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,...t??{}}),Ca=t=>t?typeof t=="boolean"?t?2:0:+t>=2?+t:2:0,Vl=t=>{const a=typeof t=="object"&&t,o={static:!0,solo:!1};if(!t)return{...o,count:Ca(!1)};const n=a?t:{},l=a?n.count??!0:t,f=Ca(l);return Object.assign(o,n,{count:f})},Nl=(t,a,o)=>t||(typeof o=="string"?o:a),Pl=t=>typeof t=="boolean"?t?_a({}):!1:_a(t),Al=t=>{const a={enterSubmit:!0,tabSubmit:!0,openMenu:!0,selectOnFocus:!1,rangeSeparator:" - "};return typeof t=="object"?{...a,...t??{},enabled:!0}:{...a,enabled:t}},El=t=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...t??{}}),Rl=t=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...t??{}}),Yl=t=>{const a={input:!1};return typeof t=="object"?{...a,...t??{},enabled:!0}:{enabled:t,...a}},Ol=t=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,...t??{}}),Fl=t=>{const a={dates:Array.isArray(t)?t.map(o=>R(o)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof t=="function"?t:{...a,...t??{}}},Il=t=>typeof t=="object"?{type:(t==null?void 0:t.type)??"local",hideOnOffsetDates:(t==null?void 0:t.hideOnOffsetDates)??!1}:{type:t,hideOnOffsetDates:!1},Ll=(t,a)=>typeof t=="object"?{enabled:!0,...{noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1},...t}:{enabled:t,noDisabledRange:a.noDisabledRange,showLastInRange:a.showLastInRange,minMaxRawRange:a.minMaxRawRange,partialRange:a.partialRange,disableTimeRangeValidation:a.disableTimeRangeValidation,maxRange:a.maxRange,minRange:a.minRange,autoRange:a.autoRange,fixedStart:a.fixedStart,fixedEnd:a.fixedEnd},zl=(t,a)=>t?typeof t=="string"?{timezone:t,exactMatch:!1,dateInTz:void 0,emitTimezone:a,convertModel:!0}:{timezone:t.timezone,exactMatch:t.exactMatch??!1,dateInTz:t.dateInTz??void 0,emitTimezone:a??t.emitTimezone,convertModel:t.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:a},Wt=(t,a)=>new Map(t.map(o=>{const n=Aa(o,a);return[sa(n),n]})),Kl=(t,a)=>t.length?new Map(t.map(o=>{const n=Aa(o.date,a);return[sa(n),o]})):null,ql=(t,a,o,n,l,f,v)=>({minDate:Qt(t,v),maxDate:Qt(a,v),disabledDates:Ft(o)?Wt(o,v):o,allowedDates:Ft(n)?Wt(n,v):null,highlight:typeof l=="object"&&Ft(l==null?void 0:l.dates)?Wt(l.dates,v):l,markers:Kl(f,v)}),Ul=(t,a)=>typeof t=="boolean"?{enabled:t,dragSelect:!0,limit:+a}:{enabled:!!t,limit:t.limit?+t.limit:null,dragSelect:t.dragSelect??!0},fe=t=>{const a=()=>{const O=t.enableSeconds?":ss":"",V=t.enableMinutes?":mm":"";return t.is24?`HH${V}${O}`:`hh${V}${O} aa`},o=()=>{var O;return t.format?t.format:t.monthPicker?"MM/yyyy":t.timePicker?a():t.weekPicker?`${((O=K.value)==null?void 0:O.type)==="iso"?"RR":"ww"}-yyyy`:t.yearPicker?"yyyy":t.quarterPicker?"QQQ/yyyy":t.enableTimePicker?`MM/dd/yyyy, ${a()}`:"MM/dd/yyyy"},n=O=>za(O,t.enableSeconds),l=()=>x.value.enabled?t.startTime&&Array.isArray(t.startTime)?[n(t.startTime[0]),n(t.startTime[1])]:null:t.startTime&&!Array.isArray(t.startTime)?n(t.startTime):null,f=e.computed(()=>Vl(t.multiCalendars)),v=e.computed(()=>l()),u=e.computed(()=>$l(t.ariaLabels)),$=e.computed(()=>El(t.filters)),N=e.computed(()=>Pl(t.transitions)),w=e.computed(()=>Rl(t.actionRow)),p=e.computed(()=>Nl(t.previewFormat,t.format,o())),_=e.computed(()=>Al(t.textInput)),C=e.computed(()=>Yl(t.inline)),B=e.computed(()=>Ol(t.config)),k=e.computed(()=>Fl(t.highlight)),K=e.computed(()=>Il(t.weekNumbers)),H=e.computed(()=>zl(t.timezone,t.emitTimezone)),z=e.computed(()=>Ul(t.multiDates,t.multiDatesLimit)),A=e.computed(()=>ql(t.minDate,t.maxDate,t.disabledDates,t.allowedDates,k.value,t.markers,H.value)),x=e.computed(()=>Ll(t.range,{minMaxRawRange:!1,maxRange:t.maxRange,minRange:t.minRange,noDisabledRange:t.noDisabledRange,showLastInRange:t.showLastInRange,partialRange:t.partialRange,disableTimeRangeValidation:t.disableTimeRangeValidation,autoRange:t.autoRange,fixedStart:t.fixedStart,fixedEnd:t.fixedEnd}));return{defaultedTransitions:N,defaultedMultiCalendars:f,defaultedStartTime:v,defaultedAriaLabels:u,defaultedFilters:$,defaultedActionRow:w,defaultedPreviewFormat:p,defaultedTextInput:_,defaultedInline:C,defaultedConfig:B,defaultedHighlight:k,defaultedWeekNumbers:K,defaultedRange:x,propDates:A,defaultedTz:H,defaultedMultiDates:z,getDefaultPattern:o,getDefaultStartTime:l}};var xe=(t=>(t.month="month",t.year="year",t))(xe||{}),je=(t=>(t.top="top",t.bottom="bottom",t))(je||{}),Qe=(t=>(t.header="header",t.calendar="calendar",t.timePicker="timePicker",t))(Qe||{}),Ne=(t=>(t.month="month",t.year="year",t.calendar="calendar",t.time="time",t.minutes="minutes",t.hours="hours",t.seconds="seconds",t))(Ne||{});const Hl=["timestamp","date","iso"],jl=(t,a,o)=>{const n=e.ref(),{defaultedTextInput:l,defaultedRange:f,defaultedTz:v,defaultedMultiDates:u,getDefaultPattern:$}=fe(a),N=e.ref(""),w=e.toRef(a,"format"),p=e.toRef(a,"formatLocale");e.watch(n,()=>{typeof a.onInternalModelChange=="function"&&t("internal-model-change",n.value,q(!0))},{deep:!0}),e.watch(w,()=>{U()});const _=d=>v.value.timezone&&v.value.convertModel?Re(d,v.value.timezone):d,C=d=>{if(v.value.timezone&&v.value.convertModel){const ee=pl(v.value.timezone);return al.addHours(d,ee)}return d},B=(d,ee,re=!1)=>qa(d,a.format,a.formatLocale,l.value.rangeSeparator,a.modelAuto,ee??$(),re),k=d=>d?a.modelType?Y(d):{hours:$e.getHours(d),minutes:Ee.getMinutes(d),seconds:a.enableSeconds?at.getSeconds(d):0}:null,K=d=>a.modelType?Y(d):{month:se.getMonth(d),year:ne.getYear(d)},H=d=>Array.isArray(d)?u.value.enabled?d.map(ee=>z(ee,Pe.setYear(R(),ee))):bt(()=>[Pe.setYear(R(),d[0]),d[1]?Pe.setYear(R(),d[1]):Xe(f.value.partialRange)],f.value.enabled):Pe.setYear(R(),+d),z=(d,ee)=>(typeof d=="string"||typeof d=="number")&&a.modelType?J(d):ee,A=d=>Array.isArray(d)?[z(d[0],qe(null,+d[0].hours,+d[0].minutes,d[0].seconds)),z(d[1],qe(null,+d[1].hours,+d[1].minutes,d[1].seconds))]:z(d,qe(null,d.hours,d.minutes,d.seconds)),x=d=>{const ee=me.set(R(),{date:1});return Array.isArray(d)?u.value.enabled?d.map(re=>z(re,Oe(ee,+re.month,+re.year))):bt(()=>[z(d[0],Oe(ee,+d[0].month,+d[0].year)),z(d[1],d[1]?Oe(ee,+d[1].month,+d[1].year):Xe(f.value.partialRange))],f.value.enabled):z(d,Oe(ee,+d.month,+d.year))},O=d=>{if(Array.isArray(d))return d.map(ee=>J(ee));throw new Error(ua.dateArr("multi-dates"))},V=d=>{if(Array.isArray(d)&&f.value.enabled){const ee=d[0],re=d[1];return[R(Array.isArray(ee)?ee[0]:null),R(Array.isArray(re)?re[0]:null)]}return R(d[0])},S=d=>a.modelAuto?Array.isArray(d)?[J(d[0]),J(d[1])]:a.autoApply?[J(d)]:[J(d),null]:Array.isArray(d)?bt(()=>d[1]?[J(d[0]),d[1]?J(d[1]):Xe(f.value.partialRange)]:[J(d[0])],f.value.enabled):J(d),L=()=>{Array.isArray(n.value)&&f.value.enabled&&n.value.length===1&&n.value.push(Xe(f.value.partialRange))},Q=()=>{const d=n.value;return[Y(d[0]),d[1]?Y(d[1]):Xe(f.value.partialRange)]},X=()=>n.value[1]?Q():Y(we(n.value[0])),ae=()=>(n.value||[]).map(d=>Y(d)),T=(d=!1)=>(d||L(),a.modelAuto?X():u.value.enabled?ae():Array.isArray(n.value)?bt(()=>Q(),f.value.enabled):Y(we(n.value))),E=d=>!d||Array.isArray(d)&&!d.length?null:a.timePicker?A(we(d)):a.monthPicker?x(we(d)):a.yearPicker?H(we(d)):u.value.enabled?O(we(d)):a.weekPicker?V(we(d)):S(we(d)),W=d=>{const ee=E(d);Xt(we(ee))?(n.value=we(ee),U()):(n.value=null,N.value="")},c=()=>{const d=ee=>Ae.formatDate(ee,l.value.format);return`${d(n.value[0])} ${l.value.rangeSeparator} ${n.value[1]?d(n.value[1]):""}`},i=()=>o.value&&n.value?Array.isArray(n.value)?c():Ae.formatDate(n.value,l.value.format):B(n.value),P=()=>n.value?u.value.enabled?n.value.map(d=>B(d)).join("; "):l.value.enabled&&typeof l.value.format=="string"?i():B(n.value):"",U=()=>{!a.format||typeof a.format=="string"||l.value.enabled&&typeof l.value.format=="string"?N.value=P():N.value=a.format(n.value)},J=d=>{if(a.utc){const ee=new Date(d);return a.utc==="preserve"?new Date(ee.getTime()+ee.getTimezoneOffset()*6e4):ee}return a.modelType?Hl.includes(a.modelType)?_(new Date(d)):a.modelType==="format"&&(typeof a.format=="string"||!a.format)?_(Jt.parse(d,$(),new Date,{locale:p.value})):_(Jt.parse(d,a.modelType,new Date,{locale:p.value})):_(new Date(d))},Y=d=>d?a.utc?Bl(d,a.utc==="preserve",a.enableSeconds):a.modelType?a.modelType==="timestamp"?+C(d):a.modelType==="iso"?C(d).toISOString():a.modelType==="format"&&(typeof a.format=="string"||!a.format)?B(C(d)):B(C(d),a.modelType,!0):C(d):"",h=(d,ee=!1,re=!1)=>{if(re)return d;if(t("update:model-value",d),v.value.emitTimezone&&ee){const s=Array.isArray(d)?d.map(Z=>Re(we(Z),v.value.emitTimezone)):Re(we(d),v.value.emitTimezone);t("update:model-timezone-value",s)}},I=d=>Array.isArray(n.value)?u.value.enabled?n.value.map(ee=>d(ee)):[d(n.value[0]),n.value[1]?d(n.value[1]):Xe(f.value.partialRange)]:d(we(n.value)),r=()=>{if(Array.isArray(n.value)){const d=Ye(n.value[0],a.weekStart),ee=n.value[1]?Ye(n.value[1],a.weekStart):[];return[d.map(re=>R(re)),ee.map(re=>R(re))]}return Ye(n.value,a.weekStart).map(d=>R(d))},m=(d,ee)=>h(we(I(d)),!1,ee),M=d=>{const ee=r();return d?ee:t("update:model-value",r())},q=(d=!1)=>(d||U(),a.monthPicker?m(K,d):a.timePicker?m(k,d):a.yearPicker?m(ne.getYear,d):a.weekPicker?M(d):h(T(d),!0,d));return{inputValue:N,internalModelValue:n,checkBeforeEmit:()=>n.value?f.value.enabled?f.value.partialRange?n.value.length>=1:n.value.length===2:!!n.value:!1,parseExternalModelValue:W,formatInputValue:U,emitModelValue:q}},Wl=(t,a)=>{const{defaultedFilters:o,propDates:n}=fe(t),{validateMonthYearInRange:l}=He(t),f=(w,p)=>{let _=w;return o.value.months.includes(se.getMonth(_))?(_=p?Ge.addMonths(w,1):pt.subMonths(w,1),f(_,p)):_},v=(w,p)=>{let _=w;return o.value.years.includes(ne.getYear(_))?(_=p?Va.addYears(w,1):Na.subYears(w,1),v(_,p)):_},u=(w,p=!1)=>{const _=me.set(R(),{month:t.month,year:t.year});let C=w?Ge.addMonths(_,1):pt.subMonths(_,1);t.disableYearSelect&&(C=Pe.setYear(C,t.year));let B=se.getMonth(C),k=ne.getYear(C);o.value.months.includes(B)&&(C=f(C,w),B=se.getMonth(C),k=ne.getYear(C)),o.value.years.includes(k)&&(C=v(C,w),k=ne.getYear(C)),l(B,k,w,t.preventMinMaxNavigation)&&$(B,k,p)},$=(w,p,_)=>{a("update-month-year",{month:w,year:p,fromNav:_})},N=e.computed(()=>w=>Ka(me.set(R(),{month:t.month,year:t.year}),n.value.maxDate,n.value.minDate,t.preventMinMaxNavigation,w));return{handleMonthYearChange:u,isDisabled:N,updateMonthYear:$}};var Ze=(t=>(t.center="center",t.left="left",t.right="right",t))(Ze||{});const Gl=({menuRef:t,menuRefInner:a,inputRef:o,pickerWrapperRef:n,inline:l,emit:f,props:v,slots:u})=>{const $=e.ref({}),N=e.ref(!1),w=e.ref({top:"0",left:"0"}),p=e.ref(!1),_=e.toRef(v,"teleportCenter");e.watch(_,()=>{w.value=JSON.parse(JSON.stringify({})),x()});const C=c=>{if(v.teleport){const i=c.getBoundingClientRect();return{left:i.left+window.scrollX,top:i.top+window.scrollY}}return{top:0,left:0}},B=(c,i)=>{w.value.left=`${c+i-$.value.width}px`},k=c=>{w.value.left=`${c}px`},K=(c,i)=>{v.position===Ze.left&&k(c),v.position===Ze.right&&B(c,i),v.position===Ze.center&&(w.value.left=`${c+i/2-$.value.width/2}px`)},H=c=>{const{width:i,height:P}=c.getBoundingClientRect(),{top:U,left:J}=v.altPosition?v.altPosition(c):C(c);return{top:+U,left:+J,width:i,height:P}},z=()=>{w.value.left="50%",w.value.top="50%",w.value.transform="translate(-50%, -50%)",w.value.position="fixed",delete w.value.opacity},A=()=>{const c=ke(o),{top:i,left:P,transform:U}=v.altPosition(c);w.value={top:`${i}px`,left:`${P}px`,transform:U??""}},x=(c=!0)=>{var i;if(!l.value.enabled){if(_.value)return z();if(v.altPosition!==null)return A();if(c){const P=v.teleport?(i=a.value)==null?void 0:i.$el:t.value;P&&($.value=P.getBoundingClientRect()),f("recalculate-position")}return ae()}},O=({inputEl:c,left:i,width:P})=>{window.screen.width>768&&!N.value&&K(i,P),L(c)},V=c=>{const{top:i,left:P,height:U,width:J}=H(c);w.value.top=`${U+i+ +v.offset}px`,p.value=!1,N.value||(w.value.left=`${P+J/2-$.value.width/2}px`),O({inputEl:c,left:P,width:J})},S=c=>{const{top:i,left:P,width:U}=H(c);w.value.top=`${i-+v.offset-$.value.height}px`,p.value=!0,O({inputEl:c,left:P,width:U})},L=c=>{if(v.autoPosition){const{left:i,width:P}=H(c),{left:U,right:J}=$.value;if(!N.value){if(Math.abs(U)!==Math.abs(J)){if(U<=0)return N.value=!0,k(i);if(J>=document.documentElement.clientWidth)return N.value=!0,B(i,P)}return K(i,P)}}},Q=()=>{const c=ke(o);if(c){const{height:i}=$.value,{top:P,height:U}=c.getBoundingClientRect(),J=window.innerHeight-P-U,Y=P;return i<=J?je.bottom:i>J&&i<=Y?je.top:J>=Y?je.bottom:je.top}return je.bottom},X=c=>Q()===je.bottom?V(c):S(c),ae=()=>{const c=ke(o);if(c)return v.autoPosition?X(c):V(c)},T=function(c){if(c){const i=c.scrollHeight>c.clientHeight,P=window.getComputedStyle(c).overflowY.indexOf("hidden")!==-1;return i&&!P}return!0},E=function(c){return!c||c===document.body||c.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:T(c)?c:E(c.assignedSlot?c.assignedSlot.parentNode:c.parentNode)},W=c=>{if(c)switch(v.position){case Ze.left:return{left:0,transform:"translateX(0)"};case Ze.right:return{left:`${c.width}px`,transform:"translateX(-100%)"};default:return{left:`${c.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:p,menuStyle:w,xCorrect:N,setMenuPosition:x,getScrollableParent:E,shadowRender:(c,i)=>{var P,U,J;const Y=document.createElement("div"),h=(P=ke(o))==null?void 0:P.getBoundingClientRect();Y.setAttribute("id","dp--temp-container");const I=(U=n.value)!=null&&U.clientWidth?n.value:document.body;I.append(Y);const r=W(h),m=e.h(c,{...i,shadow:!0,style:{opacity:0,position:"absolute",...r}},Object.fromEntries(Object.keys(u).filter(M=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(M)).map(M=>[M,u[M]])));e.render(m,Y),$.value=(J=m.el)==null?void 0:J.getBoundingClientRect(),e.render(null,Y),I.removeChild(Y)}}},Le=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]}],Jl=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],Ql={all:()=>Le,monthYear:()=>Le.filter(t=>t.use.includes("month-year")),input:()=>Jl,timePicker:()=>Le.filter(t=>t.use.includes("time")),action:()=>Le.filter(t=>t.use.includes("action")),calendar:()=>Le.filter(t=>t.use.includes("calendar")),menu:()=>Le.filter(t=>t.use.includes("menu")),shared:()=>Le.filter(t=>t.use.includes("shared")),yearMode:()=>Le.filter(t=>t.use.includes("year-mode"))},Se=(t,a,o)=>{const n=[];return Ql[a]().forEach(l=>{t[l.name]&&n.push(l.name)}),o!=null&&o.length&&o.forEach(l=>{l.slot&&n.push(l.slot)}),n},ft=t=>{const a=e.computed(()=>n=>t.value?n?t.value.open:t.value.close:""),o=e.computed(()=>n=>t.value?n?t.value.menuAppearTop:t.value.menuAppearBottom:"");return{transitionName:a,showTransition:!!t.value,menuTransition:o}},yt=(t,a)=>{const{defaultedRange:o,defaultedTz:n}=fe(t),l=R(Re(R(),n.value.timezone)),f=e.ref([{month:se.getMonth(l),year:ne.getYear(l)}]),v=e.reactive({hours:o.value.enabled?[$e.getHours(l),$e.getHours(l)]:$e.getHours(l),minutes:o.value.enabled?[Ee.getMinutes(l),Ee.getMinutes(l)]:Ee.getMinutes(l),seconds:o.value.enabled?[0,0]:0}),u=e.computed({get:()=>t.internalModelValue,set:w=>{!t.readonly&&!t.disabled&&a("update:internal-model-value",w)}}),$=e.computed(()=>w=>f.value[w]?f.value[w].month:0),N=e.computed(()=>w=>f.value[w]?f.value[w].year:0);return{calendars:f,time:v,modelValue:u,month:$,year:N,today:l}},Xl=(t,a)=>{const{defaultedMultiCalendars:o,defaultedMultiDates:n,defaultedHighlight:l,defaultedTz:f,propDates:v,defaultedRange:u}=fe(a),{isDisabled:$}=He(a),N=e.ref(null),w=e.ref(Re(new Date,f.value.timezone)),p=r=>{!r.current&&a.hideOffsetDates||(N.value=r.value)},_=()=>{N.value=null},C=r=>Array.isArray(t.value)&&u.value.enabled&&t.value[0]&&N.value?r?ge(N.value,t.value[0]):ye(N.value,t.value[0]):!0,B=(r,m)=>{const M=()=>t.value?m?t.value[0]||null:t.value[1]:null,q=t.value&&Array.isArray(t.value)?M():null;return de(R(r.value),q)},k=r=>{const m=Array.isArray(t.value)?t.value[0]:null;return r?!ye(N.value??null,m):!0},K=(r,m=!0)=>(u.value.enabled||a.weekPicker)&&Array.isArray(t.value)&&t.value.length===2?a.hideOffsetDates&&!r.current?!1:de(R(r.value),t.value[m?0:1]):u.value.enabled?B(r,m)&&k(m)||de(r.value,Array.isArray(t.value)?t.value[0]:null)&&C(m):!1,H=(r,m)=>{if(Array.isArray(t.value)&&t.value[0]&&t.value.length===1){const M=de(r.value,N.value);return m?ge(t.value[0],r.value)&&M:ye(t.value[0],r.value)&&M}return!1},z=r=>!t.value||a.hideOffsetDates&&!r.current?!1:u.value.enabled?a.modelAuto&&Array.isArray(t.value)?de(r.value,t.value[0]?t.value[0]:w.value):!1:n.value.enabled&&Array.isArray(t.value)?t.value.some(m=>de(m,r.value)):de(r.value,t.value?t.value:w.value),A=r=>{if(u.value.autoRange||a.weekPicker){if(N.value){if(a.hideOffsetDates&&!r.current)return!1;const m=We.addDays(N.value,+u.value.autoRange),M=Ye(R(N.value),a.weekStart);return a.weekPicker?de(M[1],R(r.value)):de(m,R(r.value))}return!1}return!1},x=r=>{if(u.value.autoRange||a.weekPicker){if(N.value){const m=We.addDays(N.value,+u.value.autoRange);if(a.hideOffsetDates&&!r.current)return!1;const M=Ye(R(N.value),a.weekStart);return a.weekPicker?ge(r.value,M[0])&&ye(r.value,M[1]):ge(r.value,N.value)&&ye(r.value,m)}return!1}return!1},O=r=>{if(u.value.autoRange||a.weekPicker){if(N.value){if(a.hideOffsetDates&&!r.current)return!1;const m=Ye(R(N.value),a.weekStart);return a.weekPicker?de(m[0],r.value):de(N.value,r.value)}return!1}return!1},V=r=>Mt(t.value,N.value,r.value),S=()=>a.modelAuto&&Array.isArray(a.internalModelValue)?!!a.internalModelValue[0]:!1,L=()=>a.modelAuto?Ra(a.internalModelValue):!0,Q=r=>{if(a.weekPicker)return!1;const m=u.value.enabled?!K(r)&&!K(r,!1):!0;return!$(r.value)&&!z(r)&&!(!r.current&&a.hideOffsetDates)&&m},X=r=>u.value.enabled?a.modelAuto?S()&&z(r):!1:z(r),ae=r=>l.value?_l(r.value,v.value.highlight):!1,T=r=>{const m=$(r.value);return m&&(typeof l.value=="function"?!l.value(r.value,m):!l.value.options.highlightDisabled)},E=r=>{var m;return typeof l.value=="function"?l.value(r.value):(m=l.value.weekdays)==null?void 0:m.includes(r.value.getDay())},W=r=>(u.value.enabled||a.weekPicker)&&(!(o.value.count>0)||r.current)&&L()&&!(!r.current&&a.hideOffsetDates)&&!z(r)?V(r):!1,c=r=>{const{isRangeStart:m,isRangeEnd:M}=J(r),q=u.value.enabled?m||M:!1;return{dp__cell_offset:!r.current,dp__pointer:!a.disabled&&!(!r.current&&a.hideOffsetDates)&&!$(r.value),dp__cell_disabled:$(r.value),dp__cell_highlight:!T(r)&&(ae(r)||E(r))&&!X(r)&&!q&&!O(r)&&!(W(r)&&a.weekPicker)&&!M,dp__cell_highlight_active:!T(r)&&(ae(r)||E(r))&&X(r),dp__today:!a.noToday&&de(r.value,w.value)&&r.current,"dp--past":ye(r.value,w.value),"dp--future":ge(r.value,w.value)}},i=r=>({dp__active_date:X(r),dp__date_hover:Q(r)}),P=r=>{if(t.value&&!Array.isArray(t.value)){const m=Ye(t.value,a.weekStart);return{...h(r),dp__range_start:de(m[0],r.value),dp__range_end:de(m[1],r.value),dp__range_between_week:ge(r.value,m[0])&&ye(r.value,m[1])}}return{...h(r)}},U=r=>{if(t.value&&Array.isArray(t.value)){const m=Ye(t.value[0],a.weekStart),M=t.value[1]?Ye(t.value[1],a.weekStart):[];return{...h(r),dp__range_start:de(m[0],r.value)||de(M[0],r.value),dp__range_end:de(m[1],r.value)||de(M[1],r.value),dp__range_between_week:ge(r.value,m[0])&&ye(r.value,m[1])||ge(r.value,M[0])&&ye(r.value,M[1]),dp__range_between:ge(r.value,m[1])&&ye(r.value,M[0])}}return{...h(r)}},J=r=>{const m=o.value.count>0?r.current&&K(r)&&L():K(r)&&L(),M=o.value.count>0?r.current&&K(r,!1)&&L():K(r,!1)&&L();return{isRangeStart:m,isRangeEnd:M}},Y=r=>{const{isRangeStart:m,isRangeEnd:M}=J(r);return{dp__range_start:m,dp__range_end:M,dp__range_between:W(r),dp__date_hover:de(r.value,N.value)&&!m&&!M&&!a.weekPicker,dp__date_hover_start:H(r,!0),dp__date_hover_end:H(r,!1)}},h=r=>({...Y(r),dp__cell_auto_range:x(r),dp__cell_auto_range_start:O(r),dp__cell_auto_range_end:A(r)}),I=r=>u.value.enabled?u.value.autoRange?h(r):a.modelAuto?{...i(r),...Y(r)}:a.weekPicker?U(r):Y(r):a.weekPicker?P(r):i(r);return{setHoverDate:p,clearHoverDate:_,getDayClassData:r=>a.hideOffsetDates&&!r.current?{}:{...c(r),...I(r),[a.dayClass?a.dayClass(r.value):""]:!0,[a.calendarCellClassName]:!!a.calendarCellClassName}}},He=t=>{const{defaultedFilters:a,defaultedRange:o,propDates:n,defaultedMultiDates:l}=fe(t),f=T=>n.value.disabledDates?typeof n.value.disabledDates=="function"?n.value.disabledDates(R(T)):!!Bt(T,n.value.disabledDates):!1,v=T=>{const E=n.value.maxDate?ge(T,n.value.maxDate):!1,W=n.value.minDate?ye(T,n.value.minDate):!1,c=f(T),i=a.value.months.map(h=>+h).includes(se.getMonth(T)),P=t.disabledWeekDays.length?t.disabledWeekDays.some(h=>+h===el.getDay(T)):!1,U=p(T),J=ne.getYear(T),Y=J<+t.yearRange[0]||J>+t.yearRange[1];return!(E||W||c||i||Y||P||U)},u=(T,E)=>ye(...ze(n.value.minDate,T,E))||de(...ze(n.value.minDate,T,E)),$=(T,E)=>ge(...ze(n.value.maxDate,T,E))||de(...ze(n.value.maxDate,T,E)),N=(T,E,W)=>{let c=!1;return n.value.maxDate&&W&&$(T,E)&&(c=!0),n.value.minDate&&!W&&u(T,E)&&(c=!0),c},w=(T,E,W,c)=>{let i=!1;return c?n.value.minDate&&n.value.maxDate?i=N(T,E,W):(n.value.minDate&&u(T,E)||n.value.maxDate&&$(T,E))&&(i=!0):i=!0,i},p=T=>Array.isArray(n.value.allowedDates)&&!n.value.allowedDates.length?!0:n.value.allowedDates?!Bt(T,n.value.allowedDates):!1,_=T=>!v(T),C=T=>o.value.noDisabledRange?!Sa.eachDayOfInterval({start:T[0],end:T[1]}).some(E=>_(E)):!0,B=T=>{if(T){const E=ne.getYear(T);return E>=+t.yearRange[0]&&E<=t.yearRange[1]}return!0},k=(T,E)=>!!(Array.isArray(T)&&T[E]&&(o.value.maxRange||o.value.minRange)&&B(T[E])),K=(T,E,W=0)=>{if(k(E,W)&&B(T)){const c=tl.differenceInCalendarDays(T,E[W]),i=La(E[W],T),P=i.length===1?0:i.filter(J=>_(J)).length,U=Math.abs(c)-(o.value.minMaxRawRange?0:P);if(o.value.minRange&&o.value.maxRange)return U>=+o.value.minRange&&U<=+o.value.maxRange;if(o.value.minRange)return U>=+o.value.minRange;if(o.value.maxRange)return U<=+o.value.maxRange}return!0},H=()=>!t.enableTimePicker||t.monthPicker||t.yearPicker||t.ignoreTimeValidation,z=T=>Array.isArray(T)?[T[0]?Kt(T[0]):null,T[1]?Kt(T[1]):null]:Kt(T),A=(T,E,W)=>T.find(c=>+c.hours===$e.getHours(E)&&c.minutes==="*"?!0:+c.minutes===Ee.getMinutes(E)&&+c.hours===$e.getHours(E))&&W,x=(T,E,W)=>{const[c,i]=T,[P,U]=E;return!A(c,P,W)&&!A(i,U,W)&&W},O=(T,E)=>{const W=Array.isArray(E)?E:[E];return Array.isArray(t.disabledTimes)?Array.isArray(t.disabledTimes[0])?x(t.disabledTimes,W,T):!W.some(c=>A(t.disabledTimes,c,T)):T},V=(T,E)=>{const W=Array.isArray(E)?[Je(E[0]),E[1]?Je(E[1]):void 0]:Je(E),c=!t.disabledTimes(W);return T&&c},S=(T,E)=>t.disabledTimes?Array.isArray(t.disabledTimes)?O(E,T):V(E,T):E,L=T=>{let E=!0;if(!T||H())return!0;const W=!n.value.minDate&&!n.value.maxDate?z(T):T;return(t.maxTime||n.value.maxDate)&&(E=ba(t.maxTime,n.value.maxDate,"max",we(W),E)),(t.minTime||n.value.minDate)&&(E=ba(t.minTime,n.value.minDate,"min",we(W),E)),S(T,E)},Q=T=>{if(!t.monthPicker)return!0;let E=!0;const W=R(Te(T));if(n.value.minDate&&n.value.maxDate){const c=R(Te(n.value.minDate)),i=R(Te(n.value.maxDate));return ge(W,c)&&ye(W,i)||de(W,c)||de(W,i)}if(n.value.minDate){const c=R(Te(n.value.minDate));E=ge(W,c)||de(W,c)}if(n.value.maxDate){const c=R(Te(n.value.maxDate));E=ye(W,c)||de(W,c)}return E},X=e.computed(()=>T=>!t.enableTimePicker||t.ignoreTimeValidation?!0:L(T)),ae=e.computed(()=>T=>t.monthPicker?Array.isArray(T)&&(o.value.enabled||l.value.enabled)?!T.filter(E=>!Q(E)).length:Q(T):!0);return{isDisabled:_,validateDate:v,validateMonthYearInRange:w,isDateRangeAllowed:C,checkMinMaxRange:K,isValidTime:L,isTimeValid:X,isMonthValid:ae}},St=()=>{const t=e.computed(()=>(n,l)=>n==null?void 0:n.includes(l)),a=e.computed(()=>(n,l)=>n.count?n.solo?!0:l===0:!0),o=e.computed(()=>(n,l)=>n.count?n.solo?!0:l===n.count-1:!0);return{hideNavigationButtons:t,showLeftIcon:a,showRightIcon:o}},Zl=(t,a,o)=>{const n=e.ref(0),l=e.reactive({[Qe.timePicker]:!t.enableTimePicker||t.timePicker||t.monthPicker,[Qe.calendar]:!1,[Qe.header]:!1}),f=e.computed(()=>t.monthPicker||t.timePicker),v=p=>{var _;if((_=t.flow)!=null&&_.length){if(!p&&f.value)return w();l[p]=!0,Object.keys(l).filter(C=>!l[C]).length||w()}},u=()=>{var p;(p=t.flow)!=null&&p.length&&n.value!==-1&&(n.value+=1,a("flow-step",n.value),w())},$=()=>{n.value=-1},N=(p,_,...C)=>{var B,k;t.flow[n.value]===p&&o.value&&((k=(B=o.value)[_])==null||k.call(B,...C))},w=()=>{N(Ne.month,"toggleMonthPicker",!0),N(Ne.year,"toggleYearPicker",!0),N(Ne.calendar,"toggleTimePicker",!1,!0),N(Ne.time,"toggleTimePicker",!0,!0);const p=t.flow[n.value];(p===Ne.hours||p===Ne.minutes||p===Ne.seconds)&&N(p,"toggleTimePicker",!0,!0,p)};return{childMount:v,updateFlowStep:u,resetFlow:$,flowStep:n}},Dt={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},emitTimezone:{type:String,default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},menuClassName:{type:String,default:null},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},calendarCellClassName:{type:String,default:null},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},autoRange:{type:[Number,String],default:null},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},minRange:{type:[Number,String],default:null},maxRange:{type:[Number,String],default:null},multiDatesLimit:{type:[Number,String],default:null},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},disableTimeRangeValidation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},calendarClassName:{type:String,default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},partialRange:{type:Boolean,default:!0},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},inputClassName:{type:String,default:null},fixedStart:{type:Boolean,default:!1},fixedEnd:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},noDisabledRange:{type:Boolean,default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},showLastInRange:{type:Boolean,default:!0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0}},Ve={...Dt,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})}},en={key:1,class:"dp__input_wrap"},tn=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],an={key:2,class:"dp__clear_icon"},ln=e.defineComponent({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...Dt},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur"],setup(t,{expose:a,emit:o}){const n=o,l=t,{defaultedTextInput:f,defaultedAriaLabels:v,defaultedInline:u,defaultedConfig:$,defaultedRange:N,defaultedMultiDates:w,getDefaultPattern:p,getDefaultStartTime:_}=fe(l),{checkMinMaxRange:C}=He(l),B=e.ref(),k=e.ref(null),K=e.ref(!1),H=e.ref(!1),z=e.computed(()=>({dp__pointer:!l.disabled&&!l.readonly&&!f.value.enabled,dp__disabled:l.disabled,dp__input_readonly:!f.value.enabled,dp__input:!0,dp__input_icon_pad:!l.hideInputIcon,dp__input_valid:!!l.state,dp__input_invalid:l.state===!1,dp__input_focus:K.value||l.isMenuOpen,dp__input_reg:!f.value.enabled,[l.inputClassName]:!!l.inputClassName})),A=()=>{n("set-input-date",null),l.clearable&&l.autoApply&&(n("set-empty-date"),B.value=null)},x=i=>{const P=_();return Cl(i,f.value.format??p(),P??za({},l.enableSeconds),l.inputValue,H.value,l.formatLocale)},O=i=>{const{rangeSeparator:P}=f.value,[U,J]=i.split(`${P}`);if(U){const Y=x(U.trim()),h=J?x(J.trim()):null;if(tt.isAfter(Y,h))return;const I=Y&&h?[Y,h]:[Y];C(h,I,0)&&(B.value=Y?I:null)}},V=()=>{H.value=!0},S=i=>{if(N.value.enabled)O(i);else if(w.value.enabled){const P=i.split(";");B.value=P.map(U=>x(U.trim())).filter(U=>U)}else B.value=x(i)},L=i=>{var P;const U=typeof i=="string"?i:(P=i.target)==null?void 0:P.value;U!==""?(f.value.openMenu&&!l.isMenuOpen&&n("open"),S(U),n("set-input-date",B.value)):A(),H.value=!1,n("update:input-value",U)},Q=i=>{f.value.enabled?(S(i.target.value),f.value.enterSubmit&&Xt(B.value)&&l.inputValue!==""?(n("set-input-date",B.value,!0),B.value=null):f.value.enterSubmit&&l.inputValue===""&&(B.value=null,n("clear"))):T(i)},X=i=>{f.value.enabled&&f.value.tabSubmit&&S(i.target.value),f.value.tabSubmit&&Xt(B.value)&&l.inputValue!==""?(n("set-input-date",B.value,!0,!0),B.value=null):f.value.tabSubmit&&l.inputValue===""&&(B.value=null,n("clear",!0))},ae=()=>{K.value=!0,n("focus"),e.nextTick().then(()=>{var i;f.value.enabled&&f.value.selectOnFocus&&((i=k.value)==null||i.select())})},T=i=>{i.preventDefault(),Ke(i,$.value,!0),f.value.enabled&&f.value.openMenu&&!u.value.input&&!l.isMenuOpen?n("open"):f.value.enabled||n("toggle")},E=()=>{n("real-blur"),K.value=!1,(!l.isMenuOpen||u.value.enabled&&u.value.input)&&n("blur"),l.autoApply&&f.value.enabled&&B.value&&!l.isMenuOpen&&(n("set-input-date",B.value),n("select-date"),B.value=null)},W=i=>{Ke(i,$.value,!0),n("clear")},c=i=>{if(!f.value.enabled){if(i.code==="Tab")return;i.preventDefault()}};return a({focusInput:()=>{var i;(i=k.value)==null||i.focus({preventScroll:!0})},setParsedDate:i=>{B.value=i}}),(i,P)=>{var U;return e.openBlock(),e.createElementBlock("div",{onClick:T},[i.$slots.trigger&&!i.$slots["dp-input"]&&!e.unref(u).enabled?e.renderSlot(i.$slots,"trigger",{key:0}):e.createCommentVNode("",!0),!i.$slots.trigger&&(!e.unref(u).enabled||e.unref(u).input)?(e.openBlock(),e.createElementBlock("div",en,[i.$slots["dp-input"]&&!i.$slots.trigger&&(!e.unref(u).enabled||e.unref(u).enabled&&e.unref(u).input)?e.renderSlot(i.$slots,"dp-input",{key:0,value:t.inputValue,isMenuOpen:t.isMenuOpen,onInput:L,onEnter:Q,onTab:X,onClear:W,onBlur:E,onKeypress:c,onPaste:V,openMenu:()=>i.$emit("open"),closeMenu:()=>i.$emit("close"),toggleMenu:()=>i.$emit("toggle")}):e.createCommentVNode("",!0),i.$slots["dp-input"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("input",{key:1,id:i.uid?`dp-input-${i.uid}`:void 0,ref_key:"inputRef",ref:k,"data-test":"dp-input",name:i.name,class:e.normalizeClass(z.value),inputmode:e.unref(f).enabled?"text":"none",placeholder:i.placeholder,disabled:i.disabled,readonly:i.readonly,required:i.required,value:t.inputValue,autocomplete:i.autocomplete,"aria-label":(U=e.unref(v))==null?void 0:U.input,"aria-disabled":i.disabled||void 0,"aria-invalid":i.state===!1?!0:void 0,onInput:L,onKeydown:[e.withKeys(Q,["enter"]),e.withKeys(X,["tab"]),c],onBlur:E,onFocus:ae,onKeypress:c,onPaste:V},null,42,tn)),e.createElementVNode("div",{onClick:P[2]||(P[2]=J=>n("toggle"))},[i.$slots["input-icon"]&&!i.hideInputIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:P[0]||(P[0]=J=>n("toggle"))},[e.renderSlot(i.$slots,"input-icon")])):e.createCommentVNode("",!0),!i.$slots["input-icon"]&&!i.hideInputIcon&&!i.$slots["dp-input"]?(e.openBlock(),e.createBlock(e.unref(rt),{key:1,class:"dp__input_icon dp__input_icons",onClick:P[1]||(P[1]=J=>n("toggle"))})):e.createCommentVNode("",!0)]),i.$slots["clear-icon"]&&t.inputValue&&i.clearable&&!i.disabled&&!i.readonly?(e.openBlock(),e.createElementBlock("span",an,[e.renderSlot(i.$slots,"clear-icon",{clear:W})])):e.createCommentVNode("",!0),i.clearable&&!i.$slots["clear-icon"]&&t.inputValue&&!i.disabled&&!i.readonly?(e.openBlock(),e.createBlock(e.unref(Pa),{key:3,class:"dp__clear_icon dp__input_icons","data-test":"clear-icon",onClick:P[3]||(P[3]=e.withModifiers(J=>W(J),["prevent"]))})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])}}}),nn=["title"],rn=["disabled"],on=e.defineComponent({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...Ve},emits:["close-picker","select-date","select-now","invalid-select"],setup(t,{emit:a}){const o=a,n=t,{defaultedActionRow:l,defaultedPreviewFormat:f,defaultedMultiCalendars:v,defaultedTextInput:u,defaultedInline:$,defaultedRange:N,defaultedMultiDates:w,getDefaultPattern:p}=fe(n),{isTimeValid:_,isMonthValid:C}=He(n),{buildMatrix:B}=Ue(),k=e.ref(null),K=e.ref(null),H=e.ref(!1),z=e.ref({}),A=e.ref(null),x=e.ref(null);e.onMounted(()=>{n.arrowNavigation&&B([ke(k),ke(K)],"actionRow"),O(),window.addEventListener("resize",O)}),e.onUnmounted(()=>{window.removeEventListener("resize",O)});const O=()=>{H.value=!1,setTimeout(()=>{var c,i;const P=(c=A.value)==null?void 0:c.getBoundingClientRect(),U=(i=x.value)==null?void 0:i.getBoundingClientRect();P&&U&&(z.value.maxWidth=`${U.width-P.width-20}px`),H.value=!0},0)},V=e.computed(()=>N.value.enabled&&!N.value.partialRange&&n.internalModelValue?n.internalModelValue.length===2:!0),S=e.computed(()=>!_.value(n.internalModelValue)||!C.value(n.internalModelValue)||!V.value),L=()=>{const c=f.value;return n.timePicker||n.monthPicker,c(we(n.internalModelValue))},Q=()=>{const c=n.internalModelValue;return v.value.count>0?`${X(c[0])} - ${X(c[1])}`:[X(c[0]),X(c[1])]},X=c=>qa(c,f.value,n.formatLocale,u.value.rangeSeparator,n.modelAuto,p()),ae=e.computed(()=>!n.internalModelValue||!n.menuMount?"":typeof f.value=="string"?Array.isArray(n.internalModelValue)?n.internalModelValue.length===2&&n.internalModelValue[1]?Q():w.value.enabled?n.internalModelValue.map(c=>`${X(c)}`):n.modelAuto?`${X(n.internalModelValue[0])}`:`${X(n.internalModelValue[0])} -`:X(n.internalModelValue):L()),T=()=>w.value.enabled?"; ":" - ",E=e.computed(()=>Array.isArray(ae.value)?ae.value.join(T()):ae.value),W=()=>{_.value(n.internalModelValue)&&C.value(n.internalModelValue)&&V.value?o("select-date"):o("invalid-select")};return(c,i)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"actionRowRef",ref:x,class:"dp__action_row"},[c.$slots["action-row"]?e.renderSlot(c.$slots,"action-row",e.normalizeProps(e.mergeProps({key:0},{internalModelValue:c.internalModelValue,disabled:S.value,selectDate:()=>c.$emit("select-date"),closePicker:()=>c.$emit("close-picker")}))):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(l).showPreview?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dp__selection_preview",title:E.value,style:e.normalizeStyle(z.value)},[c.$slots["action-preview"]&&H.value?e.renderSlot(c.$slots,"action-preview",{key:0,value:c.internalModelValue}):e.createCommentVNode("",!0),!c.$slots["action-preview"]&&H.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(E.value),1)],64)):e.createCommentVNode("",!0)],12,nn)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"actionBtnContainer",ref:A,class:"dp__action_buttons","data-dp-element":"action-row"},[c.$slots["action-buttons"]?e.renderSlot(c.$slots,"action-buttons",{key:0,value:c.internalModelValue}):e.createCommentVNode("",!0),c.$slots["action-buttons"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!e.unref($).enabled&&e.unref(l).showCancel?(e.openBlock(),e.createElementBlock("button",{key:0,ref_key:"cancelButtonRef",ref:k,type:"button",class:"dp__action_button dp__action_cancel",onClick:i[0]||(i[0]=P=>c.$emit("close-picker")),onKeydown:[i[1]||(i[1]=e.withKeys(P=>c.$emit("close-picker"),["enter"])),i[2]||(i[2]=e.withKeys(P=>c.$emit("close-picker"),["space"]))]},e.toDisplayString(c.cancelText),545)):e.createCommentVNode("",!0),e.unref(l).showNow?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:i[3]||(i[3]=P=>c.$emit("select-now")),onKeydown:[i[4]||(i[4]=e.withKeys(P=>c.$emit("select-now"),["enter"])),i[5]||(i[5]=e.withKeys(P=>c.$emit("select-now"),["space"]))]},e.toDisplayString(c.nowButtonLabel),33)):e.createCommentVNode("",!0),e.unref(l).showSelect?(e.openBlock(),e.createElementBlock("button",{key:2,ref_key:"selectButtonRef",ref:K,type:"button",class:"dp__action_button dp__action_select",disabled:S.value,"data-test":"select-button",onKeydown:[e.withKeys(W,["enter"]),e.withKeys(W,["space"])],onClick:W},e.toDisplayString(c.selectText),41,rn)):e.createCommentVNode("",!0)],64))],512)],64))],512))}}),un=["onKeydown"],sn={class:"dp__selection_grid_header"},dn=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],cn=["aria-label"],ht=e.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(t,{expose:a,emit:o}){const{setSelectionGrid:n,buildMultiLevelMatrix:l,setMonthPicker:f}=Ue(),v=o,u=t,{defaultedAriaLabels:$,defaultedTextInput:N,defaultedConfig:w}=fe(u),{hideNavigationButtons:p}=St(),_=e.ref(!1),C=e.ref(null),B=e.ref(null),k=e.ref([]),K=e.ref(),H=e.ref(null),z=e.ref(0),A=e.ref(null);e.onBeforeUpdate(()=>{C.value=null}),e.onMounted(()=>{e.nextTick().then(()=>ae()),u.noOverlayFocus||O(),x(!0)}),e.onUnmounted(()=>x(!1));const x=Y=>{var h;u.arrowNavigation&&((h=u.headerRefs)!=null&&h.length?f(Y):n(Y))},O=()=>{var Y;const h=ke(B);h&&(N.value.enabled||(C.value?(Y=C.value)==null||Y.focus({preventScroll:!0}):h.focus({preventScroll:!0})),_.value=h.clientHeight<h.scrollHeight)},V=e.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!u.useRelative,"dp--overlay-relative":u.useRelative})),S=e.computed(()=>u.useRelative?{height:`${u.height}px`,width:"260px"}:void 0),L=e.computed(()=>({dp__overlay_col:!0})),Q=e.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:_.value,dp__button_bottom:u.isLast})),X=e.computed(()=>{var Y,h;return{dp__overlay_container:!0,dp__container_flex:((Y=u.items)==null?void 0:Y.length)<=6,dp__container_block:((h=u.items)==null?void 0:h.length)>6}});e.watch(()=>u.items,()=>ae(!1),{deep:!0});const ae=(Y=!0)=>{e.nextTick().then(()=>{const h=ke(C),I=ke(B),r=ke(H),m=ke(A),M=r?r.getBoundingClientRect().height:0;I&&(I.getBoundingClientRect().height?z.value=I.getBoundingClientRect().height-M:z.value=w.value.modeHeight-M),h&&m&&Y&&(m.scrollTop=h.offsetTop-m.offsetTop-(z.value/2-h.getBoundingClientRect().height)-M)})},T=Y=>{Y.disabled||v("selected",Y.value)},E=()=>{v("toggle"),v("reset-flow")},W=()=>{u.escClose&&E()},c=(Y,h,I,r)=>{Y&&((h.active||h.value===u.focusValue)&&(C.value=Y),u.arrowNavigation&&(Array.isArray(k.value[I])?k.value[I][r]=Y:k.value[I]=[Y],i()))},i=()=>{var Y,h;const I=(Y=u.headerRefs)!=null&&Y.length?[u.headerRefs].concat(k.value):k.value.concat([u.skipButtonRef?[]:[H.value]]);l(we(I),(h=u.headerRefs)!=null&&h.length?"monthPicker":"selectionGrid")},P=Y=>{u.arrowNavigation||Ke(Y,w.value,!0)},U=Y=>{K.value=Y,v("hover-value",Y)},J=()=>{if(E(),!u.isLast){const Y=bl(u.menuWrapRef??null,"action-row");if(Y){const h=Ya(Y);h==null||h.focus()}}};return a({focusGrid:O}),(Y,h)=>{var I;return e.openBlock(),e.createElementBlock("div",{ref_key:"gridWrapRef",ref:B,class:e.normalizeClass(V.value),style:e.normalizeStyle(S.value),role:"dialog",tabindex:"0",onKeydown:[e.withKeys(e.withModifiers(W,["prevent"]),["esc"]),h[0]||(h[0]=e.withKeys(e.withModifiers(r=>P(r),["prevent"]),["left"])),h[1]||(h[1]=e.withKeys(e.withModifiers(r=>P(r),["prevent"]),["up"])),h[2]||(h[2]=e.withKeys(e.withModifiers(r=>P(r),["prevent"]),["down"])),h[3]||(h[3]=e.withKeys(e.withModifiers(r=>P(r),["prevent"]),["right"]))]},[e.createElementVNode("div",{ref_key:"containerRef",ref:A,class:e.normalizeClass(X.value),role:"grid",style:e.normalizeStyle({"--dp-overlay-height":`${z.value}px`})},[e.createElementVNode("div",sn,[e.renderSlot(Y.$slots,"header")]),Y.$slots.overlay?e.renderSlot(Y.$slots,"overlay",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Y.items,(r,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:e.normalizeClass(["dp__overlay_row",{dp__flex_row:Y.items.length>=3}]),role:"row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(M,q)=>(e.openBlock(),e.createElementBlock("div",{key:M.value,ref_for:!0,ref:d=>c(d,M,m,q),role:"gridcell",class:e.normalizeClass(L.value),"aria-selected":M.active||void 0,"aria-disabled":M.disabled||void 0,tabindex:"0","data-test":M.text,onClick:d=>T(M),onKeydown:[e.withKeys(e.withModifiers(d=>T(M),["prevent"]),["enter"]),e.withKeys(e.withModifiers(d=>T(M),["prevent"]),["space"])],onMouseover:d=>U(M.value)},[e.createElementVNode("div",{class:e.normalizeClass(M.className)},[Y.$slots.item?e.renderSlot(Y.$slots,"item",{key:0,item:M}):e.createCommentVNode("",!0),Y.$slots.item?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(M.text),1)],64))],2)],42,dn))),128))],2))),128))],6),Y.$slots["button-icon"]?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,ref_key:"toggleButton",ref:H,type:"button","aria-label":(I=e.unref($))==null?void 0:I.toggleOverlay,class:e.normalizeClass(Q.value),tabindex:"0",onClick:E,onKeydown:[e.withKeys(E,["enter"]),e.withKeys(J,["tab"])]},[e.renderSlot(Y.$slots,"button-icon")],42,cn)),[[e.vShow,!e.unref(p)(Y.hideNavigation,Y.type)]]):e.createCommentVNode("",!0)],46,un)}}}),xt=e.defineComponent({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(t){const a=t,o=e.computed(()=>a.multiCalendars>0?[...Array(a.multiCalendars).keys()]:[0]),n=e.computed(()=>({dp__instance_calendar:a.multiCalendars>0}));return(l,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({dp__menu_inner:!l.stretch,"dp--menu--inner-stretched":l.stretch,dp__flex_display:l.multiCalendars>0,"dp--flex-display-collapsed":l.collapse})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(v,u)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:e.normalizeClass(n.value)},[e.renderSlot(l.$slots,"default",{instance:v,index:u})],2))),128))],2))}}),mn=["aria-label","aria-disabled"],ct=e.defineComponent({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:a}){const o=a,n=e.ref(null);return e.onMounted(()=>o("set-ref",n)),(l,f)=>(e.openBlock(),e.createElementBlock("button",{ref_key:"elRef",ref:n,type:"button",class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":l.ariaLabel,"aria-disabled":l.disabled||void 0,onClick:f[0]||(f[0]=v=>l.$emit("activate")),onKeydown:[f[1]||(f[1]=e.withKeys(e.withModifiers(v=>l.$emit("activate"),["prevent"]),["enter"])),f[2]||(f[2]=e.withKeys(e.withModifiers(v=>l.$emit("activate"),["prevent"]),["space"]))]},[e.createElementVNode("span",{class:e.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:l.disabled}])},[e.renderSlot(l.$slots,"default")],2)],40,mn))}}),pn={class:"dp--year-mode-picker"},vn=["aria-label","data-test"],ja=e.defineComponent({__name:"YearModePicker",props:{...Ve,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(t,{emit:a}){const o=a,n=t,{showRightIcon:l,showLeftIcon:f}=St(),{defaultedConfig:v,defaultedMultiCalendars:u,defaultedAriaLabels:$,defaultedTransitions:N}=fe(n),{showTransition:w,transitionName:p}=ft(N),_=(k=!1,K)=>{o("toggle-year-picker",{flow:k,show:K})},C=k=>{o("year-select",k)},B=(k=!1)=>{o("handle-year",k)};return(k,K)=>{var H,z,A;return e.openBlock(),e.createElementBlock("div",pn,[e.unref(f)(e.unref(u),t.instance)?(e.openBlock(),e.createBlock(ct,{key:0,ref:"mpPrevIconRef","aria-label":(H=e.unref($))==null?void 0:H.prevYear,disabled:t.isDisabled(!1),onActivate:K[0]||(K[0]=x=>B(!1))},{default:e.withCtx(()=>[k.$slots["arrow-left"]?e.renderSlot(k.$slots,"arrow-left",{key:0}):e.createCommentVNode("",!0),k.$slots["arrow-left"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(aa),{key:1}))]),_:3},8,["aria-label","disabled"])):e.createCommentVNode("",!0),e.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":(z=e.unref($))==null?void 0:z.openYearsOverlay,"data-test":`year-mode-btn-${t.instance}`,onClick:K[1]||(K[1]=()=>_(!1)),onKeydown:K[2]||(K[2]=e.withKeys(()=>_(!1),["enter"]))},[k.$slots.year?e.renderSlot(k.$slots,"year",{key:0,year:t.year}):e.createCommentVNode("",!0),k.$slots.year?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.year),1)],64))],40,vn),e.unref(l)(e.unref(u),t.instance)?(e.openBlock(),e.createBlock(ct,{key:1,ref:"mpNextIconRef","aria-label":(A=e.unref($))==null?void 0:A.nextYear,disabled:t.isDisabled(!0),onActivate:K[3]||(K[3]=x=>B(!0))},{default:e.withCtx(()=>[k.$slots["arrow-right"]?e.renderSlot(k.$slots,"arrow-right",{key:0}):e.createCommentVNode("",!0),k.$slots["arrow-right"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(la),{key:1}))]),_:3},8,["aria-label","disabled"])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:e.unref(p)(t.showYearPicker),css:e.unref(w)},{default:e.withCtx(()=>[t.showYearPicker?(e.openBlock(),e.createBlock(ht,{key:0,items:t.items,"text-input":k.textInput,"esc-close":k.escClose,config:k.config,"is-last":k.autoApply&&!e.unref(v).keepActionRow,"hide-navigation":k.hideNavigation,"aria-labels":k.ariaLabels,type:"year",onToggle:_,onSelected:K[4]||(K[4]=x=>C(x))},e.createSlots({"button-icon":e.withCtx(()=>[k.$slots["calendar-icon"]?e.renderSlot(k.$slots,"calendar-icon",{key:0}):e.createCommentVNode("",!0),k.$slots["calendar-icon"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(rt),{key:1}))]),_:2},[k.$slots["year-overlay-value"]?{name:"item",fn:e.withCtx(({item:x})=>[e.renderSlot(k.$slots,"year-overlay-value",{text:x.text,value:x.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels"])):e.createCommentVNode("",!0)]),_:3},8,["name","css"])])}}}),ca=(t,a,o)=>{if(a.value&&Array.isArray(a.value))if(a.value.some(n=>de(t,n))){const n=a.value.filter(l=>!de(l,t));a.value=n.length?n:null}else(o&&+o>a.value.length||!o)&&a.value.push(t);else a.value=[t]},ma=(t,a,o)=>{let n=t.value?t.value.slice():[];return n.length===2&&n[1]!==null&&(n=[]),n.length?ye(a,n[0])?(n.unshift(a),o("range-start",n[0]),o("range-start",n[1])):(n[1]=a,o("range-end",a)):(n=[a],o("range-start",a)),n},Tt=(t,a,o,n)=>{t&&(t[0]&&t[1]&&o&&a("auto-apply"),t[0]&&!t[1]&&n&&o&&a("auto-apply"))},Wa=t=>{Array.isArray(t.value)&&t.value.length<=2&&t.range?t.modelValue.value=t.value.map(a=>Re(R(a),t.timezone)):Array.isArray(t.value)||(t.modelValue.value=Re(R(t.value),t.timezone))},Ga=(t,a,o,n)=>Array.isArray(a.value)&&(a.value.length===2||a.value.length===1&&n.value.partialRange)?n.value.fixedStart&&(ge(t,a.value[0])||de(t,a.value[0]))?[a.value[0],t]:n.value.fixedEnd&&(ye(t,a.value[1])||de(t,a.value[1]))?[t,a.value[1]]:(o("invalid-fixed-range",t),a.value):[],Ja=({multiCalendars:t,highlight:a,propDates:o,calendars:n,modelValue:l,props:f,filters:v,year:u,month:$,emit:N})=>{const w=e.computed(()=>ia(f.yearRange,f.locale,f.reverseYears)),p=e.ref([!1]),_=e.computed(()=>(V,S)=>{const L=me.set(Te(new Date),{month:$.value(V),year:u.value(V)});return Ka(L,o.value.maxDate,o.value.minDate,f.preventMinMaxNavigation,S)}),C=()=>{for(let V=0;V<t.value.count;V++)if(V===0)n.value[V]=n.value[0];else{const S=me.set(R(),n.value[V-1]);n.value[V]={month:se.getMonth(S),year:ne.getYear(Va.addYears(S,1))}}},B=V=>{if(!V)return C();const S=me.set(R(),n.value[V]);return n.value[0].year=ne.getYear(Na.subYears(S,t.value.count-1)),C()},k=V=>f.focusStartDate?V[0]:V[1]?V[1]:V[0],K=()=>{if(l.value){const V=Array.isArray(l.value)?k(l.value):l.value;n.value[0]={month:se.getMonth(V),year:ne.getYear(V)}}};e.onMounted(()=>{K(),t.value.count&&C()});const H=(V,S)=>{n.value[S].year=V,N("update-month-year",{instance:S,year:V,month:n.value[S].month}),t.value.count&&!t.value.solo&&B(S)},z=e.computed(()=>V=>lt(w.value,S=>{var L;const Q=u.value(V)===S.value,X=vt(S.value,nt(o.value.minDate),nt(o.value.maxDate))||((L=v.value.years)==null?void 0:L.includes(u.value(V))),ae=da(a.value,S.value);return{active:Q,disabled:X,highlighted:ae}})),A=(V,S)=>{H(V,S),O(S)},x=(V,S=!1)=>{if(!_.value(V,S)){const L=S?u.value(V)+1:u.value(V)-1;H(L,V)}},O=(V,S=!1,L)=>{S||N("reset-flow"),L!==void 0?p.value[V]=L:p.value[V]=!p.value[V],p.value||N("overlay-closed")};return{isDisabled:_,groupedYears:z,showYearPicker:p,selectYear:H,toggleYearPicker:O,handleYearSelect:A,handleYear:x}},fn=(t,a)=>{const{defaultedMultiCalendars:o,defaultedAriaLabels:n,defaultedTransitions:l,defaultedConfig:f,defaultedRange:v,defaultedHighlight:u,propDates:$,defaultedTz:N,defaultedFilters:w,defaultedMultiDates:p}=fe(t),{modelValue:_,year:C,month:B,calendars:k}=yt(t,a),K=e.computed(()=>Ea(t.formatLocale,t.locale,t.monthNameFormat)),H=e.ref(null),{checkMinMaxRange:z}=He(t),{selectYear:A,groupedYears:x,showYearPicker:O,toggleYearPicker:V,handleYearSelect:S,handleYear:L,isDisabled:Q}=Ja({modelValue:_,multiCalendars:o,highlight:u,calendars:k,year:C,propDates:$,month:B,filters:w,props:t,emit:a});e.onMounted(()=>{t.startDate&&(_.value&&t.focusStartDate||!_.value)&&A(ne.getYear(R(t.startDate)),0)});const X=r=>r?{month:se.getMonth(r),year:ne.getYear(r)}:{month:null,year:null},ae=()=>_.value?Array.isArray(_.value)?_.value.map(r=>X(r)):X(_.value):X(),T=(r,m)=>{const M=k.value[r],q=ae();return Array.isArray(q)?q.some(d=>d.year===(M==null?void 0:M.year)&&d.month===m):(M==null?void 0:M.year)===q.year&&m===q.month},E=(r,m,M)=>{var q,d;const ee=ae();return Array.isArray(ee)?C.value(m)===((q=ee[M])==null?void 0:q.year)&&r===((d=ee[M])==null?void 0:d.month):!1},W=(r,m)=>{if(v.value.enabled){const M=ae();if(Array.isArray(_.value)&&Array.isArray(M)){const q=E(r,m,0)||E(r,m,1),d=Oe(Te(R()),r,C.value(m));return Mt(_.value,H.value,d)&&!q}return!1}return!1},c=e.computed(()=>r=>lt(K.value,m=>{var M;const q=T(r,m.value),d=vt(m.value,Fa(C.value(r),$.value.minDate),Ia(C.value(r),$.value.maxDate))||Tl($.value.disabledDates,C.value(r)).includes(m.value)||((M=w.value.months)==null?void 0:M.includes(m.value)),ee=W(m.value,r),re=Ua(u.value,m.value,C.value(r));return{active:q,disabled:d,isBetween:ee,highlighted:re}})),i=(r,m)=>Oe(Te(R()),r,C.value(m)),P=(r,m)=>{const M=_.value?_.value:Te(new Date);_.value=Oe(M,r,C.value(m)),a("auto-apply"),a("update-flow-step")},U=(r,m)=>{const M=i(r,m);v.value.fixedEnd||v.value.fixedStart?_.value=Ga(M,_,a,v):_.value?z(M,_.value)&&(_.value=ma(_,i(r,m),a)):_.value=[i(r,m)],e.nextTick().then(()=>{Tt(_.value,a,t.autoApply,t.modelAuto)})},J=(r,m)=>{ca(i(r,m),_,p.value.limit),a("auto-apply",!0)},Y=(r,m)=>(k.value[m].month=r,I(m,k.value[m].year,r),p.value.enabled?J(r,m):v.value.enabled?U(r,m):P(r,m)),h=(r,m)=>{A(r,m),I(m,r,null)},I=(r,m,M)=>{let q=M;if(!q&&q!==0){const d=ae();q=Array.isArray(d)?d[r].month:d.month}a("update-month-year",{instance:r,year:m,month:q})};return{groupedMonths:c,groupedYears:x,year:C,isDisabled:Q,defaultedMultiCalendars:o,defaultedAriaLabels:n,defaultedTransitions:l,defaultedConfig:f,showYearPicker:O,modelValue:_,presetDate:(r,m)=>{Wa({value:r,modelValue:_,range:v.value.enabled,timezone:m?void 0:N.value.timezone}),a("auto-apply")},setHoverDate:(r,m)=>{H.value=i(r,m)},selectMonth:Y,selectYear:h,toggleYearPicker:V,handleYearSelect:S,handleYear:L,getModelMonthYear:ae}},yn=e.defineComponent({compatConfig:{MODE:3},__name:"MonthPicker",props:{...Ve},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range"],setup(t,{expose:a,emit:o}){const n=o,l=e.useSlots(),f=Se(l,"yearMode"),v=t;e.onMounted(()=>{v.shadow||n("mount",null)});const{groupedMonths:u,groupedYears:$,year:N,isDisabled:w,defaultedMultiCalendars:p,defaultedConfig:_,showYearPicker:C,modelValue:B,presetDate:k,setHoverDate:K,selectMonth:H,selectYear:z,toggleYearPicker:A,handleYearSelect:x,handleYear:O,getModelMonthYear:V}=fn(v,n);return a({getSidebarProps:()=>({modelValue:B,year:N,getModelMonthYear:V,selectMonth:H,selectYear:z,handleYear:O}),presetDate:k,toggleYearPicker:S=>A(0,S)}),(S,L)=>(e.openBlock(),e.createBlock(xt,{"multi-calendars":e.unref(p).count,collapse:S.collapse,stretch:""},{default:e.withCtx(({instance:Q})=>[S.$slots["top-extra"]?e.renderSlot(S.$slots,"top-extra",{key:0,value:S.internalModelValue}):e.createCommentVNode("",!0),S.$slots["month-year"]?e.renderSlot(S.$slots,"month-year",e.normalizeProps(e.mergeProps({key:1},{year:e.unref(N),months:e.unref(u)(Q),years:e.unref($)(Q),selectMonth:e.unref(H),selectYear:e.unref(z),instance:Q}))):(e.openBlock(),e.createBlock(ht,{key:2,items:e.unref(u)(Q),"arrow-navigation":S.arrowNavigation,"is-last":S.autoApply&&!e.unref(_).keepActionRow,"esc-close":S.escClose,height:e.unref(_).modeHeight,config:S.config,"no-overlay-focus":!!(S.noOverlayFocus||S.textInput),"use-relative":"",type:"month",onSelected:X=>e.unref(H)(X,Q),onHoverValue:X=>e.unref(K)(X,Q)},e.createSlots({header:e.withCtx(()=>[e.createVNode(ja,e.mergeProps(S.$props,{items:e.unref($)(Q),instance:Q,"show-year-picker":e.unref(C)[Q],year:e.unref(N)(Q),"is-disabled":X=>e.unref(w)(Q,X),onHandleYear:X=>e.unref(O)(Q,X),onYearSelect:X=>e.unref(x)(X,Q),onToggleYearPicker:X=>e.unref(A)(Q,X==null?void 0:X.flow,X==null?void 0:X.show)}),e.createSlots({_:2},[e.renderList(e.unref(f),(X,ae)=>({name:X,fn:e.withCtx(T=>[e.renderSlot(S.$slots,X,e.normalizeProps(e.guardReactiveProps(T)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[S.$slots["month-overlay-value"]?{name:"item",fn:e.withCtx(({item:X})=>[e.renderSlot(S.$slots,"month-overlay-value",{text:X.text,value:X.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),hn=(t,a)=>{const{modelValue:o}=yt(t,a),n=e.ref(null),{defaultedHighlight:l,defaultedMultiDates:f,defaultedFilters:v,defaultedRange:u,propDates:$}=fe(t),N=e.ref();e.onMounted(()=>{t.startDate&&(o.value&&t.focusStartDate||!o.value)&&(N.value=ne.getYear(R(t.startDate)))});const w=B=>Array.isArray(o.value)?o.value.some(k=>ne.getYear(k)===B):o.value?ne.getYear(o.value)===B:!1,p=B=>u.value.enabled&&Array.isArray(o.value)?Mt(o.value,n.value,C(B)):!1,_=e.computed(()=>lt(ia(t.yearRange,t.locale,t.reverseYears),B=>{const k=w(B.value),K=vt(B.value,nt($.value.minDate),nt($.value.maxDate))||v.value.years.includes(B.value),H=p(B.value)&&!k,z=da(l.value,B.value);return{active:k,disabled:K,isBetween:H,highlighted:z}})),C=B=>Pe.setYear(Te(new Date),B);return{groupedYears:_,modelValue:o,focusYear:N,setHoverValue:B=>{n.value=Pe.setYear(Te(new Date),B)},selectYear:B=>{var k;if(a("update-month-year",{instance:0,year:B}),f.value.enabled)return o.value?Array.isArray(o.value)&&(((k=o.value)==null?void 0:k.map(K=>ne.getYear(K))).includes(B)?o.value=o.value.filter(K=>ne.getYear(K)!==B):o.value.push(Pe.setYear(De(R()),B))):o.value=[Pe.setYear(De(R()),B)],a("auto-apply",!0);u.value.enabled?(o.value=ma(o,C(B),a),e.nextTick().then(()=>{Tt(o.value,a,t.autoApply,t.modelAuto)})):(o.value=C(B),a("auto-apply"))}}},gn=e.defineComponent({compatConfig:{MODE:3},__name:"YearPicker",props:{...Ve},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(t,{expose:a,emit:o}){const n=o,l=t,{groupedYears:f,modelValue:v,focusYear:u,selectYear:$,setHoverValue:N}=hn(l,n),{defaultedConfig:w}=fe(l);return a({getSidebarProps:()=>({modelValue:v,selectYear:$})}),(p,_)=>(e.openBlock(),e.createElementBlock("div",null,[p.$slots["top-extra"]?e.renderSlot(p.$slots,"top-extra",{key:0,value:p.internalModelValue}):e.createCommentVNode("",!0),p.$slots["month-year"]?e.renderSlot(p.$slots,"month-year",e.normalizeProps(e.mergeProps({key:1},{years:e.unref(f),selectYear:e.unref($)}))):(e.openBlock(),e.createBlock(ht,{key:2,items:e.unref(f),"is-last":p.autoApply&&!e.unref(w).keepActionRow,height:e.unref(w).modeHeight,config:p.config,"no-overlay-focus":!!(p.noOverlayFocus||p.textInput),"focus-value":e.unref(u),type:"year","use-relative":"",onSelected:e.unref($),onHoverValue:e.unref(N)},e.createSlots({_:2},[p.$slots["year-overlay-value"]?{name:"item",fn:e.withCtx(({item:C})=>[e.renderSlot(p.$slots,"year-overlay-value",{text:C.text,value:C.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),kn={key:0,class:"dp__time_input"},wn=["data-test","aria-label","onKeydown","onClick"],bn=e.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),_n=e.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),Cn=["aria-label","disabled","data-test","onKeydown","onClick"],Bn=["data-test","aria-label","onKeydown","onClick"],Mn=e.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),Sn=e.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),Dn={key:0},xn=["aria-label","onKeydown"],Tn=e.defineComponent({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...Ve},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","am-pm-change"],setup(t,{expose:a,emit:o}){const n=o,l=t,{setTimePickerElements:f,setTimePickerBackRef:v}=Ue(),{defaultedAriaLabels:u,defaultedTransitions:$,defaultedFilters:N,defaultedConfig:w,defaultedRange:p}=fe(l),{transitionName:_,showTransition:C}=ft($),B=e.reactive({hours:!1,minutes:!1,seconds:!1}),k=e.ref("AM"),K=e.ref(null),H=e.ref([]);e.onMounted(()=>{n("mounted")});const z=s=>me.set(new Date,{hours:s.hours,minutes:s.minutes,seconds:l.enableSeconds?s.seconds:0,milliseconds:0}),A=e.computed(()=>s=>c(s,l[s])||O(s,l[s])),x=e.computed(()=>({hours:l.hours,minutes:l.minutes,seconds:l.seconds})),O=(s,Z)=>p.value.enabled&&!p.value.disableTimeRangeValidation?!l.validateTime(s,Z):!1,V=(s,Z)=>{if(p.value.enabled&&!p.value.disableTimeRangeValidation){const oe=Z?+l[`${s}Increment`]:-+l[`${s}Increment`],G=l[s]+oe;return!l.validateTime(s,G)}return!1},S=e.computed(()=>s=>!Y(+l[s]+ +l[`${s}Increment`],s)||V(s,!0)),L=e.computed(()=>s=>!Y(+l[s]-+l[`${s}Increment`],s)||V(s,!1)),Q=(s,Z)=>xa.add(me.set(R(),s),Z),X=(s,Z)=>cl.sub(me.set(R(),s),Z),ae=e.computed(()=>({dp__time_col:!0,dp__time_col_block:!l.timePickerInline,dp__time_col_reg_block:!l.enableSeconds&&l.is24&&!l.timePickerInline,dp__time_col_reg_inline:!l.enableSeconds&&l.is24&&l.timePickerInline,dp__time_col_reg_with_button:!l.enableSeconds&&!l.is24,dp__time_col_sec:l.enableSeconds&&l.is24,dp__time_col_sec_with_button:l.enableSeconds&&!l.is24})),T=e.computed(()=>{const s=[{type:"hours"}];return l.enableMinutes&&s.push({type:"",separator:!0},{type:"minutes"}),l.enableSeconds&&s.push({type:"",separator:!0},{type:"seconds"}),s}),E=e.computed(()=>T.value.filter(s=>!s.separator)),W=e.computed(()=>s=>{if(s==="hours"){const Z=M(+l.hours);return{text:Z<10?`0${Z}`:`${Z}`,value:Z}}return{text:l[s]<10?`0${l[s]}`:`${l[s]}`,value:l[s]}}),c=(s,Z)=>{var oe;if(!l.disabledTimesConfig)return!1;const G=l.disabledTimesConfig(l.order,s==="hours"?Z:void 0);return G[s]?!!((oe=G[s])!=null&&oe.includes(Z)):!0},i=(s,Z)=>Z!=="hours"||k.value==="AM"?s:s+12,P=s=>{const Z=l.is24?24:12,oe=s==="hours"?Z:60,G=+l[`${s}GridIncrement`],le=s==="hours"&&!l.is24?G:0,b=[];for(let D=le;D<oe;D+=G)b.push({value:l.is24?D:i(D,s),text:D<10?`0${D}`:`${D}`});return s==="hours"&&!l.is24&&b.push({value:0,text:"12"}),lt(b,D=>({active:!1,disabled:N.value.times[s].includes(D.value)||!Y(D.value,s)||c(s,D.value)||O(s,D.value)}))},U=s=>s>=0?s:59,J=s=>s>=0?s:23,Y=(s,Z)=>{const oe=l.minTime?z(It(l.minTime)):null,G=l.maxTime?z(It(l.maxTime)):null,le=z(It(x.value,Z,Z==="minutes"||Z==="seconds"?U(s):J(s)));return oe&&G?(mt.isBefore(le,G)||et.isEqual(le,G))&&(tt.isAfter(le,oe)||et.isEqual(le,oe)):oe?tt.isAfter(le,oe)||et.isEqual(le,oe):G?mt.isBefore(le,G)||et.isEqual(le,G):!0},h=s=>l[`no${s[0].toUpperCase()+s.slice(1)}Overlay`],I=s=>{h(s)||(B[s]=!B[s],B[s]||n("overlay-closed"))},r=s=>s==="hours"?$e.getHours:s==="minutes"?Ee.getMinutes:at.getSeconds,m=(s,Z=!0)=>{const oe=Z?Q:X,G=Z?+l[`${s}Increment`]:-+l[`${s}Increment`];Y(+l[s]+G,s)&&n(`update:${s}`,r(s)(oe({[s]:+l[s]},{[s]:+l[`${s}Increment`]})))},M=s=>l.is24?s:(s>=12?k.value="PM":k.value="AM",yl(s)),q=()=>{k.value==="PM"?(k.value="AM",n("update:hours",l.hours-12)):(k.value="PM",n("update:hours",l.hours+12)),n("am-pm-change",k.value)},d=s=>{B[s]=!0},ee=(s,Z,oe)=>{if(s&&l.arrowNavigation){Array.isArray(H.value[Z])?H.value[Z][oe]=s:H.value[Z]=[s];const G=H.value.reduce((le,b)=>b.map((D,ie)=>[...le[ie]||[],b[ie]]),[]);v(l.closeTimePickerBtn),K.value&&(G[1]=G[1].concat(K.value)),f(G,l.order)}},re=(s,Z)=>(I(s),n(`update:${s}`,Z));return a({openChildCmp:d}),(s,Z)=>{var oe;return s.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",kn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(G,le)=>{var b,D,ie;return e.openBlock(),e.createElementBlock("div",{key:le,class:e.normalizeClass(ae.value)},[G.separator?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" : ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("button",{ref_for:!0,ref:ue=>ee(ue,le,0),type:"button",class:e.normalizeClass({dp__btn:!0,dp__inc_dec_button:!s.timePickerInline,dp__inc_dec_button_inline:s.timePickerInline,dp__tp_inline_btn_top:s.timePickerInline,dp__inc_dec_button_disabled:S.value(G.type)}),"data-test":`${G.type}-time-inc-btn-${l.order}`,"aria-label":(b=e.unref(u))==null?void 0:b.incrementValue(G.type),tabindex:"0",onKeydown:[e.withKeys(e.withModifiers(ue=>m(G.type),["prevent"]),["enter"]),e.withKeys(e.withModifiers(ue=>m(G.type),["prevent"]),["space"])],onClick:ue=>m(G.type)},[l.timePickerInline?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[bn,_n],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.$slots["arrow-up"]?e.renderSlot(s.$slots,"arrow-up",{key:0}):e.createCommentVNode("",!0),s.$slots["arrow-up"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ra),{key:1}))],64))],42,wn),e.createElementVNode("button",{ref_for:!0,ref:ue=>ee(ue,le,1),type:"button","aria-label":(D=e.unref(u))==null?void 0:D.openTpOverlay(G.type),class:e.normalizeClass({dp__time_display:!0,dp__time_display_block:!s.timePickerInline,dp__time_display_inline:s.timePickerInline,"dp--time-invalid":A.value(G.type),"dp--time-overlay-btn":!A.value(G.type)}),disabled:h(G.type),tabindex:"0","data-test":`${G.type}-toggle-overlay-btn-${l.order}`,onKeydown:[e.withKeys(e.withModifiers(ue=>I(G.type),["prevent"]),["enter"]),e.withKeys(e.withModifiers(ue=>I(G.type),["prevent"]),["space"])],onClick:ue=>I(G.type)},[s.$slots[G.type]?e.renderSlot(s.$slots,G.type,{key:0,text:W.value(G.type).text,value:W.value(G.type).value}):e.createCommentVNode("",!0),s.$slots[G.type]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(W.value(G.type).text),1)],64))],42,Cn),e.createElementVNode("button",{ref_for:!0,ref:ue=>ee(ue,le,2),type:"button",class:e.normalizeClass({dp__btn:!0,dp__inc_dec_button:!s.timePickerInline,dp__inc_dec_button_inline:s.timePickerInline,dp__tp_inline_btn_bottom:s.timePickerInline,dp__inc_dec_button_disabled:L.value(G.type)}),"data-test":`${G.type}-time-dec-btn-${l.order}`,"aria-label":(ie=e.unref(u))==null?void 0:ie.decrementValue(G.type),tabindex:"0",onKeydown:[e.withKeys(e.withModifiers(ue=>m(G.type,!1),["prevent"]),["enter"]),e.withKeys(e.withModifiers(ue=>m(G.type,!1),["prevent"]),["space"])],onClick:ue=>m(G.type,!1)},[l.timePickerInline?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[Mn,Sn],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.$slots["arrow-down"]?e.renderSlot(s.$slots,"arrow-down",{key:0}):e.createCommentVNode("",!0),s.$slots["arrow-down"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(oa),{key:1}))],64))],42,Bn)],64))],2)}),128)),s.is24?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Dn,[s.$slots["am-pm-button"]?e.renderSlot(s.$slots,"am-pm-button",{key:0,toggle:q,value:k.value}):e.createCommentVNode("",!0),s.$slots["am-pm-button"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,ref_key:"amPmButton",ref:K,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(oe=e.unref(u))==null?void 0:oe.amPmButton,tabindex:"0",onClick:q,onKeydown:[e.withKeys(e.withModifiers(q,["prevent"]),["enter"]),e.withKeys(e.withModifiers(q,["prevent"]),["space"])]},e.toDisplayString(k.value),41,xn))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(G,le)=>(e.openBlock(),e.createBlock(e.Transition,{key:le,name:e.unref(_)(B[G.type]),css:e.unref(C)},{default:e.withCtx(()=>[B[G.type]?(e.openBlock(),e.createBlock(ht,{key:0,items:P(G.type),"is-last":s.autoApply&&!e.unref(w).keepActionRow,"esc-close":s.escClose,type:G.type,"text-input":s.textInput,config:s.config,"arrow-navigation":s.arrowNavigation,"aria-labels":s.ariaLabels,onSelected:b=>re(G.type,b),onToggle:b=>I(G.type),onResetFlow:Z[0]||(Z[0]=b=>s.$emit("reset-flow"))},e.createSlots({"button-icon":e.withCtx(()=>[s.$slots["clock-icon"]?e.renderSlot(s.$slots,"clock-icon",{key:0}):e.createCommentVNode("",!0),s.$slots["clock-icon"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.timePickerInline?e.unref(rt):e.unref(na)),{key:1}))]),_:2},[s.$slots[`${G.type}-overlay-value`]?{name:"item",fn:e.withCtx(({item:b})=>[e.renderSlot(s.$slots,`${G.type}-overlay-value`,{text:b.text,value:b.value})]),key:"0"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","onSelected","onToggle"])):e.createCommentVNode("",!0)]),_:2},1032,["name","css"]))),128))]))}}}),$n={class:"dp--tp-wrap"},Vn=["aria-label","tabindex"],Nn=["tabindex"],Pn=["aria-label"],Qa=e.defineComponent({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...Ve},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(t,{expose:a,emit:o}){const n=o,l=t,{buildMatrix:f,setTimePicker:v}=Ue(),u=e.useSlots(),{defaultedTransitions:$,defaultedAriaLabels:N,defaultedTextInput:w,defaultedConfig:p,defaultedRange:_}=fe(l),{transitionName:C,showTransition:B}=ft($),{hideNavigationButtons:k}=St(),K=e.ref(null),H=e.ref(null),z=e.ref([]),A=e.ref(null);e.onMounted(()=>{n("mount"),!l.timePicker&&l.arrowNavigation?f([ke(K.value)],"time"):v(!0,l.timePicker)});const x=e.computed(()=>_.value.enabled&&l.modelAuto?Ra(l.internalModelValue):!0),O=e.ref(!1),V=i=>({hours:Array.isArray(l.hours)?l.hours[i]:l.hours,minutes:Array.isArray(l.minutes)?l.minutes[i]:l.minutes,seconds:Array.isArray(l.seconds)?l.seconds[i]:l.seconds}),S=e.computed(()=>{const i=[];if(_.value.enabled)for(let P=0;P<2;P++)i.push(V(P));else i.push(V(0));return i}),L=(i,P=!1,U="")=>{P||n("reset-flow"),O.value=i,n(i?"overlay-opened":"overlay-closed"),l.arrowNavigation&&v(i),e.nextTick(()=>{U!==""&&z.value[0]&&z.value[0].openChildCmp(U)})},Q=e.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:l.autoApply&&!p.value.keepActionRow})),X=Se(u,"timePicker"),ae=(i,P,U)=>_.value.enabled?P===0?[i,S.value[1][U]]:[S.value[0][U],i]:i,T=i=>{n("update:hours",i)},E=i=>{n("update:minutes",i)},W=i=>{n("update:seconds",i)},c=()=>{if(A.value&&!w.value.enabled&&!l.noOverlayFocus){const i=Ya(A.value);i&&i.focus({preventScroll:!0})}};return a({toggleTimePicker:L}),(i,P)=>{var U;return e.openBlock(),e.createElementBlock("div",$n,[!i.timePicker&&!i.timePickerInline?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,ref_key:"openTimePickerBtn",ref:K,type:"button",class:e.normalizeClass(Q.value),"aria-label":(U=e.unref(N))==null?void 0:U.openTimePicker,tabindex:i.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:[P[0]||(P[0]=e.withKeys(J=>L(!0),["enter"])),P[1]||(P[1]=e.withKeys(J=>L(!0),["space"]))],onClick:P[2]||(P[2]=J=>L(!0))},[i.$slots["clock-icon"]?e.renderSlot(i.$slots,"clock-icon",{key:0}):e.createCommentVNode("",!0),i.$slots["clock-icon"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(na),{key:1}))],42,Vn)),[[e.vShow,!e.unref(k)(i.hideNavigation,"time")]]):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:e.unref(C)(O.value),css:e.unref(B)&&!i.timePickerInline},{default:e.withCtx(()=>{var J;return[O.value||i.timePicker||i.timePickerInline?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:A,class:e.normalizeClass({dp__overlay:!i.timePickerInline,"dp--overlay-absolute":!l.timePicker&&!i.timePickerInline,"dp--overlay-relative":l.timePicker}),style:e.normalizeStyle(i.timePicker?{height:`${e.unref(p).modeHeight}px`}:void 0),tabindex:i.timePickerInline?void 0:0},[e.createElementVNode("div",{class:e.normalizeClass(i.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[i.$slots["time-picker-overlay"]?e.renderSlot(i.$slots,"time-picker-overlay",{key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:T,setMinutes:E,setSeconds:W}):e.createCommentVNode("",!0),i.$slots["time-picker-overlay"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(i.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(Y,h)=>e.withDirectives((e.openBlock(),e.createBlock(Tn,e.mergeProps({key:h,ref_for:!0},{...i.$props,order:h,hours:Y.hours,minutes:Y.minutes,seconds:Y.seconds,closeTimePickerBtn:H.value,disabledTimesConfig:t.disabledTimesConfig,disabled:h===0?i.fixedStart:i.fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:z,"validate-time":(I,r)=>t.validateTime(I,ae(r,h,I)),"onUpdate:hours":I=>T(ae(I,h,"hours")),"onUpdate:minutes":I=>E(ae(I,h,"minutes")),"onUpdate:seconds":I=>W(ae(I,h,"seconds")),onMounted:c,onOverlayClosed:c,onAmPmChange:P[3]||(P[3]=I=>i.$emit("am-pm-change",I))}),e.createSlots({_:2},[e.renderList(e.unref(X),(I,r)=>({name:I,fn:e.withCtx(m=>[e.renderSlot(i.$slots,I,e.mergeProps({ref_for:!0},m))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[e.vShow,h===0?!0:x.value]])),128))],2)),!i.timePicker&&!i.timePickerInline?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:2,ref_key:"closeTimePickerBtn",ref:H,type:"button",class:e.normalizeClass(Q.value),"aria-label":(J=e.unref(N))==null?void 0:J.closeTimePicker,tabindex:"0",onKeydown:[P[4]||(P[4]=e.withKeys(Y=>L(!1),["enter"])),P[5]||(P[5]=e.withKeys(Y=>L(!1),["space"]))],onClick:P[6]||(P[6]=Y=>L(!1))},[i.$slots["calendar-icon"]?e.renderSlot(i.$slots,"calendar-icon",{key:0}):e.createCommentVNode("",!0),i.$slots["calendar-icon"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(rt),{key:1}))],42,Pn)),[[e.vShow,!e.unref(k)(i.hideNavigation,"time")]]):e.createCommentVNode("",!0)],2)],14,Nn)):e.createCommentVNode("",!0)]}),_:3},8,["name","css"])])}}}),Xa=(t,a,o,n)=>{const{defaultedRange:l}=fe(t),f=(A,x)=>Array.isArray(a[A])?a[A][x]:a[A],v=A=>t.enableSeconds?Array.isArray(a.seconds)?a.seconds[A]:a.seconds:0,u=(A,x)=>A?x!==void 0?qe(A,f("hours",x),f("minutes",x),v(x)):qe(A,a.hours,a.minutes,v()):ea.setSeconds(R(),v(x)),$=(A,x)=>{a[A]=x},N=e.computed(()=>t.modelAuto&&l.value.enabled?Array.isArray(o.value)?o.value.length>1:!1:l.value.enabled),w=(A,x)=>{const O=Object.fromEntries(Object.keys(a).map(V=>V===A?[V,x]:[V,a[V]].slice()));if(N.value&&!l.value.disableTimeRangeValidation){const V=L=>o.value?qe(o.value[L],O.hours[L],O.minutes[L],O.seconds[L]):null,S=L=>ta.setMilliseconds(o.value[L],0);return!(de(V(0),V(1))&&(tt.isAfter(V(0),S(1))||mt.isBefore(V(1),S(0))))}return!0},p=(A,x)=>{w(A,x)&&($(A,x),n&&n())},_=A=>{p("hours",A)},C=A=>{p("minutes",A)},B=A=>{p("seconds",A)},k=(A,x,O,V)=>{x&&_(A),!x&&!O&&C(A),O&&B(A),o.value&&V(o.value)},K=A=>{if(A){const x=Array.isArray(A),O=x?[+A[0].hours,+A[1].hours]:+A.hours,V=x?[+A[0].minutes,+A[1].minutes]:+A.minutes,S=x?[+A[0].seconds,+A[1].seconds]:+A.seconds;$("hours",O),$("minutes",V),t.enableSeconds&&$("seconds",S)}},H=(A,x)=>{const O={hours:Array.isArray(a.hours)?a.hours[A]:a.hours,disabledArr:[]};return(x||x===0)&&(O.hours=x),Array.isArray(t.disabledTimes)&&(O.disabledArr=l.value.enabled&&Array.isArray(t.disabledTimes[A])?t.disabledTimes[A]:t.disabledTimes),O},z=e.computed(()=>(A,x)=>{var O;if(Array.isArray(t.disabledTimes)){const{disabledArr:V,hours:S}=H(A,x),L=V.filter(Q=>+Q.hours===S);return((O=L[0])==null?void 0:O.minutes)==="*"?{hours:[S],minutes:void 0,seconds:void 0}:{hours:[],minutes:(L==null?void 0:L.map(Q=>+Q.minutes))??[],seconds:(L==null?void 0:L.map(Q=>Q.seconds?+Q.seconds:void 0))??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:$,updateHours:_,updateMinutes:C,updateSeconds:B,getSetDateTime:u,updateTimeValues:k,getSecondsValue:v,assignStartTime:K,validateTime:w,disabledTimesConfig:z}},An=(t,a)=>{const{modelValue:o,time:n}=yt(t,a),{defaultedStartTime:l,defaultedRange:f}=fe(t),{updateTimeValues:v,getSetDateTime:u,setTime:$,assignStartTime:N,disabledTimesConfig:w,validateTime:p}=Xa(t,n,o,_);function _(){a("update-flow-step")}const C=x=>{const{hours:O,minutes:V,seconds:S}=x;return{hours:+O,minutes:+V,seconds:S?+S:0}},B=()=>{if(t.startTime){if(Array.isArray(t.startTime)){const O=C(t.startTime[0]),V=C(t.startTime[1]);return[me.set(R(),O),me.set(R(),V)]}const x=C(t.startTime);return me.set(R(),x)}return f.value.enabled?[null,null]:null},k=()=>{if(f.value.enabled){const[x,O]=B();o.value=[u(x,0),u(O,1)]}else o.value=u(B())},K=x=>Array.isArray(x)?[Je(R(x[0])),Je(R(x[1]))]:[Je(x??R())],H=(x,O,V)=>{$("hours",x),$("minutes",O),$("seconds",t.enableSeconds?V:0)},z=()=>{const[x,O]=K(o.value);return f.value.enabled?H([x.hours,O.hours],[x.minutes,O.minutes],[x.seconds,O.seconds]):H(x.hours,x.minutes,x.seconds)};e.onMounted(()=>{if(!t.shadow)return N(l.value),o.value?z():k()});const A=()=>{Array.isArray(o.value)?o.value=o.value.map((x,O)=>x&&u(x,O)):o.value=u(o.value),a("time-update")};return{modelValue:o,time:n,disabledTimesConfig:w,updateTime:(x,O=!0,V=!1)=>{v(x,O,V,A)},validateTime:p}},En=e.defineComponent({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...Ve},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step"],setup(t,{expose:a,emit:o}){const n=o,l=t,f=e.useSlots(),v=Se(f,"timePicker"),u=e.ref(null),{time:$,modelValue:N,disabledTimesConfig:w,updateTime:p,validateTime:_}=An(l,n);return e.onMounted(()=>{l.shadow||n("mount",null)}),a({getSidebarProps:()=>({modelValue:N,time:$,updateTime:p}),toggleTimePicker:(C,B=!1,k="")=>{var K;(K=u.value)==null||K.toggleTimePicker(C,B,k)}}),(C,B)=>(e.openBlock(),e.createBlock(xt,{"multi-calendars":0,stretch:""},{default:e.withCtx(()=>[e.createVNode(Qa,e.mergeProps({ref_key:"tpRef",ref:u},C.$props,{hours:e.unref($).hours,minutes:e.unref($).minutes,seconds:e.unref($).seconds,"internal-model-value":C.internalModelValue,"disabled-times-config":e.unref(w),"validate-time":e.unref(_),"onUpdate:hours":B[0]||(B[0]=k=>e.unref(p)(k)),"onUpdate:minutes":B[1]||(B[1]=k=>e.unref(p)(k,!1)),"onUpdate:seconds":B[2]||(B[2]=k=>e.unref(p)(k,!1,!0)),onAmPmChange:B[3]||(B[3]=k=>C.$emit("am-pm-change",k)),onResetFlow:B[4]||(B[4]=k=>C.$emit("reset-flow"))}),e.createSlots({_:2},[e.renderList(e.unref(v),(k,K)=>({name:k,fn:e.withCtx(H=>[e.renderSlot(C.$slots,k,e.normalizeProps(e.guardReactiveProps(H)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),Rn={class:"dp--header-wrap"},Yn={key:0,class:"dp__month_year_wrap"},On={key:0},Fn={class:"dp__month_year_wrap"},In=["aria-label","data-test","onClick","onKeydown"],Ln=e.defineComponent({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...Ve},emits:["update-month-year","mount","reset-flow","overlay-closed"],setup(t,{expose:a,emit:o}){const n=o,l=t,{defaultedTransitions:f,defaultedAriaLabels:v,defaultedMultiCalendars:u,defaultedFilters:$,defaultedConfig:N,defaultedHighlight:w,propDates:p}=fe(l),{transitionName:_,showTransition:C}=ft(f),{buildMatrix:B}=Ue(),{handleMonthYearChange:k,isDisabled:K,updateMonthYear:H}=Wl(l,n),{showLeftIcon:z,showRightIcon:A}=St(),x=e.ref(!1),O=e.ref(!1),V=e.ref([null,null,null,null]);e.onMounted(()=>{n("mount")});const S=h=>({get:()=>l[h],set:I=>{const r=h===xe.month?xe.year:xe.month;n("update-month-year",{[h]:I,[r]:l[r]}),h===xe.month?c(!0):i(!0)}}),L=e.computed(S(xe.month)),Q=e.computed(S(xe.year)),X=e.computed(()=>h=>({month:l.month,year:l.year,items:h===xe.month?l.months:l.years,instance:l.instance,updateMonthYear:H,toggle:h===xe.month?c:i})),ae=e.computed(()=>l.months.find(I=>I.value===l.month)||{text:"",value:0}),T=e.computed(()=>lt(l.months,h=>{const I=l.month===h.value,r=vt(h.value,Fa(l.year,p.value.minDate),Ia(l.year,p.value.maxDate))||$.value.months.includes(h.value),m=Ua(w.value,h.value,l.year);return{active:I,disabled:r,highlighted:m}})),E=e.computed(()=>lt(l.years,h=>{const I=l.year===h.value,r=vt(h.value,nt(p.value.minDate),nt(p.value.maxDate))||$.value.years.includes(h.value),m=da(w.value,h.value);return{active:I,disabled:r,highlighted:m}})),W=(h,I)=>{I!==void 0?h.value=I:h.value=!h.value,h.value||n("overlay-closed")},c=(h=!1,I)=>{P(h),W(x,I)},i=(h=!1,I)=>{P(h),W(O,I)},P=h=>{h||n("reset-flow")},U=(h,I)=>{l.arrowNavigation&&(V.value[I]=ke(h),B(V.value,"monthYear"))},J=e.computed(()=>{var h,I;return[{type:xe.month,index:1,toggle:c,modelValue:L.value,updateModelValue:r=>L.value=r,text:ae.value.text,showSelectionGrid:x.value,items:T.value,ariaLabel:(h=v.value)==null?void 0:h.openMonthsOverlay},{type:xe.year,index:2,toggle:i,modelValue:Q.value,updateModelValue:r=>Q.value=r,text:Oa(l.year,l.locale),showSelectionGrid:O.value,items:E.value,ariaLabel:(I=v.value)==null?void 0:I.openYearsOverlay}]}),Y=e.computed(()=>l.disableYearSelect?[J.value[0]]:l.yearFirst?[...J.value].reverse():J.value);return a({toggleMonthPicker:c,toggleYearPicker:i,handleMonthYearChange:k}),(h,I)=>{var r,m,M;return e.openBlock(),e.createElementBlock("div",Rn,[h.$slots["month-year"]?(e.openBlock(),e.createElementBlock("div",Yn,[e.renderSlot(h.$slots,"month-year",e.normalizeProps(e.guardReactiveProps({month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:e.unref(H),handleMonthYearChange:e.unref(k),instance:t.instance})))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.$slots["top-extra"]?(e.openBlock(),e.createElementBlock("div",On,[e.renderSlot(h.$slots,"top-extra",{value:h.internalModelValue})])):e.createCommentVNode("",!0),e.createElementVNode("div",Fn,[e.unref(z)(e.unref(u),t.instance)&&!h.vertical?(e.openBlock(),e.createBlock(ct,{key:0,"aria-label":(r=e.unref(v))==null?void 0:r.prevMonth,disabled:e.unref(K)(!1),onActivate:I[0]||(I[0]=q=>e.unref(k)(!1,!0)),onSetRef:I[1]||(I[1]=q=>U(q,0))},{default:e.withCtx(()=>[h.$slots["arrow-left"]?e.renderSlot(h.$slots,"arrow-left",{key:0}):e.createCommentVNode("",!0),h.$slots["arrow-left"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(aa),{key:1}))]),_:3},8,["aria-label","disabled"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:h.disableYearSelect}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Y.value,(q,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:q.type},[e.createElementVNode("button",{ref_for:!0,ref:ee=>U(ee,d+1),type:"button",class:"dp__btn dp__month_year_select",tabindex:"0","aria-label":q.ariaLabel,"data-test":`${q.type}-toggle-overlay-${t.instance}`,onClick:q.toggle,onKeydown:[e.withKeys(e.withModifiers(q.toggle,["prevent"]),["enter"]),e.withKeys(e.withModifiers(q.toggle,["prevent"]),["space"])]},[h.$slots[q.type]?e.renderSlot(h.$slots,q.type,{key:0,text:q.text,value:l[q.type]}):e.createCommentVNode("",!0),h.$slots[q.type]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(q.text),1)],64))],40,In),e.createVNode(e.Transition,{name:e.unref(_)(q.showSelectionGrid),css:e.unref(C)},{default:e.withCtx(()=>[q.showSelectionGrid?(e.openBlock(),e.createBlock(ht,{key:0,items:q.items,"arrow-navigation":h.arrowNavigation,"hide-navigation":h.hideNavigation,"is-last":h.autoApply&&!e.unref(N).keepActionRow,"skip-button-ref":!1,config:h.config,type:q.type,"header-refs":[],"esc-close":h.escClose,"menu-wrap-ref":h.menuWrapRef,"text-input":h.textInput,"aria-labels":h.ariaLabels,onSelected:q.updateModelValue,onToggle:q.toggle},e.createSlots({"button-icon":e.withCtx(()=>[h.$slots["calendar-icon"]?e.renderSlot(h.$slots,"calendar-icon",{key:0}):e.createCommentVNode("",!0),h.$slots["calendar-icon"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(rt),{key:1}))]),_:2},[h.$slots[`${q.type}-overlay-value`]?{name:"item",fn:e.withCtx(({item:ee})=>[e.renderSlot(h.$slots,`${q.type}-overlay-value`,{text:ee.text,value:ee.value})]),key:"0"}:void 0,h.$slots[`${q.type}-overlay`]?{name:"overlay",fn:e.withCtx(()=>[e.renderSlot(h.$slots,`${q.type}-overlay`,e.mergeProps({ref_for:!0},X.value(q.type)))]),key:"1"}:void 0,h.$slots[`${q.type}-overlay-header`]?{name:"header",fn:e.withCtx(()=>[e.renderSlot(h.$slots,`${q.type}-overlay-header`,{toggle:q.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","onSelected","onToggle"])):e.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),e.unref(z)(e.unref(u),t.instance)&&h.vertical?(e.openBlock(),e.createBlock(ct,{key:1,"aria-label":(m=e.unref(v))==null?void 0:m.prevMonth,disabled:e.unref(K)(!1),onActivate:I[2]||(I[2]=q=>e.unref(k)(!1,!0))},{default:e.withCtx(()=>[h.$slots["arrow-up"]?e.renderSlot(h.$slots,"arrow-up",{key:0}):e.createCommentVNode("",!0),h.$slots["arrow-up"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ra),{key:1}))]),_:3},8,["aria-label","disabled"])):e.createCommentVNode("",!0),e.unref(A)(e.unref(u),t.instance)?(e.openBlock(),e.createBlock(ct,{key:2,ref:"rightIcon",disabled:e.unref(K)(!0),"aria-label":(M=e.unref(v))==null?void 0:M.nextMonth,onActivate:I[3]||(I[3]=q=>e.unref(k)(!0,!0)),onSetRef:I[4]||(I[4]=q=>U(q,h.disableYearSelect?2:3))},{default:e.withCtx(()=>[h.$slots[h.vertical?"arrow-down":"arrow-right"]?e.renderSlot(h.$slots,h.vertical?"arrow-down":"arrow-right",{key:0}):e.createCommentVNode("",!0),h.$slots[h.vertical?"arrow-down":"arrow-right"]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.vertical?e.unref(oa):e.unref(la)),{key:1}))]),_:3},8,["disabled","aria-label"])):e.createCommentVNode("",!0)])],64))])}}}),zn=["aria-label"],Kn={class:"dp__calendar_header",role:"row"},qn={key:0,class:"dp__calendar_header_item",role:"gridcell"},Un=["aria-label"],Hn=e.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1),jn=["aria-label"],Wn={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},Gn={class:"dp__cell_inner"},Jn=["id","aria-selected","aria-disabled","aria-label","data-test","onClick","onKeydown","onMouseenter","onMouseleave","onMousedown"],Qn=e.defineComponent({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...Ve},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(t,{expose:a,emit:o}){const n=o,l=t,{buildMultiLevelMatrix:f}=Ue(),{defaultedTransitions:v,defaultedConfig:u,defaultedAriaLabels:$,defaultedMultiCalendars:N,defaultedWeekNumbers:w,defaultedMultiDates:p}=fe(l),_=e.ref(null),C=e.ref({bottom:"",left:"",transform:""}),B=e.ref([]),k=e.ref(null),K=e.ref(!0),H=e.ref(""),z=e.ref({startX:0,endX:0,startY:0,endY:0}),A=e.ref([]),x=e.ref({left:"50%"}),O=e.ref(!1),V=e.computed(()=>l.calendar?l.calendar(l.mappedDates):l.mappedDates),S=e.computed(()=>l.dayNames?Array.isArray(l.dayNames)?l.dayNames:l.dayNames(l.locale,+l.weekStart):fl(l.formatLocale,l.locale,+l.weekStart));e.onMounted(()=>{n("mount",{cmp:"calendar",refs:B}),u.value.noSwipe||k.value&&(k.value.addEventListener("touchstart",J,{passive:!1}),k.value.addEventListener("touchend",Y,{passive:!1}),k.value.addEventListener("touchmove",h,{passive:!1})),l.monthChangeOnScroll&&k.value&&k.value.addEventListener("wheel",m,{passive:!1})});const L=s=>s?l.vertical?"vNext":"next":l.vertical?"vPrevious":"previous",Q=(s,Z)=>{if(l.transitions){const oe=De(Oe(R(),l.month,l.year));H.value=ge(De(Oe(R(),s,Z)),oe)?v.value[L(!0)]:v.value[L(!1)],K.value=!1,e.nextTick(()=>{K.value=!0})}},X=e.computed(()=>({[l.calendarClassName]:!!l.calendarClassName})),ae=e.computed(()=>s=>{const Z=hl(s);return{dp__marker_dot:Z.type==="dot",dp__marker_line:Z.type==="line"}}),T=e.computed(()=>s=>de(s,_.value)),E=e.computed(()=>({dp__calendar:!0,dp__calendar_next:N.value.count>0&&l.instance!==0})),W=e.computed(()=>s=>l.hideOffsetDates?s.current:!0),c=s=>Ae.formatDate(s,"yyyy-MM-dd"),i=async(s,Z,oe)=>{const G=ke(B.value[Z][oe]);if(G){const{width:le,height:b}=G.getBoundingClientRect();_.value=s.value;let D={left:`${le/2}px`},ie=-50;if(await e.nextTick(),A.value[0]){const{left:ue,width:_e}=A.value[0].getBoundingClientRect();ue<0&&(D={left:"0"},ie=0,x.value.left=`${le/2}px`),window.innerWidth<ue+_e&&(D={right:"0"},ie=0,x.value.left=`${_e-le/2}px`)}C.value={bottom:`${b}px`,...D,transform:`translateX(${ie}%)`},n("tooltip-open",s.marker)}},P=async(s,Z,oe)=>{var G,le;if(O.value&&p.value.enabled&&p.value.dragSelect)return n("select-date",s);n("set-hover-date",s),(le=(G=s.marker)==null?void 0:G.tooltip)!=null&&le.length&&await i(s,Z,oe)},U=s=>{_.value&&(_.value=null,C.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),n("tooltip-close",s.marker))},J=s=>{z.value.startX=s.changedTouches[0].screenX,z.value.startY=s.changedTouches[0].screenY},Y=s=>{z.value.endX=s.changedTouches[0].screenX,z.value.endY=s.changedTouches[0].screenY,I()},h=s=>{l.vertical&&!l.inline&&s.preventDefault()},I=()=>{const s=l.vertical?"Y":"X";Math.abs(z.value[`start${s}`]-z.value[`end${s}`])>10&&n("handle-swipe",z.value[`start${s}`]>z.value[`end${s}`]?"right":"left")},r=(s,Z,oe)=>{s&&(Array.isArray(B.value[Z])?B.value[Z][oe]=s:B.value[Z]=[s]),l.arrowNavigation&&f(B.value,"calendar")},m=s=>{l.monthChangeOnScroll&&(s.preventDefault(),n("handle-scroll",s))},M=s=>w.value.type==="local"?ul.getWeek(s.value,{weekStartsOn:+l.weekStart}):w.value.type==="iso"?sl.getISOWeek(s.value):typeof w.value.type=="function"?w.value.type(s.value):"",q=s=>{const Z=s[0];return w.value.hideOnOffsetDates?s.some(oe=>oe.current)?M(Z):"":M(Z)},d=(s,Z)=>{p.value.enabled||(Ke(s,u.value),n("select-date",Z))},ee=s=>{Ke(s,u.value)},re=s=>{p.value.enabled&&p.value.dragSelect?(O.value=!0,n("select-date",s)):p.value.enabled&&n("select-date",s)};return a({triggerTransition:Q}),(s,Z)=>{var oe;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(E.value)},[e.createElementVNode("div",{ref_key:"calendarWrapRef",ref:k,role:"grid",class:e.normalizeClass(X.value),"aria-label":(oe=e.unref($))==null?void 0:oe.calendarWrap},[e.createElementVNode("div",Kn,[s.weekNumbers?(e.openBlock(),e.createElementBlock("div",qn,e.toDisplayString(s.weekNumName),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(G,le)=>{var b,D;return e.openBlock(),e.createElementBlock("div",{key:le,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(D=(b=e.unref($))==null?void 0:b.weekDay)==null?void 0:D.call(b,le)},[s.$slots["calendar-header"]?e.renderSlot(s.$slots,"calendar-header",{key:0,day:G,index:le}):e.createCommentVNode("",!0),s.$slots["calendar-header"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(G),1)],64))],8,Un)}),128))]),Hn,e.createVNode(e.Transition,{name:H.value,css:!!s.transitions},{default:e.withCtx(()=>{var G;return[K.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup","aria-label":((G=e.unref($))==null?void 0:G.calendarDays)||void 0,onMouseleave:Z[1]||(Z[1]=le=>O.value=!1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(le,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:"dp__calendar_row",role:"row"},[s.weekNumbers?(e.openBlock(),e.createElementBlock("div",Wn,[e.createElementVNode("div",Gn,e.toDisplayString(q(le.days)),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.days,(D,ie)=>{var ue,_e,te;return e.openBlock(),e.createElementBlock("div",{id:c(D.value),ref_for:!0,ref:pe=>r(pe,b,ie),key:ie+b,role:"gridcell",class:"dp__calendar_item","aria-selected":(D.classData.dp__active_date||D.classData.dp__range_start||D.classData.dp__range_start)??void 0,"aria-disabled":D.classData.dp__cell_disabled||void 0,"aria-label":(_e=(ue=e.unref($))==null?void 0:ue.day)==null?void 0:_e.call(ue,D),tabindex:"0","data-test":D.value,onClick:e.withModifiers(pe=>d(pe,D),["prevent"]),onKeydown:[e.withKeys(pe=>s.$emit("select-date",D),["enter"]),e.withKeys(pe=>s.$emit("handle-space",D),["space"])],onMouseenter:pe=>P(D,b,ie),onMouseleave:pe=>U(D),onMousedown:pe=>re(D),onMouseup:Z[0]||(Z[0]=pe=>O.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["dp__cell_inner",D.classData])},[s.$slots.day&&W.value(D)?e.renderSlot(s.$slots,"day",{key:0,day:+D.text,date:D.value}):e.createCommentVNode("",!0),s.$slots.day?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(D.text),1)],64)),D.marker&&W.value(D)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[s.$slots.marker?e.renderSlot(s.$slots,"marker",{key:0,marker:D.marker,day:+D.text,date:D.value}):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(ae.value(D.marker)),style:e.normalizeStyle(D.marker.color?{backgroundColor:D.marker.color}:{})},null,6))],64)):e.createCommentVNode("",!0),T.value(D.value)?(e.openBlock(),e.createElementBlock("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:A,class:"dp__marker_tooltip",style:e.normalizeStyle(C.value)},[(te=D.marker)!=null&&te.tooltip?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:ee},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.marker.tooltip,(pe,Be)=>(e.openBlock(),e.createElementBlock("div",{key:Be,class:"dp__tooltip_text"},[s.$slots["marker-tooltip"]?e.renderSlot(s.$slots,"marker-tooltip",{key:0,tooltip:pe,day:D.value}):e.createCommentVNode("",!0),s.$slots["marker-tooltip"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"dp__tooltip_mark",style:e.normalizeStyle(pe.color?{backgroundColor:pe.color}:{})},null,4),e.createElementVNode("div",null,e.toDisplayString(pe.text),1)],64))]))),128)),e.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:e.normalizeStyle(x.value)},null,4)])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],2)],40,Jn)}),128))]))),128))],40,jn)):e.createCommentVNode("",!0)]}),_:3},8,["name","css"])],10,zn)],2)}}}),Ba=t=>Array.isArray(t),Xn=(t,a,o,n)=>{const l=e.ref([]),f=e.ref(new Date),v=e.ref(),{modelValue:u,calendars:$,time:N,today:w}=yt(t,a),{defaultedMultiCalendars:p,defaultedStartTime:_,defaultedRange:C,defaultedConfig:B,defaultedTz:k,propDates:K,defaultedMultiDates:H}=fe(t),{validateMonthYearInRange:z,isDisabled:A,isDateRangeAllowed:x,checkMinMaxRange:O}=He(t),{updateTimeValues:V,getSetDateTime:S,setTime:L,assignStartTime:Q,validateTime:X,disabledTimesConfig:ae}=Xa(t,N,u,n),T=e.computed(()=>g=>$.value[g]?$.value[g].month:0),E=e.computed(()=>g=>$.value[g]?$.value[g].year:0),W=g=>!B.value.keepViewOnOffsetClick||g?!0:!v.value,c=(g,y,F,j=!1)=>{var ce,be;W(j)&&($.value[g]||($.value[g]={month:0,year:0}),$.value[g].month=ka(y)?(ce=$.value[g])==null?void 0:ce.month:y,$.value[g].year=ka(F)?(be=$.value[g])==null?void 0:be.year:F)},i=()=>{t.autoApply&&a("select-date")};e.watch(u,(g,y)=>{JSON.stringify(g)!==JSON.stringify(y)&&J()},{deep:!0}),e.onMounted(()=>{t.shadow||(u.value||(s(),_.value&&Q(_.value)),J(!0),t.focusStartDate&&t.startDate&&s())});const P=e.computed(()=>{var g;return(g=t.flow)!=null&&g.length&&!t.partialFlow?t.flowStep===t.flow.length:!0}),U=()=>{t.autoApply&&P.value&&a("auto-apply")},J=(g=!1)=>{if(u.value)return Array.isArray(u.value)?(l.value=u.value,q(g)):I(u.value,g);if(p.value.count&&g&&!t.startDate)return h(R(),g)},Y=()=>Array.isArray(u.value)&&C.value.enabled?se.getMonth(u.value[0])===se.getMonth(u.value[1]??u.value[0]):!1,h=(g,y=!1)=>{if((!p.value.count||!p.value.static||y)&&c(0,se.getMonth(g),ne.getYear(g)),p.value.count&&(!p.value.solo||!u.value||Y()))for(let F=1;F<p.value.count;F++){const j=me.set(R(),{month:T.value(F-1),year:E.value(F-1)}),ce=xa.add(j,{months:1});$.value[F]={month:se.getMonth(ce),year:ne.getYear(ce)}}},I=(g,y)=>{h(g),L("hours",$e.getHours(g)),L("minutes",Ee.getMinutes(g)),L("seconds",at.getSeconds(g)),p.value.count&&y&&re()},r=g=>{if(p.value.count){if(p.value.solo)return 0;const y=se.getMonth(g[0]),F=se.getMonth(g[1]);return Math.abs(F-y)<p.value.count?0:1}return 1},m=(g,y)=>{g[1]&&C.value.showLastInRange?h(g[r(g)],y):h(g[0],y);const F=(j,ce)=>[j(g[0]),g[1]?j(g[1]):N[ce][1]];L("hours",F($e.getHours,"hours")),L("minutes",F(Ee.getMinutes,"minutes")),L("seconds",F(at.getSeconds,"seconds"))},M=(g,y)=>{if((C.value.enabled||t.weekPicker)&&!H.value.enabled)return m(g,y);if(H.value.enabled&&y){const F=g[g.length-1];return I(F,y)}},q=g=>{const y=u.value;M(y,g),p.value.count&&p.value.solo&&re()},d=(g,y)=>{const F=me.set(R(),{month:T.value(y),year:E.value(y)}),j=g<0?Ge.addMonths(F,1):pt.subMonths(F,1);z(se.getMonth(j),ne.getYear(j),g<0,t.preventMinMaxNavigation)&&(c(y,se.getMonth(j),ne.getYear(j)),a("update-month-year",{instance:y,month:se.getMonth(j),year:ne.getYear(j)}),p.value.count&&!p.value.solo&&ee(y),o())},ee=g=>{for(let y=g-1;y>=0;y--){const F=pt.subMonths(me.set(R(),{month:T.value(y+1),year:E.value(y+1)}),1);c(y,se.getMonth(F),ne.getYear(F))}for(let y=g+1;y<=p.value.count-1;y++){const F=Ge.addMonths(me.set(R(),{month:T.value(y-1),year:E.value(y-1)}),1);c(y,se.getMonth(F),ne.getYear(F))}},re=()=>{if(Array.isArray(u.value)&&u.value.length===2){const g=R(R(u.value[1]?u.value[1]:Ge.addMonths(u.value[0],1))),[y,F]=[se.getMonth(u.value[0]),ne.getYear(u.value[0])],[j,ce]=[se.getMonth(u.value[1]),ne.getYear(u.value[1])];(y!==j||y===j&&F!==ce)&&p.value.solo&&c(1,se.getMonth(g),ne.getYear(g))}else u.value&&!Array.isArray(u.value)&&(c(0,se.getMonth(u.value),ne.getYear(u.value)),h(R()))},s=()=>{t.startDate&&(c(0,se.getMonth(R(t.startDate)),ne.getYear(R(t.startDate))),p.value.count&&ee(0))},Z=(g,y)=>{if(t.monthChangeOnScroll){const F=new Date().getTime()-f.value.getTime(),j=Math.abs(g.deltaY);let ce=500;j>1&&(ce=100),j>100&&(ce=0),F>ce&&(f.value=new Date,d(t.monthChangeOnScroll!=="inverse"?-g.deltaY:g.deltaY,y))}},oe=(g,y,F=!1)=>{t.monthChangeOnArrows&&t.vertical===F&&G(g,y)},G=(g,y)=>{d(g==="right"?-1:1,y)},le=g=>{if(K.value.markers)return Bt(g.value,K.value.markers)},b=(g,y)=>{switch(t.sixWeeks===!0?"append":t.sixWeeks){case"prepend":return[!0,!1];case"center":return[g==0,!0];case"fair":return[g==0||y>g,!0];case"append":return[!1,!1];default:return[!1,!1]}},D=(g,y,F,j)=>{if(t.sixWeeks&&g.length<6){const ce=6-g.length,be=(y.getDay()+7-j)%7,Fe=6-(F.getDay()+7-j)%7,[ut,wt]=b(be,Fe);for(let st=1;st<=ce;st++)if(wt?!!(st%2)==ut:ut){const Ie=g[0].days[0],Ot=ie(We.addDays(Ie.value,-7),se.getMonth(y));g.unshift({days:Ot})}else{const Ie=g[g.length-1],Ot=Ie.days[Ie.days.length-1],Za=ie(We.addDays(Ot.value,1),se.getMonth(y));g.push({days:Za})}}return g},ie=(g,y)=>{const F=R(g),j=[];for(let ce=0;ce<7;ce++){const be=We.addDays(F,ce),Fe=se.getMonth(be)!==y;j.push({text:t.hideOffsetDates&&Fe?"":be.getDate(),value:be,current:!Fe,classData:{}})}return j},ue=(g,y)=>{const F=[],j=new Date(y,g),ce=new Date(y,g+1,0),be=t.weekStart,Fe=Zt.startOfWeek(j,{weekStartsOn:be}),ut=wt=>{const st=ie(wt,g);if(F.push({days:st}),!F[F.length-1].days.some(Ie=>de(De(Ie.value),De(ce)))){const Ie=We.addDays(wt,7);ut(Ie)}};return ut(Fe),D(F,j,ce,be)},_e=g=>{const y=qe(R(g.value),N.hours,N.minutes,Me());a("date-update",y),H.value.enabled?ca(y,u,H.value.limit):u.value=y,n(),e.nextTick().then(()=>{U()})},te=g=>C.value.noDisabledRange?La(l.value[0],g).some(y=>A(y)):!1,pe=()=>{l.value=u.value?u.value.slice():[],l.value.length===2&&!(C.value.fixedStart||C.value.fixedEnd)&&(l.value=[])},Be=(g,y)=>{const F=[R(g.value),We.addDays(R(g.value),+C.value.autoRange)];x(F)?(y&>(g.value),l.value=F):a("invalid-date",g.value)},gt=g=>{const y=se.getMonth(R(g)),F=ne.getYear(R(g));if(c(0,y,F),p.value.count>0)for(let j=1;j<p.value.count;j++){const ce=Ml(me.set(R(g),{year:T.value(j-1),month:E.value(j-1)}));c(j,ce.month,ce.year)}},$t=g=>{if(te(g.value)||!O(g.value,u.value,C.value.fixedStart?0:1))return a("invalid-date",g.value);l.value=Ga(R(g.value),u,a,C)},ot=(g,y)=>{if(pe(),C.value.autoRange)return Be(g,y);if(C.value.fixedStart||C.value.fixedEnd)return $t(g);l.value[0]?O(R(g.value),u.value)&&!te(g.value)?ye(R(g.value),R(l.value[0]))?(l.value.unshift(R(g.value)),a("range-end",l.value[0])):(l.value[1]=R(g.value),a("range-end",l.value[1])):(t.autoApply&&a("auto-apply-invalid",g.value),a("invalid-date",g.value)):(l.value[0]=R(g.value),a("range-start",l.value[0]))},Me=(g=!0)=>t.enableSeconds?Array.isArray(N.seconds)?g?N.seconds[0]:N.seconds[1]:N.seconds:0,it=g=>{l.value[g]=qe(l.value[g],N.hours[g],N.minutes[g],Me(g!==1))},Vt=()=>{var g,y;l.value[0]&&l.value[1]&&+((g=l.value)==null?void 0:g[0])>+((y=l.value)==null?void 0:y[1])&&(l.value.reverse(),a("range-start",l.value[0]),a("range-end",l.value[1]))},kt=()=>{l.value.length&&(l.value[0]&&!l.value[1]?it(0):(it(0),it(1),n()),Vt(),u.value=l.value.slice(),Tt(l.value,a,t.autoApply,t.modelAuto))},Nt=(g,y=!1)=>{if(A(g.value)||!g.current&&t.hideOffsetDates)return a("invalid-date",g.value);if(v.value=JSON.parse(JSON.stringify(g)),!C.value.enabled)return _e(g);Ba(N.hours)&&Ba(N.minutes)&&!H.value.enabled&&(ot(g,y),kt())},Pt=(g,y)=>{var F;c(g,y.month,y.year,!0),p.value.count&&!p.value.solo&&ee(g),a("update-month-year",{instance:g,month:y.month,year:y.year}),o(p.value.solo?g:void 0);const j=(F=t.flow)!=null&&F.length?t.flow[t.flowStep]:void 0;!y.fromNav&&(j===Ne.month||j===Ne.year)&&n()},At=(g,y)=>{Wa({value:g,modelValue:u,range:C.value.enabled,timezone:y?void 0:k.value.timezone}),i(),t.multiCalendars&&e.nextTick().then(()=>J(!0))},Et=()=>{C.value.enabled?u.value&&Array.isArray(u.value)&&u.value[0]?u.value=ye(R(),u.value[0])?[R(),u.value[0]]:[u.value[0],R()]:u.value=[R()]:u.value=R(),i()},Rt=()=>{if(Array.isArray(u.value))if(H.value.enabled){const g=Yt();u.value[u.value.length-1]=S(g)}else u.value=u.value.map((g,y)=>g&&S(g,y));else u.value=S(u.value);a("time-update")},Yt=()=>Array.isArray(u.value)&&u.value.length?u.value[u.value.length-1]:null;return{calendars:$,modelValue:u,month:T,year:E,time:N,disabledTimesConfig:ae,today:w,validateTime:X,getCalendarDays:ue,getMarker:le,handleScroll:Z,handleSwipe:G,handleArrow:oe,selectDate:Nt,updateMonthYear:Pt,presetDate:At,selectCurrentDate:Et,updateTime:(g,y=!0,F=!1)=>{V(g,y,F,Rt)}}},Zn={key:0},er=e.defineComponent({__name:"DatePicker",props:{...Ve},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date"],setup(t,{expose:a,emit:o}){const n=o,l=t,{calendars:f,month:v,year:u,modelValue:$,time:N,disabledTimesConfig:w,today:p,validateTime:_,getCalendarDays:C,getMarker:B,handleArrow:k,handleScroll:K,handleSwipe:H,selectDate:z,updateMonthYear:A,presetDate:x,selectCurrentDate:O,updateTime:V}=Xn(l,n,Y,h),S=e.useSlots(),{setHoverDate:L,getDayClassData:Q,clearHoverDate:X}=Xl($,l),{defaultedMultiCalendars:ae}=fe(l),T=e.ref([]),E=e.ref([]),W=e.ref(null),c=Se(S,"calendar"),i=Se(S,"monthYear"),P=Se(S,"timePicker"),U=r=>{l.shadow||n("mount",r)};e.watch(f,()=>{l.shadow||setTimeout(()=>{n("recalculate-position")},0)},{deep:!0});const J=e.computed(()=>r=>C(v.value(r),u.value(r)).map(m=>({...m,days:m.days.map(M=>(M.marker=B(M),M.classData=Q(M),M))})));function Y(r){var m;r||r===0?(m=E.value[r])==null||m.triggerTransition(v.value(r),u.value(r)):E.value.forEach((M,q)=>M.triggerTransition(v.value(q),u.value(q)))}function h(){n("update-flow-step")}const I=(r,m=!1)=>{z(r,m),l.spaceConfirm&&n("select-date")};return a({clearHoverDate:X,presetDate:x,selectCurrentDate:O,toggleMonthPicker:(r,m,M=0)=>{var q;(q=T.value[M])==null||q.toggleMonthPicker(r,m)},toggleYearPicker:(r,m,M=0)=>{var q;(q=T.value[M])==null||q.toggleYearPicker(r,m)},toggleTimePicker:(r,m,M)=>{var q;(q=W.value)==null||q.toggleTimePicker(r,m,M)},handleArrow:k,updateMonthYear:A,getSidebarProps:()=>({modelValue:$,month:v,year:u,time:N,updateTime:V,updateMonthYear:A,selectDate:z,presetDate:x}),changeMonth:r=>{var m;(m=T.value[0])==null||m.handleMonthYearChange(r,!0)},changeYear:r=>{A(0,{month:v.value(0),year:u.value(0)+(r?1:-1),fromNav:!0})},selectWeekDate:r=>{if(!l.range){const m=$.value?$.value:p,M=r?Zt.startOfWeek(m,{weekStartsOn:1}):Da.endOfWeek(m,{weekStartsOn:1});z({value:M,current:se.getMonth(m)===v.value(0),text:"",classData:{}})}}}),(r,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(xt,{"multi-calendars":e.unref(ae).count,collapse:r.collapse},{default:e.withCtx(({instance:M,index:q})=>[r.disableMonthYearSelect?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ln,e.mergeProps({key:0,ref:d=>{d&&(T.value[q]=d)},months:e.unref(Ea)(r.formatLocale,r.locale,r.monthNameFormat),years:e.unref(ia)(r.yearRange,r.locale,r.reverseYears),month:e.unref(v)(M),year:e.unref(u)(M),instance:M},r.$props,{onMount:m[0]||(m[0]=d=>U(e.unref(Qe).header)),onResetFlow:m[1]||(m[1]=d=>r.$emit("reset-flow")),onUpdateMonthYear:d=>e.unref(A)(M,d),onOverlayClosed:m[2]||(m[2]=d=>r.$emit("focus-menu"))}),e.createSlots({_:2},[e.renderList(e.unref(i),(d,ee)=>({name:d,fn:e.withCtx(re=>[e.renderSlot(r.$slots,d,e.normalizeProps(e.guardReactiveProps(re)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),e.createVNode(Qn,e.mergeProps({ref:d=>{d&&(E.value[q]=d)},"mapped-dates":J.value(M),month:e.unref(v)(M),year:e.unref(u)(M),instance:M},r.$props,{onSelectDate:d=>e.unref(z)(d,M!==1),onHandleSpace:d=>I(d,M!==1),onSetHoverDate:m[3]||(m[3]=d=>e.unref(L)(d)),onHandleScroll:d=>e.unref(K)(d,M),onHandleSwipe:d=>e.unref(H)(d,M),onMount:m[4]||(m[4]=d=>U(e.unref(Qe).calendar)),onResetFlow:m[5]||(m[5]=d=>r.$emit("reset-flow")),onTooltipOpen:m[6]||(m[6]=d=>r.$emit("tooltip-open",d)),onTooltipClose:m[7]||(m[7]=d=>r.$emit("tooltip-close",d))}),e.createSlots({_:2},[e.renderList(e.unref(c),(d,ee)=>({name:d,fn:e.withCtx(re=>[e.renderSlot(r.$slots,d,e.normalizeProps(e.guardReactiveProps({...re})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),r.enableTimePicker?(e.openBlock(),e.createElementBlock("div",Zn,[r.$slots["time-picker"]?e.renderSlot(r.$slots,"time-picker",e.normalizeProps(e.mergeProps({key:0},{time:e.unref(N),updateTime:e.unref(V)}))):(e.openBlock(),e.createBlock(Qa,e.mergeProps({key:1,ref_key:"timePickerRef",ref:W},r.$props,{hours:e.unref(N).hours,minutes:e.unref(N).minutes,seconds:e.unref(N).seconds,"internal-model-value":r.internalModelValue,"disabled-times-config":e.unref(w),"validate-time":e.unref(_),onMount:m[8]||(m[8]=M=>U(e.unref(Qe).timePicker)),"onUpdate:hours":m[9]||(m[9]=M=>e.unref(V)(M)),"onUpdate:minutes":m[10]||(m[10]=M=>e.unref(V)(M,!1)),"onUpdate:seconds":m[11]||(m[11]=M=>e.unref(V)(M,!1,!0)),onResetFlow:m[12]||(m[12]=M=>r.$emit("reset-flow")),onOverlayClosed:m[13]||(m[13]=M=>r.$emit("time-picker-close")),onOverlayOpened:m[14]||(m[14]=M=>r.$emit("time-picker-open",M)),onAmPmChange:m[15]||(m[15]=M=>r.$emit("am-pm-change",M))}),e.createSlots({_:2},[e.renderList(e.unref(P),(M,q)=>({name:M,fn:e.withCtx(d=>[e.renderSlot(r.$slots,M,e.normalizeProps(e.guardReactiveProps(d)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):e.createCommentVNode("",!0)],64))}}),tr=(t,a)=>{const o=e.ref(),{defaultedMultiCalendars:n,defaultedConfig:l,defaultedHighlight:f,defaultedRange:v,propDates:u,defaultedFilters:$,defaultedMultiDates:N}=fe(t),{modelValue:w,year:p,month:_,calendars:C}=yt(t,a),{isDisabled:B}=He(t),{selectYear:k,groupedYears:K,showYearPicker:H,isDisabled:z,toggleYearPicker:A,handleYearSelect:x,handleYear:O}=Ja({modelValue:w,multiCalendars:n,highlight:f,calendars:C,propDates:u,month:_,year:p,filters:$,props:t,emit:a}),V=(c,i)=>[c,i].map(P=>Ae.formatDate(P,"MMMM",{locale:t.formatLocale})).join("-"),S=e.computed(()=>c=>w.value?Array.isArray(w.value)?w.value.some(i=>va.isSameQuarter(c,i)):va.isSameQuarter(w.value,c):!1),L=c=>{if(v.value.enabled){if(Array.isArray(w.value)){const i=de(c,w.value[0])||de(c,w.value[1]);return Mt(w.value,o.value,c)&&!i}return!1}return!1},Q=(c,i)=>c.quarter===ya.getQuarter(i)&&c.year===ne.getYear(i),X=c=>typeof f.value=="function"?f.value({quarter:ya.getQuarter(c),year:ne.getYear(c)}):!!f.value.quarters.find(i=>Q(i,c)),ae=e.computed(()=>c=>{const i=me.set(new Date,{year:p.value(c)});return ll.eachQuarterOfInterval({start:nl.startOfYear(i),end:rl.endOfYear(i)}).map(P=>{const U=ol.startOfQuarter(P),J=fa.endOfQuarter(P),Y=B(P),h=L(U),I=X(U);return{text:V(U,J),value:U,active:S.value(U),highlighted:I,disabled:Y,isBetween:h}})}),T=c=>{ca(c,w,N.value.limit),a("auto-apply",!0)},E=c=>{w.value=ma(w,c,a),Tt(w.value,a,t.autoApply,t.modelAuto)},W=c=>{w.value=c,a("auto-apply")};return{defaultedConfig:l,defaultedMultiCalendars:n,groupedYears:K,year:p,isDisabled:z,quarters:ae,showYearPicker:H,modelValue:w,setHoverDate:c=>{o.value=c},selectYear:k,selectQuarter:(c,i,P)=>{if(!P)return C.value[i].month=se.getMonth(fa.endOfQuarter(c)),N.value.enabled?T(c):v.value.enabled?E(c):W(c)},toggleYearPicker:A,handleYearSelect:x,handleYear:O}},ar={class:"dp--quarter-items"},lr=["data-test","disabled","onClick","onMouseover"],nr=e.defineComponent({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...Ve},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end"],setup(t,{expose:a,emit:o}){const n=o,l=t,f=e.useSlots(),v=Se(f,"yearMode"),{defaultedMultiCalendars:u,defaultedConfig:$,groupedYears:N,year:w,isDisabled:p,quarters:_,modelValue:C,showYearPicker:B,setHoverDate:k,selectQuarter:K,toggleYearPicker:H,handleYearSelect:z,handleYear:A}=tr(l,n);return a({getSidebarProps:()=>({modelValue:C,year:w,selectQuarter:K,handleYearSelect:z,handleYear:A})}),(x,O)=>(e.openBlock(),e.createBlock(xt,{"multi-calendars":e.unref(u).count,collapse:x.collapse,stretch:""},{default:e.withCtx(({instance:V})=>[e.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:e.normalizeStyle({minHeight:`${e.unref($).modeHeight}px`})},[x.$slots["top-extra"]?e.renderSlot(x.$slots,"top-extra",{key:0,value:x.internalModelValue}):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createVNode(ja,e.mergeProps(x.$props,{items:e.unref(N)(V),instance:V,"show-year-picker":e.unref(B)[V],year:e.unref(w)(V),"is-disabled":S=>e.unref(p)(V,S),onHandleYear:S=>e.unref(A)(V,S),onYearSelect:S=>e.unref(z)(S,V),onToggleYearPicker:S=>e.unref(H)(V,S==null?void 0:S.flow,S==null?void 0:S.show)}),e.createSlots({_:2},[e.renderList(e.unref(v),(S,L)=>({name:S,fn:e.withCtx(Q=>[e.renderSlot(x.$slots,S,e.normalizeProps(e.guardReactiveProps(Q)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),e.createElementVNode("div",ar,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_)(V),(S,L)=>(e.openBlock(),e.createElementBlock("div",{key:L},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":S.active,"dp--qr-btn-between":S.isBetween,"dp--qr-btn-disabled":S.disabled,"dp--highlighted":S.highlighted}]),"data-test":S.value,disabled:S.disabled,onClick:Q=>e.unref(K)(S.value,V,S.disabled),onMouseover:Q=>e.unref(k)(S.value)},[x.$slots.quarter?e.renderSlot(x.$slots,"quarter",{key:0,value:S.value,text:S.text}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(S.text),1)],64))],42,lr)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),rr=["id","aria-label"],or={key:0,class:"dp--menu-load-container"},ir=e.createElementVNode("span",{class:"dp--menu-loader"},null,-1),ur=[ir],sr={key:0,class:"dp__sidebar_left"},dr=["data-test","onClick","onKeydown"],cr={key:2,class:"dp__sidebar_right"},mr={key:3,class:"dp__action_extra"},Ma=e.defineComponent({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...Dt,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date"],setup(t,{expose:a,emit:o}){const n=o,l=t,f=e.ref(null),v=e.computed(()=>{const{openOnTop:b,...D}=l;return{...D,flowStep:L.value,collapse:l.collapse,noOverlayFocus:l.noOverlayFocus,menuWrapRef:f.value}}),{setMenuFocused:u,setShiftKey:$,control:N}=Ha(),w=e.useSlots(),{defaultedTextInput:p,defaultedInline:_,defaultedConfig:C}=fe(l),B=e.ref(null),k=e.ref(0),K=e.ref(null),H=e.ref(!1),z=e.ref(null);e.onMounted(()=>{if(!l.shadow){H.value=!0,A(),window.addEventListener("resize",A);const b=ke(f);if(b&&!p.value.enabled&&!_.value.enabled&&(u(!0),W()),b){const D=ie=>{C.value.allowPreventDefault&&ie.preventDefault(),Ke(ie,C.value,!0)};b.addEventListener("pointerdown",D),b.addEventListener("mousedown",D)}}}),e.onUnmounted(()=>{window.removeEventListener("resize",A)});const A=()=>{const b=ke(K);b&&(k.value=b.getBoundingClientRect().width)},{arrowRight:x,arrowLeft:O,arrowDown:V,arrowUp:S}=Ue(),{flowStep:L,updateFlowStep:Q,childMount:X,resetFlow:ae}=Zl(l,n,z),T=e.computed(()=>l.monthPicker?yn:l.yearPicker?gn:l.timePicker?En:l.quarterPicker?nr:er),E=e.computed(()=>{var b;if(C.value.arrowLeft)return C.value.arrowLeft;const D=(b=f.value)==null?void 0:b.getBoundingClientRect(),ie=l.getInputRect();return ie.width<k.value&&ie.left<=((D==null?void 0:D.left)??0)?`${ie.width/2}px`:"50%"}),W=()=>{const b=ke(f);b&&b.focus({preventScroll:!0})},c=e.computed(()=>{var b;return((b=z.value)==null?void 0:b.getSidebarProps())||{}}),i=()=>{l.openOnTop&&n("recalculate-position")},P=Se(w,"action"),U=e.computed(()=>l.monthPicker||l.yearPicker?Se(w,"monthYear"):l.timePicker?Se(w,"timePicker"):Se(w,"shared")),J=e.computed(()=>l.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),Y=e.computed(()=>({dp__menu_disabled:l.disabled,dp__menu_readonly:l.readonly,"dp-menu-loading":l.loading})),h=e.computed(()=>({dp__menu:!0,dp__menu_index:!_.value.enabled,dp__relative:_.value.enabled,[l.menuClassName]:!!l.menuClassName})),I=b=>{Ke(b,C.value,!0)},r=()=>{l.escClose&&n("close-picker")},m=b=>{if(l.arrowNavigation){if(b==="up")return S();if(b==="down")return V();if(b==="left")return O();if(b==="right")return x()}else b==="left"||b==="up"?re("handleArrow","left",0,b==="up"):re("handleArrow","right",0,b==="down")},M=b=>{$(b.shiftKey),!l.disableMonthYearSelect&&b.code==="Tab"&&b.target.classList.contains("dp__menu")&&N.value.shiftKeyInMenu&&(b.preventDefault(),Ke(b,C.value,!0),n("close-picker"))},q=()=>{W(),n("time-picker-close")},d=b=>{var D,ie,ue;(D=z.value)==null||D.toggleTimePicker(!1,!1),(ie=z.value)==null||ie.toggleMonthPicker(!1,!1,b),(ue=z.value)==null||ue.toggleYearPicker(!1,!1,b)},ee=(b,D=0)=>{var ie,ue,_e;return b==="month"?(ie=z.value)==null?void 0:ie.toggleMonthPicker(!1,!0,D):b==="year"?(ue=z.value)==null?void 0:ue.toggleYearPicker(!1,!0,D):b==="time"?(_e=z.value)==null?void 0:_e.toggleTimePicker(!0,!1):d(D)},re=(b,...D)=>{var ie,ue;(ie=z.value)!=null&&ie[b]&&((ue=z.value)==null||ue[b](...D))},s=()=>{re("selectCurrentDate")},Z=(b,D)=>{re("presetDate",b,D)},oe=()=>{re("clearHoverDate")},G=(b,D)=>{re("updateMonthYear",b,D)},le=b=>{if(M(b),b.key==="Home"||b.key==="End")return re("selectWeekDate",b.key==="Home");if(b.key==="PageUp"||b.key==="PageDown")return b.shiftKey?re("changeYear",b.key==="PageUp"):re("changeMonth",b.key==="PageUp")};return a({updateMonthYear:G,switchView:ee}),(b,D)=>{var ie,ue,_e;return e.openBlock(),e.createElementBlock("div",{id:b.uid?`dp-menu-${b.uid}`:void 0,ref_key:"dpMenuRef",ref:f,tabindex:"0",role:"dialog","aria-label":(ie=b.ariaLabels)==null?void 0:ie.menu,class:e.normalizeClass(h.value),style:e.normalizeStyle({"--dp-arrow-left":E.value}),onMouseleave:oe,onClick:I,onKeydown:[e.withKeys(r,["esc"]),D[18]||(D[18]=e.withKeys(e.withModifiers(te=>m("left"),["prevent"]),["left"])),D[19]||(D[19]=e.withKeys(e.withModifiers(te=>m("up"),["prevent"]),["up"])),D[20]||(D[20]=e.withKeys(e.withModifiers(te=>m("down"),["prevent"]),["down"])),D[21]||(D[21]=e.withKeys(e.withModifiers(te=>m("right"),["prevent"]),["right"])),le]},[(b.disabled||b.readonly)&&e.unref(_).enabled||b.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(Y.value)},[b.loading?(e.openBlock(),e.createElementBlock("div",or,ur)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),!e.unref(_).enabled&&!b.teleportCenter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(J.value)},null,2)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"innerMenuRef",ref:K,class:e.normalizeClass({dp__menu_content_wrapper:((ue=b.presetDates)==null?void 0:ue.length)||!!b.$slots["left-sidebar"]||!!b.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":t.collapse&&(((_e=b.presetDates)==null?void 0:_e.length)||!!b.$slots["left-sidebar"]||!!b.$slots["right-sidebar"])}),style:e.normalizeStyle({"--dp-menu-width":`${k.value}px`})},[b.$slots["left-sidebar"]?(e.openBlock(),e.createElementBlock("div",sr,[e.renderSlot(b.$slots,"left-sidebar",e.normalizeProps(e.guardReactiveProps(c.value)))])):e.createCommentVNode("",!0),b.presetDates.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({"dp--preset-dates-collapsed":t.collapse,"dp--preset-dates":!0})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.presetDates,(te,pe)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:pe},[te.slot?e.renderSlot(b.$slots,te.slot,{key:0,presetDate:Z,label:te.label,value:te.value}):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",style:e.normalizeStyle(te.style||{}),class:e.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":t.collapse}]),"data-test":te.testId??void 0,onClick:e.withModifiers(Be=>Z(te.value,te.noTz),["prevent"]),onKeydown:[e.withKeys(e.withModifiers(Be=>Z(te.value,te.noTz),["prevent"]),["enter"]),e.withKeys(e.withModifiers(Be=>Z(te.value,te.noTz),["prevent"]),["space"])]},e.toDisplayString(te.label),47,dr))],64))),128))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"calendarWrapperRef",ref:B,class:"dp__instance_calendar",role:"document"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(T.value),e.mergeProps({ref_key:"dynCmpRef",ref:z},v.value,{"flow-step":e.unref(L),onMount:e.unref(X),onUpdateFlowStep:e.unref(Q),onResetFlow:e.unref(ae),onFocusMenu:W,onSelectDate:D[0]||(D[0]=te=>b.$emit("select-date")),onDateUpdate:D[1]||(D[1]=te=>b.$emit("date-update",te)),onTooltipOpen:D[2]||(D[2]=te=>b.$emit("tooltip-open",te)),onTooltipClose:D[3]||(D[3]=te=>b.$emit("tooltip-close",te)),onAutoApply:D[4]||(D[4]=te=>b.$emit("auto-apply",te)),onRangeStart:D[5]||(D[5]=te=>b.$emit("range-start",te)),onRangeEnd:D[6]||(D[6]=te=>b.$emit("range-end",te)),onInvalidFixedRange:D[7]||(D[7]=te=>b.$emit("invalid-fixed-range",te)),onTimeUpdate:D[8]||(D[8]=te=>b.$emit("time-update")),onAmPmChange:D[9]||(D[9]=te=>b.$emit("am-pm-change",te)),onTimePickerOpen:D[10]||(D[10]=te=>b.$emit("time-picker-open",te)),onTimePickerClose:q,onRecalculatePosition:i,onUpdateMonthYear:D[11]||(D[11]=te=>b.$emit("update-month-year",te)),onAutoApplyInvalid:D[12]||(D[12]=te=>b.$emit("auto-apply-invalid",te)),onInvalidDate:D[13]||(D[13]=te=>b.$emit("invalid-date",te)),"onUpdate:internalModelValue":D[14]||(D[14]=te=>b.$emit("update:internal-model-value",te))}),e.createSlots({_:2},[e.renderList(U.value,(te,pe)=>({name:te,fn:e.withCtx(Be=>[e.renderSlot(b.$slots,te,e.normalizeProps(e.guardReactiveProps({...Be})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),b.$slots["right-sidebar"]?(e.openBlock(),e.createElementBlock("div",cr,[e.renderSlot(b.$slots,"right-sidebar",e.normalizeProps(e.guardReactiveProps(c.value)))])):e.createCommentVNode("",!0),b.$slots["action-extra"]?(e.openBlock(),e.createElementBlock("div",mr,[b.$slots["action-extra"]?e.renderSlot(b.$slots,"action-extra",{key:0,selectCurrentDate:s}):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6),!b.autoApply||e.unref(C).keepActionRow?(e.openBlock(),e.createBlock(on,e.mergeProps({key:2,"menu-mount":H.value},v.value,{"calendar-width":k.value,onClosePicker:D[15]||(D[15]=te=>b.$emit("close-picker")),onSelectDate:D[16]||(D[16]=te=>b.$emit("select-date")),onInvalidSelect:D[17]||(D[17]=te=>b.$emit("invalid-select")),onSelectNow:s}),e.createSlots({_:2},[e.renderList(e.unref(P),(te,pe)=>({name:te,fn:e.withCtx(Be=>[e.renderSlot(b.$slots,te,e.normalizeProps(e.guardReactiveProps({...Be})))])}))]),1040,["menu-mount","calendar-width"])):e.createCommentVNode("",!0)],46,rr)}}}),pr=typeof window<"u"?window:void 0,Gt=()=>{},vr=t=>e.getCurrentScope()?(e.onScopeDispose(t),!0):!1,fr=(t,a,o,n)=>{if(!t)return Gt;let l=Gt;const f=e.watch(()=>e.unref(t),u=>{l(),u&&(u.addEventListener(a,o,n),l=()=>{u.removeEventListener(a,o,n),l=Gt})},{immediate:!0,flush:"post"}),v=()=>{f(),l()};return vr(v),v},yr=(t,a,o,n={})=>{const{window:l=pr,event:f="pointerdown"}=n;return l?fr(l,f,v=>{const u=ke(t),$=ke(a);!u||!$||u===v.target||v.composedPath().includes(u)||v.composedPath().includes($)||o(v)},{passive:!0}):void 0},hr=e.defineComponent({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...Dt},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date"],setup(t,{expose:a,emit:o}){const n=o,l=t,f=e.useSlots(),v=e.ref(!1),u=e.toRef(l,"modelValue"),$=e.toRef(l,"timezone"),N=e.ref(null),w=e.ref(null),p=e.ref(null),_=e.ref(!1),C=e.ref(null),B=e.ref(!1),k=e.ref(!1),K=e.ref(!1),{setMenuFocused:H,setShiftKey:z}=Ha(),{clearArrowNav:A}=Ue(),{validateDate:x,isValidTime:O}=He(l),{defaultedTransitions:V,defaultedTextInput:S,defaultedInline:L,defaultedConfig:Q,defaultedRange:X,defaultedMultiDates:ae}=fe(l),{menuTransition:T,showTransition:E}=ft(V);e.onMounted(()=>{m(l.modelValue),e.nextTick().then(()=>{if(!L.value.enabled){const y=Y(C.value);y==null||y.addEventListener("scroll",le),window==null||window.addEventListener("resize",b)}}),L.value.enabled&&(v.value=!0),window==null||window.addEventListener("keyup",D),window==null||window.addEventListener("keydown",ie)}),e.onUnmounted(()=>{if(!L.value.enabled){const y=Y(C.value);y==null||y.removeEventListener("scroll",le),window==null||window.removeEventListener("resize",b)}window==null||window.removeEventListener("keyup",D),window==null||window.removeEventListener("keydown",ie)});const W=Se(f,"all",l.presetDates),c=Se(f,"input");e.watch([u,$],()=>{m(u.value)},{deep:!0});const{openOnTop:i,menuStyle:P,xCorrect:U,setMenuPosition:J,getScrollableParent:Y,shadowRender:h}=Gl({menuRef:N,menuRefInner:w,inputRef:p,pickerWrapperRef:C,inline:L,emit:n,props:l,slots:f}),{inputValue:I,internalModelValue:r,parseExternalModelValue:m,emitModelValue:M,formatInputValue:q,checkBeforeEmit:d}=jl(n,l,_),ee=e.computed(()=>({dp__main:!0,dp__theme_dark:l.dark,dp__theme_light:!l.dark,dp__flex_display:L.value.enabled,"dp--flex-display-collapsed":K.value,dp__flex_display_with_input:L.value.input})),re=e.computed(()=>l.dark?"dp__theme_dark":"dp__theme_light"),s=e.computed(()=>l.teleport?{to:typeof l.teleport=="boolean"?"body":l.teleport,disabled:!l.teleport||L.value.enabled}:{}),Z=e.computed(()=>({class:"dp__outer_menu_wrap"})),oe=e.computed(()=>L.value.enabled&&(l.timePicker||l.monthPicker||l.yearPicker||l.quarterPicker)),G=()=>{var y,F;return(F=(y=p.value)==null?void 0:y.$el)==null?void 0:F.getBoundingClientRect()},le=()=>{v.value&&(Q.value.closeOnScroll?Me():J())},b=()=>{var y;v.value&&J();const F=(y=w.value)==null?void 0:y.$el.getBoundingClientRect().width;K.value=document.body.offsetWidth<=F},D=y=>{y.key==="Tab"&&!L.value.enabled&&!l.teleport&&Q.value.tabOutClosesMenu&&(C.value.contains(document.activeElement)||Me()),k.value=y.shiftKey},ie=y=>{k.value=y.shiftKey},ue=()=>{!l.disabled&&!l.readonly&&(h(Ma,l),J(!1),v.value=!0,v.value&&n("open"),v.value||ot(),m(l.modelValue))},_e=()=>{var y;I.value="",ot(),(y=p.value)==null||y.setParsedDate(null),n("update:model-value",null),n("update:model-timezone-value",null),n("cleared"),Q.value.closeOnClearValue&&Me()},te=()=>{const y=r.value;return!y||!Array.isArray(y)&&x(y)?!0:Array.isArray(y)?ae.value.enabled||y.length===2&&x(y[0])&&x(y[1])?!0:X.value.partialRange&&!l.timePicker?x(y[0]):!1:!1},pe=()=>{d()&&te()?(M(),Me()):n("invalid-select",r.value)},Be=y=>{gt(),M(),Q.value.closeOnAutoApply&&!y&&Me()},gt=()=>{p.value&&S.value.enabled&&p.value.setParsedDate(r.value)},$t=(y=!1)=>{l.autoApply&&O(r.value)&&te()&&(X.value.enabled&&Array.isArray(r.value)?(X.value.partialRange||r.value.length===2)&&Be(y):Be(y))},ot=()=>{S.value.enabled||(r.value=null)},Me=()=>{L.value.enabled||(v.value&&(v.value=!1,U.value=!1,H(!1),z(!1),A(),n("closed"),I.value&&m(u.value)),ot(),n("blur"))},it=(y,F,j=!1)=>{if(!y){r.value=null;return}const ce=Array.isArray(y)?!y.some(Fe=>!x(Fe)):x(y),be=O(y);ce&&be&&(r.value=y,F&&(B.value=j,pe(),n("text-submit")))},Vt=()=>{l.autoApply&&O(r.value)&&M(),gt()},kt=()=>v.value?Me():ue(),Nt=y=>{r.value=y},Pt=()=>{S.value.enabled&&(_.value=!0,q()),n("focus")},At=()=>{if(S.value.enabled&&(_.value=!1,m(l.modelValue),B.value)){const y=wl(C.value,k.value);y==null||y.focus()}n("blur")},Et=y=>{w.value&&w.value.updateMonthYear(0,{month:ga(y.month),year:ga(y.year)})},Rt=y=>{m(y??l.modelValue)},Yt=(y,F)=>{var j;(j=w.value)==null||j.switchView(y,F)},g=y=>Q.value.onClickOutside?Q.value.onClickOutside(y):Me();return yr(N,p,()=>g(te)),a({closeMenu:Me,selectDate:pe,clearValue:_e,openMenu:ue,onScroll:le,formatInputValue:q,updateInternalModelValue:Nt,setMonthYear:Et,parseModel:Rt,switchView:Yt,toggleMenu:kt}),(y,F)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"pickerWrapperRef",ref:C,class:e.normalizeClass(ee.value),"data-datepicker-instance":""},[e.createVNode(ln,e.mergeProps({ref_key:"inputRef",ref:p,"input-value":e.unref(I),"onUpdate:inputValue":F[0]||(F[0]=j=>e.isRef(I)?I.value=j:null),"is-menu-open":v.value},y.$props,{onClear:_e,onOpen:ue,onSetInputDate:it,onSetEmptyDate:e.unref(M),onSelectDate:pe,onToggle:kt,onClose:Me,onFocus:Pt,onBlur:At,onRealBlur:F[1]||(F[1]=j=>_.value=!1)}),e.createSlots({_:2},[e.renderList(e.unref(c),(j,ce)=>({name:j,fn:e.withCtx(be=>[e.renderSlot(y.$slots,j,e.normalizeProps(e.guardReactiveProps(be)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.teleport?e.Teleport:"div"),e.normalizeProps(e.guardReactiveProps(s.value)),{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:e.unref(T)(e.unref(i)),css:e.unref(E)&&!e.unref(L).enabled},{default:e.withCtx(()=>[v.value?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,ref_key:"dpWrapMenuRef",ref:N},Z.value,{class:{"dp--menu-wrapper":!e.unref(L).enabled},style:e.unref(L).enabled?void 0:e.unref(P)}),[e.createVNode(Ma,e.mergeProps({ref_key:"dpMenuRef",ref:w},y.$props,{"internal-model-value":e.unref(r),"onUpdate:internalModelValue":F[2]||(F[2]=j=>e.isRef(r)?r.value=j:null),class:{[re.value]:!0,"dp--menu-wrapper":y.teleport},"open-on-top":e.unref(i),"no-overlay-focus":oe.value,collapse:K.value,"get-input-rect":G,onClosePicker:Me,onSelectDate:pe,onAutoApply:$t,onTimeUpdate:Vt,onFlowStep:F[3]||(F[3]=j=>y.$emit("flow-step",j)),onUpdateMonthYear:F[4]||(F[4]=j=>y.$emit("update-month-year",j)),onInvalidSelect:F[5]||(F[5]=j=>y.$emit("invalid-select",e.unref(r))),onAutoApplyInvalid:F[6]||(F[6]=j=>y.$emit("invalid-select",j)),onInvalidFixedRange:F[7]||(F[7]=j=>y.$emit("invalid-fixed-range",j)),onRecalculatePosition:e.unref(J),onTooltipOpen:F[8]||(F[8]=j=>y.$emit("tooltip-open",j)),onTooltipClose:F[9]||(F[9]=j=>y.$emit("tooltip-close",j)),onTimePickerOpen:F[10]||(F[10]=j=>y.$emit("time-picker-open",j)),onTimePickerClose:F[11]||(F[11]=j=>y.$emit("time-picker-close",j)),onAmPmChange:F[12]||(F[12]=j=>y.$emit("am-pm-change",j)),onRangeStart:F[13]||(F[13]=j=>y.$emit("range-start",j)),onRangeEnd:F[14]||(F[14]=j=>y.$emit("range-end",j)),onDateUpdate:F[15]||(F[15]=j=>y.$emit("date-update",j)),onInvalidDate:F[16]||(F[16]=j=>y.$emit("invalid-date",j))}),e.createSlots({_:2},[e.renderList(e.unref(W),(j,ce)=>({name:j,fn:e.withCtx(be=>[e.renderSlot(y.$slots,j,e.normalizeProps(e.guardReactiveProps({...be})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","onRecalculatePosition"])],16)):e.createCommentVNode("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),pa=(()=>{const t=hr;return t.install=a=>{a.component("Vue3DatePicker",t)},t})(),gr=Object.freeze(Object.defineProperty({__proto__:null,default:pa},Symbol.toStringTag,{value:"Module"}));Object.entries(gr).forEach(([t,a])=>{t!=="default"&&(pa[t]=a)});exports.default=pa;
|