Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zerodevx/svelte-toast

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zerodevx/svelte-toast - npm Package Compare versions

Comparing version 0.6.3 to 0.7.0-rc.1

2

dist/index.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";function e(){}const n=t=>t;function o(t,e){for(const n in e)t[n]=e[n];return t}function r(t){return t()}function s(){return Object.create(null)}function i(t){t.forEach(r)}function a(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function u(t,n,o){t.$$.on_destroy.push(function(t,...n){if(null==t)return e;const o=t.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}const l="undefined"!=typeof window;let f=l?()=>window.performance.now():()=>Date.now(),d=l?t=>requestAnimationFrame(t):e;const p=new Set;function h(t){p.forEach((e=>{e.c(t)||(p.delete(e),e.f())})),0!==p.size&&d(h)}function g(t){let e;return 0===p.size&&d(h),{promise:new Promise((n=>{p.add(e={c:t,f:n})})),abort(){p.delete(e)}}}function m(t,e){t.appendChild(e)}function $(t,e,n){const o=b(t);if(!o.getElementById(e)){const t=_("style");t.id=e,t.textContent=n,y(o,t)}}function b(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function y(t,e){m(t.head||t,e)}function v(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function _(t){return document.createElement(t)}function x(t){return document.createTextNode(t)}function j(){return x(" ")}function k(){return x("")}function B(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function E(t,e,n){t.classList[n?"add":"remove"](e)}class M{constructor(){this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.e=_(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)v(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(w)}}const S=new Set;let A,R=0;function O(t,e,n,o,r,s,i,a=0){const c=16.666/o;let u="{\n";for(let t=0;t<=1;t+=c){const o=e+(n-e)*s(t);u+=100*t+`%{${i(o,1-o)}}\n`}const l=u+`100% {${i(n,1-n)}}\n}`,f=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(l)}_${a}`,d=b(t);S.add(d);const p=d.__svelte_stylesheet||(d.__svelte_stylesheet=function(t){const e=_("style");return y(b(t),e),e}(t).sheet),h=d.__svelte_rules||(d.__svelte_rules={});h[f]||(h[f]=!0,p.insertRule(`@keyframes ${f} ${l}`,p.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${f} ${o}ms linear ${r}ms 1 both`,R+=1,f}function P(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),R-=r,R||d((()=>{R||(S.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),S.clear())})))}function T(t,e){const n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){const o=getComputedStyle(t),r="none"===o.transform?"":o.transform;t.style.transform=`${r} translate(${e.left-n.left}px, ${e.top-n.top}px)`}}function z(t){A=t}function N(t){(function(){if(!A)throw new Error("Function called outside component initialization");return A})().$$.on_destroy.push(t)}const L=[],D=[],I=[],q=[],H=Promise.resolve();let F=!1;function W(t){I.push(t)}const G=new Set;let J,K=0;function Q(){const t=A;do{for(;K<L.length;){const t=L[K];K++,z(t),U(t.$$)}for(z(null),L.length=0,K=0;D.length;)D.pop()();for(let t=0;t<I.length;t+=1){const e=I[t];G.has(e)||(G.add(e),e())}I.length=0}while(L.length);for(;q.length;)q.pop()();F=!1,G.clear(),z(t)}function U(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(W)}}function V(){return J||(J=Promise.resolve(),J.then((()=>{J=null}))),J}function X(t,e,n){t.dispatchEvent(function(t,e,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,!1,e),o}(`${e?"intro":"outro"}${n}`))}const Y=new Set;let Z;function tt(){Z={r:0,c:[],p:Z}}function et(){Z.r||i(Z.c),Z=Z.p}function nt(t,e){t&&t.i&&(Y.delete(t),t.i(e))}function ot(t,e,n,o){if(t&&t.o){if(Y.has(t))return;Y.add(t),Z.c.push((()=>{Y.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const rt={duration:0};function st(t,e){t.f(),function(t,e){ot(t,1,1,(()=>{e.delete(t.key)}))}(t,e)}function it(t){t&&t.c()}function at(t,e,n,o){const{fragment:s,on_mount:c,on_destroy:u,after_update:l}=t.$$;s&&s.m(e,n),o||W((()=>{const e=c.map(r).filter(a);u?u.push(...e):i(e),t.$$.on_mount=[]})),l.forEach(W)}function ct(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ut(t,e){-1===t.$$.dirty[0]&&(L.push(t),F||(F=!0,H.then(Q)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function lt(t,n,o,r,a,c,u,l=[-1]){const f=A;z(t);const d=t.$$={fragment:null,ctx:null,props:c,update:e,not_equal:a,bound:s(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(f?f.$$.context:[])),callbacks:s(),dirty:l,skip_bound:!1,root:n.target||f.$$.root};u&&u(d.root);let p=!1;if(d.ctx=o?o(t,n.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=r)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](r),p&&ut(t,e)),n})):[],d.update(),p=!0,i(d.before_update),d.fragment=!!r&&r(d.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);d.fragment&&d.fragment.l(t),t.forEach(w)}else d.fragment&&d.fragment.c();n.intro&&nt(t.$$.fragment),at(t,n.target,n.anchor,n.customElement),Q()}z(f)}class ft{$destroy(){ct(this,1),this.$destroy=e}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function dt(t){const e=t-1;return e*e*e+1}function pt(t,{delay:e=0,duration:o=400,easing:r=n}={}){const s=+getComputedStyle(t).opacity;return{delay:e,duration:o,easing:r,css:t=>"opacity: "+t*s}}function ht(t,{delay:e=0,duration:n=400,easing:o=dt,x:r=0,y:s=0,opacity:i=0}={}){const a=getComputedStyle(t),c=+a.opacity,u="none"===a.transform?"":a.transform,l=c*(1-i);return{delay:e,duration:n,easing:o,css:(t,e)=>`\n\t\t\ttransform: ${u} translate(${(1-t)*r}px, ${(1-t)*s}px);\n\t\t\topacity: ${c-l*e}`}}function gt(t,{from:e,to:n},o={}){const r=getComputedStyle(t),s="none"===r.transform?"":r.transform,[i,c]=r.transformOrigin.split(" ").map(parseFloat),u=e.left+e.width*i/n.width-(n.left+i),l=e.top+e.height*c/n.height-(n.top+c),{delay:f=0,duration:d=(t=>120*Math.sqrt(t)),easing:p=dt}=o;return{delay:f,duration:a(d)?d(Math.sqrt(u*u+l*l)):d,easing:p,css:(t,o)=>{const r=o*u,i=o*l,a=t+o*e.width/n.width,c=t+o*e.height/n.height;return`transform: ${s} translate(${r}px, ${i}px) scale(${a}, ${c});`}}}const mt=[];function $t(t,n=e){let o;const r=new Set;function s(e){if(c(t,e)&&(t=e,o)){const e=!mt.length;for(const e of r)e[1](),mt.push(e,t);if(e){for(let t=0;t<mt.length;t+=2)mt[t][0](mt[t+1]);mt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(i,a=e){const c=[i,a];return r.add(c),1===r.size&&(o=n(s)||e),i(t),()=>{r.delete(c),0===r.size&&(o(),o=null)}}}}const bt={duration:4e3,initial:1,next:0,pausable:!1,dismissable:!0,reversed:!1,intro:{x:256},theme:{}},yt=(()=>{const{subscribe:t,update:e}=$t([]);let n=0;const o={},r=t=>t instanceof Object;return{subscribe:t,push:(t,s={})=>{const i={target:"default",...r(t)?t:{...s,msg:t}},a=o[i.target]||{},c={...bt,...a,...i,theme:{...a.theme,...i.theme},id:++n};return e((t=>c.reversed?[...t,c]:[c,...t])),n},pop:t=>{e((e=>{if(!e.length||0===t)return[];if(r(t))return e.filter((e=>t(e)));const n=t||Math.max(...e.map((t=>t.id)));return e.filter((t=>t.id!==n))}))},set:(t,n={})=>{const o=r(t)?{...t}:{...n,id:t};e((t=>{const e=t.findIndex((t=>t.id===o.id));return e>-1&&(t[e]={...t[e],...o}),t}))},_init:(t="default",e={})=>(o[t]=e,o)}})();function vt(t){return"[object Date]"===Object.prototype.toString.call(t)}function wt(t,e){if(t===e||t!=t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map(((e,n)=>wt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(vt(t)&&vt(e)){t=t.getTime();const n=(e=e.getTime())-t;return e=>new Date(t+e*n)}const n=Object.keys(e),o={};return n.forEach((n=>{o[n]=wt(t[n],e[n])})),t=>{const e={};return n.forEach((n=>{e[n]=o[n](t)})),e}}if("number"===n){const n=e-t;return e=>t+e*n}throw new Error(`Cannot interpolate ${n} values`)}function _t(t){$(t,"svelte-j9nwjb","._toastItem.svelte-j9nwjb{width:var(--toastWidth, 16rem);height:var(--toastHeight, auto);min-height:var(--toastMinHeight, 3.5rem);margin:var(--toastMargin, 0 0 0.5rem 0);padding:var(--toastPadding, 0);background:var(--toastBackground, rgba(66, 66, 66, 0.9));color:var(--toastColor, #fff);box-shadow:var(--toastBoxShadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06));border:var(--toastBorder, none);border-radius:var(--toastBorderRadius, 0.125rem);position:relative;display:flex;flex-direction:row;align-items:center;overflow:hidden;will-change:transform, opacity;-webkit-tap-highlight-color:transparent}._toastMsg.svelte-j9nwjb{padding:var(--toastMsgPadding, 0.75rem 0.5rem);flex:1 1 0%}.pe.svelte-j9nwjb,._toastMsg.svelte-j9nwjb a{pointer-events:auto}._toastBtn.svelte-j9nwjb{width:2rem;height:100%;font:1rem sans-serif;display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none}._toastBar.svelte-j9nwjb{top:var(--toastBarTop, auto);right:var(--toastBarRight, auto);bottom:var(--toastBarBottom, 0);left:var(--toastBarLeft, 0);height:var(--toastBarHeight, 6px);width:var(--toastBarWidth, 100%);position:absolute;display:block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;pointer-events:none}._toastBar.svelte-j9nwjb::-webkit-progress-bar{background:transparent}._toastBar.svelte-j9nwjb::-webkit-progress-value{background:var(--toastProgressBackground, var(--toastBarBackground, rgba(33, 150, 243, 0.75)))}._toastBar.svelte-j9nwjb::-moz-progress-bar{background:var(--toastProgressBackground, var(--toastBarBackground, rgba(33, 150, 243, 0.75)))}")}function xt(t){let n,o,r=t[0].msg+"";return{c(){n=new M,o=k(),n.a=o},m(t,e){n.m(r,t,e),v(t,o,e)},p(t,e){1&e&&r!==(r=t[0].msg+"")&&n.p(r)},i:e,o:e,d(t){t&&w(o),t&&n.d()}}}function jt(t){let e,n,r;const s=[t[6]()];var i=t[0].component.src;function a(t){let e={};for(let t=0;t<s.length;t+=1)e=o(e,s[t]);return{props:e}}return i&&(e=new i(a())),{c(){e&&it(e.$$.fragment),n=k()},m(t,o){e&&at(e,t,o),v(t,n,o),r=!0},p(t,o){const r=64&o?function(t,e){const n={},o={},r={$$scope:1};let s=t.length;for(;s--;){const i=t[s],a=e[s];if(a){for(const t in i)t in a||(o[t]=1);for(const t in a)r[t]||(n[t]=a[t],r[t]=1);t[s]=a}else for(const t in i)r[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}(s,[(c=t[6](),"object"==typeof c&&null!==c?c:{})]):{};var c;if(i!==(i=t[0].component.src)){if(e){tt();const t=e;ot(t.$$.fragment,1,0,(()=>{ct(t,1)})),et()}i?(e=new i(a()),it(e.$$.fragment),nt(e.$$.fragment,1),at(e,n.parentNode,n)):e=null}else i&&e.$set(r)},i(t){r||(e&&nt(e.$$.fragment,t),r=!0)},o(t){e&&ot(e.$$.fragment,t),r=!1},d(t){t&&w(n),e&&ct(e,t)}}}function kt(t){let n,o,r;return{c(){n=_("div"),n.textContent="✕",C(n,"class","_toastBtn pe svelte-j9nwjb"),C(n,"role","button"),C(n,"tabindex","-1")},m(e,s){v(e,n,s),o||(r=B(n,"click",t[3]),o=!0)},p:e,d(t){t&&w(n),o=!1,r()}}}function Bt(t){let e,n,o,r,s,a,c,u,l,f;const d=[jt,xt],p=[];function h(t,e){return t[0].component?0:1}o=h(t),r=p[o]=d[o](t);let g=t[0].dismissable&&kt(t);return{c(){e=_("div"),n=_("div"),r.c(),s=j(),g&&g.c(),a=j(),c=_("progress"),C(n,"role","status"),C(n,"class","_toastMsg svelte-j9nwjb"),E(n,"pe",t[0].component),C(c,"class","_toastBar svelte-j9nwjb"),c.value=t[1],C(e,"class","_toastItem svelte-j9nwjb"),E(e,"pe",t[0].pausable)},m(r,i){v(r,e,i),m(e,n),p[o].m(n,null),m(e,s),g&&g.m(e,null),m(e,a),m(e,c),u=!0,l||(f=[B(e,"mouseenter",t[4]),B(e,"mouseleave",t[5])],l=!0)},p(t,[s]){let i=o;o=h(t),o===i?p[o].p(t,s):(tt(),ot(p[i],1,1,(()=>{p[i]=null})),et(),r=p[o],r?r.p(t,s):(r=p[o]=d[o](t),r.c()),nt(r,1),r.m(n,null)),1&s&&E(n,"pe",t[0].component),t[0].dismissable?g?g.p(t,s):(g=kt(t),g.c(),g.m(e,a)):g&&(g.d(1),g=null),(!u||2&s)&&(c.value=t[1]),1&s&&E(e,"pe",t[0].pausable)},i(t){u||(nt(r),u=!0)},o(t){ot(r),u=!1},d(t){t&&w(e),p[o].d(),g&&g.d(),l=!1,i(f)}}}function Ct(t,e,r){let s,{item:i}=e;const a=function(t,e={}){const r=$t(t);let s,i=t;function a(a,c){if(null==t)return r.set(t=a),Promise.resolve();i=a;let u=s,l=!1,{delay:d=0,duration:p=400,easing:h=n,interpolate:m=wt}=o(o({},e),c);if(0===p)return u&&(u.abort(),u=null),r.set(t=i),Promise.resolve();const $=f()+d;let b;return s=g((e=>{if(e<$)return!0;l||(b=m(t,a),"function"==typeof p&&(p=p(t,a)),l=!0),u&&(u.abort(),u=null);const n=e-$;return n>p?(r.set(t=a),!1):(r.set(t=b(h(n/p))),!0)})),s.promise}return{set:a,update:(e,n)=>a(e(i,t),n),subscribe:r.subscribe}}(i.initial,{duration:i.duration,easing:n});u(t,a,(t=>r(1,s=t)));const c=()=>yt.pop(i.id),l=()=>{1!==s&&0!==s||c()};let d=i.initial,p=d,h=!1;return N((()=>{"function"==typeof i.onpop&&i.onpop(i.id)})),t.$$set=t=>{"item"in t&&r(0,i=t.item)},t.$$.update=()=>{1&t.$$.dirty&&void 0!==i.progress&&r(0,i.next=i.progress,i),131&t.$$.dirty&&d!==i.next&&(r(7,d=i.next),p=s,h=!1,a.set(d).then(l))},[i,s,a,c,()=>{i.pausable&&!h&&s!==d&&(a.set(s,{duration:0}),h=!0)},()=>{if(h){const t=i.duration,e=t-t*((s-p)/(d-p));a.set(d,{duration:e}).then(l),h=!1}},()=>{const{props:t={},sendIdTo:e}=i.component;return e&&(t[e]=i.id),t},d]}class Et extends ft{constructor(t){super(),lt(this,t,Ct,Bt,c,{item:0},_t)}}function Mt(t){$(t,"svelte-7xr3c1","._toastContainer.svelte-7xr3c1{top:var(--toastContainerTop, 1.5rem);right:var(--toastContainerRight, 2rem);bottom:var(--toastContainerBottom, auto);left:var(--toastContainerLeft, auto);position:fixed;margin:0;padding:0;list-style-type:none;pointer-events:none;z-index:9999}")}function St(t,e,n){const o=t.slice();return o[5]=e[n],o}function At(t,o){let r,s,c,u,l,d,p,h,$=e;return s=new Et({props:{item:o[5]}}),{key:t,first:null,c(){r=_("li"),it(s.$$.fragment),c=j(),C(r,"style",u=o[1](o[5].theme)),this.first=r},m(t,e){v(t,r,e),at(s,r,null),m(r,c),h=!0},p(t,e){o=t;const n={};1&e&&(n.item=o[5]),s.$set(n),(!h||1&e&&u!==(u=o[1](o[5].theme)))&&C(r,"style",u)},r(){p=r.getBoundingClientRect()},f(){!function(t){const e=getComputedStyle(t);if("absolute"!==e.position&&"fixed"!==e.position){const{width:n,height:o}=e,r=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=o,T(t,r)}}(r),$(),T(r,p)},a(){$(),$=function(t,o,r,s){if(!o)return e;const i=t.getBoundingClientRect();if(o.left===i.left&&o.right===i.right&&o.top===i.top&&o.bottom===i.bottom)return e;const{delay:a=0,duration:c=300,easing:u=n,start:l=f()+a,end:d=l+c,tick:p=e,css:h}=r(t,{from:o,to:i},s);let m,$=!0,b=!1;function y(){h&&P(t,m),$=!1}return g((t=>{if(!b&&t>=l&&(b=!0),b&&t>=d&&(p(1,0),y()),!$)return!1;if(b){const e=0+1*u((t-l)/c);p(e,1-e)}return!0})),h&&(m=O(t,0,1,c,a,u,h)),a||(b=!0),p(0,1),y}(r,p,gt,{duration:200})},i(t){h||(nt(s.$$.fragment,t),W((()=>{d&&d.end(1),l=function(t,o,r){let s,i,c=o(t,r),u=!1,l=0;function d(){s&&P(t,s)}function p(){const{delay:o=0,duration:r=300,easing:a=n,tick:p=e,css:h}=c||rt;h&&(s=O(t,0,1,r,o,a,h,l++)),p(0,1);const m=f()+o,$=m+r;i&&i.abort(),u=!0,W((()=>X(t,!0,"start"))),i=g((e=>{if(u){if(e>=$)return p(1,0),X(t,!0,"end"),d(),u=!1;if(e>=m){const t=a((e-m)/r);p(t,1-t)}}return u}))}let h=!1;return{start(){h||(h=!0,P(t),a(c)?(c=c(),V().then(p)):p())},invalidate(){h=!1},end(){u&&(d(),u=!1)}}}(r,ht,o[5].intro),l.start()})),h=!0)},o(t){ot(s.$$.fragment,t),l&&l.invalidate(),d=function(t,o,r){let s,c=o(t,r),u=!0;const l=Z;function d(){const{delay:o=0,duration:r=300,easing:a=n,tick:d=e,css:p}=c||rt;p&&(s=O(t,1,0,r,o,a,p));const h=f()+o,m=h+r;W((()=>X(t,!1,"start"))),g((e=>{if(u){if(e>=m)return d(0,1),X(t,!1,"end"),--l.r||i(l.c),!1;if(e>=h){const t=a((e-h)/r);d(1-t,t)}}return u}))}return l.r+=1,a(c)?V().then((()=>{c=c(),d()})):d(),{end(e){e&&c.tick&&c.tick(1,0),u&&(s&&P(t,s),u=!1)}}}(r,pt,{}),h=!1},d(t){t&&w(r),ct(s),t&&d&&d.end()}}}function Rt(t){let e,n,o=[],r=new Map,s=t[0];const i=t=>t[5].id;for(let e=0;e<s.length;e+=1){let n=St(t,s,e),a=i(n);r.set(a,o[e]=At(a,n))}return{c(){e=_("ul");for(let t=0;t<o.length;t+=1)o[t].c();C(e,"class","_toastContainer svelte-7xr3c1")},m(t,r){v(t,e,r);for(let t=0;t<o.length;t+=1)o[t].m(e,null);n=!0},p(t,[n]){if(3&n){s=t[0],tt();for(let t=0;t<o.length;t+=1)o[t].r();o=function(t,e,n,o,r,s,i,a,c,u,l,f){let d=t.length,p=s.length,h=d;const g={};for(;h--;)g[t[h].key]=h;const m=[],$=new Map,b=new Map;for(h=p;h--;){const t=f(r,s,h),a=n(t);let c=i.get(a);c?o&&c.p(t,e):(c=u(a,t),c.c()),$.set(a,m[h]=c),a in g&&b.set(a,Math.abs(h-g[a]))}const y=new Set,v=new Set;function w(t){nt(t,1),t.m(a,l),i.set(t.key,t),l=t.first,p--}for(;d&&p;){const e=m[p-1],n=t[d-1],o=e.key,r=n.key;e===n?(l=e.first,d--,p--):$.has(r)?!i.has(o)||y.has(o)?w(e):v.has(r)?d--:b.get(o)>b.get(r)?(v.add(o),w(e)):(y.add(r),d--):(c(n,i),d--)}for(;d--;){const e=t[d];$.has(e.key)||c(e,i)}for(;p;)w(m[p-1]);return m}(o,n,i,1,t,s,r,e,st,At,null,St);for(let t=0;t<o.length;t+=1)o[t].a();et()}},i(t){if(!n){for(let t=0;t<s.length;t+=1)nt(o[t]);n=!0}},o(t){for(let t=0;t<o.length;t+=1)ot(o[t]);n=!1},d(t){t&&w(e);for(let t=0;t<o.length;t+=1)o[t].d()}}}function Ot(t,e,n){let o;u(t,yt,(t=>n(4,o=t)));let r,{options:s={}}=e,{target:i="default"}=e;return t.$$set=t=>{"options"in t&&n(2,s=t.options),"target"in t&&n(3,i=t.target)},t.$$.update=()=>{12&t.$$.dirty&&yt._init(i,s),24&t.$$.dirty&&n(0,r=o.filter((t=>t.target===i)))},[r,t=>Object.keys(t).reduce(((e,n)=>`${e}${n}:${t[n]};`),""),s,i,o]}t.SvelteToast=class extends ft{constructor(t){super(),lt(this,t,Ot,Rt,c,{options:2,target:3},Mt)}},t.toast=yt,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";function e(){}const n=t=>t;function o(t,e){for(const n in e)t[n]=e[n];return t}function r(t){return t()}function s(){return Object.create(null)}function i(t){t.forEach(r)}function a(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function u(t,n,o){t.$$.on_destroy.push(function(t,...n){if(null==t)return e;const o=t.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}function l(t){return null==t?"":t}const f="undefined"!=typeof window;let d=f?()=>window.performance.now():()=>Date.now(),p=f?t=>requestAnimationFrame(t):e;const h=new Set;function g(t){h.forEach((e=>{e.c(t)||(h.delete(e),e.f())})),0!==h.size&&p(g)}function m(t){let e;return 0===h.size&&p(g),{promise:new Promise((n=>{h.add(e={c:t,f:n})})),abort(){h.delete(e)}}}function $(t,e){t.appendChild(e)}function b(t,e,n){const o=y(t);if(!o.getElementById(e)){const t=_("style");t.id=e,t.textContent=n,w(o,t)}}function y(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function v(t){const e=_("style");return w(y(t),e),e.sheet}function w(t,e){$(t.head||t,e)}function x(t,e,n){t.insertBefore(e,n||null)}function j(t){t.parentNode.removeChild(t)}function _(t){return document.createElement(t)}function k(t){return document.createTextNode(t)}function B(){return k(" ")}function C(){return k("")}function E(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function M(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e,n){t.classList[n?"add":"remove"](e)}class A{constructor(){this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.e=_(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)x(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(j)}}const R=new Map;let O,P=0;function T(t,e,n,o,r,s,i,a=0){const c=16.666/o;let u="{\n";for(let t=0;t<=1;t+=c){const o=e+(n-e)*s(t);u+=100*t+`%{${i(o,1-o)}}\n`}const l=u+`100% {${i(n,1-n)}}\n}`,f=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(l)}_${a}`,d=y(t),{stylesheet:p,rules:h}=R.get(d)||function(t,e){const n={stylesheet:v(e),rules:{}};return R.set(t,n),n}(d,t);h[f]||(h[f]=!0,p.insertRule(`@keyframes ${f} ${l}`,p.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${f} ${o}ms linear ${r}ms 1 both`,P+=1,f}function z(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),P-=r,P||p((()=>{P||(R.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),R.clear())})))}function N(t,e){const n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){const o=getComputedStyle(t),r="none"===o.transform?"":o.transform;t.style.transform=`${r} translate(${e.left-n.left}px, ${e.top-n.top}px)`}}function L(t){O=t}function D(t){(function(){if(!O)throw new Error("Function called outside component initialization");return O})().$$.on_destroy.push(t)}const I=[],q=[],H=[],F=[],W=Promise.resolve();let G=!1;function J(t){H.push(t)}const K=new Set;let Q,U=0;function V(){const t=O;do{for(;U<I.length;){const t=I[U];U++,L(t),X(t.$$)}for(L(null),I.length=0,U=0;q.length;)q.pop()();for(let t=0;t<H.length;t+=1){const e=H[t];K.has(e)||(K.add(e),e())}H.length=0}while(I.length);for(;F.length;)F.pop()();G=!1,K.clear(),L(t)}function X(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(J)}}function Y(){return Q||(Q=Promise.resolve(),Q.then((()=>{Q=null}))),Q}function Z(t,e,n){t.dispatchEvent(function(t,e,n=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,!1,e),o}(`${e?"intro":"outro"}${n}`))}const tt=new Set;let et;function nt(){et={r:0,c:[],p:et}}function ot(){et.r||i(et.c),et=et.p}function rt(t,e){t&&t.i&&(tt.delete(t),t.i(e))}function st(t,e,n,o){if(t&&t.o){if(tt.has(t))return;tt.add(t),et.c.push((()=>{tt.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const it={duration:0};function at(t,e){t.f(),function(t,e){st(t,1,1,(()=>{e.delete(t.key)}))}(t,e)}function ct(t){t&&t.c()}function ut(t,e,n,o){const{fragment:s,on_mount:c,on_destroy:u,after_update:l}=t.$$;s&&s.m(e,n),o||J((()=>{const e=c.map(r).filter(a);u?u.push(...e):i(e),t.$$.on_mount=[]})),l.forEach(J)}function lt(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ft(t,e){-1===t.$$.dirty[0]&&(I.push(t),G||(G=!0,W.then(V)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function dt(t,n,o,r,a,c,u,l=[-1]){const f=O;L(t);const d=t.$$={fragment:null,ctx:null,props:c,update:e,not_equal:a,bound:s(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(f?f.$$.context:[])),callbacks:s(),dirty:l,skip_bound:!1,root:n.target||f.$$.root};u&&u(d.root);let p=!1;if(d.ctx=o?o(t,n.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=r)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](r),p&&ft(t,e)),n})):[],d.update(),p=!0,i(d.before_update),d.fragment=!!r&&r(d.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);d.fragment&&d.fragment.l(t),t.forEach(j)}else d.fragment&&d.fragment.c();n.intro&&rt(t.$$.fragment),ut(t,n.target,n.anchor,n.customElement),V()}L(f)}class pt{$destroy(){lt(this,1),this.$destroy=e}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function ht(t){const e=t-1;return e*e*e+1}function gt(t,{delay:e=0,duration:o=400,easing:r=n}={}){const s=+getComputedStyle(t).opacity;return{delay:e,duration:o,easing:r,css:t=>"opacity: "+t*s}}function mt(t,{delay:e=0,duration:n=400,easing:o=ht,x:r=0,y:s=0,opacity:i=0}={}){const a=getComputedStyle(t),c=+a.opacity,u="none"===a.transform?"":a.transform,l=c*(1-i);return{delay:e,duration:n,easing:o,css:(t,e)=>`\n\t\t\ttransform: ${u} translate(${(1-t)*r}px, ${(1-t)*s}px);\n\t\t\topacity: ${c-l*e}`}}function $t(t,{from:e,to:n},o={}){const r=getComputedStyle(t),s="none"===r.transform?"":r.transform,[i,c]=r.transformOrigin.split(" ").map(parseFloat),u=e.left+e.width*i/n.width-(n.left+i),l=e.top+e.height*c/n.height-(n.top+c),{delay:f=0,duration:d=(t=>120*Math.sqrt(t)),easing:p=ht}=o;return{delay:f,duration:a(d)?d(Math.sqrt(u*u+l*l)):d,easing:p,css:(t,o)=>{const r=o*u,i=o*l,a=t+o*e.width/n.width,c=t+o*e.height/n.height;return`transform: ${s} translate(${r}px, ${i}px) scale(${a}, ${c});`}}}const bt=[];function yt(t,n=e){let o;const r=new Set;function s(e){if(c(t,e)&&(t=e,o)){const e=!bt.length;for(const e of r)e[1](),bt.push(e,t);if(e){for(let t=0;t<bt.length;t+=2)bt[t][0](bt[t+1]);bt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(i,a=e){const c=[i,a];return r.add(c),1===r.size&&(o=n(s)||e),i(t),()=>{r.delete(c),0===r.size&&(o(),o=null)}}}}const vt={duration:4e3,initial:1,next:0,pausable:!1,dismissable:!0,reversed:!1,intro:{x:256}},wt=(()=>{const{subscribe:t,update:e}=yt([]);let n=0;const o={},r=t=>t instanceof Object;return{subscribe:t,push:(t,s={})=>{const i={target:"default",...r(t)?t:{...s,msg:t}},a=o[i.target]||{},c={...vt,...a,...i,theme:{...a.theme,...i.theme},classes:[...a.classes||[],...i.classes||[]],id:++n};return e((t=>c.reversed?[...t,c]:[c,...t])),n},pop:t=>{e((e=>{if(!e.length||0===t)return[];if(r(t))return e.filter((e=>t(e)));const n=t||Math.max(...e.map((t=>t.id)));return e.filter((t=>t.id!==n))}))},set:(t,n={})=>{const o=r(t)?{...t}:{...n,id:t};e((t=>{const e=t.findIndex((t=>t.id===o.id));return e>-1&&(t[e]={...t[e],...o}),t}))},_init:(t="default",e={})=>(o[t]=e,o)}})();function xt(t){return"[object Date]"===Object.prototype.toString.call(t)}function jt(t,e){if(t===e||t!=t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map(((e,n)=>jt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(xt(t)&&xt(e)){t=t.getTime();const n=(e=e.getTime())-t;return e=>new Date(t+e*n)}const n=Object.keys(e),o={};return n.forEach((n=>{o[n]=jt(t[n],e[n])})),t=>{const e={};return n.forEach((n=>{e[n]=o[n](t)})),e}}if("number"===n){const n=e-t;return e=>t+e*n}throw new Error(`Cannot interpolate ${n} values`)}function _t(t){b(t,"svelte-j9nwjb","._toastItem.svelte-j9nwjb{width:var(--toastWidth, 16rem);height:var(--toastHeight, auto);min-height:var(--toastMinHeight, 3.5rem);margin:var(--toastMargin, 0 0 0.5rem 0);padding:var(--toastPadding, 0);background:var(--toastBackground, rgba(66, 66, 66, 0.9));color:var(--toastColor, #fff);box-shadow:var(--toastBoxShadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06));border:var(--toastBorder, none);border-radius:var(--toastBorderRadius, 0.125rem);position:relative;display:flex;flex-direction:row;align-items:center;overflow:hidden;will-change:transform, opacity;-webkit-tap-highlight-color:transparent}._toastMsg.svelte-j9nwjb{padding:var(--toastMsgPadding, 0.75rem 0.5rem);flex:1 1 0%}.pe.svelte-j9nwjb,._toastMsg.svelte-j9nwjb a{pointer-events:auto}._toastBtn.svelte-j9nwjb{width:2rem;height:100%;font:1rem sans-serif;display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none}._toastBar.svelte-j9nwjb{top:var(--toastBarTop, auto);right:var(--toastBarRight, auto);bottom:var(--toastBarBottom, 0);left:var(--toastBarLeft, 0);height:var(--toastBarHeight, 6px);width:var(--toastBarWidth, 100%);position:absolute;display:block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;pointer-events:none}._toastBar.svelte-j9nwjb::-webkit-progress-bar{background:transparent}._toastBar.svelte-j9nwjb::-webkit-progress-value{background:var(--toastProgressBackground, var(--toastBarBackground, rgba(33, 150, 243, 0.75)))}._toastBar.svelte-j9nwjb::-moz-progress-bar{background:var(--toastProgressBackground, var(--toastBarBackground, rgba(33, 150, 243, 0.75)))}")}function kt(t){let n,o,r=t[0].msg+"";return{c(){n=new A,o=C(),n.a=o},m(t,e){n.m(r,t,e),x(t,o,e)},p(t,e){1&e&&r!==(r=t[0].msg+"")&&n.p(r)},i:e,o:e,d(t){t&&j(o),t&&n.d()}}}function Bt(t){let e,n,r;const s=[t[6]()];var i=t[0].component.src;function a(t){let e={};for(let t=0;t<s.length;t+=1)e=o(e,s[t]);return{props:e}}return i&&(e=new i(a())),{c(){e&&ct(e.$$.fragment),n=C()},m(t,o){e&&ut(e,t,o),x(t,n,o),r=!0},p(t,o){const r=64&o?function(t,e){const n={},o={},r={$$scope:1};let s=t.length;for(;s--;){const i=t[s],a=e[s];if(a){for(const t in i)t in a||(o[t]=1);for(const t in a)r[t]||(n[t]=a[t],r[t]=1);t[s]=a}else for(const t in i)r[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}(s,[(c=t[6](),"object"==typeof c&&null!==c?c:{})]):{};var c;if(i!==(i=t[0].component.src)){if(e){nt();const t=e;st(t.$$.fragment,1,0,(()=>{lt(t,1)})),ot()}i?(e=new i(a()),ct(e.$$.fragment),rt(e.$$.fragment,1),ut(e,n.parentNode,n)):e=null}else i&&e.$set(r)},i(t){r||(e&&rt(e.$$.fragment,t),r=!0)},o(t){e&&st(e.$$.fragment,t),r=!1},d(t){t&&j(n),e&&lt(e,t)}}}function Ct(t){let n,o,r;return{c(){n=_("div"),n.textContent="✕",M(n,"class","_toastBtn pe svelte-j9nwjb"),M(n,"role","button"),M(n,"tabindex","-1")},m(e,s){x(e,n,s),o||(r=E(n,"click",t[3]),o=!0)},p:e,d(t){t&&j(n),o=!1,r()}}}function Et(t){let e,n,o,r,s,a,c,u,l,f;const d=[Bt,kt],p=[];function h(t,e){return t[0].component?0:1}o=h(t),r=p[o]=d[o](t);let g=t[0].dismissable&&Ct(t);return{c(){e=_("div"),n=_("div"),r.c(),s=B(),g&&g.c(),a=B(),c=_("progress"),M(n,"role","status"),M(n,"class","_toastMsg svelte-j9nwjb"),S(n,"pe",t[0].component),M(c,"class","_toastBar svelte-j9nwjb"),c.value=t[1],M(e,"class","_toastItem svelte-j9nwjb"),S(e,"pe",t[0].pausable)},m(r,i){x(r,e,i),$(e,n),p[o].m(n,null),$(e,s),g&&g.m(e,null),$(e,a),$(e,c),u=!0,l||(f=[E(e,"mouseenter",t[4]),E(e,"mouseleave",t[5])],l=!0)},p(t,[s]){let i=o;o=h(t),o===i?p[o].p(t,s):(nt(),st(p[i],1,1,(()=>{p[i]=null})),ot(),r=p[o],r?r.p(t,s):(r=p[o]=d[o](t),r.c()),rt(r,1),r.m(n,null)),1&s&&S(n,"pe",t[0].component),t[0].dismissable?g?g.p(t,s):(g=Ct(t),g.c(),g.m(e,a)):g&&(g.d(1),g=null),(!u||2&s)&&(c.value=t[1]),1&s&&S(e,"pe",t[0].pausable)},i(t){u||(rt(r),u=!0)},o(t){st(r),u=!1},d(t){t&&j(e),p[o].d(),g&&g.d(),l=!1,i(f)}}}function Mt(t,e,r){let s,{item:i}=e;const a=function(t,e={}){const r=yt(t);let s,i=t;function a(a,c){if(null==t)return r.set(t=a),Promise.resolve();i=a;let u=s,l=!1,{delay:f=0,duration:p=400,easing:h=n,interpolate:g=jt}=o(o({},e),c);if(0===p)return u&&(u.abort(),u=null),r.set(t=i),Promise.resolve();const $=d()+f;let b;return s=m((e=>{if(e<$)return!0;l||(b=g(t,a),"function"==typeof p&&(p=p(t,a)),l=!0),u&&(u.abort(),u=null);const n=e-$;return n>p?(r.set(t=a),!1):(r.set(t=b(h(n/p))),!0)})),s.promise}return{set:a,update:(e,n)=>a(e(i,t),n),subscribe:r.subscribe}}(i.initial,{duration:i.duration,easing:n});u(t,a,(t=>r(1,s=t)));const c=()=>wt.pop(i.id),l=()=>{1!==s&&0!==s||c()};let f=i.initial,p=f,h=!1;return D((()=>{"function"==typeof i.onpop&&i.onpop(i.id)})),t.$$set=t=>{"item"in t&&r(0,i=t.item)},t.$$.update=()=>{1&t.$$.dirty&&void 0!==i.progress&&r(0,i.next=i.progress,i),131&t.$$.dirty&&f!==i.next&&(r(7,f=i.next),p=s,h=!1,a.set(f).then(l))},[i,s,a,c,()=>{i.pausable&&!h&&s!==f&&(a.set(s,{duration:0}),h=!0)},()=>{if(h){const t=i.duration,e=t-t*((s-p)/(f-p));a.set(f,{duration:e}).then(l),h=!1}},()=>{const{props:t={},sendIdTo:e}=i.component;return e&&(t[e]=i.id),t},f]}class St extends pt{constructor(t){super(),dt(this,t,Mt,Et,c,{item:0},_t)}}function At(t){b(t,"svelte-7xr3c1","._toastContainer.svelte-7xr3c1{top:var(--toastContainerTop, 1.5rem);right:var(--toastContainerRight, 2rem);bottom:var(--toastContainerBottom, auto);left:var(--toastContainerLeft, auto);position:fixed;margin:0;padding:0;list-style-type:none;pointer-events:none;z-index:9999}")}function Rt(t,e,n){const o=t.slice();return o[5]=e[n],o}function Ot(t,o){let r,s,c,u,f,p,h,g,b,y=e;return s=new St({props:{item:o[5]}}),{key:t,first:null,c(){r=_("li"),ct(s.$$.fragment),c=B(),M(r,"class",u=l(o[5].classes.join(" "))+" svelte-7xr3c1"),M(r,"style",f=o[1](o[5].theme)),this.first=r},m(t,e){x(t,r,e),ut(s,r,null),$(r,c),b=!0},p(t,e){o=t;const n={};1&e&&(n.item=o[5]),s.$set(n),(!b||1&e&&u!==(u=l(o[5].classes.join(" "))+" svelte-7xr3c1"))&&M(r,"class",u),(!b||1&e&&f!==(f=o[1](o[5].theme)))&&M(r,"style",f)},r(){g=r.getBoundingClientRect()},f(){!function(t){const e=getComputedStyle(t);if("absolute"!==e.position&&"fixed"!==e.position){const{width:n,height:o}=e,r=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=o,N(t,r)}}(r),y(),N(r,g)},a(){y(),y=function(t,o,r,s){if(!o)return e;const i=t.getBoundingClientRect();if(o.left===i.left&&o.right===i.right&&o.top===i.top&&o.bottom===i.bottom)return e;const{delay:a=0,duration:c=300,easing:u=n,start:l=d()+a,end:f=l+c,tick:p=e,css:h}=r(t,{from:o,to:i},s);let g,$=!0,b=!1;function y(){h&&z(t,g),$=!1}return m((t=>{if(!b&&t>=l&&(b=!0),b&&t>=f&&(p(1,0),y()),!$)return!1;if(b){const e=0+1*u((t-l)/c);p(e,1-e)}return!0})),h&&(g=T(t,0,1,c,a,u,h)),a||(b=!0),p(0,1),y}(r,g,$t,{duration:200})},i(t){b||(rt(s.$$.fragment,t),J((()=>{h&&h.end(1),p=function(t,o,r){let s,i,c=o(t,r),u=!1,l=0;function f(){s&&z(t,s)}function p(){const{delay:o=0,duration:r=300,easing:a=n,tick:p=e,css:h}=c||it;h&&(s=T(t,0,1,r,o,a,h,l++)),p(0,1);const g=d()+o,$=g+r;i&&i.abort(),u=!0,J((()=>Z(t,!0,"start"))),i=m((e=>{if(u){if(e>=$)return p(1,0),Z(t,!0,"end"),f(),u=!1;if(e>=g){const t=a((e-g)/r);p(t,1-t)}}return u}))}let h=!1;return{start(){h||(h=!0,z(t),a(c)?(c=c(),Y().then(p)):p())},invalidate(){h=!1},end(){u&&(f(),u=!1)}}}(r,mt,o[5].intro),p.start()})),b=!0)},o(t){st(s.$$.fragment,t),p&&p.invalidate(),h=function(t,o,r){let s,c=o(t,r),u=!0;const l=et;function f(){const{delay:o=0,duration:r=300,easing:a=n,tick:f=e,css:p}=c||it;p&&(s=T(t,1,0,r,o,a,p));const h=d()+o,g=h+r;J((()=>Z(t,!1,"start"))),m((e=>{if(u){if(e>=g)return f(0,1),Z(t,!1,"end"),--l.r||i(l.c),!1;if(e>=h){const t=a((e-h)/r);f(1-t,t)}}return u}))}return l.r+=1,a(c)?Y().then((()=>{c=c(),f()})):f(),{end(e){e&&c.tick&&c.tick(1,0),u&&(s&&z(t,s),u=!1)}}}(r,gt,{}),b=!1},d(t){t&&j(r),lt(s),t&&h&&h.end()}}}function Pt(t){let e,n,o=[],r=new Map,s=t[0];const i=t=>t[5].id;for(let e=0;e<s.length;e+=1){let n=Rt(t,s,e),a=i(n);r.set(a,o[e]=Ot(a,n))}return{c(){e=_("ul");for(let t=0;t<o.length;t+=1)o[t].c();M(e,"class","_toastContainer svelte-7xr3c1")},m(t,r){x(t,e,r);for(let t=0;t<o.length;t+=1)o[t].m(e,null);n=!0},p(t,[n]){if(3&n){s=t[0],nt();for(let t=0;t<o.length;t+=1)o[t].r();o=function(t,e,n,o,r,s,i,a,c,u,l,f){let d=t.length,p=s.length,h=d;const g={};for(;h--;)g[t[h].key]=h;const m=[],$=new Map,b=new Map;for(h=p;h--;){const t=f(r,s,h),a=n(t);let c=i.get(a);c?o&&c.p(t,e):(c=u(a,t),c.c()),$.set(a,m[h]=c),a in g&&b.set(a,Math.abs(h-g[a]))}const y=new Set,v=new Set;function w(t){rt(t,1),t.m(a,l),i.set(t.key,t),l=t.first,p--}for(;d&&p;){const e=m[p-1],n=t[d-1],o=e.key,r=n.key;e===n?(l=e.first,d--,p--):$.has(r)?!i.has(o)||y.has(o)?w(e):v.has(r)?d--:b.get(o)>b.get(r)?(v.add(o),w(e)):(y.add(r),d--):(c(n,i),d--)}for(;d--;){const e=t[d];$.has(e.key)||c(e,i)}for(;p;)w(m[p-1]);return m}(o,n,i,1,t,s,r,e,at,Ot,null,Rt);for(let t=0;t<o.length;t+=1)o[t].a();ot()}},i(t){if(!n){for(let t=0;t<s.length;t+=1)rt(o[t]);n=!0}},o(t){for(let t=0;t<o.length;t+=1)st(o[t]);n=!1},d(t){t&&j(e);for(let t=0;t<o.length;t+=1)o[t].d()}}}function Tt(t,e,n){let o;u(t,wt,(t=>n(4,o=t)));let r,{options:s={}}=e,{target:i="default"}=e;return t.$$set=t=>{"options"in t&&n(2,s=t.options),"target"in t&&n(3,i=t.target)},t.$$.update=()=>{12&t.$$.dirty&&wt._init(i,s),24&t.$$.dirty&&n(0,r=o.filter((t=>t.target===i)))},[r,t=>Object.keys(t).reduce(((e,n)=>`${e}${n}:${t[n]};`),""),s,i,o]}t.SvelteToast=class extends pt{constructor(t){super(),dt(this,t,Tt,Pt,c,{options:2,target:3},At)}},t.toast=wt,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "@zerodevx/svelte-toast",
"version": "0.6.3",
"version": "0.7.0-rc.1",
"description": "Simple elegant toast notifications",

@@ -28,25 +28,25 @@ "author": "Jason Lee <jason@zerodevx.com>",

"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.1",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"autoprefixer": "^10.4.0",
"camelcase": "^6.2.1",
"cypress": "^9.2.0",
"eslint": "^8.5.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"autoprefixer": "^10.4.2",
"camelcase": "^6.3.0",
"cypress": "^9.3.1",
"eslint": "^8.7.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-html": "^6.2.0",
"eslint-plugin-svelte3": "^3.2.1",
"eslint-plugin-svelte3": "^3.4.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.5",
"prettier": "^2.5.1",
"prettier-plugin-svelte": "^2.5.1",
"prismjs": "^1.25.0",
"rollup": "^2.62.0",
"prettier-plugin-svelte": "^2.6.0",
"prismjs": "^1.26.0",
"rollup": "^2.66.0",
"rollup-plugin-livereload": "^2.0.5",
"rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-terser": "^7.0.2",
"sirv-cli": "^1.0.14",
"svelte": "^3.44.3",
"tailwindcss": "^3.0.7",
"typescript": "^4.5.4"
"sirv-cli": "^2.0.2",
"svelte": "^3.46.2",
"tailwindcss": "^3.0.15",
"typescript": "^4.5.5"
},

@@ -53,0 +53,0 @@ "files": [

@@ -395,3 +395,4 @@ [![npm (scoped)](https://img.shields.io/npm/v/@zerodevx/svelte-toast/latest)](https://www.npmjs.com/package/@zerodevx/svelte-toast)

intro: { x: 256 }, // toast intro fly animation settings
theme: {} // css var overrides
theme: {}, // css var overrides
classes: [] // user-defined classes
}

@@ -398,0 +399,0 @@ ```

@@ -18,3 +18,4 @@ // index.d.ts

* intro: { x: 256 }, // toast intro fly animation settings
* theme: {} // css var overrides
* theme: {}, // css var overrides
* classes: [] // user-defined classes
* }

@@ -36,2 +37,3 @@ * ```

theme?: { [key: string]: string }
classes?: string[]
component?: {

@@ -38,0 +40,0 @@ src: typeof SvelteComponent

@@ -10,4 +10,3 @@ import { writable } from 'svelte/store'

reversed: false,
intro: { x: 256 },
theme: {}
intro: { x: 256 }
}

@@ -28,2 +27,3 @@

theme: { ...conf.theme, ...param.theme },
classes: [...(conf.classes || []), ...(param.classes || [])],
id: ++count

@@ -30,0 +30,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc