PageSourceSearch

https://tacmed.ua/build/assets/simple-notify-CEzYmrdf.js

js tacmed.ua collected 2026-10-09 17:03:53 UTC 10,030 bytes, 16 lines download raw bytes

1function H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function q(e,t,n){return t&&X(e.prototype,t),e}var j=Object.defineProperty,a=function(e,t){return j(e,"name",{value:t,configurable:!0})},V=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\r
2  <path d="m8.94 8 4.2-4.193a.67.67 0 0 0-.947-.947L8 7.06l-4.193-4.2a.67.67 0 1 0-.947.947L7.06 8l-4.2 4.193a.667.667 0 0 0 .217 1.093.666.666 0 0 0 .73-.146L8 8.94l4.193 4.2a.666.666 0 0 0 1.094-.217.665.665 0 0 0-.147-.73L8.94 8Z" fill="currentColor"/>\r
3</svg>\r
4`,z=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\r
5  <path d="M16 2.667a13.333 13.333 0 1 0 0 26.666 13.333 13.333 0 0 0 0-26.666Zm0 24A10.667 10.667 0 0 1 5.333 16a10.56 10.56 0 0 1 2.254-6.533l14.946 14.946A10.56 10.56 0 0 1 16 26.667Zm8.413-4.134L9.467 7.587A10.56 10.56 0 0 1 16 5.333 10.667 10.667 0 0 1 26.667 16a10.56 10.56 0 0 1-2.254 6.533Z" fill="currentColor"/>\r
6</svg>\r
7`,J=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\r
8  <path d="M16 14.667A1.333 1.333 0 0 0 14.667 16v5.333a1.333 1.333 0 0 0 2.666 0V16A1.333 1.333 0 0 0 16 14.667Zm.507-5.227a1.333 1.333 0 0 0-1.014 0 1.334 1.334 0 0 0-.44.28 1.56 1.56 0 0 0-.28.44c-.075.158-.11.332-.106.507a1.332 1.332 0 0 0 .386.946c.13.118.279.213.44.28a1.334 1.334 0 0 0 1.84-1.226 1.4 1.4 0 0 0-.386-.947 1.334 1.334 0 0 0-.44-.28ZM16 2.667a13.333 13.333 0 1 0 0 26.666 13.333 13.333 0 0 0 0-26.666Zm0 24a10.666 10.666 0 1 1 0-21.333 10.666 10.666 0 0 1 0 21.333Z" fill="currentColor"/>\r
9</svg>\r
10`,K=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\r
11  <path d="m19.627 11.72-5.72 5.733-2.2-2.2a1.334 1.334 0 1 0-1.88 1.881l3.133 3.146a1.333 1.333 0 0 0 1.88 0l6.667-6.667a1.333 1.333 0 1 0-1.88-1.893ZM16 2.667a13.333 13.333 0 1 0 0 26.666 13.333 13.333 0 0 0 0-26.666Zm0 24a10.666 10.666 0 1 1 0-21.333 10.666 10.666 0 0 1 0 21.333Z" fill="currentColor"/>\r
12</svg>\r
13`,Q=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\r
14  <path d="M16.334 17.667a1.334 1.334 0 0 0 1.334-1.333v-5.333a1.333 1.333 0 0 0-2.665 0v5.333a1.333 1.333 0 0 0 1.33 1.333Zm-.508 5.227c.325.134.69.134 1.014 0 .165-.064.314-.159.44-.28a1.56 1.56 0 0 0 .28-.44c.076-.158.112-.332.107-.507a1.332 1.332 0 0 0-.387-.946 1.532 1.532 0 0 0-.44-.28 1.334 1.334 0 0 0-1.838 1.226 1.4 1.4 0 0 0 .385.947c.127.121.277.216.44.28Zm.508 6.773a13.333 13.333 0 1 0 0-26.667 13.333 13.333 0 0 0 0 26.667Zm0-24A10.667 10.667 0 1 1 16.54 27a10.667 10.667 0 0 1-.206-21.333Z" fill="currentColor"/>\r
15</svg>\r
16`,$=a(function(e){return new DOMParser().parseFromString(e,"text/html").body.childNodes[0]},"stringToHTML"),c=a(function(e){var t=new DOMParser().parseFromString(e,"application/xml");return document.importNode(t.documentElement,!0).outerHTML},"getSvgNode"),s={CONTAINER:"sn-notifications-container",NOTIFY:"sn-notify",NOTIFY_CONTENT:"sn-notify-content",NOTIFY_ICON:"sn-notify-icon",NOTIFY_CLOSE:"sn-notify-close",NOTIFY_TITLE:"sn-notify-title",NOTIFY_TEXT:"sn-notify-text",IS_X_CENTER:"sn-is-x-center",IS_Y_CENTER:"sn-is-y-center",IS_CENTER:"sn-is-center",IS_LEFT:"sn-is-left",IS_RIGHT:"sn-is-right",IS_TOP:"sn-is-top",IS_BOTTOM:"sn-is-bottom",NOTIFY_OUTLINE:"sn-notify-outline",NOTIFY_FILLED:"sn-notify-filled",NOTIFY_ERROR:"sn-notify-error",NOTIFY_WARNING:"sn-notify-warning",NOTIFY_SUCCESS:"sn-notify-success",NOTIFY_INFO:"sn-notify-info",NOTIFY_FADE:"sn-notify-fade",NOTIFY_FADE_IN:"sn-notify-fade-in",NOTIFY_SLIDE:"sn-notify-slide",NOTIFY_SLIDE_IN:"sn-notify-slide-in",NOTIFY_AUTOCLOSE:"sn-notify-autoclose"},r={ERROR:"error",WARNING:"warning",SUCCESS:"success",INFO:"info"},L={OUTLINE:"outline",FILLED:"filled"},h={FADE:"fade",SLIDE:"slide"},l={CLOSE:c(V),SUCCESS:c(K),ERROR:c(z),WARNING:c(Q),INFO:c(J)},C=a(function(e){e.wrapper.classList.add(s.NOTIFY_FADE),setTimeout(function(){e.wrapper.classList.add(s.NOTIFY_FADE_IN)},100)},"fadeIn"),F=a(function(e){e.wrapper.classList.remove(s.NOTIFY_FADE_IN),setTimeout(function(){e.wrapper.remove()},e.speed)},"fadeOut"),tt=a(function(e){e.wrapper.classList.add(s.NOTIFY_SLIDE),setTimeout(function(){e.wrapper.classList.add(s.NOTIFY_SLIDE_IN)},100)},"slideIn"),et=a(function(e){e.wrapper.classList.remove(s.NOTIFY_SLIDE_IN),setTimeout(function(){e.wrapper.remove()},e.speed)},"slideOut"),_=(function(){function e(t){var n=this;H(this,e),this.notifyOut=a(function(W){W(n)},"notifyOut");var i=t.notificationsGap,o=i===void 0?20:i,d=t.notificationsPadding,S=d===void 0?20:d,u=t.status,g=u===void 0?"success":u,f=t.effect,R=f===void 0?h.FADE:f,p=t.type,Y=p===void 0?"outline":p,x=t.title,A=t.text,I=t.showIcon,b=I===void 0?!0:I,v=t.customIcon,k=v===void 0?"":v,N=t.customClass,D=N===void 0?"":N,O=t.speed,P=O===void 0?500:O,T=t.showCloseButton,Z=T===void 0?!0:T,E=t.autoclose,M=E===void 0?!0:E,m=t.autotimeout,U=m===void 0?3e3:m,w=t.position,B=w===void 0?"right top":w,y=t.customWrapper,G=y===void 0?"":y;if(this.customWrapper=G,this.status=g,this.title=x,this.text=A,this.showIcon=b,this.customIcon=k,this.customClass=D,this.speed=P,this.effect=R,this.showCloseButton=Z,this.autoclose=M,this.autotimeout=U,this.notificationsGap=o,this.notificationsPadding=S,this.type=Y,this.position=B,!this.checkRequirements()){console.error("You must specify 'title' or 'text' at least.");return}this.setContainer(),this.setWrapper(),this.setPosition(),this.showIcon&&this.setIcon(),this.showCloseButton&&this.setCloseButton(),this.setContent(),this.container.prepend(this.wrapper),this.setEffect(),this.notifyIn(this.selectedNotifyInEffect),this.autoclose&&this.autoClose(),this.setObserver()}return q(e,[{key:"checkRequirements",value:function(){return!!(this.title||this.text)}},{key:"setContainer",value:function(){var n=document.querySelector(".".concat(s.CONTAINER));n?this.container=n:(this.container=document.createElement("div"),this.container.classList.add(s.CONTAINER),document.body.appendChild(this.container)),this.notificationsPadding&&this.container.style.setProperty("--sn-notifications-padding","".concat(this.notificationsPadding,"px")),this.notificationsGap&&this.container.style.setProperty("--sn-notifications-gap","".concat(this.notificationsGap,"px"))}},{key:"setPosition",value:function(){this.container.classList[this.position==="center"?"add":"remove"](s.IS_CENTER),this.container.classList[this.position.includes("left")?"add":"remove"](s.IS_LEFT),this.container.classList[this.position.includes("right")?"add":"remove"](s.IS_RIGHT),this.container.classList[this.position.includes("top")?"add":"remove"](s.IS_TOP),this.container.classList[this.position.includes("bottom")?"add":"remove"](s.IS_BOTTOM),this.container.classList[this.position.includes("x-center")?"add":"remove"](s.IS_X_CENTER),this.container.classList[this.position.includes("y-center")?"add":"remove"](s.IS_Y_CENTER)}},{key:"setCloseButton",value:function(){var n=this,i=document.createElement("div");i.classList.add(s.NOTIFY_CLOSE),i.innerHTML=l.CLOSE,this.wrapper.appendChild(i),i.addEventListener("click",function(){n.close()})}},{key:"setWrapper",value:function(){var n=this;switch(this.customWrapper?this.wrapper=$(this.customWrapper):this.wrapper=document.createElement("div"),this.wrapper.style.setProperty("--sn-notify-transition-duration","".concat(this.speed,"ms")),this.wrapper.classList.add(s.NOTIFY),this.type){case L.OUTLINE:this.wrapper.classList.add(s.NOTIFY_OUTLINE);break;case L.FILLED:this.wrapper.classList.add(s.NOTIFY_FILLED);break;default:this.wrapper.classList.add(s.NOTIFY_OUTLINE)}switch(this.status){case r.SUCCESS:this.wrapper.classList.add(s.NOTIFY_SUCCESS);break;case r.ERROR:this.wrapper.classList.add(s.NOTIFY_ERROR);break;case r.WARNING:this.wrapper.classList.add(s.NOTIFY_WARNING);break;case r.INFO:this.wrapper.classList.add(s.NOTIFY_INFO);break}this.autoclose&&(this.wrapper.classList.add(s.NOTIFY_AUTOCLOSE),this.wrapper.style.setProperty("--sn-notify-autoclose-timeout","".concat(this.autotimeout+this.speed,"ms"))),this.customClass&&this.customClass.split(" ").forEach(function(i){n.wrapper.classList.add(i)})}},{key:"setContent",value:function(){var n=document.createElement("div");n.classList.add(s.NOTIFY_CONTENT);var i,o;this.title&&(i=document.createElement("div"),i.classList.add(s.NOTIFY_TITLE),i.textContent=this.title.trim(),this.showCloseButton||(i.style.paddingRight="0")),this.text&&(o=document.createElement("div"),o.classList.add(s.NOTIFY_TEXT),o.innerHTML=this.text.trim(),this.title||(o.style.marginTop="0")),this.wrapper.appendChild(n),this.title&&n.appendChild(i),this.text&&n.appendChild(o)}},{key:"setIcon",value:function(){var n=a(function(o){switch(o){case r.SUCCESS:return l.SUCCESS;case r.ERROR:return l.ERROR;case r.WARNING:return l.WARNING;
16case r.INFO:return l.INFO}},"computedIcon"),i=document.createElement("div");i.classList.add(s.NOTIFY_ICON),i.innerHTML=this.customIcon||n(this.status),(this.status||this.customIcon)&&this.wrapper.appendChild(i)}},{key:"setObserver",value:function(){var n=this,i=new IntersectionObserver(function(o){if(o[0].intersectionRatio<=0)n.close();else return},{threshold:0});setTimeout(function(){i.observe(n.wrapper)},this.speed)}},{key:"notifyIn",value:function(t){t(this)}},{key:"autoClose",value:function(){var n=this;setTimeout(function(){n.close()},this.autotimeout+this.speed)}},{key:"close",value:function(){this.notifyOut(this.selectedNotifyOutEffect)}},{key:"setEffect",value:function(){switch(this.effect){case h.FADE:this.selectedNotifyInEffect=C,this.selectedNotifyOutEffect=F;break;case h.SLIDE:this.selectedNotifyInEffect=tt,this.selectedNotifyOutEffect=et;break;default:this.selectedNotifyInEffect=C,this.selectedNotifyOutEffect=F}}}]),e})();a(_,"Notify");var it=_;globalThis.Notify=it;export{it as w};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.