maz-ui 3.11.0 → 3.11.2

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.
Files changed (179) hide show
  1. package/components/MazBottomSheet.mjs +80 -44
  2. package/components/MazBtn.mjs +72 -36
  3. package/components/MazCard.mjs +78 -42
  4. package/components/MazCarousel.mjs +77 -41
  5. package/components/MazChart.mjs +43 -17
  6. package/components/MazDialog.mjs +79 -44
  7. package/components/MazDialogPromise.mjs +79 -44
  8. package/components/MazDrawer.mjs +77 -41
  9. package/components/MazIcon.mjs +2 -2
  10. package/components/MazInput.mjs +72 -36
  11. package/components/MazInputNumber.mjs +72 -36
  12. package/components/MazInputPrice.mjs +72 -36
  13. package/components/MazInputTags.mjs +79 -43
  14. package/components/MazPhoneNumberInput.mjs +75 -39
  15. package/components/MazPicker.mjs +88 -52
  16. package/components/MazSelect.mjs +75 -39
  17. package/components/MazStepper.mjs +2 -2
  18. package/components/MazTabsBar.mjs +105 -59
  19. package/components/MazTabsContent.mjs +3 -10
  20. package/components/MazTabsContentItem.mjs +2 -2
  21. package/components/MazTextarea.mjs +2 -2
  22. package/css/main.css +1 -1
  23. package/modules/index.mjs +9 -4
  24. package/package.json +23 -13
  25. package/tailwindcss/tailwind.config.ts +1 -26
  26. package/{components/MazBtn.d.ts → types/components/MazBtn.vue.d.ts} +19 -0
  27. package/types/components/MazChart.vue.d.ts +95 -0
  28. package/{components/MazTabsBar.d.ts → types/components/MazTabsBar.vue.d.ts} +11 -2
  29. package/types/components/index.d.ts +35 -0
  30. package/types/modules/composables/aos.d.ts +4 -0
  31. package/types/modules/composables/idle-timeout.d.ts +8 -0
  32. package/types/modules/composables/index.d.ts +7 -0
  33. package/types/modules/composables/instance-uniq-id.d.ts +8 -0
  34. package/types/modules/composables/theme-handler.d.ts +20 -0
  35. package/types/modules/composables/toaster.d.ts +4 -0
  36. package/types/modules/composables/user-visibilty.d.ts +8 -0
  37. package/types/modules/composables/wait.d.ts +4 -0
  38. package/types/modules/directives/click-outside.d.ts +10 -0
  39. package/types/modules/directives/closable.d.ts +4 -0
  40. package/types/modules/directives/index.d.ts +11 -0
  41. package/types/modules/directives/v-lazy-img/index.d.ts +8 -0
  42. package/types/modules/directives/v-lazy-img/lazy-img-handler.d.ts +38 -0
  43. package/types/modules/directives/v-lazy-img/lazy-img.d.ts +5 -0
  44. package/types/modules/directives/v-lazy-img/types.d.ts +31 -0
  45. package/types/modules/directives/v-zoom-img/index.d.ts +7 -0
  46. package/types/modules/directives/v-zoom-img/style.d.ts +1 -0
  47. package/types/modules/directives/v-zoom-img/svgs.d.ts +3 -0
  48. package/types/modules/directives/v-zoom-img/zoom-img.d.ts +2 -0
  49. package/types/modules/directives/v-zoom-img/zoom-img.handler.d.ts +48 -0
  50. package/types/modules/filters/capitalize.d.ts +1 -0
  51. package/types/modules/filters/currency.d.ts +4 -0
  52. package/types/modules/filters/date.d.ts +1 -0
  53. package/types/modules/filters/index.d.ts +16 -0
  54. package/types/modules/filters/number.d.ts +1 -0
  55. package/types/modules/filters/telephone.d.ts +1 -0
  56. package/types/modules/helpers/debounce.d.ts +7 -0
  57. package/types/modules/helpers/idle-timeout/idle-timeout-handler.d.ts +29 -0
  58. package/types/modules/helpers/idle-timeout/index.d.ts +2 -0
  59. package/types/modules/helpers/idle-timeout/types.d.ts +12 -0
  60. package/types/modules/helpers/index.d.ts +9 -0
  61. package/types/modules/helpers/inject-strict.d.ts +1 -0
  62. package/types/modules/helpers/is-client.d.ts +1 -0
  63. package/types/modules/helpers/mount-component.d.ts +13 -0
  64. package/types/modules/helpers/script-loader.d.ts +19 -0
  65. package/types/modules/helpers/sleep.d.ts +1 -0
  66. package/types/modules/helpers/truthy-filter.d.ts +2 -0
  67. package/types/modules/helpers/user-visibility/index.d.ts +2 -0
  68. package/types/modules/helpers/user-visibility/types.d.ts +10 -0
  69. package/types/modules/helpers/user-visibility/user-visibility-handler.d.ts +19 -0
  70. package/types/modules/index.d.ts +5 -0
  71. package/types/modules/plugins/aos/index.d.ts +35 -0
  72. package/types/modules/plugins/index.d.ts +3 -0
  73. package/types/modules/plugins/toaster/MazToast.vue.d.ts +83 -0
  74. package/types/modules/plugins/toaster/index.d.ts +10 -0
  75. package/types/modules/plugins/toaster/timer.d.ts +11 -0
  76. package/types/modules/plugins/toaster/toaster-handler.d.ts +16 -0
  77. package/types/modules/plugins/toaster/types.d.ts +6 -0
  78. package/types/modules/plugins/wait/index.d.ts +14 -0
  79. package/types/modules/plugins/wait/utils.d.ts +7 -0
  80. package/types/nuxt/index.d.ts +41 -0
  81. package/types/nuxt/runtime/composables/use-toast.d.ts +2 -0
  82. package/types/nuxt/runtime/plugins/toaster.d.ts +7 -0
  83. package/types/tailwindcss/tailwind.config.d.ts +3 -0
  84. package/types/tailwindcss/utils/colors.d.ts +20 -0
  85. package/types/tailwindcss/variables/breakpoints.d.ts +14 -0
  86. package/types/tailwindcss/variables/colors.d.ts +29 -0
  87. package/types/tailwindcss/variables/utilities.d.ts +19 -0
  88. package/types/tailwindcss/variables/z-indexes.d.ts +14 -0
  89. package/components/MazAvatar.umd.js +0 -2
  90. package/components/MazBackdrop.umd.js +0 -2
  91. package/components/MazBadge.umd.js +0 -2
  92. package/components/MazBottomSheet.umd.js +0 -2
  93. package/components/MazBtn.umd.js +0 -2
  94. package/components/MazCard.umd.js +0 -2
  95. package/components/MazCarousel.umd.js +0 -2
  96. package/components/MazChart.umd.js +0 -1
  97. package/components/MazCheckbox.umd.js +0 -2
  98. package/components/MazDialog.umd.js +0 -2
  99. package/components/MazDialogPromise.umd.js +0 -2
  100. package/components/MazDrawer.umd.js +0 -2
  101. package/components/MazDropzone.umd.js +0 -2
  102. package/components/MazGallery.umd.js +0 -2
  103. package/components/MazIcon.umd.js +0 -2
  104. package/components/MazInput.umd.js +0 -2
  105. package/components/MazInputNumber.umd.js +0 -2
  106. package/components/MazInputPrice.umd.js +0 -2
  107. package/components/MazInputTags.umd.js +0 -2
  108. package/components/MazLazyImg.umd.js +0 -2
  109. package/components/MazPhoneNumberInput.umd.js +0 -2
  110. package/components/MazPicker.umd.js +0 -2
  111. package/components/MazRadioButtons.umd.js +0 -2
  112. package/components/MazSelect.umd.js +0 -2
  113. package/components/MazSlider.umd.js +0 -2
  114. package/components/MazSpinner.umd.js +0 -2
  115. package/components/MazStepper.umd.js +0 -2
  116. package/components/MazSwitch.umd.js +0 -2
  117. package/components/MazTabs.umd.js +0 -1
  118. package/components/MazTabsBar.umd.js +0 -2
  119. package/components/MazTabsContent.umd.js +0 -2
  120. package/components/MazTabsContentItem.umd.js +0 -2
  121. package/components/MazTextarea.umd.js +0 -2
  122. package/components/MazTransitionExpand.umd.js +0 -2
  123. package/components/index.d.ts +0 -35
  124. package/modules/index.d.ts +0 -338
  125. package/modules/index.umd.js +0 -2
  126. /package/{components/MazAvatar.d.ts → types/components/MazAvatar.vue.d.ts} +0 -0
  127. /package/{components/MazBackdrop.d.ts → types/components/MazBackdrop.vue.d.ts} +0 -0
  128. /package/{components/MazBadge.d.ts → types/components/MazBadge.vue.d.ts} +0 -0
  129. /package/{components/MazBottomSheet.d.ts → types/components/MazBottomSheet.vue.d.ts} +0 -0
  130. /package/{components/MazCard.d.ts → types/components/MazCard.vue.d.ts} +0 -0
  131. /package/{components/MazCarousel.d.ts → types/components/MazCarousel.vue.d.ts} +0 -0
  132. /package/{components/MazCheckbox.d.ts → types/components/MazCheckbox.vue.d.ts} +0 -0
  133. /package/{components/MazDialog.d.ts → types/components/MazDialog.vue.d.ts} +0 -0
  134. /package/{components → types/components}/MazDialogPromise/use-maz-dialog-promise.d.ts +0 -0
  135. /package/{components/MazDialogPromise.d.ts → types/components/MazDialogPromise.vue.d.ts} +0 -0
  136. /package/{components/MazDrawer.d.ts → types/components/MazDrawer.vue.d.ts} +0 -0
  137. /package/{components/MazDropzone.d.ts → types/components/MazDropzone.vue.d.ts} +0 -0
  138. /package/{components/MazGallery.d.ts → types/components/MazGallery.vue.d.ts} +0 -0
  139. /package/{components/MazIcon.d.ts → types/components/MazIcon.vue.d.ts} +0 -0
  140. /package/{components/MazInput.d.ts → types/components/MazInput.vue.d.ts} +0 -0
  141. /package/{components/MazInputNumber.d.ts → types/components/MazInputNumber.vue.d.ts} +0 -0
  142. /package/{components/MazInputPrice.d.ts → types/components/MazInputPrice.vue.d.ts} +0 -0
  143. /package/{components/MazInputTags.d.ts → types/components/MazInputTags.vue.d.ts} +0 -0
  144. /package/{components/MazLazyImg.d.ts → types/components/MazLazyImg.vue.d.ts} +0 -0
  145. /package/{components → types/components}/MazPhoneNumberInput/constantes/locales.d.ts +0 -0
  146. /package/{components → types/components}/MazPhoneNumberInput/types.d.ts +0 -0
  147. /package/{components → types/components}/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.d.ts +0 -0
  148. /package/{components → types/components}/MazPhoneNumberInput/utils/index.d.ts +0 -0
  149. /package/{components/MazPhoneNumberInput.d.ts → types/components/MazPhoneNumberInput.vue.d.ts} +0 -0
  150. /package/{components → types/components}/MazPicker/MazPickerCalendar.vue.d.ts +0 -0
  151. /package/{components → types/components}/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +0 -0
  152. /package/{components → types/components}/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +0 -0
  153. /package/{components → types/components}/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +0 -0
  154. /package/{components → types/components}/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +0 -0
  155. /package/{components → types/components}/MazPicker/MazPickerContainer.vue.d.ts +0 -0
  156. /package/{components → types/components}/MazPicker/MazPickerFooter.vue.d.ts +0 -0
  157. /package/{components → types/components}/MazPicker/MazPickerHeader.vue.d.ts +0 -0
  158. /package/{components → types/components}/MazPicker/MazPickerMonthSwitcher.vue.d.ts +0 -0
  159. /package/{components → types/components}/MazPicker/MazPickerShortcuts.vue.d.ts +0 -0
  160. /package/{components → types/components}/MazPicker/MazPickerTime.vue.d.ts +0 -0
  161. /package/{components → types/components}/MazPicker/MazPickerYearSwitcher.vue.d.ts +0 -0
  162. /package/{components → types/components}/MazPicker/types.d.ts +0 -0
  163. /package/{components → types/components}/MazPicker/utils.d.ts +0 -0
  164. /package/{components/MazPicker.d.ts → types/components/MazPicker.vue.d.ts} +0 -0
  165. /package/{components/MazRadioButtons.d.ts → types/components/MazRadioButtons.vue.d.ts} +0 -0
  166. /package/{components/MazSelect.d.ts → types/components/MazSelect.vue.d.ts} +0 -0
  167. /package/{components → types/components}/MazSlider/utils.d.ts +0 -0
  168. /package/{components/MazSlider.d.ts → types/components/MazSlider.vue.d.ts} +0 -0
  169. /package/{components/MazSpinner.d.ts → types/components/MazSpinner.vue.d.ts} +0 -0
  170. /package/{components/MazStepper.d.ts → types/components/MazStepper.vue.d.ts} +0 -0
  171. /package/{components/MazSwitch.d.ts → types/components/MazSwitch.vue.d.ts} +0 -0
  172. /package/{components/MazTabs.d.ts → types/components/MazTabs.vue.d.ts} +0 -0
  173. /package/{components/MazTabsContent.d.ts → types/components/MazTabsContent.vue.d.ts} +0 -0
  174. /package/{components/MazTabsContentItem.d.ts → types/components/MazTabsContentItem.vue.d.ts} +0 -0
  175. /package/{components → types/components}/MazTextarea/textarea-autogrow.d.ts +0 -0
  176. /package/{components/MazTextarea.d.ts → types/components/MazTextarea.vue.d.ts} +0 -0
  177. /package/{components/MazTransitionExpand.d.ts → types/components/MazTransitionExpand.vue.d.ts} +0 -0
  178. /package/{components → types/components}/component-list.d.ts +0 -0
  179. /package/{components → types/components}/types.d.ts +0 -0
