v-dialogs
Version:
A simple command-style pop-up dialog components for Vue3
1,372 lines • 56.7 kB
JavaScript
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(".v-dialog,.v-dialog-lite{position:fixed;z-index:1050;outline:0}.v-dialog-lite{left:0;right:0}.v-dialog{position:fixed}.v-dialog.v-dialog--content-center{display:flex;justify-content:center;align-items:center}.v-dialog.v-dialog--screen-center{left:50%;top:50%;transform:translate(-50%,-50%)}.v-dialog.v-dialog--horizontal-center{left:50%;transform:translate(-50%)}.v-dialog.v-dialog--embedded{position:absolute}.v-dialog .v-dialog-content{outline:0;position:relative;background-color:#fff;box-shadow:0 3rem 5rem #00000080;border-radius:1rem;border:0;overflow:hidden;display:flex;flex-direction:column}.v-dialog .v-dialog-header{display:flex;align-items:center;flex-shrink:0;height:42px}.v-dialog .v-dialog-header h3{margin:0;font-size:18px;padding:0 15px;font-weight:500;flex-grow:1;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v-dialog .v-dialog-body{position:relative;width:100%;padding:0;overflow:auto;box-sizing:border-box;flex-grow:1}.v-dialog-overlay{position:fixed;inset:0;z-index:1040;background-color:#00000080}.v-dialog-overlay.v-dialog-overlay--blur{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.v-dialog-overlay.v-dialog-overlay--embedded{position:absolute}.v-dialog-icon{display:inline-flex;width:1em;height:1em}@keyframes soft-candy-show{0%{transform:scale3d(.8,.8,1) translateZ(0)}45%{transform:scale3d(1.05,1.05,1) translateZ(0)}80%{transform:scale3d(.98,.98,1) translateZ(0)}to{transform:scaleZ(1) translateZ(0)}}.v-dialog--candy-enter-active{animation:soft-candy-show .36s cubic-bezier(.34,1.56,.64,1);will-change:transform,opacity;backface-visibility:hidden;contain:layout style paint}.v-dialog--candy-leave-active{transition:transform .24s cubic-bezier(.25,.46,.45,.94),opacity .24s cubic-bezier(.25,.46,.45,.94);will-change:transform,opacity;backface-visibility:hidden}.v-dialog--candy-enter-from,.v-dialog--candy-leave-to{transform:scale3d(.9,.9,1) translateZ(0);opacity:0}.v-dialog--smooth-enter-active,.v-dialog--smooth-leave-active{transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .25s cubic-bezier(.4,0,.2,1)!important;will-change:transform,opacity;transform:translateZ(0);backface-visibility:hidden;perspective:1000px;contain:layout style paint}.v-dialog--smooth-enter-from,.v-dialog--smooth-leave-to{transform:scale3d(.9,.9,1);opacity:0}.v-dialog--smooth-enter-to,.v-dialog--smooth-leave-from{transform:scaleZ(1);opacity:1}.v-dialog--fade-enter-active,.v-dialog--fade-leave-active{transition:opacity .3s cubic-bezier(.4,0,.2,1);will-change:opacity;transform:translateZ(0);backface-visibility:hidden}.v-dialog--fade-enter-from,.v-dialog--fade-leave-to{opacity:0}.v-dialog--fade-lite-enter-active,.v-dialog--fade-lite-leave-active{transition:opacity .25s cubic-bezier(.4,0,.2,1);will-change:opacity;transform:translateZ(0);backface-visibility:hidden}.v-dialog--fade-lite-enter-from,.v-dialog--fade-lite-leave-to{opacity:0}@keyframes animated-buzz-out{10%{transform:translate3d(3px,0,0) rotate(2deg)}20%{transform:translate3d(-3px,0,0) rotate(-2deg)}30%{transform:translate3d(3px,0,0) rotate(2deg)}40%{transform:translate3d(-3px,0,0) rotate(-2deg)}50%{transform:translate3d(2px,0,0) rotate(1deg)}60%{transform:translate3d(-2px,0,0) rotate(-1deg)}70%{transform:translate3d(2px,0,0) rotate(1deg)}80%{transform:translate3d(-2px,0,0) rotate(-1deg)}90%{transform:translate3d(1px,0,0) rotate(0)}to{transform:translate3d(-1px,0,0) rotate(0)}}.v-dialog--buzz-out{animation:animated-buzz-out .6s cubic-bezier(.25,.46,.45,.94);will-change:transform;backface-visibility:hidden;transform:translateZ(0);contain:layout style paint}.v-dialog-modal{inset:0}.v-dialog-modal.v-dialog-modal--maximize{padding-right:0!important}.v-dialog-modal.v-dialog-modal--maximize .v-dialog-content{width:100vw!important;height:100vh!important;border-radius:0}.v-dialog-modal.v-dialog-modal--maximize .v-dialog-header{background-color:#eee}.v-dialog-modal .v-dialog-content{border-radius:.8rem;transition:width .2s ease-in-out,height .2s ease-in-out;min-width:280px;min-height:200px}.v-dialog-modal .v-dialog-content .v-dialog-header h3{color:#333;font-weight:600}.v-dialog-modal .v-dialog-content .v-dialog-header button{width:60px;height:100%;transition:all .3s ease-out;text-shadow:none;outline:none!important;margin:0;opacity:.3;font-size:18px!important;border:0;background-color:transparent;display:inline-flex;justify-content:center;align-items:center;flex-shrink:0}.v-dialog-modal .v-dialog-content .v-dialog-header button:hover{opacity:1}.v-dialog-modal .v-dialog-content .v-dialog-header button.v-dialog-btn__close{font-weight:400}.v-dialog-modal .v-dialog-content .v-dialog-header button.v-dialog-btn__close:hover{background-color:#e81123;color:#fff}.v-dialog-modal .v-dialog-content .v-dialog-header button.v-dialog-btn__maximize:hover{background-color:#e0e0e0}.v-dialog-modal .v-dialog-content .v-dialog-body{padding:0!important}.v-dialog-mask{inset:0}.v-dialog-mask .v-dialog-content.mask--pill{border-radius:50rem}.v-dialog-mask .v-dialog-content.mask--no-icon .v-dialog-mask__content{margin-left:2rem!important}.v-dialog-mask .v-dialog-content.mask--no-panel{box-shadow:none!important;background-color:transparent}.v-dialog-mask .v-dialog-body{overflow:hidden!important;display:flex;align-items:center;min-width:300px;max-width:400px;color:#333}.v-dialog-mask .v-dialog-body .v-dialog-mask__content,.v-dialog-mask .v-dialog-body .v-dialog-mask__icon{display:flex;align-items:center}.v-dialog-mask .v-dialog-body .v-dialog-mask__content{margin:0 1.5rem 0 1rem;font-size:1rem;line-height:1.3;overflow-y:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-overflow:ellipsis}.v-dialog-mask .v-dialog-body .v-dialog-mask__icon{padding-left:17px;flex-shrink:0}.v-dialog-mask .v-dialog-body .v-dialog-icon-loading{font-size:2rem}.v-dialog-mask-parent--relative{position:relative!important}.v-dialog-drawer.v-dialog-drawer--top{top:0;left:0}.v-dialog-drawer.v-dialog-drawer--top .v-dialog-content{box-shadow:0 1rem 5rem #00000080}.v-dialog-drawer.v-dialog-drawer--bottom{bottom:0;left:0}.v-dialog-drawer.v-dialog-drawer--bottom .v-dialog-content{box-shadow:0 1rem 5rem #00000080}.v-dialog-drawer.v-dialog-drawer--left{top:0;left:0}.v-dialog-drawer.v-dialog-drawer--left .v-dialog-content{box-shadow:0 1rem 5rem #00000080}.v-dialog-drawer.v-dialog-drawer--right{top:0;right:0}.v-dialog-drawer.v-dialog-drawer--right .v-dialog-content{box-shadow:0 1rem 5rem #00000080}.v-dialog-drawer.v-dialog-drawer--rounded .v-dialog-content{border-radius:18px}.v-dialog-drawer.v-dialog-drawer--rounded.v-dialog-drawer--top .v-dialog-content{border-top-left-radius:0;border-top-right-radius:0}.v-dialog-drawer.v-dialog-drawer--rounded.v-dialog-drawer--bottom .v-dialog-content{border-bottom-left-radius:0;border-bottom-right-radius:0}.v-dialog-drawer.v-dialog-drawer--rounded.v-dialog-drawer--left .v-dialog-content{border-top-left-radius:0;border-bottom-left-radius:0}.v-dialog-drawer.v-dialog-drawer--rounded.v-dialog-drawer--right .v-dialog-content{border-top-right-radius:0;border-bottom-right-radius:0}.v-dialog-drawer .v-dialog-content{border-radius:0;min-width:400px;min-height:200px}.v-dialog-drawer .v-dialog-content .v-dialog-header h3{font-weight:600;color:#333}.v-dialog-drawer .v-dialog-content .v-dialog-header button{width:60px;height:100%;transition:all .3s ease-out;text-shadow:none;outline:none!important;margin:0;opacity:.3;font-size:18px!important;border:0;background-color:transparent;display:inline-flex;justify-content:center;align-items:center}.v-dialog-drawer .v-dialog-content .v-dialog-header button:hover{opacity:1}.v-dialog-drawer .v-dialog-content .v-dialog-header button.v-dialog-btn__close{font-weight:400}.v-dialog-drawer .v-dialog-content .v-dialog-header button.v-dialog-btn__close:hover{background-color:#e81123;color:#fff}.v-dialog-drawer .v-dialog-content .v-dialog-body{padding:0!important}.v-dialog-drawer-slide-in-top-enter-active,.v-dialog-drawer-slide-in-top-leave-active{transition:transform .28s cubic-bezier(.25,1,.5,1),opacity .18s ease-out 60ms;will-change:transform,opacity;transform:translateZ(0);backface-visibility:hidden;contain:layout style paint}.v-dialog-drawer-slide-in-top-enter-from,.v-dialog-drawer-slide-in-top-leave-to{transform:translate3d(0,-100%,0);opacity:0}.v-dialog-drawer-slide-in-bottom-enter-active,.v-dialog-drawer-slide-in-bottom-leave-active{transition:transform .28s cubic-bezier(.25,1,.5,1),opacity .18s ease-out 60ms;will-change:transform,opacity;transform:translateZ(0);backface-visibility:hidden;contain:layout style paint}.v-dialog-drawer-slide-in-bottom-enter-from,.v-dialog-drawer-slide-in-bottom-leave-to{transform:translate3d(0,100%,0);opacity:0}.v-dialog-drawer-slide-in-left-enter-active,.v-dialog-drawer-slide-in-left-leave-active{transition:transform .28s cubic-bezier(.25,1,.5,1),opacity .18s ease-out 60ms;will-change:transform,opacity;transform:translateZ(0);backface-visibility:hidden;contain:layout style paint}.v-dialog-drawer-slide-in-left-enter-from,.v-dialog-drawer-slide-in-left-leave-to{transform:translate3d(-100%,0,0);opacity:0}.v-dialog-drawer-slide-in-right-enter-active,.v-dialog-drawer-slide-in-right-leave-active{transition:transform .28s cubic-bezier(.25,1,.5,1),opacity .18s ease-out 60ms;will-change:transform,opacity;transform:translateZ(0);backface-visibility:hidden;contain:layout style paint}.v-dialog-drawer-slide-in-right-enter-from,.v-dialog-drawer-slide-in-right-leave-to{transform:translate3d(100%,0,0);opacity:0}.v-dialog-alert{inset:0}.v-dialog-alert.no-icon .v-dialog-alert__content{padding-left:15px}.v-dialog-alert.no-header .v-dialog-alert__content{padding-top:2rem}.v-dialog-alert .v-dialog-content{overflow:hidden;display:flex;flex-direction:column;background-color:#fff}.v-dialog-alert .v-dialog-footer{flex-shrink:0;overflow:hidden}.v-dialog-alert .v-dialog-footer .v-dialog-alert__buttons{display:flex;justify-content:flex-end;padding:0 1rem 1rem 0}.v-dialog-alert .v-dialog-footer .v-dialog-alert__buttons button{outline:none!important;padding:8px 15px;min-width:90px;border-radius:.7rem;font-size:14px;transition:all .2s ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none}.v-dialog-alert .v-dialog-footer .v-dialog-alert__buttons button:active{box-shadow:0 10px 20px #0003,0 6px 6px #0000003b}.v-dialog-alert .v-dialog-footer .v-dialog-alert__buttons .v-dialog-btn__ok{border:1px solid #516270;background-color:#516270;color:#fff}.v-dialog-alert .v-dialog-footer .v-dialog-alert__buttons .v-dialog-btn__cancel{border:1px solid #F0F0F0;background-color:#f0f0f0;margin-left:1rem}.v-dialog-alert .v-dialog-alert__content{overflow-y:auto;flex-grow:1;display:flex;padding:1rem}.v-dialog-alert .v-dialog-alert__content .v-dialog-alert__icon{display:flex;padding:0 2rem 0 1rem;font-size:3rem;color:#333;filter:drop-shadow(4px 5px 5px rgba(0,0,0,.6))}.v-dialog-alert .v-dialog-alert__content .v-dialog-alert__message{flex-grow:1;font-size:14px;line-height:1.5;display:flex;align-items:center}.v-dialog-alert .alert-warning .v-dialog-alert__icon{color:#ff9800;filter:drop-shadow(4px 5px 5px rgba(255,152,0,.8))}.v-dialog-alert .alert-error .v-dialog-alert__icon{color:#f44336;filter:drop-shadow(4px 5px 5px rgba(244,67,54,.8))}.v-dialog-alert .alert-success .v-dialog-alert__icon{color:#198754;filter:drop-shadow(4px 5px 5px rgba(25,135,84,.8))}.v-dialog-alert .alert-confirm .v-dialog-alert__icon{color:#3f51b5;filter:drop-shadow(4px 5px 5px rgba(63,81,181,.9))}.v-dialog__shadow--error{box-shadow:0 1rem 5rem #ff000080!important}.v-dialog__shadow--warning{box-shadow:0 1rem 5rem #ffa50080!important}.v-dialog__shadow--success{box-shadow:0 1rem 5rem #00ff0080!important}.v-dialog-message{background-color:transparent;overflow:unset;transition:all .3s;display:flex;justify-content:center;left:50%;right:unset;transform:translate(-50%)}.v-dialog-message .v-dialog-body{border-radius:1rem;box-shadow:0 7px 12px #0006;overflow:hidden;display:flex;align-items:center;background-color:#0006;-webkit-backdrop-filter:saturate(180%) blur(12px);backdrop-filter:saturate(180%) blur(12px);min-height:52px;max-width:500px}.v-dialog-message .v-dialog-body.v-dialog-message--pill{border-radius:2rem}.v-dialog-message .v-dialog-body.v-dialog-message--no-icon .v-dialog-message__body{padding:.5rem 2rem}.v-dialog-message .v-dialog-body.message-warning .v-dialog-message__prepend{color:#ff9800;filter:drop-shadow(4px 5px 5px rgba(255,152,0,.95))}.v-dialog-message .v-dialog-body.message-error .v-dialog-message__prepend{color:#f44336;filter:drop-shadow(4px 5px 5px rgba(244,67,54,.95))}.v-dialog-message .v-dialog-body.message-success .v-dialog-message__prepend{color:#198754;filter:drop-shadow(4px 5px 5px rgba(25,135,84,.95))}.v-dialog-message__prepend,.v-dialog-message__append{width:40px;flex-shrink:0;display:flex;align-items:center;font-size:1.3rem}.v-dialog-message__prepend{justify-content:flex-end;filter:drop-shadow(4px 5px 5px rgba(0,0,0,.95))}.v-dialog-message__append{justify-content:flex-start}.v-dialog-message__body{display:flex;align-items:center;font-size:14px;line-height:1.3;flex-grow:1;padding:.5rem 1rem;overflow:hidden;height:100%}.v-dialog-message__close{cursor:pointer}.v-dialog-toast{background-color:transparent;box-sizing:border-box;transition:all .3s}.v-dialog-toast .v-dialog-body{position:relative;display:flex;padding:1rem;box-shadow:0 5px 40px #0006;border-radius:.7rem;border-width:2px;border-style:solid;border-color:#ccc;color:#333;background-color:#fff;width:300px}.v-dialog-toast .v-dialog-body.toast-warning{border-color:#333;background-color:#f5cf87}.v-dialog-toast .v-dialog-body.toast-error{background-color:#ff5252;border-color:#bf2a2a;color:#fff}.v-dialog-toast .v-dialog-body.toast-error .v-dialog-toast__append{color:#ccc}.v-dialog-toast .v-dialog-body.toast-error .v-dialog-toast__append:hover{color:#fff}.v-dialog-toast .v-dialog-body.toast-success{background-color:#2cbe4e;border-color:#0a8427;color:#1b5e20}.v-dialog-toast .v-dialog-body.toast-success .v-dialog-toast__append{color:#666}.v-dialog-toast .v-dialog-body.toast-success .v-dialog-toast__append:hover{color:#000}.v-dialog-toast--left{left:16px;right:unset}.v-dialog-toast--right{left:unset;right:16px}.v-dialog-toast__prepend,.v-dialog-toast__append{display:flex;justify-content:center;flex-shrink:0}.v-dialog-toast__prepend{font-size:1.3rem}.v-dialog-toast__body{flex-grow:1;padding:0 10px;font-size:14px;overflow:hidden;min-height:60px}.v-dialog-toast__body h3{margin:0 0 3px;font-size:16px;font-weight:600}.v-dialog-toast__body div{font-size:14px;line-height:1.4;margin:0}.v-dialog-toast__append{color:#999;font-size:1rem;outline:none;transition:all .3s}.v-dialog-toast__append:hover{color:#000}.v-dialog-toast__close{cursor:pointer}")),document.head.appendChild(o)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
import { ref as y, createVNode as l, mergeProps as ie, getCurrentInstance as Ye, render as be, isVNode as V, inject as _, h as De, onMounted as w, onUnmounted as Xe, computed as O, onBeforeMount as Je, defineComponent as E, Teleport as ke, Transition as oe, createElementBlock as A, openBlock as S, createElementVNode as p, provide as P, watch as we, markRaw as Te, nextTick as Ee } from "vue";
const h = Symbol("props"), Qe = "$dlg", et = "v-dialogs-", tt = 5100, nt = 50, ot = "100vw", lt = "100vh", at = 450, Ae = 32, st = 15, it = 16, Se = 700, xe = 400, z = "info", x = "warning", M = "error", B = "success", R = "confirm", rt = 400, ct = 300, N = "top", re = "bottom", ut = "left", K = "right", Me = "top-left", Y = "top-right", Be = "bottom-left", dt = "bottom-right", X = "close", le = "render-dialog", ae = "v-dialog-message-adjust-position", Ce = [N, re, ut, K], ft = [
x,
M,
B
], ce = [
x,
M,
B
], [
Fn,
qn,
ue,
Vn,
Kn,
de
] = ["modal", "alert", "toast", "drawer", "mask", "message"], se = y(0), $ = y([]), gt = new Event(ae);
function L(e, t = {}, n) {
const { index: o, key: s } = Ie(n);
let i = l(e, ie(t, {
dialogKey: s,
dialogIndex: o,
// Dialog close and destroy
onClose: () => u()
}));
const c = Ye()?.appContext ?? null;
i.appContext = c;
let r = document.createElement("div");
be(i, r);
const u = () => {
be(null, r), r.remove(), r = null, i = null, pt(s);
};
return () => {
i.component.exposed?.close?.();
};
}
function mt() {
return et + ++se.value;
}
function Ie(e) {
const t = mt();
return $.value.push({
key: t,
index: se.value,
singletonKey: "",
...e
}), {
key: t,
index: se.value
};
}
function pt(e) {
$.value.length && ($.value = $.value.filter((t) => t.key !== e));
}
const [vt, Z, ht, yt, bt] = ["cn", "en", "pt", "jp", "tr"], ne = {
[vt]: {
titleInfo: "提示",
titleWarning: "警告",
titleError: "错误",
titleSuccess: "成功",
titleConfirm: "确认",
btnOk: "确认",
btnCancel: "取消",
maskText: "数据加载中……"
},
[Z]: {
titleInfo: "Information",
titleWarning: "Warning",
titleError: "Error",
titleSuccess: "Success",
titleConfirm: "Confirmation",
btnOk: "OK",
btnCancel: "Cancel",
maskText: "Loading……"
},
[ht]: {
titleInfo: "Aviso",
titleWarning: "Alerta",
titleError: "Erro",
titleSuccess: "Sucesso",
titleConfirm: "Confirmaço",
btnOk: "OK",
btnCancel: "Cancelar",
maskText: "Carregando……"
},
[yt]: {
titleInfo: "ヒント",
titleWarning: "警告",
titleError: "間違った",
titleSuccess: "成功",
titleConfirm: "確認",
btnOk: "確認",
btnCancel: "キャンセル",
maskText: "データロード……"
},
[bt]: {
titleInfo: "Bilgi",
titleWarning: "Uyarı",
titleError: "Hata",
titleSuccess: "Başarılı",
titleConfirm: "Onay",
btnOk: "Evet",
btnCancel: "İptal",
maskText: "Yükleniyor"
}
}, Ct = {
/** Dialog key */
dialogKey: { type: String, default: "" },
dialogIndex: { type: Number, required: !0 },
singletonKey: { type: String, default: "" },
customClass: { type: String, default: "" },
/** Display dialog backdrop */
backdrop: { type: Boolean, default: !0 },
/** Click backdrop to close dialog */
backdropClose: { type: Boolean, default: !1 },
/** Display dialog header */
header: { type: Boolean, default: !0 },
title: { type: String, default: "" },
message: { type: [String, Object], default: "" },
/** Dialog width */
width: { type: Number, default: 0 },
/** Dialog height */
height: { type: Number, default: 0 },
shake: { type: Boolean, default: !1 },
language: { type: String, default: Z },
callback: { type: Function, default: void 0 }
}, _t = [X, le], Dt = {
backdrop: !0
}, kt = {
backdrop: !0,
backdropClose: !1
}, wt = {
backdrop: !0,
backdropClose: !1,
shake: !1
}, Tt = {
shake: !1
};
function W(e) {
return { ...Ct, ...e };
}
function j(e = []) {
return [..._t, ...e];
}
function Le(e, t) {
switch (e) {
case x:
return t.titleWarning;
case M:
return t.titleError;
case B:
return t.titleSuccess;
case R:
return t.titleConfirm;
default:
return t.titleInfo;
}
}
function G(e, t, n) {
if (typeof t == "object" && typeof n == "object" || typeof t == "function" && typeof n == "function") {
console.warn("Invalid parameters for v-dialogs");
return;
}
const o = Array.from(arguments), s = o.find((a) => typeof a == "object" && !V(a) && !_e(a)) || {};
return s.message = o.find((a) => typeof a == "string" || V(a) || _e(a)) || "", s.callback = o.find((a) => typeof a == "function"), s;
}
function _e(e) {
return typeof e != "object" ? !1 : !!(Object.hasOwn(e, "render") || Object.hasOwn(e, "template") || Object.hasOwn(e, "setup"));
}
function Et(e) {
return typeof e != "object" ? !1 : !!(Object.hasOwn(e, "tagName") || Object.hasOwn(e, "tagName") && e.outerHTML);
}
function At(e) {
return ((window.innerHeight || document.documentElement.clientHeight) - e) / 2;
}
function St(e) {
const t = tt + nt * e, n = t - 10;
return { dialogZIndex: t, backdropZIndex: n };
}
function fe(e = Z) {
const t = String(e).toLowerCase();
return t in ne ? ne[t] : ne[Z];
}
function xt() {
return document.body.scrollHeight > window.innerHeight;
}
function Mt() {
if (!xt() || document.body.style.overflowY === "hidden") return;
const e = document.documentElement.clientWidth, t = window.innerWidth - e;
document.body.style.paddingRight = `${t}px`, document.body.style.overflowY = "hidden";
}
function Bt() {
document.body.style.removeProperty("overflow-y"), document.body.style.removeProperty("padding-right");
}
function q(e, t = "px") {
return typeof e == "number" ? `${e}${t}` : e;
}
function ge(e, t, n, o) {
const s = {};
return e.forEach((a) => {
const [i, ...c] = a, r = t + i.toUpperCase() + c.join("");
s[r] = function() {
const u = {
...G(...arguments),
messageType: a
}, d = o && o(u);
return L(n, u, d);
};
}), s;
}
function It(e) {
return e.toLowerCase().replace(/[-_\s]+(.)?/g, (t, n) => n ? n.toUpperCase() : "").replace(/^\w/, (t) => t.toUpperCase());
}
function Lt(e, t) {
e.duration && setTimeout(t, e.duration);
}
function Ot(e, t = 200) {
let n;
function o() {
clearTimeout(n), n = setTimeout(e, t);
}
w(() => {
addEventListener("resize", o, !1);
}), Xe(() => {
removeEventListener("resize", o, !1);
});
}
function Pt(e) {
return {
bindPositionAdjust: () => addEventListener(ae, e, !1),
unbindPositionAdjust: () => removeEventListener(ae, e, !1),
triggerPositionAdjust: () => dispatchEvent(gt)
};
}
function Oe(e, t) {
const n = {
closing: () => {
t.callback?.(X, []), e("update:visible", !1);
}
};
function o(a) {
t.withCallback(a, n);
}
function s() {
t.withoutCallback(n);
}
return {
closeDialogWithCallback: o,
closeDialogWithoutCallback: s
};
}
function Pe(e, t) {
const {
bindPositionAdjust: n,
unbindPositionAdjust: o,
triggerPositionAdjust: s
} = Pt(e);
function a(i) {
o(), t(i, {
afterClose: s
});
}
return n(), {
closeGroupDialogWithCallback: a
};
}
function zt(e) {
const {
component: t,
callback: n,
params: o,
closeDialogWithoutCallback: s
} = _(h);
function a() {
if (e.default) return e.default();
if (!t) return;
const i = typeof t == "function" ? t() : t, c = i?.emits || [], r = {};
return c.forEach((u) => {
const d = "on" + It(u);
r[d] = (...f) => {
u.toLowerCase() === X && s(), n?.(u, f);
};
}), De(i, ie(o, r));
}
return { getComponentContent: a };
}
function ze(e, { attrs: t, slots: n }) {
const o = y(!1), { index: s, key: a } = Ie(), i = {
dialogKey: a,
dialogIndex: s,
onRenderDialog: (c) => {
o.value = c;
}
};
return () => {
if (!(!t?.visible && !o.value))
return De(e, ie(t, i), () => n?.default());
};
}
function Ne(e, t) {
const n = t.offset || Ae;
function o() {
return $.value.filter((a) => a.type === e && a.placement === t.placement && a.index < t.dialogIndex);
}
function s() {
const a = o();
if (!a.length) return n;
let i = 0;
return a.forEach((c) => {
const r = document.getElementById(c.key);
i += r.offsetHeight + st;
}), n + i;
}
return { getVerticalPosition: s };
}
function H(e, t) {
const n = y(!1), o = y(!1), s = y(0), a = y(0), i = y(), c = y(), r = y(!1), u = y(!0), d = y(!0), f = y(), { dialogZIndex: v, backdropZIndex: m } = St(e.dialogIndex), D = O(() => {
const g = {};
return typeof s.value < "u" && (g.width = q(s.value)), typeof a.value < "u" && (g.height = q(a.value)), typeof i.value < "u" && (g.top = q(i.value)), typeof c.value < "u" && (g.bottom = q(c.value)), g;
});
function k(g) {
return typeof g < "u" ? g : At(a.value);
}
function b(g, T) {
s.value = g, a.value = T;
}
function C(g, T) {
i.value = k(g), typeof T < "u" && (c.value = T);
}
function F() {
u.value && Mt(), n.value = !0, t(le, !0);
}
function te(g, T, ye) {
r.value && (n.value = !1, ye?.closing?.(), f.value = () => {
console.log("close: ", T), g?.(T), t(X), ye?.afterClose?.(), t(le, !1), u.value && Bt();
});
}
function Fe(g, T) {
te(e.callback, g, T);
}
function qe(g) {
te(void 0, void 0, g);
}
function Ve(g) {
d.value && Ot(g), Je(g);
}
function Ke(g) {
w(() => {
Lt(e, g);
});
}
function Ze() {
r.value = !0;
}
function Ue() {
f?.value();
}
return {
show: n,
shaking: o,
transitionEnterComplete: r,
shouldControlOverflow: u,
shouldHandleResize: d,
dialogStyles: D,
dialogZIndex: v,
backdropZIndex: m,
openDialog: F,
destroy: f,
closeDialog: te,
closeWithCallback: Fe,
closeWithoutCallback: qe,
setPosition: C,
setDialogSize: b,
setupAutomaticClose: Ke,
setupPositionAdjustBehavior: Ve,
onTransitionAfterEnter: Ze,
onTransitionAfterLeave: Ue
};
}
const J = /* @__PURE__ */ E({
name: "DialogContainer",
props: {
containerClass: {
type: [String, Array, Object],
default: ""
},
backdropClass: {
type: [String, Array, Object],
default: ""
},
transitionName: {
type: String,
default: ""
},
appendTo: {
type: [String, Object],
default: "body"
}
},
setup(e, {
slots: t
}) {
const {
show: n,
shaking: o,
backdrop: s,
backdropClose: a,
shake: i,
dialogZIndex: c,
backdropZIndex: r,
onTransitionAfterEnter: u,
onTransitionAfterLeave: d,
backdropCloseDialog: f = void 0
} = _(h);
function v() {
if (s) {
if (a) return f && f();
i && (o.value || (o.value = !0, setTimeout(() => {
o.value = !1;
}, 750)));
}
}
const m = (b) => {
b.target === b.currentTarget && v();
};
function D() {
if (!s) return;
const b = ["v-dialog-overlay", e.backdropClass, {
"v-dialog-overlay--embedded": e.appendTo !== "body"
}];
return l(oe, {
name: "v-dialog--fade",
appear: !0
}, {
default: () => n.value && l("div", {
class: b,
style: {
"z-index": r
},
onClick: m
}, null)
});
}
function k() {
const b = [e.containerClass, {
"v-dialog--embedded": e.appendTo !== "body"
}];
return l("div", {
class: ["v-dialog", b],
style: {
"z-index": c
},
onClick: m
}, [l(oe, {
name: e.transitionName,
onAfterEnter: u,
onAfterLeave: d,
appear: !0
}, {
default: () => n.value && t?.default()
})]);
}
return () => l(ke, {
to: e.appendTo
}, {
default: () => [D(), k()]
});
}
}), Q = {
name: "DialogContentBox",
props: {
className: {
type: [String, Array, Object],
default: ""
}
},
setup(e, {
slots: t
}) {
const {
shaking: n,
customClass: o,
dialogStyles: s
} = _(h), a = O(() => ["v-dialog-content", e.className, o, {
"v-dialog--buzz-out": n.value
}]), i = O(() => ({
...s.value
}));
return () => l("div", {
class: a.value,
style: i.value
}, [t?.default()]);
}
}, I = (e, t) => {
const n = e.__vccOpts || e;
for (const [o, s] of t)
n[o] = s;
return n;
}, Nt = {}, Wt = {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
viewBox: "0 0 24 24",
class: "v-dialog-icon"
};
function jt(e, t) {
return S(), A("svg", Wt, [...t[0] || (t[0] = [
p("g", {
fill: "none",
"fill-rule": "evenodd"
}, [
p("path", { d: "m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z" }),
p("path", {
fill: "currentColor",
d: "m12 14.122l5.303 5.303a1.5 1.5 0 0 0 2.122-2.122L14.12 12l5.304-5.303a1.5 1.5 0 1 0-2.122-2.121L12 9.879L6.697 4.576a1.5 1.5 0 1 0-2.122 2.12L9.88 12l-5.304 5.304a1.5 1.5 0 1 0 2.122 2.12z"
})
], -1)
])]);
}
const ee = /* @__PURE__ */ I(Nt, [["render", jt]]), Ht = {}, $t = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
viewBox: "0 0 16 16",
class: "v-dialog-icon"
};
function Rt(e, t) {
return S(), A("svg", $t, [...t[0] || (t[0] = [
p("path", {
fill: "currentColor",
d: "M4.5 3A1.5 1.5 0 0 0 3 4.5v7A1.5 1.5 0 0 0 4.5 13h7a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 11.5 3zM5 4.5h6a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5"
}, null, -1)
])]);
}
const Gt = /* @__PURE__ */ I(Ht, [["render", Rt]]), Ft = {}, qt = {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
viewBox: "0 0 24 24",
class: "v-dialog-icon"
};
function Vt(e, t) {
return S(), A("svg", qt, [...t[0] || (t[0] = [
p("g", {
fill: "none",
"fill-rule": "evenodd"
}, [
p("path", { d: "m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z" }),
p("path", {
fill: "currentColor",
d: "M19 3a2 2 0 0 1 1.995 1.85L21 5v10a2 2 0 0 1-1.85 1.995L19 17h-2v2a2 2 0 0 1-1.85 1.995L15 21H5a2 2 0 0 1-1.995-1.85L3 19V9a2 2 0 0 1 1.85-1.995L5 7h2V5a2 2 0 0 1 1.85-1.995L9 3zm-4 6H5v10h10zm4-4H9v2h6l.15.005a2 2 0 0 1 1.844 1.838L17 9v6h2z"
})
], -1)
])]);
}
const Kt = /* @__PURE__ */ I(Ft, [["render", Vt]]), Zt = {
setup() {
const {
maxButton: e,
maximize: t,
title: n,
closeButton: o,
switchMaximize: s,
closeDialogWithoutCallback: a
} = _(h);
return () => l("div", {
class: "v-dialog-header"
}, [l("h3", null, [n]), e && l("button", {
type: "button",
class: "v-dialog-btn__maximize",
onClick: s
}, [t.value ? l(Kt, null, null) : l(Gt, null, null)]), o && l("button", {
type: "button",
class: "v-dialog-btn__close",
onClick: a
}, [l(ee, null, null)])]);
}
}, U = {
name: "DialogComponentBody",
setup(e, {
slots: t
}) {
const {
getComponentContent: n
} = zt(t);
return () => l("div", {
class: "v-dialog-body"
}, [n()]);
}
};
function Ut(e) {
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !V(e);
}
const We = /* @__PURE__ */ E({
name: "DialogModal",
props: W({
/**
* The component to put in the Modal
*/
component: [Function, Object],
shake: {
type: Boolean,
default: !0
},
title: {
type: String,
default: "Dialog"
},
width: {
type: Number,
default: Se
},
height: {
type: Number,
default: xe
},
/**
* The parameters pass to Component as props
*/
params: Object,
/** Open maximized dialog */
fullscreen: {
type: Boolean,
default: !1
},
maxButton: {
type: Boolean,
default: !0
},
closeButton: {
type: Boolean,
default: !0
},
visible: {
type: Boolean,
default: !1
}
}),
emits: j(["update:visible"]),
setup(e, {
emit: t,
slots: n,
expose: o
}) {
const {
maximize: s,
closeDialogWithoutCallback: a,
...i
} = Yt(e, t, o);
P(h, {
...e,
...i,
...kt,
closeDialogWithoutCallback: a,
maximize: s
});
const c = O(() => ["v-dialog-modal", "v-dialog--content-center", {
"v-dialog-modal--maximize": s.value
}]);
return () => {
let r;
return l(J, {
"container-class": c.value,
"transition-name": "v-dialog--smooth"
}, {
default: () => [l(Q, null, {
default: () => [e.header && l(Zt, null, null), n.default ? l(U, null, Ut(r = n.default()) ? r : {
default: () => [r]
}) : l(U, null, null)]
})]
});
};
}
});
function Yt(e, t, n) {
const {
setDialogSize: o,
openDialog: s,
closeWithCallback: a,
closeWithoutCallback: i,
...c
} = H(e, t), r = y(!1), {
closeDialogWithCallback: u,
closeDialogWithoutCallback: d
} = Oe(t, {
callback: e.callback,
withCallback: a,
withoutCallback: i
});
we(() => e.visible, (m) => {
m || d();
});
function f() {
r.value = !r.value, e.callback?.("maximize", [r.value]);
}
function v() {
s(), e.fullscreen && f();
}
return o(e.width || Se, e.height || xe), w(v), n({
close: d
}), {
...c,
maximize: r,
openModal: v,
switchMaximize: f,
closeDialogWithCallback: u,
closeDialogWithoutCallback: d,
backdropCloseDialog: d
};
}
function Xt(e, t = {}) {
const n = {
...t,
component: Te(e)
};
return L(We, n);
}
const Jt = {}, Qt = {
width: "24",
height: "24",
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
class: "v-dialog-icon v-dialog-icon-loading"
};
function en(e, t) {
return S(), A("svg", Qt, [...t[0] || (t[0] = [
p("path", {
d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",
opacity: ".25"
}, null, -1),
p("path", { d: "M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" }, [
p("animateTransform", {
attributeName: "transform",
type: "rotate",
dur: "0.75s",
values: "0 12 12;360 12 12",
repeatCount: "indefinite"
})
], -1)
])]);
}
const tn = /* @__PURE__ */ I(Jt, [["render", en]]), nn = {
name: "DialogMaskBody",
setup(e, {
slots: t
}) {
const {
icon: n
} = _(h);
return () => l("div", {
class: "v-dialog-body"
}, [n && l("div", {
class: "v-dialog-mask__icon"
}, [l(tn, null, null)]), l("div", {
class: "v-dialog-mask__content"
}, [t.default && t.default()])]);
}
}, on = /* @__PURE__ */ E({
name: "DialogMask",
props: W({
appendTo: {
type: String,
default: "body"
},
pill: {
type: Boolean,
default: !0
},
icon: {
type: Boolean,
default: !0
},
panel: {
type: Boolean,
default: !0
}
}),
emits: j(),
setup(e, {
emit: t,
expose: n
}) {
const {
messageText: o,
closeMaskWithCallback: s,
...a
} = ln(e, t, n);
P(h, {
...e,
...a,
...wt
});
const i = ["v-dialog-mask", "v-dialog--content-center"], c = [{
"mask--pill": e.pill,
"mask--no-icon": !e.icon,
"mask--no-panel": !e.panel
}];
return () => l(J, {
"container-class": i,
"backdrop-class": {
"v-dialog-overlay--blur": !e.panel
},
"transition-name": "v-dialog--smooth",
"append-to": e.appendTo
}, {
default: () => [l(Q, {
"class-name": c
}, {
default: () => [l(nn, null, {
default: () => o.value
})]
})]
});
}
});
function ln(e, t, n) {
const {
shouldControlOverflow: o,
shouldHandleResize: s,
setDialogSize: a,
openDialog: i,
closeWithCallback: c,
...r
} = H(e, t), {
addParentRelative: u,
removeParentRelative: d
} = an(e.appendTo), f = fe(e.language), v = O(() => e.message || f.maskText);
e.appendTo !== "body" && (s.value = !1, o.value = !1);
function m() {
c(void 0, {
afterClose: () => d
});
}
return u(), a(void 0, 60), w(i), n({
close: m
}), {
...r,
messageText: v,
closeMaskWithCallback: m
};
}
function an(e) {
const t = n();
function n() {
if (typeof e == "string")
return document.querySelector(e);
if (Et(e))
return e;
}
function o() {
e !== "body" && t.classList.add("v-dialog-mask-parent--relative");
}
function s() {
e !== "body" && t.classList.remove("v-dialog-mask-parent--relative");
}
return {
addParentRelative: o,
removeParentRelative: s
};
}
function sn() {
return L(on, G(...arguments));
}
const rn = {
setup() {
const {
title: e,
closeButton: t,
closeDialogWithoutCallback: n
} = _(h);
return () => l("div", {
class: "v-dialog-header"
}, [l("h3", null, [e]), t && l("button", {
type: "button",
class: "v-dialog-btn__close",
onClick: n
}, [l(ee, null, null)])]);
}
};
function cn(e) {
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !V(e);
}
const je = /* @__PURE__ */ E({
name: "DialogDrawer",
props: W({
/**
* The component to put in the Drawer
*/
component: [Function, Object],
title: {
type: String,
default: "Dialog"
},
width: {
type: Number,
default: void 0
},
height: {
type: Number,
default: void 0
},
backdropClose: {
type: Boolean,
default: !0
},
/**
* The parameters pass to Component as props
*/
params: Object,
closeButton: {
type: Boolean,
default: !0
},
placement: {
type: String,
default: K
},
rounded: {
type: Boolean,
default: !0
},
visible: {
type: Boolean,
default: !1
}
}),
emits: j(["update:visible"]),
setup(e, {
emit: t,
slots: n,
expose: o
}) {
const {
drawerClasses: s,
getTransitionName: a,
closeDialogWithoutCallback: i,
...c
} = un(e, t, o);
return P(h, {
...e,
...c,
...Tt,
closeDialogWithoutCallback: i
}), () => {
let r;
return l(J, {
"container-class": s.value,
"transition-name": a()
}, {
default: () => [l(Q, null, {
default: () => [e.header && l(rn, null, null), n.default ? l(U, null, cn(r = n.default()) ? r : {
default: () => [r]
}) : l(U, null, null)]
})]
});
};
}
});
function un(e, t, n) {
const {
setDialogSize: o,
openDialog: s,
closeWithCallback: a,
closeWithoutCallback: i,
...c
} = H(e, t), { placement: r, rounded: u } = e, { width: d, height: f } = dn(e), {
closeDialogWithCallback: v,
closeDialogWithoutCallback: m
} = Oe(t, {
callback: e.callback,
withCallback: a,
withoutCallback: i
}), D = O(() => {
const C = ["v-dialog-drawer"];
return C.push(k()), u && C.push("v-dialog-drawer--rounded"), C;
});
we(() => e.visible, (C) => {
C || m();
});
function k() {
return "v-dialog-drawer--" + (Ce.includes(r) ? r : K);
}
function b() {
return "v-dialog-drawer-slide-in-" + (Ce.includes(r) ? r : K);
}
return o(d, f), w(s), n({
close: m
}), {
...c,
drawerClasses: D,
getTransitionName: b,
closeDialogWithCallback: v,
closeDialogWithoutCallback: m,
backdropCloseDialog: m
};
}
function dn(e) {
const { width: t, height: n, placement: o } = e, s = t || rt, a = n || ct;
return o === N || o === re ? { width: ot, height: a } : { width: s, height: lt };
}
function fn(e, t = {}) {
const n = {
...t,
component: Te(e)
};
return L(je, n);
}
const gn = {
name: "DialogAlertHeader",
setup() {
const {
title: e,
lang: t,
messageType: n
} = _(h), o = e || Le(n, t);
return () => l("div", {
class: "v-dialog-header"
}, [l("h3", null, [o])]);
}
}, mn = {}, pn = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "currentColor",
class: "v-dialog-icon bi-info-circle",
viewBox: "0 0 16 16"
};
function vn(e, t) {
return S(), A("svg", pn, [...t[0] || (t[0] = [
p("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" }, null, -1),
p("path", { d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z" }, null, -1)
])]);
}
const me = /* @__PURE__ */ I(mn, [["render", vn]]), hn = {}, yn = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "currentColor",
class: "v-dialog-icon bi-exclamation-triangle",
viewBox: "0 0 16 16"
};
function bn(e, t) {
return S(), A("svg", yn, [...t[0] || (t[0] = [
p("path", { d: "M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017.163.163 0 0 1-.054-.06.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z" }, null, -1),
p("path", { d: "M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z" }, null, -1)
])]);
}
const pe = /* @__PURE__ */ I(hn, [["render", bn]]), Cn = {}, _n = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "currentColor",
class: "v-dialog-icon bi-x-circle",
viewBox: "0 0 16 16"
};
function Dn(e, t) {
return S(), A("svg", _n, [...t[0] || (t[0] = [
p("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" }, null, -1),
p("path", { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" }, null, -1)
])]);
}
const ve = /* @__PURE__ */ I(Cn, [["render", Dn]]), kn = {}, wn = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "currentColor",
class: "v-dialog-icon bi-check-circle",
viewBox: "0 0 16 16"
};
function Tn(e, t) {
return S(), A("svg", wn, [...t[0] || (t[0] = [
p("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" }, null, -1),
p("path", { d: "M10.97 4.97a.235.235 0 0 0-.02.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05z" }, null, -1)
])]);
}
const he = /* @__PURE__ */ I(kn, [["render", Tn]]), En = {}, An = {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "currentColor",
class: "v-dialog-icon bi-question-circle",
viewBox: "0 0 16 16"
};
function Sn(e, t) {
return S(), A("svg", An, [...t[0] || (t[0] = [
p("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" }, null, -1),
p("path", { d: "M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z" }, null, -1)
])]);
}
const xn = /* @__PURE__ */ I(En, [["render", Sn]]), Mn = {
name: "DialogAlertBody",
setup() {
const {
icon: e,
message: t,
messageType: n,
getAlertTypeClass: o
} = _(h), s = ["v-dialog-body", o(n)];
function a(i) {
switch (i) {
case z:
return l(me, null, null);
case x:
return l(pe, null, null);
case M:
return l(ve, null, null);
case B:
return l(he, null, null);
case R:
return l(xn, null, null);
default:
return;
}
}
return e || s.push("no-icon"), () => l("div", {
class: s
}, [l("div", {
class: "v-dialog-alert__content"
}, [e && l("div", {
class: "v-dialog-alert__icon"
}, [a(n)]), l("div", {
class: "v-dialog-alert__message"
}, [t])])]);
}
}, Bn = {
name: "DialogAlertFooter",
setup() {
const e = y(), {
lang: t,
cancelAlert: n,
isConfirmType: o,
closeWithCallback: s
} = _(h);
return w(() => {
e.value?.focus();
}), () => l("div", {
class: "v-dialog-footer"
}, [l("div", {
class: "v-dialog-alert__buttons"
}, [l("button", {
type: "button",
class: "v-dialog-btn__ok",
ref: e,
onClick: s
}, [t.btnOk]), o() && l("button", {
type: "button",
class: "v-dialog-btn__cancel",
onClick: n
}, [t.btnCancel])])]);
}
}, He = /* @__PURE__ */ E({
name: "DialogAlert",
props: W({
/**
* Message type
*
* - `info` - default
* - `warning`
* - `error`
* - `success`
* - `confirm`
*/
messageType: {
type: String,
default: z
},
colorfulShadow: {
type: Boolean,
default: !1
},
icon: {
type: Boolean,
default: !0
},
cancelCallback: {
type: Function,
default: void 0
}
}),
emits: j(),
setup(e, {
emit: t,
expose: n
}) {
const {
getShadowClass: o,
closeWithCallback: s,
...a
} = In(e, t, n);
return P(h, {
...e,
...a,
...Dt,
closeWithCallback: s
}), () => l(J, {
"container-class": ["v-dialog--content-center", "v-dialog-alert", {
"no-header": !e.header
}],
"transition-name": "v-dialog--candy"
}, {
default: () => [l(Q, {
"class-name": [o()]
}, {
default: () => [e.header && l(gn, null, null), l(Mn, null, null), l(Bn, null, null)]
})]
});
}
});
function In(e, t, n) {
const { messageType: o, colorfulShadow: s } = e, {
setDialogSize: a,
openDialog: i,
closeDialog: c,
closeWithCallback: r,
...u
} = H(e, t), d = fe(e.language), f = () => R === o;
function v() {
return [
x,
M,
B,
R
].includes(o) ? `alert-${o}` : "";
}
function m() {
return !s || !ft.includes(o) ? "" : `v-dialog__shadow--${o?.toLowerCase()}`;
}
function D() {
c(e.cancelCallback);
}
return a(at, "auto"), w(i), n({
close: r
}), {
...u,
lang: d,
cancelAlert: D,
isConfirmType: f,
getAlertTypeClass: v,
closeWithCallback: r,
backdropCloseDialog: r,
getShadowClass: m
};
}
function Ln() {
return L(He, G(...arguments));
}
const {
DialogAlertInfo: Zn,
DialogAlertWarning: Un,
DialogAlertError: Yn,
DialogAlertSuccess: Xn,
DialogAlertConfirm: Jn
} = ge(
[...ce, R],
"DialogAlert",
He
), On = {
name: "DialogMessageBody",
setup() {
const {
icon: e,
pill: t,
message: n,
messageType: o,
closeButton: s,
closeGroupDialogWithCallback: a
} = _(h), i = ["v-dialog-body", t && "v-dialog-message--pill", e || "v-dialog-message--no-icon", zn(o)];
function c(r) {
switch (r) {
case z:
return l(me, null, null);
case x:
return l(pe, null, null);
case M:
return l(ve, null, null);
case B:
return l(he, null, null);
default:
return;
}
}
return () => l("div", {
class: i
}, [e && l("div", {
class: "v-dialog-message__prepend"
}, [c(o)]), l("div", {
class: "v-dialog-message__body"
}, [n]), s && l("div", {
class: "v-dialog-message__append",
onClick: a
}, [l(ee, {
class: "v-dialog-message__close"
}, null)])]);
}
}, $e = {
name: "DialogLiteContainer",
props: {
id: {
type: [String, Number],
default: ""
},
containerClass: {
type: [String, Array, Object],
default: ""
},
transitionName: {
type: String,
default: ""
}
},
setup(e, {
slots: t
}) {
const {
show: n,
dialogStyles: o,
dialogZIndex: s,
customClass: a,
onTransitionAfterEnter: i,
onTransitionAfterLeave: c
} = _(h), r = ["v-dialog-lite", e.containerClass, a];
return () => l(ke, {
to: "body"
}, {
default: () => [l("div", {
id: e.id,
class: r,
style: {
...o.value,
"z-index": s
}
}, [l(oe, {
name: e.transitionName,
onAfterEnter: i,
onAfterLeave: c,
appear: !0
}, {
default: () => n.value && t?.default()
})])]
});
}
}, Re = /* @__PURE__ */ E({
name: "DialogMessage",
props: W({
/**
* Message type
*
* - `info` - default
* - `warning`
* - `error`
* - `success`
*/
messageType: {
type: String,
default: z
},
icon: {
type: Boolean,
default: !0
},
closeButton: {
type: Boolean,
default: !1
},
/**
* Auto close dialog milliseconds
* - 0: disabled automatic close
* - number of milliseconds: specify times to automatic close dialog
*/
duration: {
type: Numbe