{"version":3,"file":"jquery.noty.init.min.js","sources":["jquery.noty.init.js"],"sourcesContent":["(function(w, $) {\n var pubSub = w.PubSub;\n\n if (pubSub) {\n // Listen to the messages on global notifications channel\n pubSub.subscribe('notification', showNotification);\n\n if (w.notifyMessages) {\n w.notifyMessages.forEach(function (message) {\n pubSub.publish('notification', message);\n });\n }\n }\n\n function showNotification(topic, contract) {\n const topicParts = topic.split('.');\n const notificationType = topicParts.length > 1 ? topicParts[topicParts.length - 1] : 'information';\n\n let defaultOptions = {\n layout: 'topCenter',\n type: notificationType,\n maxVisible: 15,\n force: true,\n timeout: 5000\n };\n\n const notyCallback = typeof (contract) === 'object' && contract && contract.notyCallback && typeof (contract.notyCallback) === 'function' ? contract.notyCallback : null;\n\n let notyOptions = typeof (contract) === 'object' && contract ? $.extend(true, defaultOptions, contract) : $.extend(defaultOptions, { text: contract });\n\n if (w.siteScripts) {\n notyOptions = w.siteScripts.converters.apply('NotyOptionsConverters', notyOptions);\n }\n\n const notyMsg = w.noty(notyOptions);\n\n if (notyCallback) {\n notyCallback(notyMsg);\n }\n }\n})(window, jQuery);"],"names":["w","$","pubSub","PubSub","subscribe","topic","contract","topicParts","split","notificationType","length","defaultOptions","layout","type","maxVisible","force","timeout","notyCallback","let","notyOptions","extend","text","siteScripts","converters","apply","notyMsg","noty","notifyMessages","forEach","message","publish","window","jQuery"],"mappings":"CAAA,SAAUA,EAAGC,GACT,IAAIC,EAASF,EAAEG,OAEXD,IAEAA,EAAOE,UAAU,eASrB,SAA0BC,EAAOC,GACvBC,EAAaF,EAAMG,MAAM,KACzBC,EAAuC,EAApBF,EAAWG,OAAaH,EAAWA,EAAWG,OAAS,GAAK,cAEjFC,EAAiB,CACjBC,OAAQ,YACRC,KAAMJ,EACNK,WAAY,GACZC,OAAO,EACPC,QAAS,KAGb,MAAMC,EAAqC,iBAAf,GAA2BX,GAAYA,EAASW,cAAmD,mBAA3BX,EAAqB,aAAmBA,EAASW,aAAe,KAEpKC,IAAIC,EAAoC,iBAAf,GAA2Bb,EAAWL,EAAEmB,QAAO,EAAMT,EAAgBL,GAAYL,EAAEmB,OAAOT,EAAgB,CAAEU,KAAMf,IAEvIN,EAAEsB,cACFH,EAAcnB,EAAEsB,YAAYC,WAAWC,MAAM,wBAAyBL,IAGpEM,EAAUzB,EAAE0B,KAAKP,GAEnBF,GACAA,EAAaQ,KA9BbzB,EAAE2B,gBACF3B,EAAE2B,eAAeC,QAAQ,SAAUC,GAC/B3B,EAAO4B,QAAQ,eAAgBD,MAT/C,CAwCGE,OAAQC"}