UNPKG

pkg-cdn

Version:

某些库没有提供 cdn 或者只提供单个格式, 此库通过用 vite 构建提供

3 lines (2 loc) 19.8 kB
(function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o.VueToastification={},o.Vue))})(this,function(o,e){"use strict";var Q=Object.defineProperty,_=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,D=(t,s,n)=>s in t?Q(t,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[s]=n,w=(t,s)=>{for(var n in s||(s={}))Z.call(s,n)&&D(t,n,s[n]);if(_)for(var n of _(s))x.call(s,n)&&D(t,n,s[n]);return t},y=t=>typeof t=="function",B=t=>typeof t=="string",R=t=>B(t)&&t.trim().length>0,tt=t=>typeof t=="number",m=t=>typeof t>"u",T=t=>typeof t=="object"&&t!==null,et=t=>u(t,"tag")&&R(t.tag),k=t=>window.TouchEvent&&t instanceof TouchEvent,N=t=>u(t,"component")&&V(t.component),st=t=>y(t)||T(t),V=t=>!m(t)&&(B(t)||st(t)||N(t)),A=t=>T(t)&&["height","width","right","left","top","bottom"].every(s=>tt(t[s])),u=(t,s)=>(T(t)||y(t))&&s in t,nt=(t=>()=>t++)(0);function S(t){return k(t)?t.targetTouches[0].clientX:t.clientX}function L(t){return k(t)?t.targetTouches[0].clientY:t.clientY}var ot=t=>{m(t.remove)?t.parentNode&&t.parentNode.removeChild(t):t.remove()},C=t=>N(t)?C(t.component):et(t)?e.defineComponent({render(){return t}}):typeof t=="string"?t:e.toRaw(e.unref(t)),at=t=>{if(typeof t=="string")return t;const s=u(t,"props")&&T(t.props)?t.props:{},n=u(t,"listeners")&&T(t.listeners)?t.listeners:{};return{component:C(t),props:s,listeners:n}},rt=()=>typeof window<"u",E=class{constructor(){this.allHandlers={}}getHandlers(t){return this.allHandlers[t]||[]}on(t,s){const n=this.getHandlers(t);n.push(s),this.allHandlers[t]=n}off(t,s){const n=this.getHandlers(t);n.splice(n.indexOf(s)>>>0,1)}emit(t,s){this.getHandlers(t).forEach(r=>r(s))}},it=t=>["on","off","emit"].every(s=>u(t,s)&&y(t[s]));o.TYPE=void 0,function(t){t.SUCCESS="success",t.ERROR="error",t.WARNING="warning",t.INFO="info",t.DEFAULT="default"}(o.TYPE||(o.TYPE={})),o.POSITION=void 0,function(t){t.TOP_LEFT="top-left",t.TOP_CENTER="top-center",t.TOP_RIGHT="top-right",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_CENTER="bottom-center",t.BOTTOM_RIGHT="bottom-right"}(o.POSITION||(o.POSITION={}));var i;(function(t){t.ADD="add",t.DISMISS="dismiss",t.UPDATE="update",t.CLEAR="clear",t.UPDATE_DEFAULTS="update_defaults"})(i||(i={}));var c="Vue-Toastification",d={type:{type:String,default:o.TYPE.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},M={type:d.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},O={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:d.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},P={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},$={transition:{type:[Object,String],default:`${c}__bounce`}},lt={position:{type:String,default:o.POSITION.TOP_RIGHT},draggable:d.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:d.trueBoolean,pauseOnHover:d.trueBoolean,closeOnClick:d.trueBoolean,timeout:P.timeout,hideProgressBar:P.hideProgressBar,toastClassName:d.classNames,bodyClassName:d.classNames,icon:M.customIcon,closeButton:O.component,closeButtonClassName:O.classNames,showCloseButtonOnHover:O.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new E}},ct={id:{type:[String,Number],required:!0,default:0},type:d.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},dt={container:{type:[Object,Function],default:()=>document.body},newestOnTop:d.trueBoolean,maxToasts:{type:Number,default:20},transition:$.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:t=>t},filterToasts:{type:Function,default:t=>t},containerClassName:d.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},h={CORE_TOAST:lt,TOAST:ct,CONTAINER:dt,PROGRESS_BAR:P,ICON:M,TRANSITION:$,CLOSE_BUTTON:O},F=e.defineComponent({name:"VtProgressBar",props:h.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${c}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function ut(t,s){return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(t.style),class:e.normalizeClass(t.cpClass)},null,6)}F.render=ut;var ht=F,H=e.defineComponent({name:"VtCloseButton",props:h.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?C(this.component):"button"},classes(){const t=[`${c}__close-button`];return this.showOnHover&&t.push("show-on-hover"),t.concat(this.classNames)}}}),ft=e.createTextVNode(" \xD7 ");function mt(t,s){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.buttonComponent),e.mergeProps({"aria-label":t.ariaLabel,class:t.classes},t.$attrs),{default:e.withCtx(()=>[ft]),_:1},16,["aria-label","class"])}H.render=mt;var pt=H,U={},gt={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Tt=e.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),Ct=[Tt];function vt(t,s){return e.openBlock(),e.createElementBlock("svg",gt,Ct)}U.render=vt;var yt=U,z={},Bt={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Et=e.createElementVNode("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),Ot=[Et];function bt(t,s){return e.openBlock(),e.createElementBlock("svg",Bt,Ot)}z.render=bt;var j=z,Y={},St={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Pt=e.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),It=[Pt];function _t(t,s){return e.openBlock(),e.createElementBlock("svg",St,It)}Y.render=_t;var Dt=Y,G={},wt={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},Rt=e.createElementVNode("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),kt=[Rt];function Nt(t,s){return e.openBlock(),e.createElementBlock("svg",wt,kt)}G.render=Nt;var Vt=G,X=e.defineComponent({name:"VtIcon",props:h.ICON,computed:{customIconChildren(){return u(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return B(this.customIcon)?this.trimValue(this.customIcon):u(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return u(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:V(this.customIcon)?C(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[o.TYPE.DEFAULT]:j,[o.TYPE.INFO]:j,[o.TYPE.SUCCESS]:yt,[o.TYPE.ERROR]:Vt,[o.TYPE.WARNING]:Dt}[this.type]},iconClasses(){const t=[`${c}__icon`];return this.hasCustomIcon?t.concat(this.customIconClass):t}},methods:{trimValue(t,s=""){return R(t)?t.trim():s}}});function At(t,s){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.component),{class:e.normalizeClass(t.iconClasses)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.customIconChildren),1)]),_:1},8,["class"])}X.render=At;var Lt=X,W=e.defineComponent({name:"VtToast",components:{ProgressBar:ht,CloseButton:pt,Icon:Lt},inheritAttrs:!1,props:Object.assign({},h.CORE_TOAST,h.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const t=[`${c}__toast`,`${c}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&t.push("disable-transition"),this.rtl&&t.push(`${c}__toast--rtl`),t},bodyClasses(){return[`${c}__toast-${B(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return A(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:u,getVueComponentFromObj:C,closeToast(){this.eventBus.emit(i.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const t=this.$el;t.addEventListener("touchstart",this.onDragStart,{passive:!0}),t.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const t=this.$el;t.removeEventListener("touchstart",this.onDragStart),t.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(t){this.beingDragged=!0,this.dragPos={x:S(t),y:L(t)},this.dragStart=S(t),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(t){this.beingDragged&&(t.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:S(t),y:L(t)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,A(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),Mt=["role"];function $t(t,s){const n=e.resolveComponent("Icon"),r=e.resolveComponent("CloseButton"),p=e.resolveComponent("ProgressBar");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.classes),style:e.normalizeStyle(t.draggableStyle),onClick:s[0]||(s[0]=(...a)=>t.clickHandler&&t.clickHandler(...a)),onMouseenter:s[1]||(s[1]=(...a)=>t.hoverPause&&t.hoverPause(...a)),onMouseleave:s[2]||(s[2]=(...a)=>t.hoverPlay&&t.hoverPlay(...a))},[t.icon?(e.openBlock(),e.createBlock(n,{key:0,"custom-icon":t.icon,type:t.type},null,8,["custom-icon","type"])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{role:t.accessibility.toastRole||"alert",class:e.normalizeClass(t.bodyClasses)},[typeof t.content=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.content),1)],2112)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.getVueComponentFromObj(t.content)),e.mergeProps({key:1,"toast-id":t.id},t.hasProp(t.content,"props")?t.content.props:{},e.toHandlers(t.hasProp(t.content,"listeners")?t.content.listeners:{}),{onCloseToast:t.closeToast}),null,16,["toast-id","onCloseToast"]))],10,Mt),t.closeButton?(e.openBlock(),e.createBlock(r,{key:1,component:t.closeButton,"class-names":t.closeButtonClassName,"show-on-hover":t.showCloseButtonOnHover,"aria-label":t.accessibility.closeButtonLabel,onClick:e.withModifiers(t.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):e.createCommentVNode("v-if",!0),t.timeout?(e.openBlock(),e.createBlock(p,{key:2,"is-running":t.isRunning,"hide-progress-bar":t.hideProgressBar,timeout:t.timeout,onCloseToast:t.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):e.createCommentVNode("v-if",!0)],38)}W.render=$t;var Ft=W,q=e.defineComponent({name:"VtTransition",props:h.TRANSITION,emits:["leave"],methods:{hasProp:u,leave(t){t instanceof HTMLElement&&(t.style.left=t.offsetLeft+"px",t.style.top=t.offsetTop+"px",t.style.width=getComputedStyle(t).width,t.style.position="absolute")}}});function Ht(t,s){return e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"div","enter-active-class":t.transition.enter?t.transition.enter:`${t.transition}-enter-active`,"move-class":t.transition.move?t.transition.move:`${t.transition}-move`,"leave-active-class":t.transition.leave?t.transition.leave:`${t.transition}-leave-active`,onLeave:t.leave},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}q.render=Ht;var Ut=q,K=e.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:Ft,VtTransition:Ut},props:Object.assign({},h.CORE_TOAST,h.CONTAINER,h.TRANSITION),data(){return{count:0,positions:Object.values(o.POSITION),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const t=this.eventBus;t.on(i.ADD,this.addToast),t.on(i.CLEAR,this.clearToasts),t.on(i.DISMISS,this.dismissToast),t.on(i.UPDATE,this.updateToast),t.on(i.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(t){y(t)&&(t=await t()),ot(this.$el),t.appendChild(this.$el)},setToast(t){m(t.id)||(this.toasts[t.id]=t)},addToast(t){t.content=at(t.content);const s=Object.assign({},this.defaults,t.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[t.type],t),n=this.defaults.filterBeforeCreate(s,this.toastArray);n&&this.setToast(n)},dismissToast(t){const s=this.toasts[t];!m(s)&&!m(s.onClose)&&s.onClose(),delete this.toasts[t]},clearToasts(){Object.keys(this.toasts).forEach(t=>{this.dismissToast(t)})},getPositionToasts(t){const s=this.filteredToasts.filter(n=>n.position===t).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?s.reverse():s},updateDefaults(t){m(t.container)||this.setup(t.container),this.defaults=Object.assign({},this.defaults,t)},updateToast({id:t,options:s,create:n}){this.toasts[t]?(s.timeout&&s.timeout===this.toasts[t].timeout&&s.timeout++,this.setToast(Object.assign({},this.toasts[t],s))):n&&this.addToast(Object.assign({},{id:t},s))},getClasses(t){return[`${c}__container`,t].concat(this.defaults.containerClassName)}}});function zt(t,s){const n=e.resolveComponent("Toast"),r=e.resolveComponent("VtTransition");return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.positions,p=>(e.openBlock(),e.createElementBlock("div",{key:p},[e.createVNode(r,{transition:t.defaults.transition,class:e.normalizeClass(t.getClasses(p))},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getPositionToasts(p),a=>(e.openBlock(),e.createBlock(n,e.mergeProps({key:a.id},a),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}K.render=zt;var jt=K,J=(t={},s=!0)=>{const n=t.eventBus=t.eventBus||new E;s&&e.nextTick(()=>{const a=e.createApp(jt,w({},t)),l=a.mount(document.createElement("div")),g=t.onMounted;if(m(g)||g(l,a),t.shareAppContext){const f=t.shareAppContext;f===!0?console.warn(`[${c}] App to share context with was not provided.`):(a._context.components=f._context.components,a._context.directives=f._context.directives,a._context.mixins=f._context.mixins,a._context.provides=f._context.provides,a.config.globalProperties=f.config.globalProperties)}});const r=(a,l)=>{const g=Object.assign({},{id:nt(),type:o.TYPE.DEFAULT},l,{content:a});return n.emit(i.ADD,g),g.id};r.clear=()=>n.emit(i.CLEAR,void 0),r.updateDefaults=a=>{n.emit(i.UPDATE_DEFAULTS,a)},r.dismiss=a=>{n.emit(i.DISMISS,a)};function p(a,{content:l,options:g},f=!1){const Kt=Object.assign({},g,{content:l});n.emit(i.UPDATE,{id:a,options:Kt,create:f})}return r.update=p,r.success=(a,l)=>r(a,Object.assign({},l,{type:o.TYPE.SUCCESS})),r.info=(a,l)=>r(a,Object.assign({},l,{type:o.TYPE.INFO})),r.error=(a,l)=>r(a,Object.assign({},l,{type:o.TYPE.ERROR})),r.warning=(a,l)=>r(a,Object.assign({},l,{type:o.TYPE.WARNING})),r},Yt=()=>{const t=()=>console.warn(`[${c}] This plugin does not support SSR!`);return new Proxy(t,{get(){return t}})};function v(t){return rt()?it(t)?J({eventBus:t},!1):J(t,!0):Yt()}var b=Symbol("VueToastification"),I=new E,Gt=(t,s)=>{(s==null?void 0:s.shareAppContext)===!0&&(s.shareAppContext=t);const n=v(w({eventBus:I},s));t.provide(b,n)},Xt=t=>{const s=v(t);e.getCurrentInstance()&&e.provide(b,s)},Wt=t=>{if(t)return v(t);const s=e.getCurrentInstance()?e.inject(b,void 0):void 0;return s||v(I)},qt=Gt;o.EventBus=E,o.createToastInterface=v,o.default=qt,o.globalEventBus=I,o.provideToast=Xt,o.toastInjectionKey=b,o.useToast=Wt,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); //# sourceMappingURL=v2.0.0-rc.5.umd.js.map