Skip to content

BillionMail gives you open-source MailServer, NewsLetter, Email Marketing — fully self-hosted, dev-friendly, and free from monthly fees. Join the discord: https://discord.gg/asfXzBUhZr

17.0 KB
Raw Blame
"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([["1069"],{65977:function(e,o,r){r.d(o,{Z:()=>n});var t=r(58786);let n=(0,t.aZ)({name:"Add",render:()=>(0,t.h)("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.h)("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))})},99321:function(e,o,r){r.d(o,{Z:()=>z});var t=r(65083),n=r(58786),l=r(77565),i=r(1183),a=r(96823),c=r(87075),s=r(52317),d=r(64812),h=r(62198),u=r(56946),b=r(54470),v=r(53198),g=r(51048),f=r(71309),p=r(93950),w=r(19595),m=r(9798),x=r(18877);let C={name:"Alert",common:m.Z,self:function(e){let{lineHeight:o,borderRadius:r,fontWeightStrong:t,baseColor:n,dividerColor:l,actionColor:i,textColor1:a,textColor2:c,closeColorHover:s,closeColorPressed:d,closeIconColor:h,closeIconColorHover:u,closeIconColorPressed:b,infoColor:v,successColor:g,warningColor:f,errorColor:p,fontSize:m}=e;return Object.assign(Object.assign({},x.Z),{fontSize:m,lineHeight:o,titleFontWeight:t,borderRadius:r,border:`1px solid ${l}`,color:i,titleTextColor:a,iconColor:c,contentTextColor:c,closeBorderRadius:r,closeColorHover:s,closeColorPressed:d,closeIconColor:h,closeIconColorHover:u,closeIconColorPressed:b,borderInfo:`1px solid ${(0,w.h$)(n,(0,w.zX)(v,{alpha:.25}))}`,colorInfo:(0,w.h$)(n,(0,w.zX)(v,{alpha:.08})),titleTextColorInfo:a,iconColorInfo:v,contentTextColorInfo:c,closeColorHoverInfo:s,closeColorPressedInfo:d,closeIconColorInfo:h,closeIconColorHoverInfo:u,closeIconColorPressedInfo:b,borderSuccess:`1px solid ${(0,w.h$)(n,(0,w.zX)(g,{alpha:.25}))}`,colorSuccess:(0,w.h$)(n,(0,w.zX)(g,{alpha:.08})),titleTextColorSuccess:a,iconColorSuccess:g,contentTextColorSuccess:c,closeColorHoverSuccess:s,closeColorPressedSuccess:d,closeIconColorSuccess:h,closeIconColorHoverSuccess:u,closeIconColorPressedSuccess:b,borderWarning:`1px solid ${(0,w.h$)(n,(0,w.zX)(f,{alpha:.33}))}`,colorWarning:(0,w.h$)(n,(0,w.zX)(f,{alpha:.08})),titleTextColorWarning:a,iconColorWarning:f,contentTextColorWarning:c,closeColorHoverWarning:s,closeColorPressedWarning:d,closeIconColorWarning:h,closeIconColorHoverWarning:u,closeIconColorPressedWarning:b,borderError:`1px solid ${(0,w.h$)(n,(0,w.zX)(p,{alpha:.25}))}`,colorError:(0,w.h$)(n,(0,w.zX)(p,{alpha:.08})),titleTextColorError:a,iconColorError:p,contentTextColorError:c,closeColorHoverError:s,closeColorPressedError:d,closeIconColorError:h,closeIconColorHoverError:u,closeIconColorPressedError:b})}};var k=r(74482);let y=(0,f.cB)("alert",`
 line-height: var(--n-line-height);
 border-radius: var(--n-border-radius);
 position: relative;
 transition: background-color .3s var(--n-bezier);
 background-color: var(--n-color);
 text-align: start;
 word-break: break-word;
`,[(0,f.cE)("border",`
 border-radius: inherit;
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 transition: border-color .3s var(--n-bezier);
 border: var(--n-border);
 pointer-events: none;
 `),(0,f.cM)("closable",[(0,f.cB)("alert-body",[(0,f.cE)("title",`
 padding-right: 24px;
 `)])]),(0,f.cE)("icon",{color:"var(--n-icon-color)"}),(0,f.cB)("alert-body",{padding:"var(--n-padding)"},[(0,f.cE)("title",{color:"var(--n-title-text-color)"}),(0,f.cE)("content",{color:"var(--n-content-text-color)"})]),(0,k.Y)({originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.9)"}}),(0,f.cE)("icon",`
 position: absolute;
 left: 0;
 top: 0;
 align-items: center;
 justify-content: center;
 display: flex;
 width: var(--n-icon-size);
 height: var(--n-icon-size);
 font-size: var(--n-icon-size);
 margin: var(--n-icon-margin);
 `),(0,f.cE)("close",`
 transition:
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 position: absolute;
 right: 0;
 top: 0;
 margin: var(--n-close-margin);
 `),(0,f.cM)("show-icon",[(0,f.cB)("alert-body",{paddingLeft:"calc(var(--n-icon-margin-left) + var(--n-icon-size) + var(--n-icon-margin-right))"})]),(0,f.cM)("right-adjust",[(0,f.cB)("alert-body",{paddingRight:"calc(var(--n-close-size) + var(--n-padding) + 2px)"})]),(0,f.cB)("alert-body",`
 border-radius: var(--n-border-radius);
 transition: border-color .3s var(--n-bezier);
 `,[(0,f.cE)("title",`
 transition: color .3s var(--n-bezier);
 font-size: 16px;
 line-height: 19px;
 font-weight: var(--n-title-font-weight);
 `,[(0,f.c)("& +",[(0,f.cE)("content",{marginTop:"9px"})])]),(0,f.cE)("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),(0,f.cE)("icon",{transition:"color .3s var(--n-bezier)"})]),$=Object.assign(Object.assign({},u.Z.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:"default"},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function}),z=(0,n.aZ)({name:"Alert",inheritAttrs:!1,props:$,slots:Object,setup(e){let{mergedClsPrefixRef:o,mergedBorderedRef:r,inlineThemeDisabled:l,mergedRtlRef:i}=(0,b.ZP)(e),a=(0,u.Z)("Alert","-alert",y,C,e,o),c=(0,g.V)("Alert",i,o),s=(0,n.Fl)(()=>{let{common:{cubicBezierEaseInOut:o},self:r}=a.value,{fontSize:n,borderRadius:l,titleFontWeight:i,lineHeight:c,iconSize:s,iconMargin:d,iconMarginRtl:h,closeIconSize:u,closeBorderRadius:b,closeSize:v,closeMargin:g,closeMarginRtl:p,padding:w}=r,{type:m}=e,{left:x,right:C}=(0,t.mH)(d);return{"--n-bezier":o,"--n-color":r[(0,f.Tl)("color",m)],"--n-close-icon-size":u,"--n-close-border-radius":b,"--n-close-color-hover":r[(0,f.Tl)("closeColorHover",m)],"--n-close-color-pressed":r[(0,f.Tl)("closeColorPressed",m)],"--n-close-icon-color":r[(0,f.Tl)("closeIconColor",m)],"--n-close-icon-color-hover":r[(0,f.Tl)("closeIconColorHover",m)],"--n-close-icon-color-pressed":r[(0,f.Tl)("closeIconColorPressed",m)],"--n-icon-color":r[(0,f.Tl)("iconColor",m)],"--n-border":r[(0,f.Tl)("border",m)],"--n-title-text-color":r[(0,f.Tl)("titleTextColor",m)],"--n-content-text-color":r[(0,f.Tl)("contentTextColor",m)],"--n-line-height":c,"--n-border-radius":l,"--n-font-size":n,"--n-title-font-weight":i,"--n-icon-size":s,"--n-icon-margin":d,"--n-icon-margin-rtl":h,"--n-close-size":v,"--n-close-margin":g,"--n-close-margin-rtl":p,"--n-padding":w,"--n-icon-margin-left":x,"--n-icon-margin-right":C}}),d=l?(0,v.F)("alert",(0,n.Fl)(()=>e.type[0]),s,e):void 0,h=(0,n.iH)(!0),p=()=>{let{onAfterLeave:o,onAfterHide:r}=e;o&&o(),r&&r()};return{rtlEnabled:c,mergedClsPrefix:o,mergedBordered:r,visible:h,handleCloseClick:()=>{var o;Promise.resolve(null==(o=e.onClose)?void 0:o.call(e)).then(e=>{!1!==e&&(h.value=!1)})},handleAfterLeave:()=>{p()},mergedTheme:a,cssVars:l?void 0:s,themeClass:null==d?void 0:d.themeClass,onRender:null==d?void 0:d.onRender}},render(){var e;return null==(e=this.onRender)||e.call(this),(0,n.h)(l.Z,{onAfterLeave:this.handleAfterLeave},{default:()=>{let{mergedClsPrefix:e,$slots:o}=this,r={class:[`${e}-alert`,this.themeClass,this.closable&&`${e}-alert--closable`,this.showIcon&&`${e}-alert--show-icon`,!this.title&&this.closable&&`${e}-alert--right-adjust`,this.rtlEnabled&&`${e}-alert--rtl`],style:this.cssVars,role:"alert"};return this.visible?(0,n.h)("div",Object.assign({},(0,n.dG)(this.$attrs,r)),this.closable&&(0,n.h)(i.Z,{clsPrefix:e,class:`${e}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&(0,n.h)("div",{class:`${e}-alert__border`}),this.showIcon&&(0,n.h)("div",{class:`${e}-alert__icon`,"aria-hidden":"true"},(0,p.gI)(o.icon,()=>[(0,n.h)(a.Z,{clsPrefix:e},{default:()=>{switch(this.type){case"success":return(0,n.h)(c.Z,null);case"info":return(0,n.h)(s.Z,null);case"warning":return(0,n.h)(d.Z,null);case"error":return(0,n.h)(h.Z,null);default:return null}}})])),(0,n.h)("div",{class:[`${e}-alert-body`,this.mergedBordered&&`${e}-alert-body--bordered`]},(0,p.K9)(o.header,o=>{let r=o||this.title;return r?(0,n.h)("div",{class:`${e}-alert-body__title`},r):null}),o.default&&(0,n.h)("div",{class:`${e}-alert-body__content`},o))):null}})}})},29875:function(e,o,r){let t;r.d(o,{Z:()=>y});var n=r(65083),l=r(20013),i=r(58786),a=r(76128),c=r(62594),s=r(56946),d=r(54470),h=r(32196),u=r(53198),b=r(44267),v=r(71309),g=r(93950),f=r(19595),p=r(9798),w=r(30951);let m={name:"Switch",common:p.Z,self:function(e){let{primaryColor:o,opacityDisabled:r,borderRadius:t,textColor3:n}=e;return Object.assign(Object.assign({},w.Z),{iconColor:n,textColor:"white",loadingColor:o,opacityDisabled:r,railColor:"rgba(0, 0, 0, .14)",railColorActive:o,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:t,railBorderRadiusMedium:t,railBorderRadiusLarge:t,buttonBorderRadiusSmall:t,buttonBorderRadiusMedium:t,buttonBorderRadiusLarge:t,boxShadowFocus:`0 0 0 2px ${(0,f.zX)(o,{alpha:.2})}`})}};var x=r(28632);let C=(0,v.cB)("switch",`
 height: var(--n-height);
 min-width: var(--n-width);
 vertical-align: middle;
 user-select: none;
 -webkit-user-select: none;
 display: inline-flex;
 outline: none;
 justify-content: center;
 align-items: center;
`,[(0,v.cE)("children-placeholder",`
 height: var(--n-rail-height);
 display: flex;
 flex-direction: column;
 overflow: hidden;
 pointer-events: none;
 visibility: hidden;
 `),(0,v.cE)("rail-placeholder",`
 display: flex;
 flex-wrap: none;
 `),(0,v.cE)("button-placeholder",`
 width: calc(1.75 * var(--n-rail-height));
 height: var(--n-rail-height);
 `),(0,v.cB)("base-loading",`
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translateX(-50%) translateY(-50%);
 font-size: calc(var(--n-button-width) - 4px);
 color: var(--n-loading-color);
 transition: color .3s var(--n-bezier);
 `,[(0,x.c)({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),(0,v.cE)("checked, unchecked",`
 transition: color .3s var(--n-bezier);
 color: var(--n-text-color);
 box-sizing: border-box;
 position: absolute;
 white-space: nowrap;
 top: 0;
 bottom: 0;
 display: flex;
 align-items: center;
 line-height: 1;
 `),(0,v.cE)("checked",`
 right: 0;
 padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));
 `),(0,v.cE)("unchecked",`
 left: 0;
 justify-content: flex-end;
 padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));
 `),(0,v.c)("&:focus",[(0,v.cE)("rail",`
 box-shadow: var(--n-box-shadow-focus);
 `)]),(0,v.cM)("round",[(0,v.cE)("rail","border-radius: calc(var(--n-rail-height) / 2);",[(0,v.cE)("button","border-radius: calc(var(--n-button-height) / 2);")])]),(0,v.u4)("disabled",[(0,v.u4)("icon",[(0,v.cM)("rubber-band",[(0,v.cM)("pressed",[(0,v.cE)("rail",[(0,v.cE)("button","max-width: var(--n-button-width-pressed);")])]),(0,v.cE)("rail",[(0,v.c)("&:active",[(0,v.cE)("button","max-width: var(--n-button-width-pressed);")])]),(0,v.cM)("active",[(0,v.cM)("pressed",[(0,v.cE)("rail",[(0,v.cE)("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])]),(0,v.cE)("rail",[(0,v.c)("&:active",[(0,v.cE)("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])])])])])]),(0,v.cM)("active",[(0,v.cE)("rail",[(0,v.cE)("button","left: calc(100% - var(--n-button-width) - var(--n-offset))")])]),(0,v.cE)("rail",`
 overflow: hidden;
 height: var(--n-rail-height);
 min-width: var(--n-rail-width);
 border-radius: var(--n-rail-border-radius);
 cursor: pointer;
 position: relative;
 transition:
 opacity .3s var(--n-bezier),
 background .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
 background-color: var(--n-rail-color);
 `,[(0,v.cE)("button-icon",`
 color: var(--n-icon-color);
 transition: color .3s var(--n-bezier);
 font-size: calc(var(--n-button-height) - 4px);
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 display: flex;
 justify-content: center;
 align-items: center;
 line-height: 1;
 `,[(0,x.c)()]),(0,v.cE)("button",`
 align-items: center; 
 top: var(--n-offset);
 left: var(--n-offset);
 height: var(--n-button-height);
 width: var(--n-button-width-pressed);
 max-width: var(--n-button-width);
 border-radius: var(--n-button-border-radius);
 background-color: var(--n-button-color);
 box-shadow: var(--n-button-box-shadow);
 box-sizing: border-box;
 cursor: inherit;
 content: "";
 position: absolute;
 transition:
 background-color .3s var(--n-bezier),
 left .3s var(--n-bezier),
 opacity .3s var(--n-bezier),
 max-width .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
 `)]),(0,v.cM)("active",[(0,v.cE)("rail","background-color: var(--n-rail-color-active);")]),(0,v.cM)("loading",[(0,v.cE)("rail",`
 cursor: wait;
 `)]),(0,v.cM)("disabled",[(0,v.cE)("rail",`
 cursor: not-allowed;
 opacity: .5;
 `)])]),k=Object.assign(Object.assign({},s.Z.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]}),y=(0,i.aZ)({name:"Switch",props:k,slots:Object,setup(e){void 0===t&&(t="undefined"==typeof CSS||void 0!==CSS.supports&&CSS.supports("width","max(1px)"));let{mergedClsPrefixRef:o,inlineThemeDisabled:r}=(0,d.ZP)(e),a=(0,s.Z)("Switch","-switch",C,m,e,o),c=(0,h.Z)(e),{mergedSizeRef:g,mergedDisabledRef:f}=c,p=(0,i.iH)(e.defaultValue),w=(0,i.Vh)(e,"value"),x=(0,l.Z)(w,p),k=(0,i.Fl)(()=>x.value===e.checkedValue),y=(0,i.iH)(!1),$=(0,i.iH)(!1),z=(0,i.Fl)(()=>{let{railStyle:o}=e;if(o)return o({focused:$.value,checked:k.value})});function E(o){let{"onUpdate:value":r,onChange:t,onUpdateValue:n}=e,{nTriggerFormInput:l,nTriggerFormChange:i}=c;r&&(0,b.R)(r,o),n&&(0,b.R)(n,o),t&&(0,b.R)(t,o),p.value=o,l(),i()}let B=(0,i.Fl)(()=>{let e,o,r,{value:l}=g,{self:{opacityDisabled:i,railColor:c,railColorActive:s,buttonBoxShadow:d,buttonColor:h,boxShadowFocus:u,loadingColor:b,textColor:f,iconColor:p,[(0,v.Tl)("buttonHeight",l)]:w,[(0,v.Tl)("buttonWidth",l)]:m,[(0,v.Tl)("buttonWidthPressed",l)]:x,[(0,v.Tl)("railHeight",l)]:C,[(0,v.Tl)("railWidth",l)]:k,[(0,v.Tl)("railBorderRadius",l)]:y,[(0,v.Tl)("buttonBorderRadius",l)]:$},common:{cubicBezierEaseInOut:z}}=a.value;return t?(e=`calc((${C} - ${w}) / 2)`,o=`max(${C}, ${w})`,r=`max(${k}, calc(${k} + ${w} - ${C}))`):(e=(0,n.BL)(((0,n.fQ)(C)-(0,n.fQ)(w))/2),o=(0,n.BL)(Math.max((0,n.fQ)(C),(0,n.fQ)(w))),r=(0,n.fQ)(C)>(0,n.fQ)(w)?k:(0,n.BL)((0,n.fQ)(k)+(0,n.fQ)(w)-(0,n.fQ)(C))),{"--n-bezier":z,"--n-button-border-radius":$,"--n-button-box-shadow":d,"--n-button-color":h,"--n-button-width":m,"--n-button-width-pressed":x,"--n-button-height":w,"--n-height":o,"--n-offset":e,"--n-opacity-disabled":i,"--n-rail-border-radius":y,"--n-rail-color":c,"--n-rail-color-active":s,"--n-rail-height":C,"--n-rail-width":k,"--n-width":r,"--n-box-shadow-focus":u,"--n-loading-color":b,"--n-text-color":f,"--n-icon-color":p}}),T=r?(0,u.F)("switch",(0,i.Fl)(()=>g.value[0]),B,e):void 0;return{handleClick:function(){e.loading||f.value||(x.value!==e.checkedValue?E(e.checkedValue):E(e.uncheckedValue))},handleBlur:function(){$.value=!1;let{nTriggerFormBlur:e}=c;e(),y.value=!1},handleFocus:function(){$.value=!0;let{nTriggerFormFocus:e}=c;e()},handleKeyup:function(o){e.loading||f.value||" "===o.key&&(x.value!==e.checkedValue?E(e.checkedValue):E(e.uncheckedValue),y.value=!1)},handleKeydown:function(o){e.loading||f.value||" "===o.key&&(o.preventDefault(),y.value=!0)},mergedRailStyle:z,pressed:y,mergedClsPrefix:o,mergedValue:x,checked:k,mergedDisabled:f,cssVars:r?void 0:B,themeClass:null==T?void 0:T.themeClass,onRender:null==T?void 0:T.onRender}},render(){let{mergedClsPrefix:e,mergedDisabled:o,checked:r,mergedRailStyle:t,onRender:n,$slots:l}=this;null==n||n();let{checked:s,unchecked:d,icon:h,"checked-icon":u,"unchecked-icon":b}=l,v=!((0,g.aD)(h)&&(0,g.aD)(u)&&(0,g.aD)(b));return(0,i.h)("div",{role:"switch","aria-checked":r,class:[`${e}-switch`,this.themeClass,v&&`${e}-switch--icon`,r&&`${e}-switch--active`,o&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},(0,i.h)("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:t},(0,g.K9)(s,o=>(0,g.K9)(d,r=>o||r?(0,i.h)("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},(0,i.h)("div",{class:`${e}-switch__rail-placeholder`},(0,i.h)("div",{class:`${e}-switch__button-placeholder`}),o),(0,i.h)("div",{class:`${e}-switch__rail-placeholder`},(0,i.h)("div",{class:`${e}-switch__button-placeholder`}),r)):null)),(0,i.h)("div",{class:`${e}-switch__button`},(0,g.K9)(h,o=>(0,g.K9)(u,r=>(0,g.K9)(b,t=>(0,i.h)(a.Z,null,{default:()=>this.loading?(0,i.h)(c.Z,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(r||o)?(0,i.h)("div",{class:`${e}-switch__button-icon`,key:r?"checked-icon":"icon"},r||o):!this.checked&&(t||o)?(0,i.h)("div",{class:`${e}-switch__button-icon`,key:t?"unchecked-icon":"icon"},t||o):null})))),(0,g.K9)(s,o=>o&&(0,i.h)("div",{key:"checked",class:`${e}-switch__checked`},o)),(0,g.K9)(d,o=>o&&(0,i.h)("div",{key:"unchecked",class:`${e}-switch__unchecked`},o)))))}})}}]);