@@ -1,2 +0,0 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode(".m-toast-container{-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.m-toast-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.m-toast-container{padding:1rem;z-index:1051}.m-toast-container.--top{top:0;display:-webkit-box;display:-ms-flexbox;display:flex}.m-toast-container.--center{width:100%}@media (min-width: 768px){.m-toast-container.--center{position:fixed;left:50%;width:auto;-webkit-transform:translate(-50%,0);transform:translate(-50%)}}.m-toast-container.--bottom{bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.m-toast-container.--bottom>:not([hidden])~:not([hidden]){margin-bottom:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-top:calc(.5rem * var(--tw-space-y-reverse))}.m-toast-container.--right{right:0;width:100%}@media (min-width: 768px){.m-toast-container.--right{width:auto}}.m-toast-container.--left{left:0;width:100%}@media (min-width: 768px){.m-toast-container.--left{width:auto}}.m-toast[data-v-db385587],.m-toast *[data-v-db385587]{-webkit-box-sizing:border-box;box-sizing:border-box}.m-toast[data-v-db385587]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-item-align:center;align-self:center;border-radius:var(--maz-border-radius);padding-left:.5rem;padding-right:.5rem;color:var(--maz-color-white);--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width: 768px){.m-toast.--left[data-v-db385587],.m-toast.--right[data-v-db385587]{width:20rem}.m-toast.--center[data-v-db385587]{width:20rem;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}.m-toast__message-wrapper[data-v-db385587]{-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%;padding-top:.75rem;padding-bottom:.75rem}.m-toast__message[data-v-db385587]{margin:0;font-weight:500}.m-toast .--close[data-v-db385587]{margin-left:.25rem;display:-webkit-box;display:-ms-flexbox;display:flex;height:1.75rem;width:1.75rem;border-radius:var(--maz-border-radius);background-color:transparent;padding:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.m-toast .--close[data-v-db385587]:hover{background-color:#11182733}.m-toast .--close .--icon[data-v-db385587]{cursor:pointer}.m-toast.--info[data-v-db385587]{background-color:var(--maz-color-info);color:var(--maz-color-info-contrast)}.m-toast.--info[data-v-db385587]:hover{background-color:var(--maz-color-info-600)}.m-toast.--info .--close[data-v-db385587]{color:var(--maz-color-info-contrast)}.m-toast.--success[data-v-db385587]{background-color:var(--maz-color-success);color:var(--maz-color-success-contrast)}.m-toast.--success[data-v-db385587]:hover{background-color:var(--maz-color-success-600)}.m-toast.--success .--close[data-v-db385587]{color:var(--maz-color-success-contrast)}.m-toast.--warning[data-v-db385587]{background-color:var(--maz-color-warning);color:var(--maz-color-warning-contrast)}.m-toast.--warning[data-v-db385587]:hover{background-color:var(--maz-color-warning-600)}.m-toast.--warning .--close[data-v-db385587]{color:var(--maz-color-warning-contrast)}.m-toast.--danger[data-v-db385587]{background-color:var(--maz-color-danger);color:var(--maz-color-danger-contrast)}.m-toast.--danger[data-v-db385587]:hover{background-color:var(--maz-color-danger-600)}.m-toast.--danger .--close[data-v-db385587]{color:var(--maz-color-danger-contrast)}.m-slide-top-enter-active[data-v-db385587],.m-slide-top-leave-active[data-v-db385587]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateY(0);transform:translateY(0)}.m-slide-top-enter-from[data-v-db385587],.m-slide-top-leave-to[data-v-db385587]{opacity:0;-webkit-transform:translateY(-100%);transform:translateY(-100%)}.m-slide-bottom-enter-active[data-v-db385587],.m-slide-bottom-leave-active[data-v-db385587]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateY(0);transform:translateY(0)}.m-slide-bottom-enter-from[data-v-db385587],.m-slide-bottom-leave-to[data-v-db385587]{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}.m-slide-right-enter-active[data-v-db385587],.m-slide-right-leave-active[data-v-db385587]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateX(0);transform:translate(0)}.m-slide-right-enter-from[data-v-db385587],.m-slide-right-leave-to[data-v-db385587]{opacity:0;-webkit-transform:translateX(100%);transform:translate(100%)}.m-slide-left-enter-active[data-v-db385587],.m-slide-left-leave-active[data-v-db385587]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateX(0);transform:translate(0)}.m-slide-left-enter-from[data-v-db385587],.m-slide-left-leave-to[data-v-db385587]{opacity:0;-webkit-transform:translateX(-100%);transform:translate(-100%)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}}();
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).index={},e.Vue)}(this,(function(e,t){"use strict";var i=Object.defineProperty,s=(e,t,s)=>(((e,t,s)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s})(e,"symbol"!=typeof t?t+"":t,s),s);function o(e,i){const s=t.inject(e,i);if(!s)throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${e}`);return s}function n(e,{props:i,children:s,element:o,app:n}={}){let r=o;const a=t.createVNode(e,i,s);n&&n._context&&(a.appContext=n._context),r?t.render(a,r):"undefined"!=typeof document&&t.render(a,r=document.createElement("div"));return{vNode:a,destroy:()=>{r&&t.render(null,r)},el:r}}function r(){return"undefined"!=typeof document}class a{constructor(e,t){s(this,"defaultOptions",{element:void 0,timeout:3e5,once:!1,immediate:!0,ssr:!1}),s(this,"options"),s(this,"timeoutHandler"),s(this,"isIdle",!1),s(this,"isDestroy",!1),s(this,"startTime",0),s(this,"remainingTime",0),s(this,"lastClientX",-1),s(this,"lastClientY",-1),s(this,"eventNames",["DOMMouseScroll","mousedown","mousemove","mousewheel","MSPointerDown","MSPointerMove","keydown","touchmove","touchstart","wheel","click"]),s(this,"handleEvent",(e=>{try{if(this.remainingTime>0)return;if("mousemove"===e.type){const{clientX:t,clientY:i}=e;if(void 0===t&&void 0===i||t===this.lastClientX&&i===this.lastClientY)return;this.lastClientX=t,this.lastClientY=i}this.resetTimeout(),this.callback({isIdle:this.isIdle,eventType:e.type})}catch(t){throw new Error(`[IdleTimeout](handleEvent) ${t}`)}})),this.callback=e,this.options={...this.defaultOptions,...t},!this.options.ssr&&r()?this.start():this.options.ssr||r()||console.warn('[IdleTimeout](constructor) executed on server side - set immediate option to "false"')}get element(){return this.options.element??document.body}start(){if(r()){for(const e of this.eventNames)this.element.addEventListener(e,this.handleEvent);this.resetTimeout(),this.options.immediate&&this.callback({isIdle:!1})}else console.warn("[IdleTimeout](start) you should run this method on client side")}pause(){const e=this.startTime+this.options.timeout-Date.now();e<=0||(this.remainingTime=e,this.timeoutHandler&&(clearTimeout(this.timeoutHandler),this.timeoutHandler=void 0))}resume(){this.remainingTime<=0||(this.resetTimeout(),this.callback({isIdle:this.isIdle}),this.remainingTime=0)}reset(){this.isDestroy=!1,this.isIdle=!1,this.remainingTime=0,this.resetTimeout(),this.callback({isIdle:this.isIdle})}destroy(){if(r()){this.isDestroy=!0;for(const e of this.eventNames)this.element.removeEventListener(e,this.handleEvent);this.timeoutHandler&&clearTimeout(this.timeoutHandler)}else console.warn("[IdleTimeout](destroy) you should run this method on client side")}resetTimeout(){this.isIdle=!1,this.timeoutHandler&&(clearTimeout(this.timeoutHandler),this.timeoutHandler=void 0),this.timeoutHandler=setTimeout(this.handleTimeout.bind(this),this.remainingTime||this.options.timeout),this.startTime=Date.now()}handleTimeout(){this.isIdle=!0,this.callback({isIdle:this.isIdle}),this.options.once&&this.destroy()}get destroyed(){return this.isDestroy}get timeout(){return this.options.timeout}set timeout(e){this.options.timeout=e}get idle(){return this.isIdle}set idle(e){e?this.handleTimeout():this.reset(),this.callback({isIdle:this.isIdle})}}class l{constructor(e,t){s(this,"eventHandlerFunction"),s(this,"event","visibilitychange"),s(this,"timeoutHandler"),s(this,"options"),s(this,"defaultOptions",{timeout:5e3,once:!1,immediate:!0,ssr:!1}),s(this,"isVisible",!1),this.callback=e,this.options={...this.defaultOptions,...t},this.eventHandlerFunction=this.eventHandler.bind(this),!this.options.ssr&&r()?this.start():this.options.ssr||r()||console.warn('[UserVisibility](constructor) executed on server side - set "ssr" option to "false"')}start(){r()?(this.options.immediate&&this.emitCallback(),this.addEventListener()):console.warn("[UserVisibility](start) you should run this method on client side")}emitCallback(){this.isVisible="visible"===document.visibilityState,this.callback({isVisible:this.isVisible}),this.options.once&&this.destroy()}eventHandler(){"visible"!==document.visibilityState||this.isVisible?"hidden"===document.visibilityState&&this.initTimeout():(this.clearTimeout(),this.emitCallback())}clearTimeout(){this.timeoutHandler&&(clearTimeout(this.timeoutHandler),this.timeoutHandler=void 0)}initTimeout(){this.clearTimeout(),this.timeoutHandler=setTimeout(this.emitCallback.bind(this),this.options.timeout)}addEventListener(){document.addEventListener(this.event,this.eventHandlerFunction)}removeEventListener(){document.removeEventListener(this.event,this.eventHandlerFunction)}destroy(){this.removeEventListener(),this.timeoutHandler&&clearTimeout(this.timeoutHandler)}}const d="__vue_click_away__",m=()=>null===document.ontouchstart?"touchstart":"click",c=async(e,i)=>{u(e);const s=i.instance,o=i.value,n="function"==typeof o;if(!n)throw new Error("[maz-ui](vClickOutside) the callback should be a function");await t.nextTick(),e[d]=t=>{if((!e||!e.contains(t.target))&&o&&n)return o.call(s,t)};const r=m();document.addEventListener(r,e[d],!1)},u=e=>{const t=m();document.removeEventListener(t,e[d],!1),delete e[d]},h={mounted:c,updated:(e,t)=>{t.value!==t.oldValue&&c(e,t)},unmounted:u},p={install:e=>{e.directive("click-outside",h)}},g=(e,t,i,s)=>{e.stopPropagation();const{handler:o,exclude:n}=i.value;let r=!1;if(n&&n.length>0)for(const a of n)if(!r){r=s.context.$refs[a].contains(e.target)}t.contains(e.target)||r||s.context[o]()},v=()=>null===document.ontouchstart?"touchstart":"click",w={mounted:(e,t,i)=>{const s=v();document.addEventListener(s,(s=>g(s,e,t,i)))},unmounted:(e,t,i)=>{const s=v();document.removeEventListener(s,(s=>g(s,e,t,i)))}},b={install:e=>{e.directive("closable",w)}},f={close:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',next:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',previous:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>',spinner:'<svg width="40px" height="40px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve" class="maz-zoom-img__loader__svg" data-v-6d1cb50c=""><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"></path></svg>'};class y{constructor(e){if(s(this,"options"),s(this,"loader"),s(this,"wrapper"),s(this,"img"),s(this,"keydownHandler"),s(this,"onImgLoadedCallback"),s(this,"buttonsAdded"),s(this,"defaultOptions",{scale:!0,blur:!0,disabled:!1}),s(this,"mouseEnterListener"),s(this,"mouseLeaveListener"),s(this,"renderPreviewListener"),!e.value)throw new Error('[MazUI](zoom-img) Image path must be defined. Ex: `v-zoom-img="<PATH_TO_IMAGE>"`');if("object"==typeof e.value&&!e.value.src)throw new Error("[maz-ui](zoom-img) src of image must be provided");this.buttonsAdded=!1,this.options=this.buildOptions(e),this.keydownHandler=this.keydownLister.bind(this),this.loader=this.getLoader(),this.wrapper=document.createElement("div"),this.wrapper.classList.add("maz-zoom-img__wrapper"),this.wrapper.prepend(this.loader),this.img=document.createElement("img"),this.onImgLoadedCallback=this.onImgLoaded.bind(this),this.imgEventHandler(!0)}buildOptions(e){return{...this.defaultOptions,..."object"==typeof e.value?e.value:{src:e.value}}}get allInstances(){return[...document.querySelectorAll(".maz-zoom-img-instance")]}create(e){this.options.disabled||(e.style.cursor="pointer",setTimeout((()=>e.classList.add("maz-zoom-img-instance"))),e.setAttribute("data-src",this.options.src),this.options.alt&&e.setAttribute("data-alt",this.options.alt),e.style.transition="all 300ms ease-in-out",this.mouseEnterListener=()=>this.mouseEnter(e),this.mouseLeaveListener=()=>this.mouseLeave(e),this.renderPreviewListener=()=>this.renderPreview(e,this.options),e.addEventListener("mouseenter",this.mouseEnterListener),e.addEventListener("mouseleave",this.mouseLeaveListener),e.addEventListener("click",this.renderPreviewListener))}update(e){this.options=this.buildOptions(e)}remove(e){this.imgEventHandler(!1),e.removeEventListener("mouseenter",this.mouseEnterListener),e.removeEventListener("mouseleave",this.mouseLeaveListener),e.removeEventListener("click",this.renderPreviewListener),e.classList.remove("maz-zoom-img-instance"),e.removeAttribute("data-src"),e.removeAttribute("data-alt"),e.style.cursor=""}renderPreview(e,t){e.classList.add("maz-is-open"),this.addStyle("\n.maz-zoom-img {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1rem;\n z-index: 1050;\n background-color: hsla(238, 15%, 40%, 0.7);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n\n.maz-zoom-img,\n.maz-zoom-img * {\n box-sizing: border-box;\n}\n\n.maz-zoom-img .maz-zoom-img__wrapper {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 0;\n min-height: 0;\n max-width: 100%;\n max-height: 100%;\n transition: all 300ms ease-in-out;\n opacity: 0;\n transform: scale(0.5);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__wrapper {\n opacity: 1;\n transform: scale(1);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: hsla(238, 15%, 40%, 0.7);\n border-radius: 1rem;\n z-index: 2;\n min-width: 60px;\n min-height: 60px;\n}\n.maz-zoom-img.maz-animate .maz-zoom-img__loader[hidden] {\n display: none;\n}\n\n@-webkit-keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader__svg {\n animation: spin .6s linear infinite;\n}\n\n.maz-zoom-img img {\n max-width: 100%;\n max-height: 100%;\n min-width: 0;\n border-radius: 1rem;\n}\n\n.maz-zoom-img .maz-zoom-btn {\n margin: 0 auto;\n border: none;\n background-color: hsla(0, 0%, 7%, 0.5);\n box-shadow: 0 0 0.5rem 0 hsla(0, 0%, 0%, 0.2);\n height: 2.2rem;\n min-height: 2.2rem;\n width: 2.2rem;\n min-width: 2.2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 2.2rem;\n cursor: pointer;\n flex: 0 0 auto;\n outline: none;\n}\n\n.maz-zoom-img .maz-zoom-btn svg {\n fill: white;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--close {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--previous {\n position: absolute;\n left: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--next {\n position: absolute;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn:hover {\n background-color: hsl(0, 0%, 0%);\n}");const i=document.createElement("div");i.classList.add("maz-zoom-img"),i.setAttribute("id","MazImgPreviewFullsize"),i.addEventListener("click",(e=>{i.isEqualNode(e.target)&&this.closePreview()})),"object"==typeof t&&(this.img.setAttribute("src",t.src),t.alt&&this.img.setAttribute("alt",t.alt),this.img.id="MazImgElement"),this.wrapper.append(this.img),i.append(this.wrapper),document.body.append(i),this.keyboardEventHandler(!0),setTimeout((()=>{i&&i.classList.add("maz-animate")}),100)}onImgLoaded(){this.wrapper.style.width=`${this.img.width}px`,this.wrapper.style.minWidth="200px",this.loader.hidden=!0;const e=this.getButton(),t=[],i=this.allInstances.length>1;if(!this.buttonsAdded){if(this.buttonsAdded=!0,i){const e=this.getButton("previous"),i=this.getButton("next");t.push(e,i)}this.wrapper.append(e),i&&(this.wrapper.prepend(t[0]),this.wrapper.append(t[1]))}}getLoader(){const e=document.createElement("div");return e.classList.add("maz-zoom-img__loader"),e.innerHTML=f.spinner,e}mouseLeave(e){this.options.scale&&(e.style.transform=""),this.options.blur&&(e.style.filter=""),e.style.zIndex=""}mouseEnter(e){e.style.zIndex="1",this.options.scale&&(e.style.transform="scale(1.1)"),this.options.blur&&(e.style.filter="blur(2px)")}keydownLister(e){e.preventDefault(),"Escape"!==e.key&&" "!==e.key||this.closePreview(),"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||this.nextPreviousImage("ArrowRight"===e.key)}getButton(e="close"){const t=document.createElement("button");return t.innerHTML=f[e],t.addEventListener("click",(()=>{"close"===e?this.closePreview():this.allInstances&&this.nextPreviousImage("next"===e)})),t.classList.add("maz-zoom-btn"),t.classList.add(`maz-zoom-btn--${e}`),t}closePreview(){const e=document.querySelector("#MazImgPreviewFullsize"),t=document.querySelector("#MazPreviewStyle"),i=document.querySelector(".maz-zoom-img-instance.maz-is-open");i&&i.classList.remove("maz-is-open"),e&&e.classList.remove("maz-animate"),this.keyboardEventHandler(!1),setTimeout((()=>{e&&e.remove(),t&&t.remove()}),300)}getNewInstanceIndex(e){return e<0?this.allInstances.length-1:e>=this.allInstances.length?0:e}nextPreviousImage(e){const t=e,i=document.querySelector(".maz-zoom-img-instance.maz-is-open");if(i){const e=this.allInstances.indexOf(i),s=t?e+1:e-1,o=this.allInstances[this.getNewInstanceIndex(s)];o&&this.useNextInstance(i,o)}}useNextInstance(e,t){e.classList.remove("maz-is-open"),t.classList.add("maz-is-open");const i=t.getAttribute("data-src"),s=t.getAttribute("data-alt");this.wrapper.style.width="",this.loader.hidden=!1,i&&this.img.setAttribute("src",i),s&&this.img.setAttribute("alt",s)}addStyle(e){const t=document.createElement("style");t.id="MazPreviewStyle",t.textContent=e,document.head.append(t)}keyboardEventHandler(e){if(e)return document.addEventListener("keydown",this.keydownHandler);document.removeEventListener("keydown",this.keydownHandler)}imgEventHandler(e){if(e)return this.img.addEventListener("load",this.onImgLoadedCallback);this.img.removeEventListener("load",this.onImgLoadedCallback)}}let z;const L={created(e,t){z=new y(t),z.create(e)},updated(e,t){z.update(t)},unmounted(e){z.remove(e)}},I={install(e){e.directive("zoom-img",L)}},E={baseClass:"m-lazy-img",loadedClass:"m-lazy-loaded",loadingClass:"m-lazy-loading",errorClass:"m-lazy-error",noPhotoClass:"m-lazy-no-photo",noPhoto:!1,observerOnce:!0,loadOnce:!1,noUseErrorPhoto:!1,observerOptions:{threshold:.1}};class T{constructor(e={}){s(this,"observers",[]),s(this,"defaultOptions",E),s(this,"options"),s(this,"onImgLoadedCallback"),s(this,"onImgErrorCallback"),s(this,"hasImgLoaded",!1),this.options=this.buildOptions(e),this.onImgLoadedCallback=this.imageIsLoaded.bind(this),this.onImgErrorCallback=this.imageHasError.bind(this)}async loadErrorPhoto(){const{default:e}=await Promise.resolve().then((()=>ue));return e}buildOptions(e){return{...this.defaultOptions,...e,observerOptions:{...this.defaultOptions.observerOptions,...e.observerOptions}}}removeClass(e,t){e.classList.remove(t)}addClass(e,t){e.classList.add(t)}removeAllStateClasses(e){this.removeClass(e,this.options.loadedClass),this.removeClass(e,this.options.loadingClass),this.removeClass(e,this.options.errorClass),this.removeClass(e,this.options.noPhotoClass)}setBaseClass(e){this.addClass(e,this.options.baseClass)}imageIsLoading(e){var t,i;this.addClass(e,this.options.loadingClass),null==(i=(t=this.options).onLoading)||i.call(t,e)}imageHasNoPhoto(e){this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.noPhotoClass),this.setDefaultPhoto(e)}imageIsLoaded(e){var t,i;this.hasImgLoaded=!0,this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.loadedClass),null==(i=(t=this.options).onLoaded)||i.call(t,e)}imageHasError(e,t){var i,s;console.warn("[maz-ui][MazLazyImg] Error while loading image",t),this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.errorClass),null==(s=(i=this.options).onError)||s.call(i,e),this.setDefaultPhoto(e)}getImageUrl(e,t){const i=this.getImgElement(e).getAttribute("data-src");if(i)return i;t.value;const s="object"==typeof t.value?t.value.src:t.value;return s||console.warn("[maz-ui][MazLazyImg] src url is not defined"),s}async setPictureSourceUrls(e){const t=e.querySelectorAll("source");if(t.length>0)for await(const i of t){const e=i.getAttribute("data-srcset");e?i.srcset=e:console.warn('[maz-ui][MazLazyImg] the "[data-srcset]" attribute is not provided on "<source />"')}else console.warn('[maz-ui][MazLazyImg] No "<source />" elements provided into the "<picture />" element'),this.imageHasError(e)}hasBgImgMode(e){return"bg-image"===e.arg}isPictureElement(e){return e instanceof HTMLPictureElement}getImgElement(e){return this.isPictureElement(e)?e.querySelector("img"):e}async setDefaultPhoto(e){if(this.options.noUseErrorPhoto)return;const t=this.options.errorPhoto??await this.loadErrorPhoto(),i=e.querySelectorAll("source");if(i.length>0)for await(const s of i)s.srcset=t;else this.setImgSrc(e,t)}addEventListenerToImg(e){const t=this.getImgElement(e);t.addEventListener("load",(()=>this.onImgLoadedCallback(e)),{once:!0}),t.addEventListener("error",(t=>this.onImgErrorCallback(e,t)),{once:!0})}async loadImage(e,t){if(this.imageIsLoading(e),this.isPictureElement(e))this.addEventListenerToImg(e),await this.setPictureSourceUrls(e);else{const i=this.getImageUrl(e,t);if(!i)return this.imageHasError(e);this.hasBgImgMode(t)?(e.style.backgroundImage=`url('${i}')`,this.imageIsLoaded(e)):(this.addEventListenerToImg(e),this.setImgSrc(e,i))}}setImgSrc(e,t){this.getImgElement(e).src=t}handleIntersectionObserver(e,t,i,s){var o,n;this.observers.push(s);for(const r of i)if(r.isIntersecting){if(null==(n=(o=this.options).onIntersecting)||n.call(o,r.target),this.options.observerOnce&&s.unobserve(e),this.options.loadOnce&&this.hasImgLoaded)return;this.loadImage(e,t)}}createObserver(e,t){const i=this.options.observerOptions;new IntersectionObserver(((i,s)=>{this.handleIntersectionObserver(e,t,i,s)}),i).observe(e)}async imageHandler(e,t,i){if("update"===i)for await(const s of this.observers)s.unobserve(e);window.IntersectionObserver?this.createObserver(e,t):this.loadImage(e,t)}async bindUpdateHandler(e,t,i){if(this.options.noPhoto)return this.imageHasNoPhoto(e);await this.imageHandler(e,t,i)}async add(e,t){if(this.hasBgImgMode(t)&&this.isPictureElement(e))throw new Error('[MazLazyImg] You can\'t use the "bg-image" mode with "<picture />" element');setTimeout((()=>this.setBaseClass(e)),0),e.getAttribute("src")||this.setImgSrc(e,"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),await this.bindUpdateHandler(e,t,"bind")}async update(e,t){t.value!==t.oldValue&&(this.hasImgLoaded=!1,this.removeAllStateClasses(e),await this.bindUpdateHandler(e,t,"update"))}remove(e,t){this.hasImgLoaded=!1,this.hasBgImgMode(t)&&(e.style.backgroundImage=""),this.removeAllStateClasses(e);for(const i of this.observers)i.unobserve(e);this.observers=[]}}let M;const C={created(e,t){const i="object"==typeof t.value?t.value:{};M=new T(i),M.add(e,t)},updated(e,t){M.update(e,t)},unmounted(e,t){M.remove(e,t)}},k={install(e,t={}){const i={...E,...t,observerOptions:{...E.observerOptions,...t.observerOptions}},s=new T(i);e.directive("lazy-img",{created:s.add.bind(s),updated:s.update.bind(s),unmounted:s.remove.bind(s)})}},A=[{name:"click-outside",directive:h},{name:"closable",directive:w},{name:"zoom-img",directive:L},{name:"lazy-img",directive:C}],x={install(e){for(const{name:t,directive:i}of A)e.directive(t,i)}},S=e=>e?(e=e.toString()).charAt(0).toUpperCase()+e.slice(1):"",D={style:"currency",minimumFractionDigits:2,round:!1},O=(e,t,i)=>{const s={...D,...i};((e,t,i)=>{if(void 0===e)throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");if(void 0===t)throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute is required.");if("string"!=typeof t)throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute must be a string.");if(void 0===i.currency)throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.")})(e,t,s);try{return((e,t,i)=>{let s=Number(e);return i.round&&(s=Math.floor(s),i.minimumFractionDigits=0),new Intl.NumberFormat(t,i).format(s)})(e,t,s)}catch(o){throw new Error(`[maz-ui](FilterCurrency) ${o}`)}},H={month:"short",day:"numeric",year:"numeric"},j=(e,t,i)=>{if(void 0===t)throw new TypeError("[maz-ui](FilterDate) The `locale` attribute is required.");if("string"!=typeof t)throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");const s=i??H;try{const i=e instanceof Date?e:new Date(e);return new Intl.DateTimeFormat(t,s).format(i)}catch(o){throw new Error(`[maz-ui](FilterDate) ${o}`)}},P={minimumFractionDigits:2},N=(e,t,i)=>{const s={...P,...i};if(void 0===e)throw new TypeError("[maz-ui](FilterNumber) The `number` attribute is required.");if(void 0===t)throw new TypeError("[maz-ui](FilterNumber) The `locale` attribute is required.");if("string"!=typeof t)throw new TypeError("[maz-ui](FilterNumber) The `locale` attribute must be a string.");try{return new Intl.NumberFormat(t,s).format(Number(e))}catch(o){throw new Error(`[maz-ui](FilterNumber) ${o}`)}},_={capitalize:S,currency:O,date:j,number:N},V={install(e){e.provide("filters",_)}};class B{constructor(e,t){s(this,"callback"),s(this,"delay"),s(this,"timer"),s(this,"startedAt"),this.startedAt=Date.now(),this.callback=e,this.delay=t,this.start()}pause(){this.stop(),this.delay-=Date.now()-this.startedAt}resume(){this.startedAt=Date.now(),this.start()}start(){this.timer=setTimeout(this.callback,this.delay)}stop(){clearTimeout(this.timer)}}const F={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24"},q=[t.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M6 18 18 6M6 6l12 12"},null,-1)];const U={render:function(e,i){return t.openBlock(),t.createElementBlock("svg",F,q)}},$={class:"m-toast__message-wrapper"},Y={class:"m-toast__message"},Z={key:0,class:"--close"},G=((e,t)=>{const i=e.__vccOpts||e;for(const[s,o]of t)i[s]=o;return i})(t.defineComponent({__name:"MazToast",props:{position:{type:String,default:"bottom-right"},maxToasts:{type:[Number,Boolean],default:!1},timeout:{type:Number,default:1e4},queue:{type:Boolean,default:!1},noPauseOnHover:{type:Boolean,default:!1},type:{type:String,default:"info",validator:e=>["info","success","warning","danger"].includes(e)},message:{type:String,required:!0},persistent:{type:Boolean,default:!1}},emits:["close","click"],setup(e,{emit:i}){const s=e,o=t.ref(),n=t.computed((()=>s.position.includes("top")?"top":"bottom")),r=t.computed((()=>s.position.includes("left")?"left":s.position.includes("right")?"right":"center")),a=t.computed((()=>"center"!==r.value?"right"===r.value?"m-slide-right":"m-slide-left":"top"===n.value?"m-slide-top":"m-slide-bottom")),l=t.ref(!1),d=t.ref(),m=t.ref(),c=`m-toast-container --${n.value} --${r.value}`,u=`.${c.replaceAll(" ",".")}`,h=()=>{if((()=>{const e=document.querySelector(u);return!(!s.queue&&!1===s.maxToasts)&&("number"==typeof s.maxToasts&&e?s.maxToasts<=e.childElementCount:e&&e.childElementCount>0)})())return void(m.value=setTimeout(h,250));const e=document.querySelector(u);o.value&&e&&e.prepend(o.value),l.value=!0,d.value=s.timeout?new B(g,s.timeout):void 0};const p=e=>{d.value&&!s.noPauseOnHover&&(e?d.value.pause():d.value.resume())},g=()=>{d.value&&d.value.stop(),m.value&&clearTimeout(m.value),l.value=!1,setTimeout((()=>{var e;i("close"),null==(e=o.value)||e.remove();const t=document.querySelector(u);t&&!(null==t?void 0:t.hasChildNodes())&&t.remove()}),300)};return t.onMounted((()=>{(()=>{const e=document.querySelector(u);if(!e&&!e){const e=document.body,t=document.createElement("div");t.className=c,e.append(t)}})(),h()})),(d,m)=>(t.openBlock(),t.createBlock(t.Transition,{name:a.value,persisted:""},{default:t.withCtx((()=>[t.withDirectives(t.createElementVNode("div",{ref_key:"Toaster",ref:o,class:t.normalizeClass(["m-toast",[`--${e.type}`,`--${n.value}`,`--${r.value}`]]),role:"alert",onMouseover:m[0]||(m[0]=e=>p(!0)),onMouseleave:m[1]||(m[1]=e=>p(!1)),onClick:m[2]||(m[2]=e=>(i("click",e),void(s.persistent||g())))},[t.createElementVNode("div",$,[t.createElementVNode("p",Y,t.toDisplayString(e.message),1)]),e.persistent?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("button",Z,[t.createVNode(t.unref(U),{class:"--icon"})]))],34),[[t.vShow,l.value]])])),_:1},8,["name"]))}}),[["__scopeId","data-v-db385587"]]);class Q{constructor(e,t){this.app=e,this.globalOptions=t}show(e,t){const i={...{message:e,...t},...this.globalOptions,...t};n(G,{props:i,app:this.app})}getLocalOptions(e,t){return{type:e,...t}}success(e,t){return this.show(e,this.getLocalOptions("success",t))}error(e,t){return this.show(e,this.getLocalOptions("danger",t))}info(e,t){return this.show(e,this.getLocalOptions("info",t))}warning(e,t){return this.show(e,this.getLocalOptions("warning",t))}}const W={position:"bottom-right",timeout:1e4,persistent:!0};e.toastInstance=void 0;const K={install(t,i){e.toastInstance=new Q(t,{...W,...i}),t.provide("toast",e.toastInstance)}};class R{constructor(){s(this,"_loaders",t.ref([]))}get loaders(){return t.computed((()=>this._loaders.value))}stop(e=""){var t;this._loaders.value=(t=this._loaders.value,(e="")=>t.filter((t=>t!==e)))(e)}start(e=""){var t;return this._loaders.value=(t=this._loaders.value,(e="")=>(e=>e.filter(((e,t,i)=>t===i.indexOf(e))))([...t,e]))(e),()=>this.stop(e)}get anyLoading(){return t.computed((()=>this._loaders.value.length>0))}isLoading(e=""){return t.computed((()=>{return(t=this._loaders.value,(e="")=>"function"==typeof e?t.findIndex(((...t)=>e(...t)))>-1:t.includes(e))(e);var t})).value}}const J=new R,X={install:e=>{e.provide("wait",J)}},ee=100,te={root:void 0,rootMargin:"0px",threshold:.2},ie={once:!0,duration:300};class se{constructor(e){s(this,"options"),this.options={delay:(null==e?void 0:e.delay)??ee,observer:{...te,...null==e?void 0:e.observer},animation:{...ie,...null==e?void 0:e.animation}}}runAnimations(){if(r())return this.handleObserver();console.warn("[MazAos](runAnimations) should be executed on client side")}async handleObserver(){var e;await(e=this.options.delay,new Promise((t=>setTimeout(t,e))));const t=new IntersectionObserver(this.handleIntersect.bind(this),{...this.options.observer});for(const i of document.querySelectorAll("[data-maz-aos]")){const e=i.getAttribute("data-maz-aos-anchor");if(e){const i=document.querySelector(e);i?(i.setAttribute("data-maz-aos-children","true"),t.observe(i)):console.warn(`[maz-ui](aos) no element found with selector "${e}"`)}else t.observe(i)}}handleIntersect(e,t){for(const i of e){const e="true"===i.target.getAttribute("data-maz-aos-children"),s=i.target.getAttribute("data-maz-aos")?[i.target]:[];if(e){const e=[...document.querySelectorAll("[data-maz-aos-anchor]")].map((e=>e.getAttribute("data-maz-aos-anchor")===`#${i.target.id}`?e:void 0));for(const t of e)t&&s.push(t)}for(const o of s){const e=o.getAttribute("data-maz-aos-once"),s="string"==typeof e?"true"===e:this.options.animation.once;if("number"==typeof this.options.observer.threshold&&i.intersectionRatio>this.options.observer.threshold){o.getAttribute("data-maz-aos-duration")||(o.style.transitionDuration=`${this.options.animation.duration}ms`,setTimeout((()=>{o.style.transitionDuration="0"}),1e3)),o.classList.add("maz-aos-animate"),s&&t.unobserve(o)}else o.classList.remove("maz-aos-animate")}}}}e.aosInstance=void 0;const oe={install:(t,i)=>{e.aosInstance=new se(i),t.provide("aos",e.aosInstance),r()&&((null==i?void 0:i.router)?i.router.afterEach((async()=>{e.aosInstance.runAnimations()})):e.aosInstance.runAnimations())}},ne={darkClass:"dark",storageThemeKey:"theme",storageThemeValueDark:"dark",storageThemeValueLight:"light"},re=t.ref(),ae=({darkClass:e,storageThemeKey:t,storageThemeValueDark:i,setLocalStorageValue:s=!0})=>{document.documentElement.classList.add(e),re.value=i,s&&(localStorage[t]=i)},le=({darkClass:e,storageThemeKey:t,storageThemeValueLight:i,setLocalStorageValue:s=!0})=>{document.documentElement.classList.remove(e),re.value=i,s&&(localStorage[t]=i)},de=({shouldSetDarkMode:e,...t})=>e?ae(t):le(t),me=t.ref(),ce=t.ref(),ue=Object.freeze(Object.defineProperty({__proto__:null,default:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlPSJub25lIiBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgZmlsbD0iY3VycmVudENvbG9yIgogIGFyaWEtaGlkZGVuPSJ0cnVlIj4KICA8Zz4KICAgIDxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIgLz4KICAgIDxnPgogICAgICA8cGF0aAogICAgICAgIGQ9Ik04LjksNi4wN0w3LjQ4LDQuNjZMOSwzaDZsMS44MywySDIwYzEuMSwwLDIsMC45LDIsMnYxMmMwLDAuMDUtMC4wMSwwLjEtMC4wMiwwLjE2TDIwLDE3LjE3VjdoLTQuMDVsLTEuODMtMkg5Ljg4IEw4LjksNi4wN3ogTTIwLjQ5LDIzLjMxTDE4LjE3LDIxSDRjLTEuMSwwLTItMC45LTItMlY3YzAtMC41OSwwLjI3LTEuMTIsMC42OC0xLjQ5bC0yLTJMMi4xLDIuMWwxOS44LDE5LjhMMjAuNDksMjMuMzF6IE05LjE5LDEyLjAyQzkuMDgsMTIuMzMsOSwxMi42NSw5LDEzYzAsMS42NiwxLjM0LDMsMywzYzAuMzUsMCwwLjY3LTAuMDgsMC45OC0wLjE5TDkuMTksMTIuMDJ6IE0xNi4xNywxOWwtMS42OC0xLjY4IEMxMy43NiwxNy43NSwxMi45MSwxOCwxMiwxOGMtMi43NiwwLTUtMi4yNC01LTVjMC0wLjkxLDAuMjUtMS43NiwwLjY4LTIuNDlMNC4xNyw3SDR2MTJIMTYuMTd6IE0xNC44MSwxMS45OGwyLjA3LDIuMDcgQzE2Ljk2LDEzLjcxLDE3LDEzLjM2LDE3LDEzYzAtMi43Ni0yLjI0LTUtNS01Yy0wLjM2LDAtMC43MSwwLjA0LTEuMDYsMC4xMmwyLjA3LDIuMDdDMTMuODUsMTAuNDksMTQuNTEsMTEuMTUsMTQuODEsMTEuOTh6IiAvPgogICAgPC9nPgogIDwvZz4KPC9zdmc+"},Symbol.toStringTag,{value:"Module"}));e.AosHandler=se,e.IdleTimeout=a,e.ScriptLoader=class{constructor({src:e,identifier:t,once:i=!0,async:o=!0,defer:n=!0}){if(s(this,"src"),s(this,"script"),s(this,"once"),s(this,"async"),s(this,"defer"),s(this,"identifier"),"undefined"==typeof window)throw new TypeError("[ScriptLoader]: Is supported only on browser side");if(!e)throw new Error('[ScriptLoader]: You should provide the attribut "src"');if(!t)throw new Error('[ScriptLoader]: You should provide the attribut "identifier"');this.src=e,this.identifier=t,this.once=i,this.async=o,this.defer=n}removeTag(e){var t;"string"==typeof e?null==(t=document.head.querySelector(`[data-identifier="${e}"]`))||t.remove():e.remove()}load(){const e=window,t=document.head.querySelectorAll(`[data-identifier="${this.identifier}"]`);if(this.once&&e[this.identifier]&&t.length>0)return this.script=e[this.identifier],Promise.resolve(this.script);if(!this.once&&t.length>0)for(const i of t)this.removeTag(i);return this.injectScript()}injectScript(){const e=window;return new Promise(((t,i)=>{try{const s=document.createElement("script");s.src=this.src,s.async=this.async,s.defer=this.defer,s.dataset.identifier=this.identifier,s.addEventListener("error",(e=>i(new Error(`[ScriptLoader](injectScript) ${e.message}`)))),s.addEventListener("load",(i=>(this.script=i,e[this.identifier]=i,t(i)))),document.head.append(s)}catch(s){throw new Error(`[ScriptLoader](init) ${s}`)}}))}},e.ToasterHandler=Q,e.UserVisibility=l,e.WaitHandler=R,e.capitalize=S,e.currency=O,e.date=j,e.debounce=function(e,t=0,i=!1){let s,o;const n=function(){s&&(clearTimeout(s),o=void 0,s=void 0)},r=function(...r){if(!t)return e.apply(this,r);const a=this,l=i&&!s;return n(),o=function(){e.apply(a,r)},s=setTimeout((function(){if(s=void 0,!l){const e=o;if(o=void 0,void 0!==e)return e()}}),t),l?o():void 0};return r.cancel=n,r.flush=function(){const e=o;n(),e&&e()},r},e.injectStrict=o,e.installAos=oe,e.installDirectives=x,e.installFilters=V,e.installToaster=K,e.installWait=X,e.isClient=r,e.mount=n,e.number=N,e.sleep=e=>new Promise((t=>{setTimeout(t,e)})),e.theme=re,e.truthyFilter=function(e){return!!e},e.useAos=()=>({aos:o("aos")}),e.useIdleTimeout=({callback:e,options:t})=>{const i=new a(e,t);me.value=i;return{idle:me}},e.useInstanceUniqId=({componentName:e,instance:i,providedId:s})=>({instanceId:t.computed((()=>s??`${e}-${null==i?void 0:i.uid}`))}),e.useThemeHandler=(e=ne)=>{const i={...ne,...e};return{autoSetTheme:()=>(e=>{localStorage[e.storageThemeKey]===e.storageThemeValueDark||!(e.storageThemeKey in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches?ae({...e,setLocalStorageValue:!1}):le({...e,setLocalStorageValue:!1})})(i),toggleTheme:()=>(e=>localStorage[e.storageThemeKey]===e.storageThemeValueDark?le(e):ae(e))(i),setDarkTheme:()=>de({...i,shouldSetDarkMode:!0}),setLightTheme:()=>de({...i,shouldSetDarkMode:!1}),hasDarkTheme:t.computed((()=>re.value===i.storageThemeValueDark)),hasLightTheme:t.computed((()=>re.value===i.storageThemeValueLight)),theme:re}},e.useToast=()=>({toast:o("toast")}),e.useUserVisibility=({callback:e,options:t})=>{const i=new l(e,t);ce.value=i;return{visibility:ce}},e.useWait=()=>({wait:o("wait")}),e.vClickOutside=h,e.vClickOutsideInstall=p,e.vClosable=w,e.vClosableInstall=b,e.vLazyImg=C,e.vLazyImgInstall=k,e.vZoomImg=L,e.vZoomImgInstall=I,e.waitInstance=J,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
File without changes