@tabler/core 1.0.0-beta22 → 1.0.0-beta23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/demo.css +2 -2
- package/dist/css/demo.min.css +2 -2
- package/dist/css/demo.rtl.css +2 -2
- package/dist/css/demo.rtl.min.css +2 -2
- package/dist/css/tabler-flags.css +2 -2
- package/dist/css/tabler-flags.min.css +2 -2
- package/dist/css/tabler-flags.rtl.css +2 -2
- package/dist/css/tabler-flags.rtl.min.css +2 -2
- package/dist/css/tabler-payments.css +2 -2
- package/dist/css/tabler-payments.min.css +2 -2
- package/dist/css/tabler-payments.rtl.css +2 -2
- package/dist/css/tabler-payments.rtl.min.css +2 -2
- package/dist/css/tabler-socials.css +221 -0
- package/dist/css/tabler-socials.min.css +9 -0
- package/dist/css/tabler-socials.rtl.css +221 -0
- package/dist/css/tabler-socials.rtl.min.css +9 -0
- package/dist/css/tabler-vendors.css +4 -3
- package/dist/css/tabler-vendors.min.css +3 -3
- package/dist/css/tabler-vendors.rtl.css +4 -3
- package/dist/css/tabler-vendors.rtl.min.css +3 -3
- package/dist/css/tabler.css +14 -6
- package/dist/css/tabler.min.css +4 -4
- package/dist/css/tabler.rtl.css +14 -6
- package/dist/css/tabler.rtl.min.css +4 -4
- package/dist/img/social/apple-gray.svg +3 -0
- package/dist/img/social/apple.svg +3 -0
- package/dist/img/social/discord-gray.svg +3 -0
- package/dist/img/social/discord.svg +3 -0
- package/dist/img/social/dribbble-gray.svg +3 -0
- package/dist/img/social/dribbble.svg +4 -0
- package/dist/img/social/facebook-gray.svg +3 -0
- package/dist/img/social/facebook.svg +4 -0
- package/dist/img/social/figma-gray.svg +3 -0
- package/dist/img/social/figma.svg +7 -0
- package/dist/img/social/github-gray.svg +10 -0
- package/dist/img/social/github.svg +10 -0
- package/dist/img/social/google-gray.svg +3 -0
- package/dist/img/social/google.svg +6 -0
- package/dist/img/social/instagram-gray.svg +5 -0
- package/dist/img/social/instagram.svg +18 -0
- package/dist/img/social/linkedin-gray.svg +3 -0
- package/dist/img/social/linkedin.svg +3 -0
- package/dist/img/social/medium-gray.svg +5 -0
- package/dist/img/social/medium.svg +5 -0
- package/dist/img/social/meta-gray.svg +5 -0
- package/dist/img/social/meta.svg +17 -0
- package/dist/img/social/metamask-gray.svg +12 -0
- package/dist/img/social/metamask.svg +14 -0
- package/dist/img/social/pinterest-gray.svg +3 -0
- package/dist/img/social/pinterest.svg +4 -0
- package/dist/img/social/reddit-gray.svg +6 -0
- package/dist/img/social/reddit.svg +11 -0
- package/dist/img/social/signal-gray.svg +10 -0
- package/dist/img/social/signal.svg +10 -0
- package/dist/img/social/skype-gray.svg +3 -0
- package/dist/img/social/skype.svg +3 -0
- package/dist/img/social/snapchat-gray.svg +10 -0
- package/dist/img/social/snapchat.svg +11 -0
- package/dist/img/social/spotify-gray.svg +3 -0
- package/dist/img/social/spotify.svg +3 -0
- package/dist/img/social/telegram-gray.svg +3 -0
- package/dist/img/social/telegram.svg +10 -0
- package/dist/img/social/tiktok-gray.svg +3 -0
- package/dist/img/social/tiktok.svg +5 -0
- package/dist/img/social/tumblr-gray.svg +3 -0
- package/dist/img/social/tumblr.svg +3 -0
- package/dist/img/social/twitch-gray.svg +5 -0
- package/dist/img/social/twitch.svg +6 -0
- package/dist/img/social/vk-gray.svg +3 -0
- package/dist/img/social/vk.svg +4 -0
- package/dist/img/social/x-gray.svg +3 -0
- package/dist/img/social/x.svg +3 -0
- package/dist/img/social/youtube-gray.svg +3 -0
- package/dist/img/social/youtube.svg +11 -0
- package/dist/js/demo-theme.js +2 -2
- package/dist/js/demo-theme.min.js +2 -2
- package/dist/js/demo.js +2 -2
- package/dist/js/demo.min.js +2 -2
- package/dist/js/tabler.esm.js +19 -4
- package/dist/js/tabler.esm.min.js +3 -3
- package/dist/js/tabler.js +19 -4
- package/dist/js/tabler.min.js +4 -4
- package/docs/icons/index.mdx +3 -93
- package/docs/icons/libraries/index.mdx +5 -0
- package/docs/icons/{preact.mdx → libraries/preact.mdx} +4 -2
- package/docs/icons/{react.mdx → libraries/react.mdx} +5 -3
- package/docs/icons/{solidjs.mdx → libraries/solidjs.mdx} +5 -2
- package/docs/icons/{svelte.mdx → libraries/svelte.mdx} +5 -2
- package/docs/icons/{vue.mdx → libraries/vue.mdx} +13 -8
- package/docs/icons/{webfont.mdx → libraries/webfont.mdx} +4 -1
- package/docs/icons/plugins/figma.mdx +15 -0
- package/docs/icons/plugins/index.mdx +4 -0
- package/docs/icons/{eps.mdx → static-files/eps.mdx} +3 -1
- package/docs/icons/static-files/index.mdx +5 -0
- package/docs/icons/{pdf.mdx → static-files/pdf.mdx} +3 -1
- package/docs/icons/static-files/png.mdx +31 -0
- package/docs/icons/{svg.mdx → static-files/svg.mdx} +18 -18
- package/docs/illustrations/index.mdx +8 -0
- package/docs/illustrations/introduction/customization.mdx +442 -0
- package/docs/illustrations/introduction/index.mdx +5 -0
- package/docs/img/browsers/brave.svg +1 -0
- package/docs/img/browsers/chrome.svg +1 -0
- package/docs/img/browsers/edge.svg +1 -0
- package/docs/img/browsers/electron.svg +1 -0
- package/docs/img/browsers/firefox.svg +1 -0
- package/docs/img/browsers/internet-explorer.svg +1 -0
- package/docs/img/browsers/opera.svg +1 -0
- package/docs/img/browsers/safari.svg +1 -0
- package/docs/img/browsers/vivaldi.svg +1 -0
- package/docs/img/cover-illustrations-dark.png +0 -0
- package/docs/img/cover-illustrations.png +0 -0
- package/docs/img/cover-tabler-dark.png +0 -0
- package/docs/img/cover-tabler.png +0 -0
- package/docs/img/icons/figma-plugin.png +0 -0
- package/docs/img/icons/package-angular-dark.png +0 -0
- package/docs/img/icons/package-angular.png +0 -0
- package/docs/img/icons/package-eps-dark.png +0 -0
- package/docs/img/icons/package-eps.png +0 -0
- package/docs/img/icons/package-js-dark.png +0 -0
- package/docs/img/icons/package-js.png +0 -0
- package/docs/img/icons/package-pdf-dark.png +0 -0
- package/docs/img/icons/package-pdf.png +0 -0
- package/docs/img/icons/package-png-dark.png +0 -0
- package/docs/img/icons/package-png.png +0 -0
- package/docs/img/icons/package-preact-dark.png +0 -0
- package/docs/img/icons/package-preact.png +0 -0
- package/docs/img/icons/package-react-dark.png +0 -0
- package/docs/img/icons/package-react-native-dark.png +0 -0
- package/docs/img/icons/package-react-native.png +0 -0
- package/docs/img/icons/package-react.png +0 -0
- package/docs/img/icons/package-solidjs-dark.png +0 -0
- package/docs/img/icons/package-solidjs.png +0 -0
- package/docs/img/icons/package-sprite-dark.png +0 -0
- package/docs/img/icons/package-sprite.png +0 -0
- package/docs/img/icons/package-svelte-dark.png +0 -0
- package/docs/img/icons/package-svelte.png +0 -0
- package/docs/img/icons/package-svg-dark.png +0 -0
- package/docs/img/icons/package-svg.png +0 -0
- package/docs/img/icons/package-vue-dark.png +0 -0
- package/docs/img/icons/package-vue.png +0 -0
- package/docs/img/icons/package-webfont-dark.png +0 -0
- package/docs/img/icons/package-webfont.png +0 -0
- package/docs/index.mdx +16 -0
- package/docs/ui/base/colors.mdx +63 -5
- package/docs/ui/base/index.mdx +6 -0
- package/docs/ui/base/typography.mdx +96 -101
- package/docs/ui/components/alerts.mdx +20 -19
- package/docs/ui/components/autosize.mdx +12 -3
- package/docs/ui/components/avatars.mdx +7 -4
- package/docs/ui/components/badges.mdx +25 -16
- package/docs/ui/components/breadcrumb.mdx +125 -59
- package/docs/ui/components/buttons.mdx +142 -87
- package/docs/ui/components/cards.mdx +48 -27
- package/docs/ui/components/carousel.mdx +8 -7
- package/docs/ui/components/charts.mdx +8 -7
- package/docs/ui/components/countup.mdx +13 -14
- package/docs/ui/components/datagrid.mdx +10 -2
- package/docs/ui/components/divider.mdx +6 -6
- package/docs/ui/components/dropdowns.mdx +24 -15
- package/docs/ui/components/dropzone.mdx +5 -11
- package/docs/ui/components/empty.mdx +7 -5
- package/docs/ui/components/icons.mdx +8 -7
- package/docs/ui/components/index.mdx +6 -0
- package/docs/ui/components/inline-player.mdx +4 -3
- package/docs/ui/components/modals.mdx +14 -9
- package/docs/ui/components/placeholder.mdx +12 -11
- package/docs/ui/components/popover.mdx +8 -9
- package/docs/ui/components/progress.mdx +120 -19
- package/docs/ui/components/range-slider.mdx +18 -3
- package/docs/ui/components/ribbons.mdx +13 -12
- package/docs/ui/components/spinners.mdx +31 -10
- package/docs/ui/components/statuses.mdx +38 -13
- package/docs/ui/components/steps.mdx +8 -7
- package/docs/ui/components/switch-icon.mdx +4 -3
- package/docs/ui/components/tables.mdx +37 -17
- package/docs/ui/components/tabs.mdx +17 -11
- package/docs/ui/components/timelines.mdx +48 -29
- package/docs/ui/components/tinymce.mdx +3 -2
- package/docs/ui/components/toasts.mdx +3 -2
- package/docs/ui/components/tooltips.mdx +4 -3
- package/docs/ui/components/tracking.mdx +39 -34
- package/docs/ui/forms/form-color-check.mdx +36 -11
- package/docs/ui/forms/form-elements.mdx +32 -16
- package/docs/ui/forms/form-fieldset.mdx +3 -2
- package/docs/ui/forms/form-helpers.mdx +71 -4
- package/docs/ui/forms/form-image-check.mdx +43 -29
- package/docs/ui/forms/form-input-mask.mdx +33 -5
- package/docs/ui/forms/form-selectboxes.mdx +101 -16
- package/docs/ui/forms/form-validation.mdx +54 -13
- package/docs/ui/forms/index.mdx +6 -0
- package/docs/ui/getting-started/browser-support.mdx +2 -0
- package/docs/ui/getting-started/customize.mdx +5 -4
- package/docs/ui/getting-started/development.mdx +32 -0
- package/docs/ui/getting-started/download.mdx +3 -5
- package/docs/ui/getting-started/faq.mdx +3 -1
- package/docs/ui/getting-started/index.mdx +4 -28
- package/docs/ui/index.mdx +8 -0
- package/docs/ui/layout/index.mdx +6 -0
- package/docs/ui/layout/page-headers.mdx +16 -9
- package/docs/ui/layout/page-layouts.mdx +4 -3
- package/docs/ui/plugins/flags.mdx +270 -6
- package/docs/ui/plugins/index.mdx +6 -0
- package/docs/ui/plugins/payments.mdx +108 -4
- package/docs/ui/plugins/social-icons.mdx +135 -0
- package/docs/ui/utilities/borders.mdx +2 -1
- package/docs/ui/utilities/cursors.mdx +2 -1
- package/docs/ui/utilities/index.mdx +5 -0
- package/docs/ui/utilities/interactions.mdx +10 -5
- package/package.json +4 -3
- package/src/js/src/countup.js +17 -0
- package/src/js/tabler.esm.js +1 -0
- package/src/js/tabler.js +1 -0
- package/src/scss/_variables.scss +2 -4
- package/src/scss/tabler-socials.scss +2 -0
- package/src/scss/ui/_buttons.scss +1 -0
- package/src/scss/ui/_forms.scss +4 -0
- package/src/scss/ui/_social.scss +52 -0
- package/src/scss/ui/_tables.scss +0 -1
- package/src/scss/ui/_type.scss +4 -0
- package/src/scss/vendor/_tom-select.scss +1 -0
- package/dist/css/tabler-social.css +0 -10
- package/dist/css/tabler-social.min.css +0 -8
- package/dist/css/tabler-social.rtl.css +0 -10
- package/dist/css/tabler-social.rtl.min.css +0 -8
- package/docs/icons/figma.mdx +0 -7
- package/docs/icons/png.mdx +0 -19
- package/docs/menu.json +0 -317
- package/docs/ui/components/progressbg.mdx +0 -16
- package/src/scss/tabler-social.scss +0 -1
package/dist/js/demo.js
CHANGED
package/dist/js/demo.min.js
CHANGED
package/dist/js/tabler.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Tabler v1.0.0-
|
|
3
|
-
* @version 1.0.0-
|
|
2
|
+
* Tabler v1.0.0-beta23 (https://tabler.io)
|
|
3
|
+
* @version 1.0.0-beta23
|
|
4
4
|
* @link https://tabler.io
|
|
5
5
|
* Copyright 2018-2025 The Tabler Authors
|
|
6
6
|
* Copyright 2018-2025 codecalm.net Paweł Kuna
|
|
@@ -8,10 +8,25 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var e=new Map;function t(t){var o=e.get(t);o&&o.destroy();}function o(t){var o=e.get(t);o&&o.update();}var r=null;"undefined"==typeof window?((r=function(e){return e}).destroy=function(e){return e},r.update=function(e){return e}):((r=function(t,o){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!e.has(t)){var o,r=null,n=window.getComputedStyle(t),i=(o=t.value,function(){a({testForHeightReduction:""===o||!t.value.startsWith(o),restoreTextAlign:null}),o=t.value;}),l=function(o){t.removeEventListener("autosize:destroy",l),t.removeEventListener("autosize:update",s),t.removeEventListener("input",i),window.removeEventListener("resize",s),Object.keys(o).forEach(function(e){return t.style[e]=o[e]}),e.delete(t);}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",l),t.addEventListener("autosize:update",s),t.addEventListener("input",i),window.addEventListener("resize",s),t.style.overflowX="hidden",t.style.wordWrap="break-word",e.set(t,{destroy:l,update:s}),s();}function a(e){var o,i,l=e.restoreTextAlign,s=void 0===l?null:l,d=e.testForHeightReduction,u=void 0===d||d,c=n.overflowY;if(0!==t.scrollHeight&&("vertical"===n.resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),u&&(o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach(function(e){var t=e[0],o=e[1];t.style.scrollBehavior="auto",t.scrollTop=o,t.style.scrollBehavior=null;})}}(t),t.style.height=""),i="content-box"===n.boxSizing?t.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):t.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),"none"!==n.maxHeight&&i>parseFloat(n.maxHeight)?("hidden"===n.overflowY&&(t.style.overflow="scroll"),i=parseFloat(n.maxHeight)):"hidden"!==n.overflowY&&(t.style.overflow="hidden"),t.style.height=i+"px",s&&(t.style.textAlign=s),o&&o(),r!==i&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),r=i),c!==n.overflow&&!s)){var v=n.textAlign;"hidden"===n.overflow&&(t.style.textAlign="start"===v?"end":"start"),a({restoreTextAlign:v,testForHeightReduction:!0});}}function s(){a({testForHeightReduction:!0,restoreTextAlign:null});}}(t)}),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e});var n=r;
|
|
10
10
|
|
|
11
|
-
var elements = document.querySelectorAll('[data-bs-toggle="autosize"]');
|
|
11
|
+
var elements$1 = document.querySelectorAll('[data-bs-toggle="autosize"]');
|
|
12
|
+
if (elements$1.length) {
|
|
13
|
+
elements$1.forEach(function (element) {
|
|
14
|
+
n(element);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var elements = document.querySelectorAll('[data-countup]');
|
|
12
19
|
if (elements.length) {
|
|
13
20
|
elements.forEach(function (element) {
|
|
14
|
-
|
|
21
|
+
var options = {};
|
|
22
|
+
try {
|
|
23
|
+
options = element.getAttribute('data-countup') ? JSON.parse(element.getAttribute('data-countup')) : {};
|
|
24
|
+
} catch (error) {}
|
|
25
|
+
var value = parseInt(element.innerHTML, 10);
|
|
26
|
+
var countUp = new window.countUp.CountUp(element, value, options);
|
|
27
|
+
if (!countUp.error) {
|
|
28
|
+
countUp.start();
|
|
29
|
+
}
|
|
15
30
|
});
|
|
16
31
|
}
|
|
17
32
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Tabler v1.0.0-
|
|
3
|
-
* @version 1.0.0-
|
|
2
|
+
* Tabler v1.0.0-beta23 (https://tabler.io)
|
|
3
|
+
* @version 1.0.0-beta23
|
|
4
4
|
* @link https://tabler.io
|
|
5
5
|
* Copyright 2018-2025 The Tabler Authors
|
|
6
6
|
* Copyright 2018-2025 codecalm.net Paweł Kuna
|
|
7
7
|
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
|
8
8
|
*/
|
|
9
|
-
var e=new Map;function t(t){var s=e.get(t);s&&s.destroy()}function o(t){var s=e.get(t);s&&s.update()}var r=null;"undefined"==typeof window?((r=function(e){return e}).destroy=function(e){return e},r.update=function(e){return e}):((r=function(t,s){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!e.has(t)){var s,i=null,n=window.getComputedStyle(t),r=(s=t.value,function(){o({testForHeightReduction:""===s||!t.value.startsWith(s),restoreTextAlign:null}),s=t.value}),a=function(s){t.removeEventListener("autosize:destroy",a),t.removeEventListener("autosize:update",l),t.removeEventListener("input",r),window.removeEventListener("resize",l),Object.keys(s).forEach((function(e){return t.style[e]=s[e]})),e.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",a),t.addEventListener("autosize:update",l),t.addEventListener("input",r),window.addEventListener("resize",l),t.style.overflowX="hidden",t.style.wordWrap="break-word",e.set(t,{destroy:a,update:l}),l()}function o(e){var s,r,a=e.restoreTextAlign,l=void 0===a?null:a,u=e.testForHeightReduction,h=void 0===u||u,c=n.overflowY;if(0!==t.scrollHeight&&("vertical"===n.resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),h&&(s=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach((function(e){var t=e[0],s=e[1];t.style.scrollBehavior="auto",t.scrollTop=s,t.style.scrollBehavior=null}))}}(t),t.style.height=""),r="content-box"===n.boxSizing?t.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):t.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),"none"!==n.maxHeight&&r>parseFloat(n.maxHeight)?("hidden"===n.overflowY&&(t.style.overflow="scroll"),r=parseFloat(n.maxHeight)):"hidden"!==n.overflowY&&(t.style.overflow="hidden"),t.style.height=r+"px",l&&(t.style.textAlign=l),s&&s(),i!==r&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=r),c!==n.overflow&&!l)){var d=n.textAlign;"hidden"===n.overflow&&(t.style.textAlign="start"===d?"end":"start"),o({restoreTextAlign:d,testForHeightReduction:!0})}}function l(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e});var n=r,elements=document.querySelectorAll('[data-bs-toggle="autosize"]');function isString(e){return"string"==typeof e||e instanceof String}function isObject(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function pick(e,t){return Array.isArray(t)?pick(e,((e,s)=>t.includes(s))):Object.entries(e).reduce(((e,s)=>{let[i,n]=s;return t(n,i)&&(e[i]=n),e}),{})}elements.length&&elements.forEach((function(e){n(e)}));const DIRECTION={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function forceDirection(e){switch(e){case DIRECTION.LEFT:return DIRECTION.FORCE_LEFT;case DIRECTION.RIGHT:return DIRECTION.FORCE_RIGHT;default:return e}}function escapeRegExp(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function objectIncludes(e,t){if(t===e)return!0;const s=Array.isArray(t),i=Array.isArray(e);let n;if(s&&i){if(t.length!=e.length)return!1;for(n=0;n<t.length;n++)if(!objectIncludes(t[n],e[n]))return!1;return!0}if(s!=i)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){const s=t instanceof Date,i=e instanceof Date;if(s&&i)return t.getTime()==e.getTime();if(s!=i)return!1;const r=t instanceof RegExp,a=e instanceof RegExp;if(r&&a)return t.toString()==e.toString();if(r!=a)return!1;const o=Object.keys(t);for(n=0;n<o.length;n++)if(!Object.prototype.hasOwnProperty.call(e,o[n]))return!1;for(n=0;n<o.length;n++)if(!objectIncludes(e[o[n]],t[o[n]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class ActionDetails{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?DIRECTION.NONE:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?DIRECTION.LEFT:DIRECTION.RIGHT}}function IMask(e,t){return new IMask.InputMask(e,t)}function maskedClass(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?IMask.MaskedRegExp:isString(e)?IMask.MaskedPattern:e===Date?IMask.MaskedDate:e===Number?IMask.MaskedNumber:Array.isArray(e)||e===Array?IMask.MaskedDynamic:IMask.Masked&&e.prototype instanceof IMask.Masked?e:IMask.Masked&&e instanceof IMask.Masked?e.constructor:e instanceof Function?IMask.MaskedFunction:(console.warn("Mask not found for mask",e),IMask.Masked)}function normalizeOpts(e){if(!e)throw new Error("Options in not defined");if(IMask.Masked){if(e.prototype instanceof IMask.Masked)return{mask:e};const{mask:t,...s}=e instanceof IMask.Masked?{mask:e}:isObject(e)&&e.mask instanceof IMask.Masked?e:{};if(t){const e=t.mask;return{...pick(t,((e,t)=>!t.startsWith("_"))),mask:t.constructor,_mask:e,...s}}}return isObject(e)?{...e}:{mask:e}}function createMask(e){if(IMask.Masked&&e instanceof IMask.Masked)return e;const t=normalizeOpts(e),s=maskedClass(t.mask);if(!s)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===s&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new s(t)}IMask.createMask=createMask;class MaskElement{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}IMask.MaskElement=MaskElement;const KEY_Z=90,KEY_Y=89;class HTMLMaskElement extends MaskElement{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return null!=(e=null==(t=(s=this.input).getRootNode)?void 0:t.call(s))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}IMask.HTMLMaskElement=HTMLMaskElement;class HTMLInputMaskElement extends HTMLMaskElement{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}IMask.HTMLMaskElement=HTMLMaskElement;class HTMLContenteditableMaskElement extends HTMLMaskElement{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s>i?s:i}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const i=this.rootElement,n=i.getSelection&&i.getSelection();n&&(n.removeAllRanges(),n.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}IMask.HTMLContenteditableMaskElement=HTMLContenteditableMaskElement;class InputHistory{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>InputHistory.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}InputHistory.MAX_LENGTH=100;class InputMask{constructor(e,t){this.el=e instanceof MaskElement?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new HTMLContenteditableMaskElement(e):new HTMLInputMaskElement(e),this.masked=createMask(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new InputHistory,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof IMask.Masked)&&this.masked.constructor===maskedClass(e))return void this.masked.updateOptions({mask:e});const t=e instanceof IMask.Masked?e:createMask({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach((e=>e(t)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,n=this.displayValue,r=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=t,this._value=s,this._rawInputValue=i,this.el.value!==n&&(this.el.value=n),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),r&&this._fireChangeEvents(),this._historyChanging||!r&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,i=!this.maskEquals(t),n=this.masked.optionsIsChanged(s);i&&(this.mask=t),n&&this.masked.updateOptions(s),(i||n)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,DIRECTION.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new ActionDetails({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,n=s===this.masked.rawInputValue?t.removeDirection:DIRECTION.NONE;let r=this.masked.nearestInputPos(t.startChangePos+i,n);n!==DIRECTION.NONE&&(r=this.masked.nearestInputPos(r,DIRECTION.NONE)),this.updateControl(r),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}IMask.InputMask=InputMask;class ChangeDetails{static normalize(e){return Array.isArray(e)?e:[e,new ChangeDetails]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}IMask.ChangeDetails=ChangeDetails;class ContinuousTailDetails{constructor(e,t,s){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class Masked{constructor(e){this._value="",this._update({...Masked.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new ContinuousTailDetails(this.extractInput(e,t),e)}appendTail(e){return isString(e)&&(e=new ContinuousTailDetails(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new ChangeDetails({inserted:e,rawInserted:e})):new ChangeDetails}_appendChar(e,t,s){void 0===t&&(t={});const i=this.state;let n;if([e,n]=this.doPrepareChar(e,t),e&&(n=n.aggregate(this._appendCharRaw(e,t)),!n.rawInserted&&"pad"===this.autofix)){const s=this.state;this.state=i;let r=this.pad(t);const a=this._appendCharRaw(e,t);r=r.aggregate(a),a.rawInserted||r.equals(n)?n=r:this.state=s}if(n.inserted){let e,r=!1!==this.doValidate(t);if(r&&null!=s){const t=this.state;if(!0===this.overwrite){e=s.state;for(let e=0;e<n.rawInserted.length;++e)s.unshift(this.displayValue.length-n.tailShift)}let i=this.appendTail(s);if(r=i.rawInserted.length===s.toString().length,!(r&&i.inserted||"shift"!==this.overwrite)){this.state=t,e=s.state;for(let e=0;e<n.rawInserted.length;++e)s.shift();i=this.appendTail(s),r=i.rawInserted.length===s.toString().length}r&&i.inserted&&(this.state=t)}r||(n=new ChangeDetails,this.state=i,s&&e&&(s.state=e))}return n}_appendPlaceholder(){return new ChangeDetails}_appendEager(){return new ChangeDetails}append(e,t,s){if(!isString(e))throw new Error("value should be string");const i=isString(s)?new ContinuousTailDetails(String(s)):s;let n;null!=t&&t.tail&&(t._beforeTailState=this.state),[e,n]=this.doPrepare(e,t);for(let s=0;s<e.length;++s){const r=this._appendChar(e[s],t,i);if(!r.rawInserted&&!this.doSkipInvalid(e[s],t,i))break;n.aggregate(r)}return(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&n.aggregate(this._appendEager()),null!=i&&(n.tailShift+=this.appendTail(i).tailShift),n}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new ChangeDetails}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==s&&0===s.indexOf(this.value)&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return Boolean(this.skipInvalid)}doPrepare(e,t){return void 0===t&&(t={}),ChangeDetails.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),ChangeDetails.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,s,i,n){void 0===s&&(s=""),void 0===i&&(i=DIRECTION.NONE),void 0===n&&(n={input:!0});const r=e+t,a=this.extractTail(r),o=!0===this.eager||"remove"===this.eager;let l;o&&(i=forceDirection(i),l=this.extractInput(0,r,{raw:!0}));let u=e;const h=new ChangeDetails;if(i!==DIRECTION.NONE&&(u=this.nearestInputPos(e,t>1&&0!==e&&!o?DIRECTION.NONE:i),h.tailShift=u-e),h.aggregate(this.remove(u)),o&&i!==DIRECTION.NONE&&l===this.rawInputValue)if(i===DIRECTION.FORCE_LEFT){let e;for(;l===this.rawInputValue&&(e=this.displayValue.length);)h.aggregate(new ChangeDetails({tailShift:-1})).aggregate(this.remove(e-1))}else i===DIRECTION.FORCE_RIGHT&&a.unshift();return h.aggregate(this.append(s,n,a))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!objectIncludes(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||Masked.EMPTY_VALUES.includes(e)&&Masked.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new ChangeDetails}}Masked.DEFAULTS={skipInvalid:!0},Masked.EMPTY_VALUES=[void 0,null,""],IMask.Masked=Masked;class ChunksTailDetails{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=isString(e)?new ContinuousTailDetails(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof ContinuousTailDetails)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof ChunksTailDetails){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof IMask.MaskedPattern)){return new ContinuousTailDetails(this.toString()).appendTo(e)}const t=new ChangeDetails;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],n=e._mapPosToBlock(e.displayValue.length),r=i.stop;let a;if(null!=r&&(!n||n.index<=r)&&((i instanceof ChunksTailDetails||e._stops.indexOf(r)>=0)&&t.aggregate(e._appendPlaceholder(r)),a=i instanceof ChunksTailDetails&&e._blocks[r]),a){const s=a.appendTail(i);t.aggregate(s);const n=i.toString().slice(s.rawInserted.length);n&&t.aggregate(e.append(n,{tail:!0}))}else t.aggregate(e.append(i.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map((e=>e.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map((e=>{const t="chunks"in e?new ChunksTailDetails:new ContinuousTailDetails;return t.state=e,t}))}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let s=0;for(;s<this.chunks.length;){const e=this.chunks[s],i=e.unshift(t);if(e.toString()){if(!i)break;++s}else this.chunks.splice(s,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class PatternCursor{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:i}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.FORCE_LEFT),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.LEFT),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.LEFT),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.FORCE_RIGHT),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.NONE),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.NONE),!0}))}}class PatternFixedDefinition{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new ChangeDetails}nearestInputPos(e,t){void 0===t&&(t=DIRECTION.NONE);const s=this._value.length;switch(t){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return 0;default:return s}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===s&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new ChangeDetails;const s=!0===this.eager||"append"===this.eager,i=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,n=new ChangeDetails({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(t.raw||t.input),n}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new ChangeDetails;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new ContinuousTailDetails("")}appendTail(e){return isString(e)&&(e=new ContinuousTailDetails(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return null!=s&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class PatternInputDefinition{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:n,lazy:r,eager:a,...o}=e;this.masked=createMask(o),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:n,lazy:r,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new ChangeDetails}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new ChangeDetails;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&!1===this.doValidate(t)&&(i=new ChangeDetails,this.masked.state=s),i.inserted||this.isOptional||this.lazy||t.input||(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=Boolean(i.inserted),i}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ChangeDetails:(this.isFilled=!0,new ChangeDetails({inserted:this.placeholderChar}))}_appendEager(){return new ChangeDetails}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){void 0===t&&(t=DIRECTION.NONE);const s=this.value.length,i=Math.min(Math.max(e,0),s);switch(t){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return this.isComplete?i:0;case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:return this.isComplete?i:s;default:return i}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new ChangeDetails}}PatternInputDefinition.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class MaskedRegExp extends Masked{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}}IMask.MaskedRegExp=MaskedRegExp;class MaskedPattern extends Masked{constructor(e){super({...MaskedPattern.DEFAULTS,...e,definitions:Object.assign({},PatternInputDefinition.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,i=!1;for(let n=0;n<t.length;++n){if(this.blocks){const e=t.slice(n),s=Object.keys(this.blocks).filter((t=>0===e.indexOf(t)));s.sort(((e,t)=>t.length-e.length));const i=s[0];if(i){const{expose:e,repeat:t,...s}=normalizeOpts(this.blocks[i]),r={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...s,repeat:t,parent:this},a=null!=t?new IMask.RepeatBlock(r):createMask(r);a&&(this._blocks.push(a),e&&(this.exposeBlock=a),this._maskedBlocks[i]||(this._maskedBlocks[i]=[]),this._maskedBlocks[i].push(this._blocks.length-1)),n+=i.length-1;continue}}let r=t[n],a=r in e;if(r===MaskedPattern.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===r||"}"===r){s=!s;continue}if("["===r||"]"===r){i=!i;continue}if(r===MaskedPattern.ESCAPE_CHAR){if(++n,r=t[n],!r)break;a=!1}const o=a?new PatternInputDefinition({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...normalizeOpts(e[r]),parent:this}):new PatternFixedDefinition({char:r,eager:this.eager,isUnmasking:s});this._blocks.push(o)}}get state(){return{...super.state,_blocks:this._blocks.map((e=>e.state))}}set state(e){if(!e)return void this.reset();const{_blocks:t,...s}=e;this._blocks.forEach(((e,s)=>e.state=t[s])),super.state=s}reset(){super.reset(),this._blocks.forEach((e=>e.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((e=>e.isComplete))}get isFilled(){return this._blocks.every((e=>e.isFilled))}get isFixed(){return this._blocks.every((e=>e.isFixed))}get isOptional(){return this._blocks.every((e=>e.isOptional))}doCommit(){this._blocks.forEach((e=>e.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((e,t)=>e+t.unmaskedValue),"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((e,t)=>e+t.value),"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce(((e,t)=>e+t.displayValue),"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new ChangeDetails;let s=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==s)return t;this._blocks[s].isFilled&&++s;for(let e=s;e<this._blocks.length;++e){const s=this._blocks[e]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t}_appendCharRaw(e,t){void 0===t&&(t={});const s=this._mapPosToBlock(this.displayValue.length),i=new ChangeDetails;if(!s)return i;for(let r,a=s.index;r=this._blocks[a];++a){var n;const s=r._appendChar(e,{...t,_beforeTailState:null==(n=t._beforeTailState)||null==(n=n._blocks)?void 0:n[a]});if(i.aggregate(s),s.consumed)break}return i}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=new ChunksTailDetails;return e===t||this._forEachBlocksInRange(e,t,((e,t,i,n)=>{const r=e.extractTail(i,n);r.stop=this._findStopBefore(t),r.from=this._blockStartPos(t),r instanceof ChunksTailDetails&&(r.blockIndex=t),s.extend(r)})),s}extractInput(e,t,s){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===s&&(s={}),e===t)return"";let i="";return this._forEachBlocksInRange(e,t,((e,t,n,r)=>{i+=e.extractInput(n,r,s)})),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(!(i<=e))break;t=i}return t}_appendPlaceholder(e){const t=new ChangeDetails;if(this.lazy&&null==e)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const i=s.index,n=null!=e?e:this._blocks.length;return this._blocks.slice(i,n).forEach((s=>{var i;s.lazy&&null==e||t.aggregate(s._appendPlaceholder(null==(i=s._blocks)?void 0:i.length))})),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],n=t.length;if(t+=i.displayValue,e<=t.length)return{index:s,offset:e-n}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce(((e,t)=>e+t.displayValue.length),0)}_forEachBlocksInRange(e,t,s){void 0===t&&(t=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const e=this._mapPosToBlock(t),n=e&&i.index===e.index,r=i.offset,a=e&&n?e.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,r,a),e&&!n){for(let t=i.index+1;t<e.index;++t)s(this._blocks[t],t,0,this._blocks[t].displayValue.length);s(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,((e,t,i,n)=>{s.aggregate(e.remove(i,n))})),s}nearestInputPos(e,t){if(void 0===t&&(t=DIRECTION.NONE),!this._blocks.length)return 0;const s=new PatternCursor(this,e);if(t===DIRECTION.NONE)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.displayValue.length);if(t===DIRECTION.LEFT||t===DIRECTION.FORCE_LEFT){if(t===DIRECTION.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===DIRECTION.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e)return s.pos;if(s.popState(),s.ok&&s.pos<=e)return s.pos;s.popState()}return s.ok?s.pos:t===DIRECTION.FORCE_LEFT?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return t===DIRECTION.RIGHT||t===DIRECTION.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===DIRECTION.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(e,DIRECTION.LEFT)))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,((e,t,i,n)=>{s+=e.totalInputPositions(i,n)})),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map((e=>this._blocks[e])):[]}pad(e){const t=new ChangeDetails;return this._forEachBlocksInRange(0,this.displayValue.length,(s=>t.aggregate(s.pad(e)))),t}}MaskedPattern.DEFAULTS={...Masked.DEFAULTS,lazy:!0,placeholderChar:"_"},MaskedPattern.STOP_CHAR="`",MaskedPattern.ESCAPE_CHAR="\\",MaskedPattern.InputDefinition=PatternInputDefinition,MaskedPattern.FixedDefinition=PatternFixedDefinition,IMask.MaskedPattern=MaskedPattern;class MaskedRange extends MaskedPattern{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:n=this.autofix,...r}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,i),this.autofix=n;const a=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<o.length&&o[l]===a[l];)++l;r.mask=o.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(r)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",s="";const[,i,n]=e.match(/^(\D*)(\d*)(\D*)/)||[];return n&&(t="0".repeat(i.length)+n,s="9".repeat(i.length)+n),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){let s;return void 0===t&&(t={}),[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[n,r]=this.boundaries(this.value+e);return Number(r)<this.from?super._appendCharRaw(s[this.value.length],t):Number(n)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(i[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(t);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const t=new ChangeDetails;if(this.value.length===this.maxLength)return t;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let s=0;s<i;++s)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach((e=>this._appendCharRaw(e)))}return t}}IMask.MaskedRange=MaskedRange;const DefaultPattern="d{.}`m{.}`Y";class MaskedDate extends MaskedPattern{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:isString(t)?t:s}}constructor(e){super(MaskedDate.extractPatternOptions({...MaskedDate.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...n}={...MaskedDate.DEFAULTS,...e},r=Object.assign({},MaskedDate.GET_DEFAULT_BLOCKS());e.min&&(r.Y.from=e.min.getFullYear()),e.max&&(r.Y.to=e.max.getFullYear()),e.min&&e.max&&r.Y.from===r.Y.to&&(r.m.from=e.min.getMonth()+1,r.m.to=e.max.getMonth()+1,r.m.from===r.m.to&&(r.d.from=e.min.getDate(),r.d.to=e.max.getDate())),Object.assign(r,this.blocks,i),super._update({...n,mask:isString(t)?t:s,blocks:r})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(MaskedDate.extractPatternOptions(e))}}MaskedDate.GET_DEFAULT_BLOCKS=()=>({d:{mask:MaskedRange,from:1,to:31,maxLength:2},m:{mask:MaskedRange,from:1,to:12,maxLength:2},Y:{mask:MaskedRange,from:1900,to:9999}}),MaskedDate.DEFAULTS={...MaskedPattern.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";return[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join(".")},parse:(e,t)=>{const[s,i,n]=e.split(".").map(Number);return new Date(n,i-1,s)}},IMask.MaskedDate=MaskedDate;class MaskedDynamic extends Masked{constructor(e){super({...MaskedDynamic.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map((e=>{const{expose:t,...s}=normalizeOpts(e),i=createMask({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...s});return t&&(this.exposeMask=i),i})):[])}_appendCharRaw(e,t){void 0===t&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){void 0===e&&(e=""),void 0===t&&(t={}),void 0===s&&(s="");const i=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,n=this.rawInputValue,r=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:n,a=n.slice(r.length),o=this.currentMask,l=new ChangeDetails,u=null==o?void 0:o.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==o?(this.currentMask.reset(),r&&(this.currentMask.append(r,{raw:!0}),l.tailShift=this.currentMask.value.length-i.length),a&&(l.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),l}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new ChangeDetails;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(s=e._beforeTailState)?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return void 0===t&&(t={}),void 0===s&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[s,i]=super.doPrepare(e,t);if(this.currentMask){let e;[s,e]=super.doPrepare(s,this.currentMaskFlags(t)),i=i.aggregate(e)}return[s,i]}doPrepareChar(e,t){void 0===t&&(t={});let[s,i]=super.doPrepareChar(e,t);if(this.currentMask){let e;[s,e]=super.doPrepareChar(s,this.currentMaskFlags(t)),i=i.aggregate(e)}return[s,i]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach((e=>e.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const s=new ChangeDetails;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((e=>e.state)),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:i,...n}=e;t&&this.compiledMasks.forEach(((e,s)=>e.state=t[s])),null!=s&&(this.currentMask=s,this.currentMask.state=i),super.state=n}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every(((t,s)=>{if(!e[s])return;const{mask:i,...n}=e[s];return objectIncludes(t,n)&&t.maskEquals(i)})):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}MaskedDynamic.DEFAULTS={...Masked.DEFAULTS,dispatch:(e,t,s,i)=>{if(!t.compiledMasks.length)return;const n=t.rawInputValue,r=t.compiledMasks.map(((r,a)=>{const o=t.currentMask===r,l=o?r.displayValue.length:r.nearestInputPos(r.displayValue.length,DIRECTION.FORCE_LEFT);return r.rawInputValue!==n?(r.reset(),r.append(n,{raw:!0})):o||r.remove(l),r.append(e,t.currentMaskFlags(s)),r.appendTail(i),{index:a,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(l,r.nearestInputPos(r.displayValue.length,DIRECTION.FORCE_LEFT)))}}));return r.sort(((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions)),t.compiledMasks[r[0].index]}},IMask.MaskedDynamic=MaskedDynamic;class MaskedEnum extends MaskedPattern{constructor(e){super({...MaskedEnum.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const e=t.map((e=>e.length)),i=Math.min(...e),n=Math.max(...e)-i;s.mask="*".repeat(i),n&&(s.mask+="["+"*".repeat(n)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){void 0===t&&(t={});const s=Math.min(this.nearestInputPos(0,DIRECTION.FORCE_RIGHT),this.value.length),i=this.enum.filter((t=>this.matchValue(t,this.unmaskedValue+e,s)));if(i.length){1===i.length&&this._forEachBlocksInRange(0,this.value.length,((e,s)=>{const n=i[0][s];s>=this.value.length||n===e.value||(e.reset(),e._appendChar(n,t))}));const e=super._appendCharRaw(i[0][this.value.length],t);return 1===i.length&&i[0].slice(this.unmaskedValue.length).split("").forEach((t=>e.aggregate(super._appendCharRaw(t)))),e}return new ChangeDetails({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new ContinuousTailDetails("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new ChangeDetails;const s=Math.min(super.nearestInputPos(0,DIRECTION.FORCE_RIGHT),this.value.length);let i;for(i=e;i>=0;--i){const e=this.enum.filter((e=>this.matchValue(e,this.value.slice(s,i),s)));if(e.length>1)break}const n=super.remove(i,t);return n.tailShift+=i-e,n}get isComplete(){return this.enum.indexOf(this.value)>=0}}MaskedEnum.DEFAULTS={...MaskedPattern.DEFAULTS,matchValue:(e,t,s)=>e.indexOf(t,s)===s},IMask.MaskedEnum=MaskedEnum;class MaskedFunction extends Masked{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}var _MaskedNumber;IMask.MaskedFunction=MaskedFunction;class MaskedNumber extends Masked{constructor(e){super({...MaskedNumber.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+escapeRegExp(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(escapeRegExp).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(escapeRegExp(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(i.skip=!0),!s||this.allowPositive||this.value||"-"===s||i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(e,t){void 0===t&&(t=!1);let s=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){void 0===t&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const n=this._value;this._value+=e;const r=this.number;let a,o=!isNaN(r),l=!1;if(o){let e;null!=this.min&&this.min<0&&this.number<this.min&&(e=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(MaskedNumber.UNMASKED_RADIX,this.radix),l||(l=n===this._value&&!t.tail)):o=!1),o&&(o=Boolean(this._value.match(this._numberRegExp)))}o?a=new ChangeDetails({inserted:this._value.slice(n.length),rawInserted:l?"":e,skip:l}):(this._value=n,a=new ChangeDetails),this._value=this._insertThousandsSeparators(this._value);const u=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,h=this._separatorsCountFromSlice(u);return a.tailShift+=(h-i)*this.thousandsSeparator.length,a}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const i=this._findSeparatorAround(t);return i>=0&&(t=i+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),i=this.value.slice(t),n=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const r=this._separatorsCountFromSlice(s);return new ChangeDetails({tailShift:(r-n)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case DIRECTION.NONE:case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===DIRECTION.FORCE_LEFT)return s}break}case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,((e,t,s,i)=>t+i)),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){void 0===t&&(t={});const i=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===MaskedNumber.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,MaskedNumber.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(MaskedNumber.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||MaskedNumber.EMPTY_VALUES.includes(e)&&MaskedNumber.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}_MaskedNumber=MaskedNumber,MaskedNumber.UNMASKED_RADIX=".",MaskedNumber.EMPTY_VALUES=[...Masked.EMPTY_VALUES,0],MaskedNumber.DEFAULTS={...Masked.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[_MaskedNumber.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},IMask.MaskedNumber=MaskedNumber;const PIPE_TYPE={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function createPipe(e,t,s){void 0===t&&(t=PIPE_TYPE.MASKED),void 0===s&&(s=PIPE_TYPE.MASKED);const i=createMask(e);return e=>i.runIsolated((i=>(i[t]=e,i[s])))}function pipe(e,t,s,i){return createPipe(t,s,i)(e)}IMask.PIPE_TYPE=PIPE_TYPE,IMask.createPipe=createPipe,IMask.pipe=pipe;class RepeatBlock extends MaskedPattern{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,i;const{repeat:n,...r}=normalizeOpts(e);this._blockOpts=Object.assign({},this._blockOpts,r);const a=createMask(this._blockOpts);this.repeat=null!=(t=null!=(s=null!=n?n:a.repeat)?s:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(i=this._blocks)?void 0:i.length)||0,this.repeatFrom)),blocks:{m:a},eager:a.eager,overwrite:a.overwrite,skipInvalid:a.skipInvalid,lazy:a.lazy,placeholderChar:a.placeholderChar,displayChar:a.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(createMask(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const s=new ChangeDetails;for(let o,l,u=null!=(i=null==(n=this._mapPosToBlock(this.displayValue.length))?void 0:n.index)?i:Math.max(this._blocks.length-1,0);o=null!=(r=this._blocks[u])?r:l=!l&&this._allocateBlock(u);++u){var i,n,r,a;const h=o._appendChar(e,{...t,_beforeTailState:null==(a=t._beforeTailState)||null==(a=a._blocks)?void 0:a[u]});if(h.skip&&l){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(h),h.consumed)break}return s}_trimEmptyTail(e,t){var s,i;void 0===e&&(e=0);const n=Math.max((null==(s=this._mapPosToBlock(e))?void 0:s.index)||0,this.repeatFrom,0);let r;null!=t&&(r=null==(i=this._mapPosToBlock(t))?void 0:i.index),null==r&&(r=this._blocks.length-1);let a=0;for(let e=r;n<=e&&!this._blocks[e].unmaskedValue;--e,++a);a&&(this._blocks.splice(r-a+1,a),this.mask=this.mask.slice(a))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return void 0===e&&(e=0),null==t&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}IMask.RepeatBlock=RepeatBlock;try{globalThis.IMask=IMask}catch{}var maskElementList=[].slice.call(document.querySelectorAll("[data-mask]"));maskElementList.map((function(e){return new IMask(e,{mask:e.dataset.mask,lazy:"true"===e.dataset["mask-visible"]})}));var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce((function(e,t){return e.concat([t+"-"+start,t+"-"+end])}),[]),placements=[].concat(basePlacements,[auto]).reduce((function(e,t){return e.concat([t,t+"-"+start,t+"-"+end])}),[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement$1(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return"undefined"!=typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var s=t.styles[e]||{},i=t.attributes[e]||{},n=t.elements[e];isHTMLElement(n)&&getNodeName(n)&&(Object.assign(n.style,s),Object.keys(i).forEach((function(e){var t=i[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?"":t)})))}))}function effect$2(e){var t=e.state,s={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,s.popper),t.styles=s,t.elements.arrow&&Object.assign(t.elements.arrow.style,s.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],n=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:s[e]).reduce((function(e,t){return e[t]="",e}),{});isHTMLElement(i)&&getNodeName(i)&&(Object.assign(i.style,r),Object.keys(n).forEach((function(e){i.removeAttribute(e)})))}))}}var applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(e){return e.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,s){void 0===t&&(t=!1),void 0===s&&(s=!1);var i=e.getBoundingClientRect(),n=1,r=1;t&&isHTMLElement(e)&&(n=e.offsetWidth>0&&round(i.width)/e.offsetWidth||1,r=e.offsetHeight>0&&round(i.height)/e.offsetHeight||1);var a=(isElement$1(e)?getWindow(e):window).visualViewport,o=!isLayoutViewport()&&s,l=(i.left+(o&&a?a.offsetLeft:0))/n,u=(i.top+(o&&a?a.offsetTop:0))/r,h=i.width/n,c=i.height/r;return{width:h,height:c,top:u,right:l+h,bottom:u+c,left:l,x:l,y:u}}function getLayoutRect(e){var t=getBoundingClientRect(e),s=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-s)<=1&&(s=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:s,height:i}}function contains(e,t){var s=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(s&&isShadowRoot(s)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return["table","td","th"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement$1(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement(e)&&"fixed"!==getComputedStyle$1(e).position?e.offsetParent:null}function getContainingBlock(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(e)&&"fixed"===getComputedStyle$1(e).position)return null;var s=getParentNode(e);for(isShadowRoot(s)&&(s=s.host);isHTMLElement(s)&&["html","body"].indexOf(getNodeName(s))<0;){var i=getComputedStyle$1(s);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return s;s=s.parentNode}return null}function getOffsetParent(e){for(var t=getWindow(e),s=getTrueOffsetParent(e);s&&isTableElement(s)&&"static"===getComputedStyle$1(s).position;)s=getTrueOffsetParent(s);return s&&("html"===getNodeName(s)||"body"===getNodeName(s)&&"static"===getComputedStyle$1(s).position)?t:s||getContainingBlock(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,s){return max(e,min(t,s))}function withinMaxClamp(e,t,s){var i=within(e,t,s);return i>s?s:i}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce((function(t,s){return t[s]=e,t}),{})}var toPaddingObject=function(e,t){return mergePaddingObject("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,basePlacements))};function arrow(e){var t,s=e.state,i=e.name,n=e.options,r=s.elements.arrow,a=s.modifiersData.popperOffsets,o=getBasePlacement(s.placement),l=getMainAxisFromPlacement(o),u=[left,right].indexOf(o)>=0?"height":"width";if(r&&a){var h=toPaddingObject(n.padding,s),c=getLayoutRect(r),d="y"===l?top:left,p="y"===l?bottom:right,_=s.rects.reference[u]+s.rects.reference[l]-a[l]-s.rects.popper[u],g=a[l]-s.rects.reference[l],f=getOffsetParent(r),E=f?"y"===l?f.clientHeight||0:f.clientWidth||0:0,m=_/2-g/2,v=h[d],T=E-c[u]-h[p],A=E/2-c[u]/2+m,b=within(v,A,T),C=l;s.modifiersData[i]=((t={})[C]=b,t.centerOffset=b-A,t)}}function effect$1(e){var t=e.state,s=e.options.element,i=void 0===s?"[data-popper-arrow]":s;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&contains(t.elements.popper,i)&&(t.elements.arrow=i)}var arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(e){return e.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e,t){var s=e.x,i=e.y,n=t.devicePixelRatio||1;return{x:round(s*n)/n||0,y:round(i*n)/n||0}}function mapToStyles(e){var t,s=e.popper,i=e.popperRect,n=e.placement,r=e.variation,a=e.offsets,o=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,c=e.isFixed,d=a.x,p=void 0===d?0:d,_=a.y,g=void 0===_?0:_,f="function"==typeof h?h({x:p,y:g}):{x:p,y:g};p=f.x,g=f.y;var E=a.hasOwnProperty("x"),m=a.hasOwnProperty("y"),v=left,T=top,A=window;if(u){var b=getOffsetParent(s),C="clientHeight",k="clientWidth";if(b===getWindow(s)&&"static"!==getComputedStyle$1(b=getDocumentElement(s)).position&&"absolute"===o&&(C="scrollHeight",k="scrollWidth"),n===top||(n===left||n===right)&&r===end)T=bottom,g-=(c&&b===A&&A.visualViewport?A.visualViewport.height:b[C])-i.height,g*=l?1:-1;if(n===left||(n===top||n===bottom)&&r===end)v=right,p-=(c&&b===A&&A.visualViewport?A.visualViewport.width:b[k])-i.width,p*=l?1:-1}var S,D=Object.assign({position:o},u&&unsetSides),y=!0===h?roundOffsetsByDPR({x:p,y:g},getWindow(s)):{x:p,y:g};return p=y.x,g=y.y,l?Object.assign({},D,((S={})[T]=m?"0":"",S[v]=E?"0":"",S.transform=(A.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",S)):Object.assign({},D,((t={})[T]=m?g+"px":"",t[v]=E?p+"px":"",t.transform="",t))}function computeStyles(e){var t=e.state,s=e.options,i=s.gpuAcceleration,n=void 0===i||i,r=s.adaptive,a=void 0===r||r,o=s.roundOffsets,l=void 0===o||o,u={placement:getBasePlacement(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}},passive={passive:!0};function effect(e){var t=e.state,s=e.instance,i=e.options,n=i.scroll,r=void 0===n||n,a=i.resize,o=void 0===a||a,l=getWindow(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&u.forEach((function(e){e.addEventListener("scroll",s.update,passive)})),o&&l.addEventListener("resize",s.update,passive),function(){r&&u.forEach((function(e){e.removeEventListener("scroll",s.update,passive)})),o&&l.removeEventListener("resize",s.update,passive)}}var eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:effect,data:{}},hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(function(e){return hash$1[e]}))}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,(function(e){return hash[e]}))}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect(e,t){var s=getWindow(e),i=getDocumentElement(e),n=s.visualViewport,r=i.clientWidth,a=i.clientHeight,o=0,l=0;if(n){r=n.width,a=n.height;var u=isLayoutViewport();(u||!u&&"fixed"===t)&&(o=n.offsetLeft,l=n.offsetTop)}return{width:r,height:a,x:o+getWindowScrollBarX(e),y:l}}function getDocumentRect(e){var t,s=getDocumentElement(e),i=getWindowScroll(e),n=null==(t=e.ownerDocument)?void 0:t.body,r=max(s.scrollWidth,s.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=max(s.scrollHeight,s.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),o=-i.scrollLeft+getWindowScrollBarX(e),l=-i.scrollTop;return"rtl"===getComputedStyle$1(n||s).direction&&(o+=max(s.clientWidth,n?n.clientWidth:0)-r),{width:r,height:a,x:o,y:l}}function isScrollParent(e){var t=getComputedStyle$1(e),s=t.overflow,i=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(s+n+i)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){var s;void 0===t&&(t=[]);var i=getScrollParent(e),n=i===(null==(s=e.ownerDocument)?void 0:s.body),r=getWindow(i),a=n?[r].concat(r.visualViewport||[],isScrollParent(i)?i:[]):i,o=t.concat(a);return n?o:o.concat(listScrollParents(getParentNode(a)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect(e,t){var s=getBoundingClientRect(e,!1,"fixed"===t);return s.top=s.top+e.clientTop,s.left=s.left+e.clientLeft,s.bottom=s.top+e.clientHeight,s.right=s.left+e.clientWidth,s.width=e.clientWidth,s.height=e.clientHeight,s.x=s.left,s.y=s.top,s}function getClientRectFromMixedType(e,t,s){return t===viewport?rectToClientRect(getViewportRect(e,s)):isElement$1(t)?getInnerBoundingClientRect(t,s):rectToClientRect(getDocumentRect(getDocumentElement(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode(e)),s=["absolute","fixed"].indexOf(getComputedStyle$1(e).position)>=0&&isHTMLElement(e)?getOffsetParent(e):e;return isElement$1(s)?t.filter((function(e){return isElement$1(e)&&contains(e,s)&&"body"!==getNodeName(e)})):[]}function getClippingRect(e,t,s,i){var n="clippingParents"===t?getClippingParents(e):[].concat(t),r=[].concat(n,[s]),a=r[0],o=r.reduce((function(t,s){var n=getClientRectFromMixedType(e,s,i);return t.top=max(n.top,t.top),t.right=min(n.right,t.right),t.bottom=min(n.bottom,t.bottom),t.left=max(n.left,t.left),t}),getClientRectFromMixedType(e,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function computeOffsets(e){var t,s=e.reference,i=e.element,n=e.placement,r=n?getBasePlacement(n):null,a=n?getVariation(n):null,o=s.x+s.width/2-i.width/2,l=s.y+s.height/2-i.height/2;switch(r){case top:t={x:o,y:s.y-i.height};break;case bottom:t={x:o,y:s.y+s.height};break;case right:t={x:s.x+s.width,y:l};break;case left:t={x:s.x-i.width,y:l};break;default:t={x:s.x,y:s.y}}var u=r?getMainAxisFromPlacement(r):null;if(null!=u){var h="y"===u?"height":"width";switch(a){case start:t[u]=t[u]-(s[h]/2-i[h]/2);break;case end:t[u]=t[u]+(s[h]/2-i[h]/2)}}return t}function detectOverflow(e,t){void 0===t&&(t={});var s=t,i=s.placement,n=void 0===i?e.placement:i,r=s.strategy,a=void 0===r?e.strategy:r,o=s.boundary,l=void 0===o?clippingParents:o,u=s.rootBoundary,h=void 0===u?viewport:u,c=s.elementContext,d=void 0===c?popper:c,p=s.altBoundary,_=void 0!==p&&p,g=s.padding,f=void 0===g?0:g,E=mergePaddingObject("number"!=typeof f?f:expandToHashMap(f,basePlacements)),m=d===popper?reference:popper,v=e.rects.popper,T=e.elements[_?m:d],A=getClippingRect(isElement$1(T)?T:T.contextElement||getDocumentElement(e.elements.popper),l,h,a),b=getBoundingClientRect(e.elements.reference),C=computeOffsets({reference:b,element:v,strategy:"absolute",placement:n}),k=rectToClientRect(Object.assign({},v,C)),S=d===popper?k:b,D={top:A.top-S.top+E.top,bottom:S.bottom-A.bottom+E.bottom,left:A.left-S.left+E.left,right:S.right-A.right+E.right},y=e.modifiersData.offset;if(d===popper&&y){var O=y[n];Object.keys(D).forEach((function(e){var t=[right,bottom].indexOf(e)>=0?1:-1,s=[top,bottom].indexOf(e)>=0?"y":"x";D[e]+=O[s]*t}))}return D}function computeAutoPlacement(e,t){void 0===t&&(t={});var s=t,i=s.placement,n=s.boundary,r=s.rootBoundary,a=s.padding,o=s.flipVariations,l=s.allowedAutoPlacements,u=void 0===l?placements:l,h=getVariation(i),c=h?o?variationPlacements:variationPlacements.filter((function(e){return getVariation(e)===h})):basePlacements,d=c.filter((function(e){return u.indexOf(e)>=0}));0===d.length&&(d=c);var p=d.reduce((function(t,s){return t[s]=detectOverflow(e,{placement:s,boundary:n,rootBoundary:r,padding:a})[getBasePlacement(s)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}function getExpandedFallbackPlacements(e){if(getBasePlacement(e)===auto)return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip(e){var t=e.state,s=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var n=s.mainAxis,r=void 0===n||n,a=s.altAxis,o=void 0===a||a,l=s.fallbackPlacements,u=s.padding,h=s.boundary,c=s.rootBoundary,d=s.altBoundary,p=s.flipVariations,_=void 0===p||p,g=s.allowedAutoPlacements,f=t.options.placement,E=getBasePlacement(f),m=l||(E===f||!_?[getOppositePlacement(f)]:getExpandedFallbackPlacements(f)),v=[f].concat(m).reduce((function(e,s){return e.concat(getBasePlacement(s)===auto?computeAutoPlacement(t,{placement:s,boundary:h,rootBoundary:c,padding:u,flipVariations:_,allowedAutoPlacements:g}):s)}),[]),T=t.rects.reference,A=t.rects.popper,b=new Map,C=!0,k=v[0],S=0;S<v.length;S++){var D=v[S],y=getBasePlacement(D),O=getVariation(D)===start,N=[top,bottom].indexOf(y)>=0,w=N?"width":"height",I=detectOverflow(t,{placement:D,boundary:h,rootBoundary:c,altBoundary:d,padding:u}),M=N?O?right:left:O?bottom:top;T[w]>A[w]&&(M=getOppositePlacement(M));var L=getOppositePlacement(M),R=[];if(r&&R.push(I[y]<=0),o&&R.push(I[M]<=0,I[L]<=0),R.every((function(e){return e}))){k=D,C=!1;break}b.set(D,R)}if(C)for(var P=function(e){var t=v.find((function(t){var s=b.get(t);if(s)return s.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},x=_?3:1;x>0;x--){if("break"===P(x))break}t.placement!==k&&(t.modifiersData[i]._skip=!0,t.placement=k,t.reset=!0)}}var flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(e,t,s){return void 0===s&&(s={x:0,y:0}),{top:e.top-t.height-s.y,right:e.right-t.width+s.x,bottom:e.bottom-t.height+s.y,left:e.left-t.width-s.x}}function isAnySideFullyClipped(e){return[top,right,bottom,left].some((function(t){return e[t]>=0}))}function hide(e){var t=e.state,s=e.name,i=t.rects.reference,n=t.rects.popper,r=t.modifiersData.preventOverflow,a=detectOverflow(t,{elementContext:"reference"}),o=detectOverflow(t,{altBoundary:!0}),l=getSideOffsets(a,i),u=getSideOffsets(o,n,r),h=isAnySideFullyClipped(l),c=isAnySideFullyClipped(u);t.modifiersData[s]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:c},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":c})}var hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(e,t,s){var i=getBasePlacement(e),n=[left,top].indexOf(i)>=0?-1:1,r="function"==typeof s?s(Object.assign({},t,{placement:e})):s,a=r[0],o=r[1];return a=a||0,o=(o||0)*n,[left,right].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function offset(e){var t=e.state,s=e.options,i=e.name,n=s.offset,r=void 0===n?[0,0]:n,a=placements.reduce((function(e,s){return e[s]=distanceAndSkiddingToXY(s,t.rects,r),e}),{}),o=a[t.placement],l=o.x,u=o.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[i]=a}var offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(e){var t=e.state,s=e.name;t.modifiersData[s]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(e){return"x"===e?"y":"x"}function preventOverflow(e){var t=e.state,s=e.options,i=e.name,n=s.mainAxis,r=void 0===n||n,a=s.altAxis,o=void 0!==a&&a,l=s.boundary,u=s.rootBoundary,h=s.altBoundary,c=s.padding,d=s.tether,p=void 0===d||d,_=s.tetherOffset,g=void 0===_?0:_,f=detectOverflow(t,{boundary:l,rootBoundary:u,padding:c,altBoundary:h}),E=getBasePlacement(t.placement),m=getVariation(t.placement),v=!m,T=getMainAxisFromPlacement(E),A=getAltAxis(T),b=t.modifiersData.popperOffsets,C=t.rects.reference,k=t.rects.popper,S="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,D="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(b){if(r){var N,w="y"===T?top:left,I="y"===T?bottom:right,M="y"===T?"height":"width",L=b[T],R=L+f[w],P=L-f[I],x=p?-k[M]/2:0,V=m===start?C[M]:k[M],F=m===start?-k[M]:-C[M],$=t.elements.arrow,B=p&&$?getLayoutRect($):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),K=H[w],W=H[I],Y=within(0,C[M],B[M]),j=v?C[M]/2-x-Y-K-D.mainAxis:V-Y-K-D.mainAxis,U=v?-C[M]/2+x+Y+W+D.mainAxis:F+Y+W+D.mainAxis,G=t.elements.arrow&&getOffsetParent(t.elements.arrow),z=G?"y"===T?G.clientTop||0:G.clientLeft||0:0,q=null!=(N=null==y?void 0:y[T])?N:0,X=L+U-q,Q=within(p?min(R,L+j-q-z):R,L,p?max(P,X):P);b[T]=Q,O[T]=Q-L}if(o){var Z,J="x"===T?top:left,ee="x"===T?bottom:right,te=b[A],se="y"===A?"height":"width",ie=te+f[J],ne=te-f[ee],re=-1!==[top,left].indexOf(E),ae=null!=(Z=null==y?void 0:y[A])?Z:0,oe=re?ie:te-C[se]-k[se]-ae+D.altAxis,le=re?te+C[se]+k[se]-ae-D.altAxis:ne,ue=p&&re?withinMaxClamp(oe,te,le):within(p?oe:ie,te,p?le:ne);b[A]=ue,O[A]=ue-te}t.modifiersData[i]=O}}var preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll(e){return e!==getWindow(e)&&isHTMLElement(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),s=round(t.width)/e.offsetWidth||1,i=round(t.height)/e.offsetHeight||1;return 1!==s||1!==i}function getCompositeRect(e,t,s){void 0===s&&(s=!1);var i=isHTMLElement(t),n=isHTMLElement(t)&&isElementScaled(t),r=getDocumentElement(t),a=getBoundingClientRect(e,n,s),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!s)&&(("body"!==getNodeName(t)||isScrollParent(r))&&(o=getNodeScroll(t)),isHTMLElement(t)?((l=getBoundingClientRect(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=getWindowScrollBarX(r))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function order(e){var t=new Map,s=new Set,i=[];function n(e){s.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!s.has(e)){var i=t.get(e);i&&n(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){s.has(e.name)||n(e)})),i}function orderModifiers(e){var t=order(e);return modifierPhases.reduce((function(e,s){return e.concat(t.filter((function(e){return e.phase===s})))}),[])}function debounce(e){var t;return function(){return t||(t=new Promise((function(s){Promise.resolve().then((function(){t=void 0,s(e())}))}))),t}}function mergeByName(e){var t=e.reduce((function(e,t){var s=e[t.name];return e[t.name]=s?Object.assign({},s,t,{options:Object.assign({},s.options,t.options),data:Object.assign({},s.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function popperGenerator(e){void 0===e&&(e={});var t=e,s=t.defaultModifiers,i=void 0===s?[]:s,n=t.defaultOptions,r=void 0===n?DEFAULT_OPTIONS:n;return function(e,t,s){void 0===s&&(s=r);var n={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],o=!1,l={state:n,setOptions:function(s){var o="function"==typeof s?s(n.options):s;u(),n.options=Object.assign({},r,n.options,o),n.scrollParents={reference:isElement$1(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var h=orderModifiers(mergeByName([].concat(i,n.options.modifiers)));return n.orderedModifiers=h.filter((function(e){return e.enabled})),n.orderedModifiers.forEach((function(e){var t=e.name,s=e.options,i=void 0===s?{}:s,r=e.effect;if("function"==typeof r){var o=r({state:n,name:t,instance:l,options:i}),u=function(){};a.push(o||u)}})),l.update()},forceUpdate:function(){if(!o){var e=n.elements,t=e.reference,s=e.popper;if(areValidElements(t,s)){n.rects={reference:getCompositeRect(t,getOffsetParent(s),"fixed"===n.options.strategy),popper:getLayoutRect(s)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach((function(e){return n.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<n.orderedModifiers.length;i++)if(!0!==n.reset){var r=n.orderedModifiers[i],a=r.fn,u=r.options,h=void 0===u?{}:u,c=r.name;"function"==typeof a&&(n=a({state:n,options:h,name:c,instance:l})||n)}else n.reset=!1,i=-1}}},update:debounce((function(){return new Promise((function(e){l.forceUpdate(),e(n)}))})),destroy:function(){u(),o=!0}};if(!areValidElements(e,t))return l;function u(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(s).then((function(e){!o&&s.onFirstUpdate&&s.onFirstUpdate(e)})),l}}var createPopper$2=popperGenerator(),defaultModifiers$1=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1],createPopper$1=popperGenerator({defaultModifiers:defaultModifiers$1}),defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers:defaultModifiers}),Popper=Object.freeze({__proto__:null,popperGenerator:popperGenerator,detectOverflow:detectOverflow,createPopperBase:createPopper$2,createPopper:createPopper,createPopperLite:createPopper$1,top:top,bottom:bottom,right:right,left:left,auto:auto,basePlacements:basePlacements,start:start,end:end,clippingParents:clippingParents,viewport:viewport,popper:popper,reference:reference,variationPlacements:variationPlacements,placements:placements,beforeRead:beforeRead,read:read,afterRead:afterRead,beforeMain:beforeMain,main:main,afterMain:afterMain,beforeWrite:beforeWrite,write:write,afterWrite:afterWrite,modifierPhases:modifierPhases,applyStyles:applyStyles$1,arrow:arrow$1,computeStyles:computeStyles$1,eventListeners:eventListeners,flip:flip$1,hide:hide$1,offset:offset$1,popperOffsets:popperOffsets$1,preventOverflow:preventOverflow$1});
|
|
9
|
+
var e=new Map;function t(t){var s=e.get(t);s&&s.destroy()}function o(t){var s=e.get(t);s&&s.update()}var r=null;"undefined"==typeof window?((r=function(e){return e}).destroy=function(e){return e},r.update=function(e){return e}):((r=function(t,s){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!e.has(t)){var s,i=null,n=window.getComputedStyle(t),r=(s=t.value,function(){o({testForHeightReduction:""===s||!t.value.startsWith(s),restoreTextAlign:null}),s=t.value}),a=function(s){t.removeEventListener("autosize:destroy",a),t.removeEventListener("autosize:update",l),t.removeEventListener("input",r),window.removeEventListener("resize",l),Object.keys(s).forEach((function(e){return t.style[e]=s[e]})),e.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",a),t.addEventListener("autosize:update",l),t.addEventListener("input",r),window.addEventListener("resize",l),t.style.overflowX="hidden",t.style.wordWrap="break-word",e.set(t,{destroy:a,update:l}),l()}function o(e){var s,r,a=e.restoreTextAlign,l=void 0===a?null:a,u=e.testForHeightReduction,h=void 0===u||u,c=n.overflowY;if(0!==t.scrollHeight&&("vertical"===n.resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),h&&(s=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach((function(e){var t=e[0],s=e[1];t.style.scrollBehavior="auto",t.scrollTop=s,t.style.scrollBehavior=null}))}}(t),t.style.height=""),r="content-box"===n.boxSizing?t.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):t.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),"none"!==n.maxHeight&&r>parseFloat(n.maxHeight)?("hidden"===n.overflowY&&(t.style.overflow="scroll"),r=parseFloat(n.maxHeight)):"hidden"!==n.overflowY&&(t.style.overflow="hidden"),t.style.height=r+"px",l&&(t.style.textAlign=l),s&&s(),i!==r&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=r),c!==n.overflow&&!l)){var d=n.textAlign;"hidden"===n.overflow&&(t.style.textAlign="start"===d?"end":"start"),o({restoreTextAlign:d,testForHeightReduction:!0})}}function l(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e});var n=r,elements$1=document.querySelectorAll('[data-bs-toggle="autosize"]');elements$1.length&&elements$1.forEach((function(e){n(e)}));var elements=document.querySelectorAll("[data-countup]");function isString(e){return"string"==typeof e||e instanceof String}function isObject(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function pick(e,t){return Array.isArray(t)?pick(e,((e,s)=>t.includes(s))):Object.entries(e).reduce(((e,s)=>{let[i,n]=s;return t(n,i)&&(e[i]=n),e}),{})}elements.length&&elements.forEach((function(e){var t={};try{t=e.getAttribute("data-countup")?JSON.parse(e.getAttribute("data-countup")):{}}catch(e){}var s=parseInt(e.innerHTML,10),i=new window.countUp.CountUp(e,s,t);i.error||i.start()}));const DIRECTION={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function forceDirection(e){switch(e){case DIRECTION.LEFT:return DIRECTION.FORCE_LEFT;case DIRECTION.RIGHT:return DIRECTION.FORCE_RIGHT;default:return e}}function escapeRegExp(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function objectIncludes(e,t){if(t===e)return!0;const s=Array.isArray(t),i=Array.isArray(e);let n;if(s&&i){if(t.length!=e.length)return!1;for(n=0;n<t.length;n++)if(!objectIncludes(t[n],e[n]))return!1;return!0}if(s!=i)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){const s=t instanceof Date,i=e instanceof Date;if(s&&i)return t.getTime()==e.getTime();if(s!=i)return!1;const r=t instanceof RegExp,a=e instanceof RegExp;if(r&&a)return t.toString()==e.toString();if(r!=a)return!1;const o=Object.keys(t);for(n=0;n<o.length;n++)if(!Object.prototype.hasOwnProperty.call(e,o[n]))return!1;for(n=0;n<o.length;n++)if(!objectIncludes(e[o[n]],t[o[n]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class ActionDetails{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?DIRECTION.NONE:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?DIRECTION.LEFT:DIRECTION.RIGHT}}function IMask(e,t){return new IMask.InputMask(e,t)}function maskedClass(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?IMask.MaskedRegExp:isString(e)?IMask.MaskedPattern:e===Date?IMask.MaskedDate:e===Number?IMask.MaskedNumber:Array.isArray(e)||e===Array?IMask.MaskedDynamic:IMask.Masked&&e.prototype instanceof IMask.Masked?e:IMask.Masked&&e instanceof IMask.Masked?e.constructor:e instanceof Function?IMask.MaskedFunction:(console.warn("Mask not found for mask",e),IMask.Masked)}function normalizeOpts(e){if(!e)throw new Error("Options in not defined");if(IMask.Masked){if(e.prototype instanceof IMask.Masked)return{mask:e};const{mask:t,...s}=e instanceof IMask.Masked?{mask:e}:isObject(e)&&e.mask instanceof IMask.Masked?e:{};if(t){const e=t.mask;return{...pick(t,((e,t)=>!t.startsWith("_"))),mask:t.constructor,_mask:e,...s}}}return isObject(e)?{...e}:{mask:e}}function createMask(e){if(IMask.Masked&&e instanceof IMask.Masked)return e;const t=normalizeOpts(e),s=maskedClass(t.mask);if(!s)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===s&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new s(t)}IMask.createMask=createMask;class MaskElement{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}IMask.MaskElement=MaskElement;const KEY_Z=90,KEY_Y=89;class HTMLMaskElement extends MaskElement{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return null!=(e=null==(t=(s=this.input).getRootNode)?void 0:t.call(s))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}IMask.HTMLMaskElement=HTMLMaskElement;class HTMLInputMaskElement extends HTMLMaskElement{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}IMask.HTMLMaskElement=HTMLMaskElement;class HTMLContenteditableMaskElement extends HTMLMaskElement{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s>i?s:i}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const i=this.rootElement,n=i.getSelection&&i.getSelection();n&&(n.removeAllRanges(),n.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}IMask.HTMLContenteditableMaskElement=HTMLContenteditableMaskElement;class InputHistory{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>InputHistory.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}InputHistory.MAX_LENGTH=100;class InputMask{constructor(e,t){this.el=e instanceof MaskElement?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new HTMLContenteditableMaskElement(e):new HTMLInputMaskElement(e),this.masked=createMask(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new InputHistory,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof IMask.Masked)&&this.masked.constructor===maskedClass(e))return void this.masked.updateOptions({mask:e});const t=e instanceof IMask.Masked?e:createMask({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach((e=>e(t)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,n=this.displayValue,r=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=t,this._value=s,this._rawInputValue=i,this.el.value!==n&&(this.el.value=n),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),r&&this._fireChangeEvents(),this._historyChanging||!r&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,i=!this.maskEquals(t),n=this.masked.optionsIsChanged(s);i&&(this.mask=t),n&&this.masked.updateOptions(s),(i||n)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,DIRECTION.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new ActionDetails({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,n=s===this.masked.rawInputValue?t.removeDirection:DIRECTION.NONE;let r=this.masked.nearestInputPos(t.startChangePos+i,n);n!==DIRECTION.NONE&&(r=this.masked.nearestInputPos(r,DIRECTION.NONE)),this.updateControl(r),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}IMask.InputMask=InputMask;class ChangeDetails{static normalize(e){return Array.isArray(e)?e:[e,new ChangeDetails]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}IMask.ChangeDetails=ChangeDetails;class ContinuousTailDetails{constructor(e,t,s){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class Masked{constructor(e){this._value="",this._update({...Masked.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new ContinuousTailDetails(this.extractInput(e,t),e)}appendTail(e){return isString(e)&&(e=new ContinuousTailDetails(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new ChangeDetails({inserted:e,rawInserted:e})):new ChangeDetails}_appendChar(e,t,s){void 0===t&&(t={});const i=this.state;let n;if([e,n]=this.doPrepareChar(e,t),e&&(n=n.aggregate(this._appendCharRaw(e,t)),!n.rawInserted&&"pad"===this.autofix)){const s=this.state;this.state=i;let r=this.pad(t);const a=this._appendCharRaw(e,t);r=r.aggregate(a),a.rawInserted||r.equals(n)?n=r:this.state=s}if(n.inserted){let e,r=!1!==this.doValidate(t);if(r&&null!=s){const t=this.state;if(!0===this.overwrite){e=s.state;for(let e=0;e<n.rawInserted.length;++e)s.unshift(this.displayValue.length-n.tailShift)}let i=this.appendTail(s);if(r=i.rawInserted.length===s.toString().length,!(r&&i.inserted||"shift"!==this.overwrite)){this.state=t,e=s.state;for(let e=0;e<n.rawInserted.length;++e)s.shift();i=this.appendTail(s),r=i.rawInserted.length===s.toString().length}r&&i.inserted&&(this.state=t)}r||(n=new ChangeDetails,this.state=i,s&&e&&(s.state=e))}return n}_appendPlaceholder(){return new ChangeDetails}_appendEager(){return new ChangeDetails}append(e,t,s){if(!isString(e))throw new Error("value should be string");const i=isString(s)?new ContinuousTailDetails(String(s)):s;let n;null!=t&&t.tail&&(t._beforeTailState=this.state),[e,n]=this.doPrepare(e,t);for(let s=0;s<e.length;++s){const r=this._appendChar(e[s],t,i);if(!r.rawInserted&&!this.doSkipInvalid(e[s],t,i))break;n.aggregate(r)}return(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&n.aggregate(this._appendEager()),null!=i&&(n.tailShift+=this.appendTail(i).tailShift),n}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new ChangeDetails}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==s&&0===s.indexOf(this.value)&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return Boolean(this.skipInvalid)}doPrepare(e,t){return void 0===t&&(t={}),ChangeDetails.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),ChangeDetails.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,s,i,n){void 0===s&&(s=""),void 0===i&&(i=DIRECTION.NONE),void 0===n&&(n={input:!0});const r=e+t,a=this.extractTail(r),o=!0===this.eager||"remove"===this.eager;let l;o&&(i=forceDirection(i),l=this.extractInput(0,r,{raw:!0}));let u=e;const h=new ChangeDetails;if(i!==DIRECTION.NONE&&(u=this.nearestInputPos(e,t>1&&0!==e&&!o?DIRECTION.NONE:i),h.tailShift=u-e),h.aggregate(this.remove(u)),o&&i!==DIRECTION.NONE&&l===this.rawInputValue)if(i===DIRECTION.FORCE_LEFT){let e;for(;l===this.rawInputValue&&(e=this.displayValue.length);)h.aggregate(new ChangeDetails({tailShift:-1})).aggregate(this.remove(e-1))}else i===DIRECTION.FORCE_RIGHT&&a.unshift();return h.aggregate(this.append(s,n,a))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!objectIncludes(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||Masked.EMPTY_VALUES.includes(e)&&Masked.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new ChangeDetails}}Masked.DEFAULTS={skipInvalid:!0},Masked.EMPTY_VALUES=[void 0,null,""],IMask.Masked=Masked;class ChunksTailDetails{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=isString(e)?new ContinuousTailDetails(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof ContinuousTailDetails)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof ChunksTailDetails){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof IMask.MaskedPattern)){return new ContinuousTailDetails(this.toString()).appendTo(e)}const t=new ChangeDetails;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],n=e._mapPosToBlock(e.displayValue.length),r=i.stop;let a;if(null!=r&&(!n||n.index<=r)&&((i instanceof ChunksTailDetails||e._stops.indexOf(r)>=0)&&t.aggregate(e._appendPlaceholder(r)),a=i instanceof ChunksTailDetails&&e._blocks[r]),a){const s=a.appendTail(i);t.aggregate(s);const n=i.toString().slice(s.rawInserted.length);n&&t.aggregate(e.append(n,{tail:!0}))}else t.aggregate(e.append(i.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map((e=>e.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map((e=>{const t="chunks"in e?new ChunksTailDetails:new ContinuousTailDetails;return t.state=e,t}))}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let s=0;for(;s<this.chunks.length;){const e=this.chunks[s],i=e.unshift(t);if(e.toString()){if(!i)break;++s}else this.chunks.splice(s,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class PatternCursor{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:i}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.FORCE_LEFT),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.LEFT),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.LEFT),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.FORCE_RIGHT),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.NONE),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.NONE),!0}))}}class PatternFixedDefinition{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new ChangeDetails}nearestInputPos(e,t){void 0===t&&(t=DIRECTION.NONE);const s=this._value.length;switch(t){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return 0;default:return s}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===s&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new ChangeDetails;const s=!0===this.eager||"append"===this.eager,i=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,n=new ChangeDetails({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(t.raw||t.input),n}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new ChangeDetails;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new ContinuousTailDetails("")}appendTail(e){return isString(e)&&(e=new ContinuousTailDetails(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return null!=s&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class PatternInputDefinition{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:n,lazy:r,eager:a,...o}=e;this.masked=createMask(o),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:n,lazy:r,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new ChangeDetails}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new ChangeDetails;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&!1===this.doValidate(t)&&(i=new ChangeDetails,this.masked.state=s),i.inserted||this.isOptional||this.lazy||t.input||(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=Boolean(i.inserted),i}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ChangeDetails:(this.isFilled=!0,new ChangeDetails({inserted:this.placeholderChar}))}_appendEager(){return new ChangeDetails}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){void 0===t&&(t=DIRECTION.NONE);const s=this.value.length,i=Math.min(Math.max(e,0),s);switch(t){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return this.isComplete?i:0;case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:return this.isComplete?i:s;default:return i}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new ChangeDetails}}PatternInputDefinition.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class MaskedRegExp extends Masked{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}}IMask.MaskedRegExp=MaskedRegExp;class MaskedPattern extends Masked{constructor(e){super({...MaskedPattern.DEFAULTS,...e,definitions:Object.assign({},PatternInputDefinition.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,i=!1;for(let n=0;n<t.length;++n){if(this.blocks){const e=t.slice(n),s=Object.keys(this.blocks).filter((t=>0===e.indexOf(t)));s.sort(((e,t)=>t.length-e.length));const i=s[0];if(i){const{expose:e,repeat:t,...s}=normalizeOpts(this.blocks[i]),r={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...s,repeat:t,parent:this},a=null!=t?new IMask.RepeatBlock(r):createMask(r);a&&(this._blocks.push(a),e&&(this.exposeBlock=a),this._maskedBlocks[i]||(this._maskedBlocks[i]=[]),this._maskedBlocks[i].push(this._blocks.length-1)),n+=i.length-1;continue}}let r=t[n],a=r in e;if(r===MaskedPattern.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===r||"}"===r){s=!s;continue}if("["===r||"]"===r){i=!i;continue}if(r===MaskedPattern.ESCAPE_CHAR){if(++n,r=t[n],!r)break;a=!1}const o=a?new PatternInputDefinition({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...normalizeOpts(e[r]),parent:this}):new PatternFixedDefinition({char:r,eager:this.eager,isUnmasking:s});this._blocks.push(o)}}get state(){return{...super.state,_blocks:this._blocks.map((e=>e.state))}}set state(e){if(!e)return void this.reset();const{_blocks:t,...s}=e;this._blocks.forEach(((e,s)=>e.state=t[s])),super.state=s}reset(){super.reset(),this._blocks.forEach((e=>e.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((e=>e.isComplete))}get isFilled(){return this._blocks.every((e=>e.isFilled))}get isFixed(){return this._blocks.every((e=>e.isFixed))}get isOptional(){return this._blocks.every((e=>e.isOptional))}doCommit(){this._blocks.forEach((e=>e.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((e,t)=>e+t.unmaskedValue),"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((e,t)=>e+t.value),"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce(((e,t)=>e+t.displayValue),"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new ChangeDetails;let s=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==s)return t;this._blocks[s].isFilled&&++s;for(let e=s;e<this._blocks.length;++e){const s=this._blocks[e]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t}_appendCharRaw(e,t){void 0===t&&(t={});const s=this._mapPosToBlock(this.displayValue.length),i=new ChangeDetails;if(!s)return i;for(let r,a=s.index;r=this._blocks[a];++a){var n;const s=r._appendChar(e,{...t,_beforeTailState:null==(n=t._beforeTailState)||null==(n=n._blocks)?void 0:n[a]});if(i.aggregate(s),s.consumed)break}return i}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=new ChunksTailDetails;return e===t||this._forEachBlocksInRange(e,t,((e,t,i,n)=>{const r=e.extractTail(i,n);r.stop=this._findStopBefore(t),r.from=this._blockStartPos(t),r instanceof ChunksTailDetails&&(r.blockIndex=t),s.extend(r)})),s}extractInput(e,t,s){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===s&&(s={}),e===t)return"";let i="";return this._forEachBlocksInRange(e,t,((e,t,n,r)=>{i+=e.extractInput(n,r,s)})),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(!(i<=e))break;t=i}return t}_appendPlaceholder(e){const t=new ChangeDetails;if(this.lazy&&null==e)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const i=s.index,n=null!=e?e:this._blocks.length;return this._blocks.slice(i,n).forEach((s=>{var i;s.lazy&&null==e||t.aggregate(s._appendPlaceholder(null==(i=s._blocks)?void 0:i.length))})),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],n=t.length;if(t+=i.displayValue,e<=t.length)return{index:s,offset:e-n}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce(((e,t)=>e+t.displayValue.length),0)}_forEachBlocksInRange(e,t,s){void 0===t&&(t=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const e=this._mapPosToBlock(t),n=e&&i.index===e.index,r=i.offset,a=e&&n?e.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,r,a),e&&!n){for(let t=i.index+1;t<e.index;++t)s(this._blocks[t],t,0,this._blocks[t].displayValue.length);s(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,((e,t,i,n)=>{s.aggregate(e.remove(i,n))})),s}nearestInputPos(e,t){if(void 0===t&&(t=DIRECTION.NONE),!this._blocks.length)return 0;const s=new PatternCursor(this,e);if(t===DIRECTION.NONE)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.displayValue.length);if(t===DIRECTION.LEFT||t===DIRECTION.FORCE_LEFT){if(t===DIRECTION.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===DIRECTION.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e)return s.pos;if(s.popState(),s.ok&&s.pos<=e)return s.pos;s.popState()}return s.ok?s.pos:t===DIRECTION.FORCE_LEFT?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return t===DIRECTION.RIGHT||t===DIRECTION.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===DIRECTION.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(e,DIRECTION.LEFT)))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,((e,t,i,n)=>{s+=e.totalInputPositions(i,n)})),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map((e=>this._blocks[e])):[]}pad(e){const t=new ChangeDetails;return this._forEachBlocksInRange(0,this.displayValue.length,(s=>t.aggregate(s.pad(e)))),t}}MaskedPattern.DEFAULTS={...Masked.DEFAULTS,lazy:!0,placeholderChar:"_"},MaskedPattern.STOP_CHAR="`",MaskedPattern.ESCAPE_CHAR="\\",MaskedPattern.InputDefinition=PatternInputDefinition,MaskedPattern.FixedDefinition=PatternFixedDefinition,IMask.MaskedPattern=MaskedPattern;class MaskedRange extends MaskedPattern{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:n=this.autofix,...r}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,i),this.autofix=n;const a=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<o.length&&o[l]===a[l];)++l;r.mask=o.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(r)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",s="";const[,i,n]=e.match(/^(\D*)(\d*)(\D*)/)||[];return n&&(t="0".repeat(i.length)+n,s="9".repeat(i.length)+n),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){let s;return void 0===t&&(t={}),[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[n,r]=this.boundaries(this.value+e);return Number(r)<this.from?super._appendCharRaw(s[this.value.length],t):Number(n)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(i[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(t);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const t=new ChangeDetails;if(this.value.length===this.maxLength)return t;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let s=0;s<i;++s)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach((e=>this._appendCharRaw(e)))}return t}}IMask.MaskedRange=MaskedRange;const DefaultPattern="d{.}`m{.}`Y";class MaskedDate extends MaskedPattern{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:isString(t)?t:s}}constructor(e){super(MaskedDate.extractPatternOptions({...MaskedDate.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...n}={...MaskedDate.DEFAULTS,...e},r=Object.assign({},MaskedDate.GET_DEFAULT_BLOCKS());e.min&&(r.Y.from=e.min.getFullYear()),e.max&&(r.Y.to=e.max.getFullYear()),e.min&&e.max&&r.Y.from===r.Y.to&&(r.m.from=e.min.getMonth()+1,r.m.to=e.max.getMonth()+1,r.m.from===r.m.to&&(r.d.from=e.min.getDate(),r.d.to=e.max.getDate())),Object.assign(r,this.blocks,i),super._update({...n,mask:isString(t)?t:s,blocks:r})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(MaskedDate.extractPatternOptions(e))}}MaskedDate.GET_DEFAULT_BLOCKS=()=>({d:{mask:MaskedRange,from:1,to:31,maxLength:2},m:{mask:MaskedRange,from:1,to:12,maxLength:2},Y:{mask:MaskedRange,from:1900,to:9999}}),MaskedDate.DEFAULTS={...MaskedPattern.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";return[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join(".")},parse:(e,t)=>{const[s,i,n]=e.split(".").map(Number);return new Date(n,i-1,s)}},IMask.MaskedDate=MaskedDate;class MaskedDynamic extends Masked{constructor(e){super({...MaskedDynamic.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map((e=>{const{expose:t,...s}=normalizeOpts(e),i=createMask({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...s});return t&&(this.exposeMask=i),i})):[])}_appendCharRaw(e,t){void 0===t&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){void 0===e&&(e=""),void 0===t&&(t={}),void 0===s&&(s="");const i=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,n=this.rawInputValue,r=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:n,a=n.slice(r.length),o=this.currentMask,l=new ChangeDetails,u=null==o?void 0:o.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==o?(this.currentMask.reset(),r&&(this.currentMask.append(r,{raw:!0}),l.tailShift=this.currentMask.value.length-i.length),a&&(l.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),l}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new ChangeDetails;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(s=e._beforeTailState)?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return void 0===t&&(t={}),void 0===s&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[s,i]=super.doPrepare(e,t);if(this.currentMask){let e;[s,e]=super.doPrepare(s,this.currentMaskFlags(t)),i=i.aggregate(e)}return[s,i]}doPrepareChar(e,t){void 0===t&&(t={});let[s,i]=super.doPrepareChar(e,t);if(this.currentMask){let e;[s,e]=super.doPrepareChar(s,this.currentMaskFlags(t)),i=i.aggregate(e)}return[s,i]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach((e=>e.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const s=new ChangeDetails;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((e=>e.state)),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:i,...n}=e;t&&this.compiledMasks.forEach(((e,s)=>e.state=t[s])),null!=s&&(this.currentMask=s,this.currentMask.state=i),super.state=n}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every(((t,s)=>{if(!e[s])return;const{mask:i,...n}=e[s];return objectIncludes(t,n)&&t.maskEquals(i)})):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}MaskedDynamic.DEFAULTS={...Masked.DEFAULTS,dispatch:(e,t,s,i)=>{if(!t.compiledMasks.length)return;const n=t.rawInputValue,r=t.compiledMasks.map(((r,a)=>{const o=t.currentMask===r,l=o?r.displayValue.length:r.nearestInputPos(r.displayValue.length,DIRECTION.FORCE_LEFT);return r.rawInputValue!==n?(r.reset(),r.append(n,{raw:!0})):o||r.remove(l),r.append(e,t.currentMaskFlags(s)),r.appendTail(i),{index:a,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(l,r.nearestInputPos(r.displayValue.length,DIRECTION.FORCE_LEFT)))}}));return r.sort(((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions)),t.compiledMasks[r[0].index]}},IMask.MaskedDynamic=MaskedDynamic;class MaskedEnum extends MaskedPattern{constructor(e){super({...MaskedEnum.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const e=t.map((e=>e.length)),i=Math.min(...e),n=Math.max(...e)-i;s.mask="*".repeat(i),n&&(s.mask+="["+"*".repeat(n)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){void 0===t&&(t={});const s=Math.min(this.nearestInputPos(0,DIRECTION.FORCE_RIGHT),this.value.length),i=this.enum.filter((t=>this.matchValue(t,this.unmaskedValue+e,s)));if(i.length){1===i.length&&this._forEachBlocksInRange(0,this.value.length,((e,s)=>{const n=i[0][s];s>=this.value.length||n===e.value||(e.reset(),e._appendChar(n,t))}));const e=super._appendCharRaw(i[0][this.value.length],t);return 1===i.length&&i[0].slice(this.unmaskedValue.length).split("").forEach((t=>e.aggregate(super._appendCharRaw(t)))),e}return new ChangeDetails({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new ContinuousTailDetails("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new ChangeDetails;const s=Math.min(super.nearestInputPos(0,DIRECTION.FORCE_RIGHT),this.value.length);let i;for(i=e;i>=0;--i){const e=this.enum.filter((e=>this.matchValue(e,this.value.slice(s,i),s)));if(e.length>1)break}const n=super.remove(i,t);return n.tailShift+=i-e,n}get isComplete(){return this.enum.indexOf(this.value)>=0}}MaskedEnum.DEFAULTS={...MaskedPattern.DEFAULTS,matchValue:(e,t,s)=>e.indexOf(t,s)===s},IMask.MaskedEnum=MaskedEnum;class MaskedFunction extends Masked{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}var _MaskedNumber;IMask.MaskedFunction=MaskedFunction;class MaskedNumber extends Masked{constructor(e){super({...MaskedNumber.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+escapeRegExp(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(escapeRegExp).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(escapeRegExp(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(i.skip=!0),!s||this.allowPositive||this.value||"-"===s||i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(e,t){void 0===t&&(t=!1);let s=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){void 0===t&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const n=this._value;this._value+=e;const r=this.number;let a,o=!isNaN(r),l=!1;if(o){let e;null!=this.min&&this.min<0&&this.number<this.min&&(e=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(MaskedNumber.UNMASKED_RADIX,this.radix),l||(l=n===this._value&&!t.tail)):o=!1),o&&(o=Boolean(this._value.match(this._numberRegExp)))}o?a=new ChangeDetails({inserted:this._value.slice(n.length),rawInserted:l?"":e,skip:l}):(this._value=n,a=new ChangeDetails),this._value=this._insertThousandsSeparators(this._value);const u=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,h=this._separatorsCountFromSlice(u);return a.tailShift+=(h-i)*this.thousandsSeparator.length,a}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const i=this._findSeparatorAround(t);return i>=0&&(t=i+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),i=this.value.slice(t),n=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const r=this._separatorsCountFromSlice(s);return new ChangeDetails({tailShift:(r-n)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case DIRECTION.NONE:case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===DIRECTION.FORCE_LEFT)return s}break}case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,((e,t,s,i)=>t+i)),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){void 0===t&&(t={});const i=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===MaskedNumber.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,MaskedNumber.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(MaskedNumber.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||MaskedNumber.EMPTY_VALUES.includes(e)&&MaskedNumber.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}_MaskedNumber=MaskedNumber,MaskedNumber.UNMASKED_RADIX=".",MaskedNumber.EMPTY_VALUES=[...Masked.EMPTY_VALUES,0],MaskedNumber.DEFAULTS={...Masked.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[_MaskedNumber.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},IMask.MaskedNumber=MaskedNumber;const PIPE_TYPE={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function createPipe(e,t,s){void 0===t&&(t=PIPE_TYPE.MASKED),void 0===s&&(s=PIPE_TYPE.MASKED);const i=createMask(e);return e=>i.runIsolated((i=>(i[t]=e,i[s])))}function pipe(e,t,s,i){return createPipe(t,s,i)(e)}IMask.PIPE_TYPE=PIPE_TYPE,IMask.createPipe=createPipe,IMask.pipe=pipe;class RepeatBlock extends MaskedPattern{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,i;const{repeat:n,...r}=normalizeOpts(e);this._blockOpts=Object.assign({},this._blockOpts,r);const a=createMask(this._blockOpts);this.repeat=null!=(t=null!=(s=null!=n?n:a.repeat)?s:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(i=this._blocks)?void 0:i.length)||0,this.repeatFrom)),blocks:{m:a},eager:a.eager,overwrite:a.overwrite,skipInvalid:a.skipInvalid,lazy:a.lazy,placeholderChar:a.placeholderChar,displayChar:a.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(createMask(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const s=new ChangeDetails;for(let o,l,u=null!=(i=null==(n=this._mapPosToBlock(this.displayValue.length))?void 0:n.index)?i:Math.max(this._blocks.length-1,0);o=null!=(r=this._blocks[u])?r:l=!l&&this._allocateBlock(u);++u){var i,n,r,a;const h=o._appendChar(e,{...t,_beforeTailState:null==(a=t._beforeTailState)||null==(a=a._blocks)?void 0:a[u]});if(h.skip&&l){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(h),h.consumed)break}return s}_trimEmptyTail(e,t){var s,i;void 0===e&&(e=0);const n=Math.max((null==(s=this._mapPosToBlock(e))?void 0:s.index)||0,this.repeatFrom,0);let r;null!=t&&(r=null==(i=this._mapPosToBlock(t))?void 0:i.index),null==r&&(r=this._blocks.length-1);let a=0;for(let e=r;n<=e&&!this._blocks[e].unmaskedValue;--e,++a);a&&(this._blocks.splice(r-a+1,a),this.mask=this.mask.slice(a))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return void 0===e&&(e=0),null==t&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}IMask.RepeatBlock=RepeatBlock;try{globalThis.IMask=IMask}catch{}var maskElementList=[].slice.call(document.querySelectorAll("[data-mask]"));maskElementList.map((function(e){return new IMask(e,{mask:e.dataset.mask,lazy:"true"===e.dataset["mask-visible"]})}));var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce((function(e,t){return e.concat([t+"-"+start,t+"-"+end])}),[]),placements=[].concat(basePlacements,[auto]).reduce((function(e,t){return e.concat([t,t+"-"+start,t+"-"+end])}),[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement$1(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return"undefined"!=typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var s=t.styles[e]||{},i=t.attributes[e]||{},n=t.elements[e];isHTMLElement(n)&&getNodeName(n)&&(Object.assign(n.style,s),Object.keys(i).forEach((function(e){var t=i[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?"":t)})))}))}function effect$2(e){var t=e.state,s={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,s.popper),t.styles=s,t.elements.arrow&&Object.assign(t.elements.arrow.style,s.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],n=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:s[e]).reduce((function(e,t){return e[t]="",e}),{});isHTMLElement(i)&&getNodeName(i)&&(Object.assign(i.style,r),Object.keys(n).forEach((function(e){i.removeAttribute(e)})))}))}}var applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(e){return e.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,s){void 0===t&&(t=!1),void 0===s&&(s=!1);var i=e.getBoundingClientRect(),n=1,r=1;t&&isHTMLElement(e)&&(n=e.offsetWidth>0&&round(i.width)/e.offsetWidth||1,r=e.offsetHeight>0&&round(i.height)/e.offsetHeight||1);var a=(isElement$1(e)?getWindow(e):window).visualViewport,o=!isLayoutViewport()&&s,l=(i.left+(o&&a?a.offsetLeft:0))/n,u=(i.top+(o&&a?a.offsetTop:0))/r,h=i.width/n,c=i.height/r;return{width:h,height:c,top:u,right:l+h,bottom:u+c,left:l,x:l,y:u}}function getLayoutRect(e){var t=getBoundingClientRect(e),s=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-s)<=1&&(s=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:s,height:i}}function contains(e,t){var s=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(s&&isShadowRoot(s)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return["table","td","th"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement$1(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement(e)&&"fixed"!==getComputedStyle$1(e).position?e.offsetParent:null}function getContainingBlock(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(e)&&"fixed"===getComputedStyle$1(e).position)return null;var s=getParentNode(e);for(isShadowRoot(s)&&(s=s.host);isHTMLElement(s)&&["html","body"].indexOf(getNodeName(s))<0;){var i=getComputedStyle$1(s);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return s;s=s.parentNode}return null}function getOffsetParent(e){for(var t=getWindow(e),s=getTrueOffsetParent(e);s&&isTableElement(s)&&"static"===getComputedStyle$1(s).position;)s=getTrueOffsetParent(s);return s&&("html"===getNodeName(s)||"body"===getNodeName(s)&&"static"===getComputedStyle$1(s).position)?t:s||getContainingBlock(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,s){return max(e,min(t,s))}function withinMaxClamp(e,t,s){var i=within(e,t,s);return i>s?s:i}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce((function(t,s){return t[s]=e,t}),{})}var toPaddingObject=function(e,t){return mergePaddingObject("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,basePlacements))};function arrow(e){var t,s=e.state,i=e.name,n=e.options,r=s.elements.arrow,a=s.modifiersData.popperOffsets,o=getBasePlacement(s.placement),l=getMainAxisFromPlacement(o),u=[left,right].indexOf(o)>=0?"height":"width";if(r&&a){var h=toPaddingObject(n.padding,s),c=getLayoutRect(r),d="y"===l?top:left,p="y"===l?bottom:right,g=s.rects.reference[u]+s.rects.reference[l]-a[l]-s.rects.popper[u],f=a[l]-s.rects.reference[l],_=getOffsetParent(r),E=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,m=g/2-f/2,v=h[d],T=E-c[u]-h[p],A=E/2-c[u]/2+m,b=within(v,A,T),C=l;s.modifiersData[i]=((t={})[C]=b,t.centerOffset=b-A,t)}}function effect$1(e){var t=e.state,s=e.options.element,i=void 0===s?"[data-popper-arrow]":s;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&contains(t.elements.popper,i)&&(t.elements.arrow=i)}var arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(e){return e.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e,t){var s=e.x,i=e.y,n=t.devicePixelRatio||1;return{x:round(s*n)/n||0,y:round(i*n)/n||0}}function mapToStyles(e){var t,s=e.popper,i=e.popperRect,n=e.placement,r=e.variation,a=e.offsets,o=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,c=e.isFixed,d=a.x,p=void 0===d?0:d,g=a.y,f=void 0===g?0:g,_="function"==typeof h?h({x:p,y:f}):{x:p,y:f};p=_.x,f=_.y;var E=a.hasOwnProperty("x"),m=a.hasOwnProperty("y"),v=left,T=top,A=window;if(u){var b=getOffsetParent(s),C="clientHeight",k="clientWidth";if(b===getWindow(s)&&"static"!==getComputedStyle$1(b=getDocumentElement(s)).position&&"absolute"===o&&(C="scrollHeight",k="scrollWidth"),n===top||(n===left||n===right)&&r===end)T=bottom,f-=(c&&b===A&&A.visualViewport?A.visualViewport.height:b[C])-i.height,f*=l?1:-1;if(n===left||(n===top||n===bottom)&&r===end)v=right,p-=(c&&b===A&&A.visualViewport?A.visualViewport.width:b[k])-i.width,p*=l?1:-1}var S,D=Object.assign({position:o},u&&unsetSides),y=!0===h?roundOffsetsByDPR({x:p,y:f},getWindow(s)):{x:p,y:f};return p=y.x,f=y.y,l?Object.assign({},D,((S={})[T]=m?"0":"",S[v]=E?"0":"",S.transform=(A.devicePixelRatio||1)<=1?"translate("+p+"px, "+f+"px)":"translate3d("+p+"px, "+f+"px, 0)",S)):Object.assign({},D,((t={})[T]=m?f+"px":"",t[v]=E?p+"px":"",t.transform="",t))}function computeStyles(e){var t=e.state,s=e.options,i=s.gpuAcceleration,n=void 0===i||i,r=s.adaptive,a=void 0===r||r,o=s.roundOffsets,l=void 0===o||o,u={placement:getBasePlacement(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}},passive={passive:!0};function effect(e){var t=e.state,s=e.instance,i=e.options,n=i.scroll,r=void 0===n||n,a=i.resize,o=void 0===a||a,l=getWindow(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&u.forEach((function(e){e.addEventListener("scroll",s.update,passive)})),o&&l.addEventListener("resize",s.update,passive),function(){r&&u.forEach((function(e){e.removeEventListener("scroll",s.update,passive)})),o&&l.removeEventListener("resize",s.update,passive)}}var eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:effect,data:{}},hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(function(e){return hash$1[e]}))}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,(function(e){return hash[e]}))}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect(e,t){var s=getWindow(e),i=getDocumentElement(e),n=s.visualViewport,r=i.clientWidth,a=i.clientHeight,o=0,l=0;if(n){r=n.width,a=n.height;var u=isLayoutViewport();(u||!u&&"fixed"===t)&&(o=n.offsetLeft,l=n.offsetTop)}return{width:r,height:a,x:o+getWindowScrollBarX(e),y:l}}function getDocumentRect(e){var t,s=getDocumentElement(e),i=getWindowScroll(e),n=null==(t=e.ownerDocument)?void 0:t.body,r=max(s.scrollWidth,s.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=max(s.scrollHeight,s.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),o=-i.scrollLeft+getWindowScrollBarX(e),l=-i.scrollTop;return"rtl"===getComputedStyle$1(n||s).direction&&(o+=max(s.clientWidth,n?n.clientWidth:0)-r),{width:r,height:a,x:o,y:l}}function isScrollParent(e){var t=getComputedStyle$1(e),s=t.overflow,i=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(s+n+i)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){var s;void 0===t&&(t=[]);var i=getScrollParent(e),n=i===(null==(s=e.ownerDocument)?void 0:s.body),r=getWindow(i),a=n?[r].concat(r.visualViewport||[],isScrollParent(i)?i:[]):i,o=t.concat(a);return n?o:o.concat(listScrollParents(getParentNode(a)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect(e,t){var s=getBoundingClientRect(e,!1,"fixed"===t);return s.top=s.top+e.clientTop,s.left=s.left+e.clientLeft,s.bottom=s.top+e.clientHeight,s.right=s.left+e.clientWidth,s.width=e.clientWidth,s.height=e.clientHeight,s.x=s.left,s.y=s.top,s}function getClientRectFromMixedType(e,t,s){return t===viewport?rectToClientRect(getViewportRect(e,s)):isElement$1(t)?getInnerBoundingClientRect(t,s):rectToClientRect(getDocumentRect(getDocumentElement(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode(e)),s=["absolute","fixed"].indexOf(getComputedStyle$1(e).position)>=0&&isHTMLElement(e)?getOffsetParent(e):e;return isElement$1(s)?t.filter((function(e){return isElement$1(e)&&contains(e,s)&&"body"!==getNodeName(e)})):[]}function getClippingRect(e,t,s,i){var n="clippingParents"===t?getClippingParents(e):[].concat(t),r=[].concat(n,[s]),a=r[0],o=r.reduce((function(t,s){var n=getClientRectFromMixedType(e,s,i);return t.top=max(n.top,t.top),t.right=min(n.right,t.right),t.bottom=min(n.bottom,t.bottom),t.left=max(n.left,t.left),t}),getClientRectFromMixedType(e,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function computeOffsets(e){var t,s=e.reference,i=e.element,n=e.placement,r=n?getBasePlacement(n):null,a=n?getVariation(n):null,o=s.x+s.width/2-i.width/2,l=s.y+s.height/2-i.height/2;switch(r){case top:t={x:o,y:s.y-i.height};break;case bottom:t={x:o,y:s.y+s.height};break;case right:t={x:s.x+s.width,y:l};break;case left:t={x:s.x-i.width,y:l};break;default:t={x:s.x,y:s.y}}var u=r?getMainAxisFromPlacement(r):null;if(null!=u){var h="y"===u?"height":"width";switch(a){case start:t[u]=t[u]-(s[h]/2-i[h]/2);break;case end:t[u]=t[u]+(s[h]/2-i[h]/2)}}return t}function detectOverflow(e,t){void 0===t&&(t={});var s=t,i=s.placement,n=void 0===i?e.placement:i,r=s.strategy,a=void 0===r?e.strategy:r,o=s.boundary,l=void 0===o?clippingParents:o,u=s.rootBoundary,h=void 0===u?viewport:u,c=s.elementContext,d=void 0===c?popper:c,p=s.altBoundary,g=void 0!==p&&p,f=s.padding,_=void 0===f?0:f,E=mergePaddingObject("number"!=typeof _?_:expandToHashMap(_,basePlacements)),m=d===popper?reference:popper,v=e.rects.popper,T=e.elements[g?m:d],A=getClippingRect(isElement$1(T)?T:T.contextElement||getDocumentElement(e.elements.popper),l,h,a),b=getBoundingClientRect(e.elements.reference),C=computeOffsets({reference:b,element:v,strategy:"absolute",placement:n}),k=rectToClientRect(Object.assign({},v,C)),S=d===popper?k:b,D={top:A.top-S.top+E.top,bottom:S.bottom-A.bottom+E.bottom,left:A.left-S.left+E.left,right:S.right-A.right+E.right},y=e.modifiersData.offset;if(d===popper&&y){var O=y[n];Object.keys(D).forEach((function(e){var t=[right,bottom].indexOf(e)>=0?1:-1,s=[top,bottom].indexOf(e)>=0?"y":"x";D[e]+=O[s]*t}))}return D}function computeAutoPlacement(e,t){void 0===t&&(t={});var s=t,i=s.placement,n=s.boundary,r=s.rootBoundary,a=s.padding,o=s.flipVariations,l=s.allowedAutoPlacements,u=void 0===l?placements:l,h=getVariation(i),c=h?o?variationPlacements:variationPlacements.filter((function(e){return getVariation(e)===h})):basePlacements,d=c.filter((function(e){return u.indexOf(e)>=0}));0===d.length&&(d=c);var p=d.reduce((function(t,s){return t[s]=detectOverflow(e,{placement:s,boundary:n,rootBoundary:r,padding:a})[getBasePlacement(s)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}function getExpandedFallbackPlacements(e){if(getBasePlacement(e)===auto)return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip(e){var t=e.state,s=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var n=s.mainAxis,r=void 0===n||n,a=s.altAxis,o=void 0===a||a,l=s.fallbackPlacements,u=s.padding,h=s.boundary,c=s.rootBoundary,d=s.altBoundary,p=s.flipVariations,g=void 0===p||p,f=s.allowedAutoPlacements,_=t.options.placement,E=getBasePlacement(_),m=l||(E===_||!g?[getOppositePlacement(_)]:getExpandedFallbackPlacements(_)),v=[_].concat(m).reduce((function(e,s){return e.concat(getBasePlacement(s)===auto?computeAutoPlacement(t,{placement:s,boundary:h,rootBoundary:c,padding:u,flipVariations:g,allowedAutoPlacements:f}):s)}),[]),T=t.rects.reference,A=t.rects.popper,b=new Map,C=!0,k=v[0],S=0;S<v.length;S++){var D=v[S],y=getBasePlacement(D),O=getVariation(D)===start,N=[top,bottom].indexOf(y)>=0,w=N?"width":"height",I=detectOverflow(t,{placement:D,boundary:h,rootBoundary:c,altBoundary:d,padding:u}),M=N?O?right:left:O?bottom:top;T[w]>A[w]&&(M=getOppositePlacement(M));var L=getOppositePlacement(M),R=[];if(r&&R.push(I[y]<=0),o&&R.push(I[M]<=0,I[L]<=0),R.every((function(e){return e}))){k=D,C=!1;break}b.set(D,R)}if(C)for(var P=function(e){var t=v.find((function(t){var s=b.get(t);if(s)return s.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},x=g?3:1;x>0;x--){if("break"===P(x))break}t.placement!==k&&(t.modifiersData[i]._skip=!0,t.placement=k,t.reset=!0)}}var flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(e,t,s){return void 0===s&&(s={x:0,y:0}),{top:e.top-t.height-s.y,right:e.right-t.width+s.x,bottom:e.bottom-t.height+s.y,left:e.left-t.width-s.x}}function isAnySideFullyClipped(e){return[top,right,bottom,left].some((function(t){return e[t]>=0}))}function hide(e){var t=e.state,s=e.name,i=t.rects.reference,n=t.rects.popper,r=t.modifiersData.preventOverflow,a=detectOverflow(t,{elementContext:"reference"}),o=detectOverflow(t,{altBoundary:!0}),l=getSideOffsets(a,i),u=getSideOffsets(o,n,r),h=isAnySideFullyClipped(l),c=isAnySideFullyClipped(u);t.modifiersData[s]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:c},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":c})}var hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(e,t,s){var i=getBasePlacement(e),n=[left,top].indexOf(i)>=0?-1:1,r="function"==typeof s?s(Object.assign({},t,{placement:e})):s,a=r[0],o=r[1];return a=a||0,o=(o||0)*n,[left,right].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function offset(e){var t=e.state,s=e.options,i=e.name,n=s.offset,r=void 0===n?[0,0]:n,a=placements.reduce((function(e,s){return e[s]=distanceAndSkiddingToXY(s,t.rects,r),e}),{}),o=a[t.placement],l=o.x,u=o.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[i]=a}var offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(e){var t=e.state,s=e.name;t.modifiersData[s]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(e){return"x"===e?"y":"x"}function preventOverflow(e){var t=e.state,s=e.options,i=e.name,n=s.mainAxis,r=void 0===n||n,a=s.altAxis,o=void 0!==a&&a,l=s.boundary,u=s.rootBoundary,h=s.altBoundary,c=s.padding,d=s.tether,p=void 0===d||d,g=s.tetherOffset,f=void 0===g?0:g,_=detectOverflow(t,{boundary:l,rootBoundary:u,padding:c,altBoundary:h}),E=getBasePlacement(t.placement),m=getVariation(t.placement),v=!m,T=getMainAxisFromPlacement(E),A=getAltAxis(T),b=t.modifiersData.popperOffsets,C=t.rects.reference,k=t.rects.popper,S="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,D="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(b){if(r){var N,w="y"===T?top:left,I="y"===T?bottom:right,M="y"===T?"height":"width",L=b[T],R=L+_[w],P=L-_[I],x=p?-k[M]/2:0,V=m===start?C[M]:k[M],F=m===start?-k[M]:-C[M],$=t.elements.arrow,B=p&&$?getLayoutRect($):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),K=H[w],W=H[I],Y=within(0,C[M],B[M]),j=v?C[M]/2-x-Y-K-D.mainAxis:V-Y-K-D.mainAxis,U=v?-C[M]/2+x+Y+W+D.mainAxis:F+Y+W+D.mainAxis,G=t.elements.arrow&&getOffsetParent(t.elements.arrow),z=G?"y"===T?G.clientTop||0:G.clientLeft||0:0,q=null!=(N=null==y?void 0:y[T])?N:0,X=L+U-q,Q=within(p?min(R,L+j-q-z):R,L,p?max(P,X):P);b[T]=Q,O[T]=Q-L}if(o){var Z,J="x"===T?top:left,ee="x"===T?bottom:right,te=b[A],se="y"===A?"height":"width",ie=te+_[J],ne=te-_[ee],re=-1!==[top,left].indexOf(E),ae=null!=(Z=null==y?void 0:y[A])?Z:0,oe=re?ie:te-C[se]-k[se]-ae+D.altAxis,le=re?te+C[se]+k[se]-ae-D.altAxis:ne,ue=p&&re?withinMaxClamp(oe,te,le):within(p?oe:ie,te,p?le:ne);b[A]=ue,O[A]=ue-te}t.modifiersData[i]=O}}var preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll(e){return e!==getWindow(e)&&isHTMLElement(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),s=round(t.width)/e.offsetWidth||1,i=round(t.height)/e.offsetHeight||1;return 1!==s||1!==i}function getCompositeRect(e,t,s){void 0===s&&(s=!1);var i=isHTMLElement(t),n=isHTMLElement(t)&&isElementScaled(t),r=getDocumentElement(t),a=getBoundingClientRect(e,n,s),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!s)&&(("body"!==getNodeName(t)||isScrollParent(r))&&(o=getNodeScroll(t)),isHTMLElement(t)?((l=getBoundingClientRect(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=getWindowScrollBarX(r))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function order(e){var t=new Map,s=new Set,i=[];function n(e){s.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!s.has(e)){var i=t.get(e);i&&n(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){s.has(e.name)||n(e)})),i}function orderModifiers(e){var t=order(e);return modifierPhases.reduce((function(e,s){return e.concat(t.filter((function(e){return e.phase===s})))}),[])}function debounce(e){var t;return function(){return t||(t=new Promise((function(s){Promise.resolve().then((function(){t=void 0,s(e())}))}))),t}}function mergeByName(e){var t=e.reduce((function(e,t){var s=e[t.name];return e[t.name]=s?Object.assign({},s,t,{options:Object.assign({},s.options,t.options),data:Object.assign({},s.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function popperGenerator(e){void 0===e&&(e={});var t=e,s=t.defaultModifiers,i=void 0===s?[]:s,n=t.defaultOptions,r=void 0===n?DEFAULT_OPTIONS:n;return function(e,t,s){void 0===s&&(s=r);var n={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],o=!1,l={state:n,setOptions:function(s){var o="function"==typeof s?s(n.options):s;u(),n.options=Object.assign({},r,n.options,o),n.scrollParents={reference:isElement$1(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var h=orderModifiers(mergeByName([].concat(i,n.options.modifiers)));return n.orderedModifiers=h.filter((function(e){return e.enabled})),n.orderedModifiers.forEach((function(e){var t=e.name,s=e.options,i=void 0===s?{}:s,r=e.effect;if("function"==typeof r){var o=r({state:n,name:t,instance:l,options:i}),u=function(){};a.push(o||u)}})),l.update()},forceUpdate:function(){if(!o){var e=n.elements,t=e.reference,s=e.popper;if(areValidElements(t,s)){n.rects={reference:getCompositeRect(t,getOffsetParent(s),"fixed"===n.options.strategy),popper:getLayoutRect(s)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach((function(e){return n.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<n.orderedModifiers.length;i++)if(!0!==n.reset){var r=n.orderedModifiers[i],a=r.fn,u=r.options,h=void 0===u?{}:u,c=r.name;"function"==typeof a&&(n=a({state:n,options:h,name:c,instance:l})||n)}else n.reset=!1,i=-1}}},update:debounce((function(){return new Promise((function(e){l.forceUpdate(),e(n)}))})),destroy:function(){u(),o=!0}};if(!areValidElements(e,t))return l;function u(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(s).then((function(e){!o&&s.onFirstUpdate&&s.onFirstUpdate(e)})),l}}var createPopper$2=popperGenerator(),defaultModifiers$1=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1],createPopper$1=popperGenerator({defaultModifiers:defaultModifiers$1}),defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers:defaultModifiers}),Popper=Object.freeze({__proto__:null,popperGenerator:popperGenerator,detectOverflow:detectOverflow,createPopperBase:createPopper$2,createPopper:createPopper,createPopperLite:createPopper$1,top:top,bottom:bottom,right:right,left:left,auto:auto,basePlacements:basePlacements,start:start,end:end,clippingParents:clippingParents,viewport:viewport,popper:popper,reference:reference,variationPlacements:variationPlacements,placements:placements,beforeRead:beforeRead,read:read,afterRead:afterRead,beforeMain:beforeMain,main:main,afterMain:afterMain,beforeWrite:beforeWrite,write:write,afterWrite:afterWrite,modifierPhases:modifierPhases,applyStyles:applyStyles$1,arrow:arrow$1,computeStyles:computeStyles$1,eventListeners:eventListeners,flip:flip$1,hide:hide$1,offset:offset$1,popperOffsets:popperOffsets$1,preventOverflow:preventOverflow$1});
|
|
10
10
|
/*!
|
|
11
11
|
* Bootstrap v5.3.3 (https://getbootstrap.com/)
|
|
12
12
|
* Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
package/dist/js/tabler.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Tabler v1.0.0-
|
|
3
|
-
* @version 1.0.0-
|
|
2
|
+
* Tabler v1.0.0-beta23 (https://tabler.io)
|
|
3
|
+
* @version 1.0.0-beta23
|
|
4
4
|
* @link https://tabler.io
|
|
5
5
|
* Copyright 2018-2025 The Tabler Authors
|
|
6
6
|
* Copyright 2018-2025 codecalm.net Paweł Kuna
|
|
@@ -13,10 +13,25 @@
|
|
|
13
13
|
|
|
14
14
|
var e=new Map;function t(t){var o=e.get(t);o&&o.destroy();}function o(t){var o=e.get(t);o&&o.update();}var r=null;"undefined"==typeof window?((r=function(e){return e}).destroy=function(e){return e},r.update=function(e){return e}):((r=function(t,o){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!e.has(t)){var o,r=null,n=window.getComputedStyle(t),i=(o=t.value,function(){a({testForHeightReduction:""===o||!t.value.startsWith(o),restoreTextAlign:null}),o=t.value;}),l=function(o){t.removeEventListener("autosize:destroy",l),t.removeEventListener("autosize:update",s),t.removeEventListener("input",i),window.removeEventListener("resize",s),Object.keys(o).forEach(function(e){return t.style[e]=o[e]}),e.delete(t);}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",l),t.addEventListener("autosize:update",s),t.addEventListener("input",i),window.addEventListener("resize",s),t.style.overflowX="hidden",t.style.wordWrap="break-word",e.set(t,{destroy:l,update:s}),s();}function a(e){var o,i,l=e.restoreTextAlign,s=void 0===l?null:l,d=e.testForHeightReduction,u=void 0===d||d,c=n.overflowY;if(0!==t.scrollHeight&&("vertical"===n.resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),u&&(o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach(function(e){var t=e[0],o=e[1];t.style.scrollBehavior="auto",t.scrollTop=o,t.style.scrollBehavior=null;})}}(t),t.style.height=""),i="content-box"===n.boxSizing?t.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):t.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),"none"!==n.maxHeight&&i>parseFloat(n.maxHeight)?("hidden"===n.overflowY&&(t.style.overflow="scroll"),i=parseFloat(n.maxHeight)):"hidden"!==n.overflowY&&(t.style.overflow="hidden"),t.style.height=i+"px",s&&(t.style.textAlign=s),o&&o(),r!==i&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),r=i),c!==n.overflow&&!s)){var v=n.textAlign;"hidden"===n.overflow&&(t.style.textAlign="start"===v?"end":"start"),a({restoreTextAlign:v,testForHeightReduction:!0});}}function s(){a({testForHeightReduction:!0,restoreTextAlign:null});}}(t)}),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e});var n=r;
|
|
15
15
|
|
|
16
|
-
var elements = document.querySelectorAll('[data-bs-toggle="autosize"]');
|
|
16
|
+
var elements$1 = document.querySelectorAll('[data-bs-toggle="autosize"]');
|
|
17
|
+
if (elements$1.length) {
|
|
18
|
+
elements$1.forEach(function (element) {
|
|
19
|
+
n(element);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var elements = document.querySelectorAll('[data-countup]');
|
|
17
24
|
if (elements.length) {
|
|
18
25
|
elements.forEach(function (element) {
|
|
19
|
-
|
|
26
|
+
var options = {};
|
|
27
|
+
try {
|
|
28
|
+
options = element.getAttribute('data-countup') ? JSON.parse(element.getAttribute('data-countup')) : {};
|
|
29
|
+
} catch (error) {}
|
|
30
|
+
var value = parseInt(element.innerHTML, 10);
|
|
31
|
+
var countUp = new window.countUp.CountUp(element, value, options);
|
|
32
|
+
if (!countUp.error) {
|
|
33
|
+
countUp.start();
|
|
34
|
+
}
|
|
20
35
|
});
|
|
21
36
|
}
|
|
22
37
|
|