function IsDisable(n){return n.hasClass("t-state-disabled")?!0:!1}function ChecksCondition(n){return $(n).length>0}function MostrarMensagemErro(n){var t=n.JqMessageBox;t!=null&&t.Confirm==!1&&jAlert(t.Message,t.Title)}function CloseNewWindowTab(n){var t=NewWindowTab[n];t&&(t.close(),delete NewWindowTab[n])}function OpenNewWindowTab(n,t){CloseNewWindowTab(t);var i=window.open(n,t);NewWindowTab[t]=i}function DestroyQtipTootips(){}function WindowClose(n){n.data("tWindow").destroy()}function WindowScrollTop(n){n.find(".t-window-content").scrollTop(0)}function OpenWindow(n,t,i,r,u,f,e,o,s,h,c,l){var a=$(n),v=Math.floor(Math.random()*99999999+1);return $.ajax({type:"POST",dataType:"JSON",url:s,data:h,traditional:!0,beforeSend:function(n){n.uniqueId=v;$("body").myBsBlock(n.uniqueId).html($("<div/>").addClass("loader-animation loader-animation-sm"))},success:function(n){if(a.enable(!0),n.Success){var s=CreateWindow(t,i,r,u,f,e,o,l);s.content(n.WindowPartialViewHtml);s.center().open();c&&typeof c=="function"&&c(n)}else MostrarMensagemErro(n)}}).always(function(n,t,i){a.enable(!1);$("body").myBsUnBlock(i.uniqueId)})}function CreateWindow(n,t,i,r,u,f,e,o){var s=$("#"+n);return s.remove(),s=$.telerik.window.create({title:t,actions:i,modal:r,draggable:u,resizable:f,scrollable:e,onClose:function(n){n.preventDefault();o&&typeof o=="function"?o(s.data("tWindow")):s.data("tWindow").destroy()}}).attr("id",n),s.data("tWindow")}function DownloadFiles(n,t,i){var r=$(n),u=Math.floor(Math.random()*99999999+1);return $.ajax({type:"POST",dataType:"JSON",url:t,data:i,beforeSend:function(n){n.uniqueId=u;$("body").myBsBlock(n.uniqueId).html($("<div/>").addClass("loader-animation loader-animation-sm"))},success:function(n){if(r.enable(!0),n.Success)MostrarMensagemErro(n),n.DonwloadFiles!=null&&$.each(n.DonwloadFiles,function(n,t){window.open(t,"_blank")});else{var t=n.JqMessageBox;jAlert(t.Message,t.Title)}}}).always(function(n,t,i){r.enable(!1);$("body").myBsUnBlock(i.uniqueId)})}function HideRefreshButton(n){$("#"+n+" .t-status").hide()}function serializeAll(n){var t=n.find("input:disabled, textarea:disabled, select:disabled").removeAttr("disabled"),i=n.serialize();return t.attr("disabled","disabled"),i}function ActializaPartialViews(n,t,i,r){var u=$(n),f=Math.floor(Math.random()*99999999+1);return $.ajax({type:"POST",dataType:"JSON",url:t,data:i,traditional:!0,beforeSend:function(n){n.uniqueId=f;$("body").myBsBlock(n.uniqueId).html($("<div/>").addClass("loader-animation loader-animation-sm"))},success:function(n){u.enable(!0);n.Success?(MostrarMensagemErro(n),n.RenderPatialViews!=null&&$.each(n.RenderPatialViews,function(n,t){$(t.Selector).html(t.Html)}),r&&typeof r=="function"&&r(n)):MostrarMensagemErro(n)}}).always(function(n,t,i){$("body").myBsUnBlock(i.uniqueId);u.enable(!0)})}function SubmitAjaxWindowForm(n,t,i,r,u){var e=$(n),o=Math.floor(Math.random()*99999999+1),f="#"+t+" input[type='submit']";i&&(f="#"+t+" "+i+" input[type='submit']");$(f).die("click").live("click",function(n){var f,i;return n.preventDefault(),f=$("#"+t),WindowScrollTop(f),IsDisable($(this))==!1&&(i=$(this).closest("form"),i.valid())?$.ajax({type:"POST",dataType:"JSON",url:i.attr("action"),data:serializeAll(i),beforeSend:function(n){n.uniqueId=o;$("body").myBsBlock(n.uniqueId).html($("<div/>").addClass("loader-animation loader-animation-sm"));onBeforeSend&&typeof onBeforeSend=="function"&&onBeforeSend()},success:function(n){n.RenderPatialViews!=null&&$.each(n.RenderPatialViews,function(n,t){$(t.Selector).html(t.Html)});n.Success?(f.data("tWindow").close(),r&&typeof r=="function"&&r(n)):(MostrarMensagemErro(n),u&&typeof u=="function"&&u(n))}}).always(function(n,t,i){$("body").myBsUnBlock(i.uniqueId);e.enable(!0)}):void 0})}function AjaxPost(n,t,i,r,u){var f=$(n),e=Math.floor(Math.random()*99999999+1);return $.ajax({type:"POST",dataType:"JSON",url:t,data:i,beforeSend:function(n){n.uniqueId=e;$("body").myBsBlock(n.uniqueId).html($("<div/>").addClass("loader-animation loader-animation-sm"))},success:function(n){n.Success?r&&typeof r=="function"&&r(n):u&&typeof u=="function"&&u(n)}}).always(function(n,t,i){$("body").myBsUnBlock(i.uniqueId);f.enable(!0)})}function GridPagingWithFilter(n,t){var i=$("#"+n.target.id);i.attr("ajaxSelectUrl")==null&&i.attr("ajaxSelectUrl",i.data("tGrid").ajax.selectUrl);i.data("tGrid").ajax.selectUrl=i.attr("ajaxSelectUrl").indexOf("?")!=-1?i.attr("ajaxSelectUrl")+"&"+encodeURI(serializeAll(t)):i.attr("ajaxSelectUrl")+"?"+encodeURI(serializeAll(t))}function URLAppend(n,t){return n+(n.indexOf("?")!=-1?"&":" ?")+t}function ValidateUploadExtensions(n){var t=n.target.innerHTML.match(/<input id="([^"]+)"/),i,r;t&&(i=t[1],r=$("#"+i).parents("div.t-upload").attr("Extensions").split(","),$.each(n.files,function(){var t=this.extension.toLowerCase();if($.inArray(t,r)==-1)return jAlert("A extensão "+t+" não é suportada.","Informação"),n.preventDefault(),!1}))}function Truncate(n,t,i){return n.length>t&&(n=n.substring(0,t+1),n=n.substring(0,Math.min(n.length,n.lastIndexOf(" "))),n=n+i),n}function ReplaceNewLine(n,t){return n.replace("\n",t)}(function(n){n.fn.liveDelayedKeyup=function(t){var i={handler:n.noop(),delay:1e3};this.die("keyup").live("keyup",function(r){var u=n.extend({},i,t),f=this;typeof window.inputTimeout!="undefined"&&window.clearTimeout(inputTimeout);window.inputTimeout=window.setTimeout(function(){u.handler.call(f,r)},u.delay)})};n.fn.liveSortable=function(t){this.die("mousemove").live("mousemove",function(){n(this).sortable(t)})};n.fn.liveDraggable=function(t){this.die("mousemove").live("mousemove",function(){n(this).draggable(t)})};n.fn.liveDroppable=function(t){this.die("mousemove").live("mousemove",function(){n(this).droppable(t)})};n.fn.liveAutoComplete=function(t,i){this.die("mousemove").live("mousemove",function(){var r=n(this).autocomplete(t);r.autocomplete("instance")._renderItem=function(t,r){if(i&&typeof i=="function")return i(t,r);var u=n("<li>").append(r.label).appendTo(t);return r.title&&u.attr("title",r.title),r.selected&&u.addClass("selected"),u}})};n.fn.selectRange=function(n,t){return this.each(function(){if(this.setSelectionRange)this.focus(),this.setSelectionRange(n,t);else if(this.createTextRange){var i=this.createTextRange();i.collapse(!0);i.moveEnd("character",t);i.moveStart("character",n);i.select()}})};n.fn.liveQtip=function(t){this.die("mousemove").live("mousemove",function(){n(this).qtip(t)})};n.fn.toggleDisabled=function(){return this.each(function(){var t=n(this);t.attr("disabled")?t.removeAttr("disabled"):t.attr("disabled","disabled")})};n.fn.enable=function(n){n?this.removeAttr("disabled"):this.attr("disabled","disabled")};n.fn.myBsBlock=function(t){var r=this,i=n(".myBsBlockOverlay[requestid='"+t+"']");return i.length==0&&(i=n("<div/>").addClass("myBsBlockOverlay d-flex justify-content-center align-items-center").attr("requestid",t).appendTo(r)),n(i)};n.fn.myBsUnBlock=function(t){var r=this,i=n(".myBsBlockOverlay[requestid='"+t+"']");i.length>0&&i.remove()}})(jQuery);var NewWindowTab={};(function(n){n.extend(n.fn,{livequery:function(t,i,r){var f=this,u;return n.isFunction(t)&&(r=i,i=t,t=undefined),n.each(n.livequery.queries,function(n,e){if(f.selector==e.selector&&f.context==e.context&&t==e.type&&(!i||i.$lqguid==e.fn.$lqguid)&&(!r||r.$lqguid==e.fn2.$lqguid))return(u=e)&&!1}),u=u||new n.livequery(this.selector,this.context,t,i,r),u.stopped=!1,u.run(),this},expire:function(t,i,r){var u=this;return n.isFunction(t)&&(r=i,i=t,t=undefined),n.each(n.livequery.queries,function(f,e){u.selector!=e.selector||u.context!=e.context||t&&t!=e.type||i&&i.$lqguid!=e.fn.$lqguid||r&&r.$lqguid!=e.fn2.$lqguid||this.stopped||n.livequery.stop(e.id)}),this}});n.livequery=function(t,i,r,u,f){return this.selector=t,this.context=i||document,this.type=r,this.fn=u,this.fn2=f,this.elements=[],this.stopped=!1,this.id=n.livequery.queries.push(this)-1,u.$lqguid=u.$lqguid||n.livequery.guid++,f&&(f.$lqguid=f.$lqguid||n.livequery.guid++),this};n.livequery.prototype={stop:function(){var n=this;this.type?this.elements.unbind(this.type,this.fn):this.fn2&&this.elements.each(function(t,i){n.fn2.apply(i)});this.elements=[];this.stopped=!0},run:function(){if(!this.stopped){var i=this,t=this.elements,r=n(this.selector,this.context),u=r.not(t);this.elements=r;this.type?(u.bind(this.type,this.fn),t.length>0&&n.each(t,function(t,u){n.inArray(u,r)<0&&n.event.remove(u,i.type,i.fn)})):(u.each(function(){i.fn.apply(this)}),this.fn2&&t.length>0&&n.each(t,function(t,u){n.inArray(u,r)<0&&i.fn2.apply(u)}))}}};n.extend(n.livequery,{guid:0,queries:[],queue:[],running:!1,timeout:null,checkQueue:function(){if(n.livequery.running&&n.livequery.queue.length)for(var t=n.livequery.queue.length;t--;)n.livequery.queries[n.livequery.queue.shift()].run()},pause:function(){n.livequery.running=!1},play:function(){n.livequery.running=!0;n.livequery.run()},registerPlugin:function(){n.each(arguments,function(t,i){if(n.fn[i]){var r=n.fn[i];n.fn[i]=function(){var t=r.apply(this,arguments);return n.livequery.run(),t}}})},run:function(t){t!=undefined?n.inArray(t,n.livequery.queue)<0&&n.livequery.queue.push(t):n.each(n.livequery.queries,function(t){n.inArray(t,n.livequery.queue)<0&&n.livequery.queue.push(t)});n.livequery.timeout&&clearTimeout(n.livequery.timeout);n.livequery.timeout=setTimeout(n.livequery.checkQueue,20)},stop:function(t){t!=undefined?n.livequery.queries[t].stop():n.each(n.livequery.queries,function(t){n.livequery.queries[t].stop()})}});n.livequery.registerPlugin("append","prepend","after","before","wrap","attr","removeAttr","addClass","removeClass","toggleClass","empty","remove");n(function(){n.livequery.play()});var t=n.prototype.init;n.prototype.init=function(n,i){var r=t.apply(this,arguments);return n&&n.selector&&(r.context=n.context,r.selector=n.selector),typeof n=="string"&&(r.context=i||document,r.selector=n),r};n.prototype.init.prototype=n.prototype})(jQuery),function(n){n.fn.textareaCount=function(t,i){function h(){return f.html(p()),typeof i!="undefined"&&i.call(this,b()),!0}function p(){var n=r.val(),l=n.length,h,p,i;return t.maxCharacterSize>0?(l>=t.maxCharacterSize&&(n=n.substring(0,t.maxCharacterSize)),i=a(n),h=t.maxCharacterSize-i,c()||(h=t.maxCharacterSize),l>h&&(p=this.scrollTop,r.val(n.substring(0,h)),this.scrollTop=p),f.removeClass(t.warningStyle),h-l<=t.warningNumber&&f.addClass(t.warningStyle),u=r.val().length+i,c()||(u=r.val().length),o=y(v(r.val())),s=e-u):(i=a(n),u=r.val().length+i,c()||(u=r.val().length),o=y(v(r.val()))),w()}function w(){var n=t.displayFormat;return n=n.replace("#input",u),n=n.replace("#words",o),e>0&&(n=n.replace("#max",e),n=n.replace("#left",s)),n}function b(){return{input:u,max:e,left:s,words:o}}function k(n){return n.next(".charleft")}function c(){var n=navigator.appVersion;return n.toLowerCase().indexOf("win")!=-1?!0:!1}function a(n){for(var i=0,t=0;t<n.length;t++)n.charAt(t)=="\n"&&i++;return i}function v(n){var t=n+" ",i=t.replace(/^[^A-Za-z0-9]+/gi,""),r=rExp=/[^A-Za-z0-9]+/gi,u=i.replace(r," ");return u.split(" ")}function y(n){return n.length-1}var t=n.extend({maxCharacterSize:-1,originalStyle:"originalTextareaInfo",warningStyle:"warningTextareaInfo",warningNumber:20,displayFormat:"#input characters | #words words"},t),r=n(this),l,f;n("<div class='charleft'>&nbsp;<\/div>").insertAfter(r);l={width:r.width()};f=k(r);f.addClass(t.originalStyle);f.css(l);var u=0,e=t.maxCharacterSize,s=0,o=0;r.bind("keyup",function(){h()}).bind("mouseover",function(){setTimeout(function(){h()},10)}).bind("paste",function(){setTimeout(function(){h()},10)})}}(jQuery),function(n){function o(i){var e=n("#"+i.filter).val(),r=n("#"+i.view),u=n("#"+i.loading);u.show();n.ajax({type:"POST",dataType:"json",url:i.url,data:{keyword:e},success:function(e){r.empty();n.each(e,function(t,i){r.append(n("<option><\/option>").attr("value",i.Id).text(i.Nome))});u.hide();t[i.index].useCounters&&f(i)}})}function f(t){var i=n("#"+t.view+" option").size(),r=n("#"+t.counter);i==0?r.text("Não resultou da pesquisa qualquer registo."):i==1?r.text("Resultado da pesquisa: 1 registo."):r.text("Resultado da pesquisa: "+i+" registos.")}function u(t){var i=n("#"+t.view+" option").size(),r=n("#"+t.counter);i==0?r.text("Não foi transferido qualquer registo."):i==1?r.text("Foi transferido 1 registo."):r.text("Foram transferidos "+i+" registos.")}function s(i,r){n("#"+i.view+" option:selected").filter(function(){var t=!1,i;return n(this).removeAttr("selected"),i=n(this).val().toLowerCase(),n("#"+r.view+" option").each(function(){var r=n(this).val().toLowerCase();r==i&&(t=!0)}),!t}).clone().appendTo("#"+r.view).attr("selected","selected");t[i.index].useCounters&&(f(i),u(r))}function l(i,r){n("#"+i.view+" option").filter(function(){var t=!1,i;return n(this).removeAttr("selected"),i=n(this).val().toLowerCase(),n("#"+r.view+" option").each(function(){var r=n(this).val().toLowerCase();r==i&&(t=!0)}),!t}).clone().appendTo("#"+r.view).attr("selected","selected");t[i.index].useCounters&&(f(i),u(r))}function h(i,r){n("#"+r.view+" option:selected").remove();t[r.index].useCounters&&u(r)}function a(i,r){n("#"+r.view+" option").remove();t[r.index].useCounters&&u(r)}var e,c=700,t=[],r=[],i=[];n.configureBoxes=function(v){var y=t.push({boxFromUrl:"URL",boxFromView:"boxFromView",boxFromFilter:"boxFromFilter",boxFromClear:"boxFromClear",boxFromCounter:"boxFromCounter",boxFromLoading:"boxFromLoading",from:"from",allFrom:"allFrom",boxToUrl:"URL",boxToView:"boxToView",boxToFilter:"boxToFilter",boxToClear:"boxToClear",boxToCounter:"boxToCounter",boxToLoading:"boxToLoading",to:"to",allTo:"allTo",useCounters:!0,useFilters:!0,selectOnSubmit:!0});y--;n.extend(t[y],v);r.push({url:t[y].boxToUrl,view:t[y].boxToView,filter:t[y].boxToFilter,clear:t[y].boxToClear,counter:t[y].boxToCounter,loading:t[y].boxToLoading,index:y});i.push({url:t[y].boxFromUrl,view:t[y].boxFromView,filter:t[y].boxFromFilter,clear:t[y].boxFromClear,counter:t[y].boxFromCounter,loading:t[y].boxFromLoading,index:y});t[y].useFilters&&(n("#"+i[y].filter).die("keyup").live("keyup",function(){clearTimeout(e);e=setTimeout(function(){o(i[y])},c)}),n("#"+i[y].clear).die("click").live("click",function(){n("#"+i[y].filter).val("");o(i[y])}),n("#"+r[y].filter).die("keyup").live("keyup",function(){}),n("#"+r[y].clear).die("click").live("click",function(){}));n("#"+i[y].view).die("dblclick").live("dblclick",function(){s(i[y],r[y])});n("#"+t[y].from).die("click").live("click",function(){s(i[y],r[y])});n("#"+t[y].allFrom).die("click").live("click",function(){l(i[y],r[y])});n("#"+r[y].view).die("dblclick").live("dblclick",function(){h(i[y],r[y])});n("#"+t[y].to).die("click").live("click",function(){h(i[y],r[y])});n("#"+t[y].allTo).die("click").live("click",function(){a(i[y],r[y])});t[y].useCounters&&(f(i[y]),u(r[y]));t[y].selectOnSubmit&&n("#"+t[y].boxToView).closest("form").submit(function(){n("#"+t[y].boxToView).children("option").attr("selected","selected")})}}(jQuery),function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Popper=t()}(this,function(){"use strict";function ft(n){return n&&"[object Function]"==={}.toString.call(n)}function r(n,t){if(1!==n.nodeType)return[];var r=n.ownerDocument.defaultView,i=r.getComputedStyle(n,null);return t?i[t]:i}function y(n){return"HTML"===n.nodeName?n:n.parentNode||n.host}function s(n){if(!n)return document.body;switch(n.nodeName){case"HTML":case"BODY":return n.ownerDocument.body;case"#document":return n.body}var t=r(n),i=t.overflow,u=t.overflowX,f=t.overflowY;return/(auto|scroll|overlay)/.test(i+f+u)?n:s(y(n))}function u(n){return 11===n?ui:10===n?fi:ui||fi}function f(n){var e,t,i;if(!n)return document.documentElement;for(e=u(10)?document.body:null,t=n.offsetParent||null;t===e&&n.nextElementSibling;)t=(n=n.nextElementSibling).offsetParent;return i=t&&t.nodeName,i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(t.nodeName)&&"static"===r(t,"position")?f(t):t:n?n.ownerDocument.documentElement:document.documentElement}function oi(n){var t=n.nodeName;return"BODY"!==t&&("HTML"===t||f(n.firstElementChild)===n)}function p(n){return null===n.parentNode?n:p(n.parentNode)}function l(n,t){var i,u;if(!n||!n.nodeType||!t||!t.nodeType)return document.documentElement;var e=n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=e?n:t,s=e?t:n,r=document.createRange();return(r.setStart(o,0),r.setEnd(s,0),i=r.commonAncestorContainer,n!==i&&t!==i||o.contains(s))?oi(i)?i:f(i):(u=p(n),u.host?l(u.host,t):l(n,p(t).host))}function e(n){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"top",t="top"===f?"scrollTop":"scrollLeft",i=n.nodeName,r,u;return"BODY"===i||"HTML"===i?(r=n.ownerDocument.documentElement,u=n.ownerDocument.scrollingElement||r,u[t]):n[t]}function si(n,t){var f=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=e(t,"top"),u=e(t,"left"),i=f?-1:1;return n.top+=r*i,n.bottom+=r*i,n.left+=u*i,n.right+=u*i,n}function et(n,t){var i="x"===t?"Left":"Top",r="Left"==i?"Right":"Bottom";return parseFloat(n["border"+i+"Width"],10)+parseFloat(n["border"+r+"Width"],10)}function ot(n,i,r,f){return t(i["offset"+n],i["scroll"+n],r["client"+n],r["offset"+n],r["scroll"+n],u(10)?parseInt(r["offset"+n])+parseInt(f["margin"+("Height"===n?"Top":"Left")])+parseInt(f["margin"+("Height"===n?"Bottom":"Right")]):0)}function st(n){var i=n.body,t=n.documentElement,r=u(10)&&getComputedStyle(t);return{height:ot("Height",i,t,r),width:ot("Width",i,t,r)}}function i(t){return n({},t,{right:t.left+t.width,bottom:t.top+t.height})}function w(n){var t={},o,s,l;try{u(10)?(t=n.getBoundingClientRect(),o=e(n,"top"),s=e(n,"left"),t.top+=o,t.left+=s,t.bottom+=o,t.right+=s):t=n.getBoundingClientRect()}catch(r){}var f={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===n.nodeName?st(n.ownerDocument):{},v=a.width||n.clientWidth||f.right-f.left,y=a.height||n.clientHeight||f.bottom-f.top,h=n.offsetWidth-v,c=n.offsetHeight-y;return(h||c)&&(l=r(n),h-=et(l,"x"),c-=et(l,"y"),f.width-=h,f.height-=c),i(f)}function b(n,f){var b=2<arguments.length&&void 0!==arguments[2]&&arguments[2],k=u(10),d="HTML"===f.nodeName,h=w(n),o=w(f),v=s(n),c=r(f),y=parseFloat(c.borderTopWidth,10),p=parseFloat(c.borderLeftWidth,10),e,l,a;return b&&d&&(o.top=t(o.top,0),o.left=t(o.left,0)),e=i({top:h.top-o.top-y,left:h.left-o.left-p,width:h.width,height:h.height}),(e.marginTop=0,e.marginLeft=0,!k&&d)&&(l=parseFloat(c.marginTop,10),a=parseFloat(c.marginLeft,10),e.top-=y-l,e.bottom-=y-l,e.left-=p-a,e.right-=p-a,e.marginTop=l,e.marginLeft=a),(k&&!b?f.contains(v):f===v&&"BODY"!==v.nodeName)&&(e=si(e,f)),e}function hi(n){var f=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=n.ownerDocument.documentElement,u=b(n,r),o=t(r.clientWidth,window.innerWidth||0),s=t(r.clientHeight,window.innerHeight||0),h=f?0:e(r),c=f?0:e(r,"left"),l={top:h-u.top+u.marginTop,left:c-u.left+u.marginLeft,width:o,height:s};return i(l)}function ht(n){var i=n.nodeName,t;return"BODY"===i||"HTML"===i?!1:"fixed"===r(n,"position")?!0:(t=y(n),!!t&&ht(t))}function ct(n){if(!n||!n.parentElement||u())return document.documentElement;for(var t=n.parentElement;t&&"none"===r(t,"transform");)t=t.parentElement;return t||document.documentElement}function k(n,t,i,r){var h=4<arguments.length&&void 0!==arguments[4]&&arguments[4],u={top:0,left:0},c=h?ct(n):l(n,t),e,f,o;if("viewport"===r)u=hi(c,h);else if("scrollParent"===r?(e=s(y(t)),"BODY"===e.nodeName&&(e=n.ownerDocument.documentElement)):e="window"===r?n.ownerDocument.documentElement:r,f=b(e,c,h),"HTML"!==e.nodeName||ht(c))u=f;else{var a=st(n.ownerDocument),v=a.height,p=a.width;u.top+=f.top-f.marginTop;u.bottom=v+f.top;u.left+=f.left-f.marginLeft;u.right=p+f.left}return i=i||0,o="number"==typeof i,u.left+=o?i:i.left||0,u.top+=o?i:i.top||0,u.right-=o?i:i.right||0,u.bottom-=o?i:i.bottom||0,u}function ci(n){var t=n.width,i=n.height;return t*i}function lt(t,i,r,u,f){var l=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var e=k(r,u,l,f),o={top:{width:e.width,height:i.top-e.top},right:{width:e.right-i.right,height:e.height},bottom:{width:e.width,height:e.bottom-i.bottom},left:{width:i.left-e.left,height:e.height}},s=Object.keys(o).map(function(t){return n({key:t},o[t],{area:ci(o[t])})}).sort(function(n,t){return t.area-n.area}),h=s.filter(function(n){var t=n.width,i=n.height;return t>=r.clientWidth&&i>=r.clientHeight}),a=0<h.length?h[0].key:s[0].key,c=t.split("-")[1];return a+(c?"-"+c:"")}function at(n,t,i){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,u=r?ct(t):l(t,i);return b(i,u,r)}function vt(n){var i=n.ownerDocument.defaultView,t=i.getComputedStyle(n),r=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),u=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:n.offsetWidth+u,height:n.offsetHeight+r}}function a(n){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return n.replace(/left|right|bottom|top/g,function(n){return t[n]})}function yt(n,t,i){i=i.split("-")[0];var r=vt(n),e={width:r.width,height:r.height},u=-1!==["right","left"].indexOf(i),o=u?"top":"left",f=u?"left":"top",s=u?"height":"width",h=u?"width":"height";return e[o]=t[o]+t[s]/2-r[s]/2,e[f]=i===f?t[f]-r[h]:t[a(f)],e}function h(n,t){return Array.prototype.find?n.find(t):n.filter(t)[0]}function li(n,t,i){if(Array.prototype.findIndex)return n.findIndex(function(n){return n[t]===i});var r=h(n,function(n){return n[t]===i});return n.indexOf(r)}function pt(n,t,r){var u=void 0===r?n:n.slice(0,li(n,"name",r));return u.forEach(function(n){n["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var r=n["function"]||n.fn;n.enabled&&ft(r)&&(t.offsets.popper=i(t.offsets.popper),t.offsets.reference=i(t.offsets.reference),t=r(t,n))}),t}function ai(){if(!this.state.isDestroyed){var n={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};n.offsets.reference=at(this.state,this.popper,this.reference,this.options.positionFixed);n.placement=lt(this.options.placement,n.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding);n.originalPlacement=n.placement;n.positionFixed=this.options.positionFixed;n.offsets.popper=yt(this.popper,n.offsets.reference,n.placement);n.offsets.popper.position=this.options.positionFixed?"fixed":"absolute";n=pt(this.modifiers,n);this.state.isCreated?this.options.onUpdate(n):(this.state.isCreated=!0,this.options.onCreate(n))}}function wt(n,t){return n.some(function(n){var i=n.name,r=n.enabled;return r&&i===t})}function d(n){for(var i,r,u=[!1,"ms","Webkit","Moz","O"],f=n.charAt(0).toUpperCase()+n.slice(1),t=0;t<u.length;t++)if(i=u[t],r=i?""+i+f:n,"undefined"!=typeof document.body.style[r])return r;return null}function vi(){return this.state.isDestroyed=!0,wt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[d("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function bt(n){var t=n.ownerDocument;return t?t.defaultView:window}function kt(n,t,i,r){var f="BODY"===n.nodeName,u=f?n.ownerDocument.defaultView:n;u.addEventListener(t,i,{passive:!0});f||kt(s(u.parentNode),t,i,r);r.push(u)}function yi(n,t,i,r){i.updateBound=r;bt(n).addEventListener("resize",i.updateBound,{passive:!0});var u=s(n);return kt(u,"scroll",i.updateBound,i.scrollParents),i.scrollElement=u,i.eventsEnabled=!0,i}function pi(){this.state.eventsEnabled||(this.state=yi(this.reference,this.options,this.state,this.scheduleUpdate))}function wi(n,t){return bt(n).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(n){n.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function bi(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=wi(this.reference,this.state))}function g(n){return""!==n&&!isNaN(parseFloat(n))&&isFinite(n)}function nt(n,t){Object.keys(t).forEach(function(i){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&g(t[i])&&(r="px");n.style[i]=t[i]+r})}function ki(n,t){Object.keys(t).forEach(function(i){var r=t[i];!1===r?n.removeAttribute(i):n.setAttribute(i,t[i])})}function di(n,t){var u=n.offsets,i=u.popper,l=u.reference,r=ti,f=function(n){return n},e=r(l.width),o=r(i.width),a=-1!==["left","right"].indexOf(n.placement),s=-1!==n.placement.indexOf("-"),h=t?a||s||e%2==o%2?r:tt:f,c=t?r:f;return{left:h(1==e%2&&1==o%2&&!s&&t?i.left-1:i.left),top:c(i.top),bottom:c(i.bottom),right:h(i.right)}}function dt(n,t,i){var u=h(n,function(n){var i=n.name;return i===t}),f=!!u&&n.some(function(n){return n.name===i&&n.enabled&&n.order<u.order}),r;return f||(r="`"+t+"`",console.warn("`"+i+"` modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")),f}function gi(n){return"end"===n?"start":"start"===n?"end":n}function gt(n){var r=1<arguments.length&&void 0!==arguments[1]&&arguments[1],t=rt.indexOf(n),i=rt.slice(t+1).concat(rt.slice(0,t));return r?i.reverse():i}function nr(n,r,u,f){var h=n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+h[1],e=h[2],s,c,l;if(!o)return n;if(0===e.indexOf("%")){switch(e){case"%p":s=u;break;case"%":case"%r":default:s=f}return c=i(s),c[r]/100*o}return"vh"===e||"vw"===e?(l="vh"===e?t(document.documentElement.clientHeight,window.innerHeight||0):t(document.documentElement.clientWidth,window.innerWidth||0),l/100*o):o}function tr(n,t,i,r){var s=[0,0],c=-1!==["right","left"].indexOf(r),u=n.split(/(\+|\-)/).map(function(n){return n.trim()}),f=u.indexOf(h(u,function(n){return-1!==n.search(/,|\s/)})),o,e;return u[f]&&-1===u[f].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."),o=/\s*,\s*|\s+/,e=-1===f?[u]:[u.slice(0,f).concat([u[f].split(o)[0]]),[u[f].split(o)[1]].concat(u.slice(f+1))],e=e.map(function(n,r){var f=(1===r?!c:c)?"height":"width",u=!1;return n.reduce(function(n,t){return""===n[n.length-1]&&-1!==["+","-"].indexOf(t)?(n[n.length-1]=t,u=!0,n):u?(n[n.length-1]+=t,u=!1,n):n.concat(t)},[]).map(function(n){return nr(n,f,t,i)})}),e.forEach(function(n,t){n.forEach(function(i,r){g(i)&&(s[t]+=i*("-"===n[r-1]?-1:1))})}),s}function ir(n,t){var r,f=t.offset,o=n.placement,e=n.offsets,i=e.popper,s=e.reference,u=o.split("-")[0];return r=g(+f)?[+f,0]:tr(f,i,s,u),"left"===u?(i.top+=r[0],i.left-=r[1]):"right"===u?(i.top+=r[0],i.left+=r[1]):"top"===u?(i.left+=r[0],i.top-=r[1]):"bottom"===u&&(i.left+=r[0],i.top+=r[1]),n.popper=i,n}for(var ni=Math.min,tt=Math.floor,ti=Math.round,t=Math.max,c="undefined"!=typeof window&&"undefined"!=typeof document,ii=["Edge","Trident","Firefox"],ri=0,it=0;it<ii.length;it+=1)if(c&&0<=navigator.userAgent.indexOf(ii[it])){ri=1;break}var rr=c&&window.Promise,ur=rr?function(n){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1;n()}))}}:function(n){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1;n()},ri))}},ui=c&&!!(window.MSInputMethodContext&&document.documentMode),fi=c&&/MSIE 10/.test(navigator.userAgent),fr=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");},er=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),o=function(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n},n=Object.assign||function(n){for(var t,r,i=1;i<arguments.length;i++)for(r in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},or=c&&/Firefox/i.test(navigator.userAgent),ei=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],rt=ei.slice(3),ut={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},v=function(){function t(i,r){var u=this,f=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},e;fr(this,t);this.scheduleUpdate=function(){return requestAnimationFrame(u.update)};this.update=ur(this.update.bind(this));this.options=n({},t.Defaults,f);this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]};this.reference=i&&i.jquery?i[0]:i;this.popper=r&&r.jquery?r[0]:r;this.options.modifiers={};Object.keys(n({},t.Defaults.modifiers,f.modifiers)).forEach(function(i){u.options.modifiers[i]=n({},t.Defaults.modifiers[i]||{},f.modifiers?f.modifiers[i]:{})});this.modifiers=Object.keys(this.options.modifiers).map(function(t){return n({name:t},u.options.modifiers[t])}).sort(function(n,t){return n.order-t.order});this.modifiers.forEach(function(n){n.enabled&&ft(n.onLoad)&&n.onLoad(u.reference,u.popper,u.options,n,u.state)});this.update();e=this.options.eventsEnabled;e&&this.enableEventListeners();this.state.eventsEnabled=e}return er(t,[{key:"update",value:function(){return ai.call(this)}},{key:"destroy",value:function(){return vi.call(this)}},{key:"enableEventListeners",value:function(){return pi.call(this)}},{key:"disableEventListeners",value:function(){return bi.call(this)}}]),t}();return v.Utils=("undefined"==typeof window?global:window).PopperUtils,v.placements=ei,v.Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var u=t.placement,l=u.split("-")[0],f=u.split("-")[1];if(f){var e=t.offsets,r=e.reference,s=e.popper,h=-1!==["bottom","top"].indexOf(l),i=h?"left":"top",c=h?"width":"height",a={start:o({},i,r[i]),end:o({},i,r[i]+r[c]-s[c])};t.offsets.popper=n({},s,a[f])}return t}},offset:{order:200,enabled:!0,fn:ir,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(i,r){var h=r.boundariesElement||f(i.instance.popper),s;i.instance.reference===h&&(h=f(h));var c=d("transform"),e=i.instance.popper.style,l=e.top,a=e.left,v=e[c];e.top="";e.left="";e[c]="";s=k(i.instance.popper,i.instance.reference,r.padding,h,i.positionFixed);e.top=l;e.left=a;e[c]=v;r.boundaries=s;var y=r.priority,u=i.offsets.popper,p={primary:function(n){var i=u[n];return u[n]<s[n]&&!r.escapeWithReference&&(i=t(u[n],s[n])),o({},n,i)},secondary:function(n){var t="right"===n?"left":"top",i=u[t];return u[n]>s[n]&&!r.escapeWithReference&&(i=ni(u[t],s[n]-("right"===n?u.width:u.height))),o({},t,i)}};return y.forEach(function(t){var i=-1===["left","top"].indexOf(t)?"secondary":"primary";u=n({},u,p[i](t))}),i.offsets.popper=u,i},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(n){var o=n.offsets,u=o.popper,i=o.reference,s=n.placement.split("-")[0],r=tt,f=-1!==["top","bottom"].indexOf(s),e=f?"right":"bottom",t=f?"left":"top",h=f?"width":"height";return u[e]<r(i[t])&&(n.offsets.popper[t]=r(i[t])-u[h]),u[t]>r(i[e])&&(n.offsets.popper[t]=r(i[e])),n}},arrow:{order:500,enabled:!0,fn:function(n,u){var l,e;if(!dt(n.instance.modifiers,"arrow","keepTogether"))return n;if(e=u.element,"string"==typeof e){if(e=n.instance.popper.querySelector(e),!e)return n}else if(!n.instance.popper.contains(e))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),n;var d=n.placement.split("-")[0],b=n.offsets,c=b.popper,s=b.reference,a=-1!==["left","right"].indexOf(d),y=a?"height":"width",p=a?"Top":"Left",f=p.toLowerCase(),g=a?"left":"top",v=a?"bottom":"right",h=vt(e)[y];s[v]-h<c[f]&&(n.offsets.popper[f]-=c[f]-(s[v]-h));s[f]+h>c[v]&&(n.offsets.popper[f]+=s[f]+h-c[v]);n.offsets.popper=i(n.offsets.popper);var nt=s[f]+s[y]/2-h/2,k=r(n.instance.popper),tt=parseFloat(k["margin"+p],10),it=parseFloat(k["border"+p+"Width"],10),w=nt-n.offsets.popper[f]-tt-it;return w=t(ni(c[y]-h,w),0),n.arrowElement=e,n.offsets.arrow=(l={},o(l,f,ti(w)),o(l,g,""),l),n},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,i){if(wt(t.instance.modifiers,"inner")||t.flipped&&t.placement===t.originalPlacement)return t;var e=k(t.instance.popper,t.instance.reference,i.padding,i.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],o=a(r),u=t.placement.split("-")[1]||"",f=[];switch(i.behavior){case ut.FLIP:f=[r,o];break;case ut.CLOCKWISE:f=gt(r);break;case ut.COUNTERCLOCKWISE:f=gt(r,!0);break;default:f=i.behavior}return f.forEach(function(s,h){if(r!==s||f.length===h+1)return t;r=t.placement.split("-")[0];o=a(r);var l=t.offsets.popper,y=t.offsets.reference,c=tt,d="left"===r&&c(l.right)>c(y.left)||"right"===r&&c(l.left)<c(y.right)||"top"===r&&c(l.bottom)>c(y.top)||"bottom"===r&&c(l.top)<c(y.bottom),p=c(l.left)<c(e.left),w=c(l.right)>c(e.right),b=c(l.top)<c(e.top),k=c(l.bottom)>c(e.bottom),g="left"===r&&p||"right"===r&&w||"top"===r&&b||"bottom"===r&&k,v=-1!==["top","bottom"].indexOf(r),it=!!i.flipVariations&&(v&&"start"===u&&p||v&&"end"===u&&w||!v&&"start"===u&&b||!v&&"end"===u&&k),rt=!!i.flipVariationsByContent&&(v&&"start"===u&&w||v&&"end"===u&&p||!v&&"start"===u&&k||!v&&"end"===u&&b),nt=it||rt;(d||g||nt)&&(t.flipped=!0,(d||g)&&(r=f[h+1]),nt&&(u=gi(u)),t.placement=r+(u?"-"+u:""),t.offsets.popper=n({},t.offsets.popper,yt(t.instance.popper,t.offsets.reference,t.placement)),t=pt(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(n){var u=n.placement,t=u.split("-")[0],f=n.offsets,r=f.popper,o=f.reference,e=-1!==["left","right"].indexOf(t),s=-1===["top","left"].indexOf(t);return r[e?"left":"top"]=o[t]-(s?r[e?"width":"height"]:0),n.placement=a(u),n.offsets.popper=i(r),n}},hide:{order:800,enabled:!0,fn:function(n){if(!dt(n.instance.modifiers,"hide","preventOverflow"))return n;var t=n.offsets.reference,i=h(n.instance.modifiers,function(n){return"preventOverflow"===n.name}).boundaries;if(t.bottom<i.top||t.left>i.right||t.top>i.bottom||t.right<i.left){if(!0===n.hide)return n;n.hide=!0;n.attributes["x-out-of-boundaries"]=""}else{if(!1===n.hide)return n;n.hide=!1;n.attributes["x-out-of-boundaries"]=!1}return n}},computeStyle:{order:850,enabled:!0,fn:function(t,i){var g=i.x,nt=i.y,tt=t.offsets.popper,c=h(t.instance.modifiers,function(n){return"applyStyle"===n.name}).gpuAcceleration,p,b,k;void 0!==c&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var l,a,it=void 0===c?i.gpuAcceleration:c,e=f(t.instance.popper),v=w(e),r={position:tt.position},u=di(t,2>window.devicePixelRatio||!or),o="bottom"===g?"top":"bottom",s="right"===nt?"left":"right",y=d("transform");return(a="bottom"==o?"HTML"===e.nodeName?-e.clientHeight+u.bottom:-v.height+u.bottom:u.top,l="right"==s?"HTML"===e.nodeName?-e.clientWidth+u.right:-v.width+u.right:u.left,it&&y)?(r[y]="translate3d("+l+"px, "+a+"px, 0)",r[o]=0,r[s]=0,r.willChange="transform"):(p="bottom"==o?-1:1,b="right"==s?-1:1,r[o]=a*p,r[s]=l*b,r.willChange=o+", "+s),k={"x-placement":t.placement},t.attributes=n({},k,t.attributes),t.styles=n({},r,t.styles),t.arrowStyles=n({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(n){return nt(n.instance.popper,n.styles),ki(n.instance.popper,n.attributes),n.arrowElement&&Object.keys(n.arrowStyles).length&&nt(n.arrowElement,n.arrowStyles),n},onLoad:function(n,t,i,r,u){var f=at(u,t,n,i.positionFixed),e=lt(i.placement,f,t,n,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return t.setAttribute("x-placement",e),nt(t,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}}},v}),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof module=="object"&&module.exports?module.exports=function(t,i){return i===undefined&&(i=typeof window!="undefined"?require("jquery"):require("jquery")(t)),n(i),i}:n(jQuery)}(function(n){function i(i,r,u){typeof u=="string"&&(u={className:u});this.options=ot(p,n.isPlainObject(u)?u:{});this.loadHTML();this.wrapper=n(k.html);this.options.clickToHide&&this.wrapper.addClass(t+"-hidable");this.wrapper.data(t,this);this.arrow=this.wrapper.find("."+t+"-arrow");this.container=this.wrapper.find("."+t+"-container");this.container.append(this.userContainer);i&&i.length&&(this.elementType=i.attr("type"),this.originalElement=i,this.elem=rt(i),this.elem.data(t,this),this.elem.before(this.wrapper));this.container.hide();this.run(r)}var f=[].indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===n)return t;return-1},e="notify",t=e+"js",a=e+"!blank",r={t:"top",m:"middle",b:"bottom",l:"left",c:"center",r:"right"},h=["l","c","r"],v=["t","m","b"],s=["t","b","l","r"],b={t:"b",m:null,b:"t",l:"r",c:null,r:"l"},ut=function(t){var i;return i=[],n.each(t.split(/\W+/),function(n,t){var u;return u=t.toLowerCase().charAt(0),r[u]?i.push(u):void 0}),i},o={},k={name:"core",html:'<div class="'+t+'-wrapper">\n\t<div class="'+t+'-arrow"><\/div>\n\t<div class="'+t+'-container"><\/div>\n<\/div>',css:"."+t+"-corner {\n\tposition: fixed;\n\tmargin: 5px;\n\tz-index: 1050;\n}\n\n."+t+"-corner ."+t+"-wrapper,\n."+t+"-corner ."+t+"-container {\n\tposition: relative;\n\tdisplay: block;\n\theight: inherit;\n\twidth: inherit;\n\tmargin: 3px;\n}\n\n."+t+"-wrapper {\n\tz-index: 1;\n\tposition: absolute;\n\tdisplay: inline-block;\n\theight: 0;\n\twidth: 0;\n}\n\n."+t+"-container {\n\tdisplay: none;\n\tz-index: 1;\n\tposition: absolute;\n}\n\n."+t+"-hidable {\n\tcursor: pointer;\n}\n\n[data-notify-text],[data-notify-html] {\n\tposition: relative;\n}\n\n."+t+"-arrow {\n\tposition: absolute;\n\tz-index: 2;\n\twidth: 0;\n\theight: 0;\n}"},d={"border-radius":["-webkit-","-moz-"]},ft=function(n){return o[n]},et=function(n){if(!n)throw"Missing Style name";o[n]&&delete o[n]},g=function(i,r){var s,u,f,h;if(!i)throw"Missing Style name";if(!r)throw"Missing Style definition";if(!r.html)throw"Missing Style HTML";s=o[i];s&&s.cssElem&&(window.console&&console.warn(e+": overwriting style '"+i+"'"),o[i].cssElem.remove());r.name=i;o[i]=r;u="";r.classes&&n.each(r.classes,function(i,f){return u+="."+t+"-"+r.name+"-"+i+" {\n",n.each(f,function(t,i){return d[t]&&n.each(d[t],function(n,r){return u+="\t"+r+t+": "+i+";\n"}),u+="\t"+t+": "+i+";\n"}),u+="}\n"});r.css&&(u+="/* styles for "+r.name+" */\n"+r.css);u&&(r.cssElem=y(u),r.cssElem.attr("id","notify-"+r.name));f={};h=n(r.html);nt("html",h,f);nt("text",h,f);r.fields=f},y=function(t){var i;i=w("style");i.attr("type","text/css");n("head").append(i);try{i.html(t)}catch(r){i[0].styleSheet.cssText=t}return i},nt=function(t,i,r){var u;return t!=="html"&&(t="text"),u="data-notify-"+t,tt(i,"["+u+"]").each(function(){var i;i=n(this).attr(u);i||(i=a);r[i]=t})},tt=function(n,t){return n.is(t)?n:n.find(t)},p={clickToHide:!0,autoHide:!0,autoHideDelay:5e3,arrowShow:!0,arrowSize:5,breakNewLines:!0,elementPosition:"bottom",globalPosition:"top right",style:"bootstrap",className:"error",showAnimation:"slideDown",showDuration:400,hideAnimation:"slideUp",hideDuration:200,gap:5},ot=function(t,i){var r;return r=function(){},r.prototype=t,n.extend(!0,new r,i)},st=function(t){return n.extend(p,t)},w=function(t){return n("<"+t+"><\/"+t+">")},it={},rt=function(t){var i;return t.is("[type=radio]")&&(i=t.parents("form:first").find("[type=radio]").filter(function(i,r){return n(r).attr("name")===t.attr("name")}),t=i.first()),t},u=function(n,t,i){var u,f;if(typeof i=="string")i=parseInt(i,10);else if(typeof i!="number")return;if(!isNaN(i))return u=r[b[t.charAt(0)]],f=t,n[u]!==undefined&&(t=r[u.charAt(0)],i=-i),n[t]===undefined?n[t]=i:n[t]+=i,null},c=function(n,t,i){if(n==="l"||n==="t")return 0;if(n==="c"||n==="m")return i/2-t/2;if(n==="r"||n==="b")return i-t;throw"Invalid alignment";},l=function(n){return l.e=l.e||w("div"),l.e.text(n).html()};i.prototype.loadHTML=function(){var t;t=this.getStyle();this.userContainer=n(t.html);this.userFields=t.fields};i.prototype.show=function(n,t){var i,f,e,r,u;if(f=function(i){return function(){return n||i.elem||i.destroy(),t?t():void 0}}(this),u=this.container.parent().parents(":hidden").length>0,e=this.container.add(this.arrow),i=[],u&&n)r="show";else if(u&&!n)r="hide";else if(!u&&n)r=this.options.showAnimation,i.push(this.options.showDuration);else{if(!!u||!!n)return f();r=this.options.hideAnimation;i.push(this.options.hideDuration)}return i.push(f),e[r].apply(e,i)};i.prototype.setGlobalPosition=function(){var e=this.getPosition(),o=e[0],s=e[1],c=r[o],f=r[s],h=o+"|"+s,i=it[h],u;return i&&document.body.contains(i[0])||(i=it[h]=w("div"),u={},u[c]=0,f==="middle"?u.top="45%":f==="center"?u.left="45%":u[f]=0,i.css(u).addClass(t+"-corner"),n("body").append(i)),i.prepend(this.wrapper)};i.prototype.setElementPosition=function(){var et,i,e,ot,st,ht,t,d,ct,lt,g,nt,at,y,p,vt,yt,pt,tt,w,it,o,wt,l,a,rt,k,ut,ft;for(k=this.getPosition(),l=k[0],o=k[1],wt=k[2],g=this.elem.position(),d=this.elem.outerHeight(),nt=this.elem.outerWidth(),ct=this.elem.innerHeight(),lt=this.elem.innerWidth(),ft=this.wrapper.position(),st=this.container.height(),ht=this.container.width(),pt=r[l],w=b[l],it=r[w],t={},t[it]=l==="b"?d:l==="r"?nt:0,u(t,"top",g.top-ft.top),u(t,"left",g.left-ft.left),ut=["top","left"],y=0,vt=ut.length;y<vt;y++)a=ut[y],tt=parseInt(this.elem.css("margin-"+a),10),tt&&u(t,a,tt);if(at=Math.max(0,this.options.gap-(this.options.arrowShow?e:0)),u(t,it,at),this.options.arrowShow){for(e=this.options.arrowSize,i=n.extend({},t),et=this.userContainer.css("border-color")||this.userContainer.css("border-top-color")||this.userContainer.css("background-color")||"white",p=0,yt=s.length;p<yt;p++)(a=s[p],rt=r[a],a!==w)&&(ot=rt===pt?et:"transparent",i["border-"+rt]=e+"px solid "+ot);u(t,r[w],e);f.call(s,o)>=0&&u(i,r[o],e*2)}else this.arrow.hide();return f.call(v,l)>=0?(u(t,"left",c(o,ht,nt)),i&&u(i,"left",c(o,e,lt))):f.call(h,l)>=0&&(u(t,"top",c(o,st,d)),i&&u(i,"top",c(o,e,ct))),this.container.is(":visible")&&(t.display="block"),this.container.removeAttr("style").css(t),i?this.arrow.removeAttr("style").css(i):void 0};i.prototype.getPosition=function(){var n,t,i,r,u,e,o,c;if(c=this.options.position||(this.elem?this.options.elementPosition:this.options.globalPosition),n=ut(c),n.length===0&&(n[0]="b"),t=n[0],f.call(s,t)<0)throw"Must be one of ["+s+"]";return(n.length===1||(i=n[0],f.call(v,i)>=0)&&(r=n[1],f.call(h,r)<0)||(u=n[0],f.call(h,u)>=0)&&(e=n[1],f.call(v,e)<0))&&(n[1]=(o=n[0],f.call(h,o)>=0)?"m":"l"),n.length===2&&(n[2]=n[1]),n};i.prototype.getStyle=function(n){var t;if(n||(n=this.options.style),n||(n="default"),t=o[n],!t)throw"Missing style: "+n;return t};i.prototype.updateClasses=function(){var i,r;return i=["base"],n.isArray(this.options.className)?i=i.concat(this.options.className):this.options.className&&i.push(this.options.className),r=this.getStyle(),i=n.map(i,function(n){return t+"-"+r.name+"-"+n}).join(" "),this.userContainer.attr("class",i)};i.prototype.run=function(t,i){var r,u,f,e,o;if(n.isPlainObject(i)?n.extend(this.options,i):n.type(i)==="string"&&(this.options.className=i),this.container&&!t){this.show(!1);return}if(this.container||t){u={};n.isPlainObject(t)?u=t:u[a]=t;for(f in u)(r=u[f],e=this.userFields[f],e)&&(e==="text"&&(r=l(r),this.options.breakNewLines&&(r=r.replace(/\n/g,"<br/>"))),o=f===a?"":"="+f,tt(this.userContainer,"[data-notify-"+e+o+"]").html(r));this.updateClasses();this.elem?this.setElementPosition():this.setGlobalPosition();this.show(!0);this.options.autoHide&&(clearTimeout(this.autohideTimer),this.autohideTimer=setTimeout(this.show.bind(this,!1),this.options.autoHideDelay))}};i.prototype.destroy=function(){this.wrapper.data(t,null);this.wrapper.remove()};n[e]=function(t,r,u){return t&&t.nodeName||t.jquery?n(t)[e](r,u):(u=r,r=t,new i(null,r,u)),t};n.fn[e]=function(r,u){return n(this).each(function(){var f=rt(n(this)).data(t),e;f&&f.destroy();e=new i(n(this),r,u)}),this};n.extend(n[e],{defaults:st,addStyle:g,removeStyle:et,pluginOptions:p,getStyle:ft,insertCSS:y});g("bootstrap",{html:"<div>\n<span data-notify-text><\/span>\n<\/div>",classes:{base:{"font-weight":"bold",padding:"8px 15px 8px 14px","text-shadow":"0 1px 0 rgba(255, 255, 255, 0.5)","background-color":"#fcf8e3",border:"1px solid #fbeed5","border-radius":"4px","white-space":"nowrap","padding-left":"25px","background-repeat":"no-repeat","background-position":"3px 7px"},error:{color:"#B94A48","background-color":"#F2DEDE","border-color":"#EED3D7","background-image":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAtRJREFUeNqkVc1u00AQHq+dOD+0poIQfkIjalW0SEGqRMuRnHos3DjwAH0ArlyQeANOOSMeAA5VjyBxKBQhgSpVUKKQNGloFdw4cWw2jtfMOna6JOUArDTazXi/b3dm55socPqQhFka++aHBsI8GsopRJERNFlY88FCEk9Yiwf8RhgRyaHFQpPHCDmZG5oX2ui2yilkcTT1AcDsbYC1NMAyOi7zTX2Agx7A9luAl88BauiiQ/cJaZQfIpAlngDcvZZMrl8vFPK5+XktrWlx3/ehZ5r9+t6e+WVnp1pxnNIjgBe4/6dAysQc8dsmHwPcW9C0h3fW1hans1ltwJhy0GxK7XZbUlMp5Ww2eyan6+ft/f2FAqXGK4CvQk5HueFz7D6GOZtIrK+srupdx1GRBBqNBtzc2AiMr7nPplRdKhb1q6q6zjFhrklEFOUutoQ50xcX86ZlqaZpQrfbBdu2R6/G19zX6XSgh6RX5ubyHCM8nqSID6ICrGiZjGYYxojEsiw4PDwMSL5VKsC8Yf4VRYFzMzMaxwjlJSlCyAQ9l0CW44PBADzXhe7xMdi9HtTrdYjFYkDQL0cn4Xdq2/EAE+InCnvADTf2eah4Sx9vExQjkqXT6aAERICMewd/UAp/IeYANM2joxt+q5VI+ieq2i0Wg3l6DNzHwTERPgo1ko7XBXj3vdlsT2F+UuhIhYkp7u7CarkcrFOCtR3H5JiwbAIeImjT/YQKKBtGjRFCU5IUgFRe7fF4cCNVIPMYo3VKqxwjyNAXNepuopyqnld602qVsfRpEkkz+GFL1wPj6ySXBpJtWVa5xlhpcyhBNwpZHmtX8AGgfIExo0ZpzkWVTBGiXCSEaHh62/PoR0p/vHaczxXGnj4bSo+G78lELU80h1uogBwWLf5YlsPmgDEd4M236xjm+8nm4IuE/9u+/PH2JXZfbwz4zw1WbO+SQPpXfwG/BBgAhCNZiSb/pOQAAAAASUVORK5CYII=)"},success:{color:"#468847","background-color":"#DFF0D8","border-color":"#D6E9C6","background-image":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAutJREFUeNq0lctPE0Ecx38zu/RFS1EryqtgJFA08YCiMZIAQQ4eRG8eDGdPJiYeTIwHTfwPiAcvXIwXLwoXPaDxkWgQ6islKlJLSQWLUraPLTv7Gme32zoF9KSTfLO7v53vZ3d/M7/fIth+IO6INt2jjoA7bjHCJoAlzCRw59YwHYjBnfMPqAKWQYKjGkfCJqAF0xwZjipQtA3MxeSG87VhOOYegVrUCy7UZM9S6TLIdAamySTclZdYhFhRHloGYg7mgZv1Zzztvgud7V1tbQ2twYA34LJmF4p5dXF1KTufnE+SxeJtuCZNsLDCQU0+RyKTF27Unw101l8e6hns3u0PBalORVVVkcaEKBJDgV3+cGM4tKKmI+ohlIGnygKX00rSBfszz/n2uXv81wd6+rt1orsZCHRdr1Imk2F2Kob3hutSxW8thsd8AXNaln9D7CTfA6O+0UgkMuwVvEFFUbbAcrkcTA8+AtOk8E6KiQiDmMFSDqZItAzEVQviRkdDdaFgPp8HSZKAEAL5Qh7Sq2lIJBJwv2scUqkUnKoZgNhcDKhKg5aH+1IkcouCAdFGAQsuWZYhOjwFHQ96oagWgRoUov1T9kRBEODAwxM2QtEUl+Wp+Ln9VRo6BcMw4ErHRYjH4/B26AlQoQQTRdHWwcd9AH57+UAXddvDD37DmrBBV34WfqiXPl61g+vr6xA9zsGeM9gOdsNXkgpEtTwVvwOklXLKm6+/p5ezwk4B+j6droBs2CsGa/gNs6RIxazl4Tc25mpTgw/apPR1LYlNRFAzgsOxkyXYLIM1V8NMwyAkJSctD1eGVKiq5wWjSPdjmeTkiKvVW4f2YPHWl3GAVq6ymcyCTgovM3FzyRiDe2TaKcEKsLpJvNHjZgPNqEtyi6mZIm4SRFyLMUsONSSdkPeFtY1n0mczoY3BHTLhwPRy9/lzcziCw9ACI+yql0VLzcGAZbYSM5CCSZg1/9oc/nn7+i8N9p/8An4JMADxhH+xHfuiKwAAAABJRU5ErkJggg==)"},info:{color:"#3A87AD","background-color":"#D9EDF7","border-color":"#BCE8F1","background-image":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QYFAhkSsdes/QAAA8dJREFUOMvVlGtMW2UYx//POaWHXg6lLaW0ypAtw1UCgbniNOLcVOLmAjHZolOYlxmTGXVZdAnRfXQm+7SoU4mXaOaiZsEpC9FkiQs6Z6bdCnNYruM6KNBw6YWewzl9z+sHImEWv+vz7XmT95f/+3/+7wP814v+efDOV3/SoX3lHAA+6ODeUFfMfjOWMADgdk+eEKz0pF7aQdMAcOKLLjrcVMVX3xdWN29/GhYP7SvnP0cWfS8caSkfHZsPE9Fgnt02JNutQ0QYHB2dDz9/pKX8QjjuO9xUxd/66HdxTeCHZ3rojQObGQBcuNjfplkD3b19Y/6MrimSaKgSMmpGU5WevmE/swa6Oy73tQHA0Rdr2Mmv/6A1n9w9suQ7097Z9lM4FlTgTDrzZTu4StXVfpiI48rVcUDM5cmEksrFnHxfpTtU/3BFQzCQF/2bYVoNbH7zmItbSoMj40JSzmMyX5qDvriA7QdrIIpA+3cdsMpu0nXI8cV0MtKXCPZev+gCEM1S2NHPvWfP/hL+7FSr3+0p5RBEyhEN5JCKYr8XnASMT0xBNyzQGQeI8fjsGD39RMPk7se2bd5ZtTyoFYXftF6y37gx7NeUtJJOTFlAHDZLDuILU3j3+H5oOrD3yWbIztugaAzgnBKJuBLpGfQrS8wO4FZgV+c1IxaLgWVU0tMLEETCos4xMzEIv9cJXQcyagIwigDGwJgOAtHAwAhisQUjy0ORGERiELgG4iakkzo4MYAxcM5hAMi1WWG1yYCJIcMUaBkVRLdGeSU2995TLWzcUAzONJ7J6FBVBYIggMzmFbvdBV44Corg8vjhzC+EJEl8U1kJtgYrhCzgc/vvTwXKSib1paRFVRVORDAJAsw5FuTaJEhWM2SHB3mOAlhkNxwuLzeJsGwqWzf5TFNdKgtY5qHp6ZFf67Y/sAVadCaVY5YACDDb3Oi4NIjLnWMw2QthCBIsVhsUTU9tvXsjeq9+X1d75/KEs4LNOfcdf/+HthMnvwxOD0wmHaXr7ZItn2wuH2SnBzbZAbPJwpPx+VQuzcm7dgRCB57a1uBzUDRL4bfnI0RE0eaXd9W89mpjqHZnUI5Hh2l2dkZZUhOqpi2qSmpOmZ64Tuu9qlz/SEXo6MEHa3wOip46F1n7633eekV8ds8Wxjn37Wl63VVa+ej5oeEZ/82ZBETJjpJ1Rbij2D3Z/1trXUvLsblCK0XfOx0SX2kMsn9dX+d+7Kf6h8o4AIykuffjT8L20LU+w4AZd5VvEPY+XpWqLV327HR7DzXuDnD8r+ovkBehJ8i+y8YAAAAASUVORK5CYII=)"},warn:{color:"#C09853","background-color":"#FCF8E3","border-color":"#FBEED5","background-image":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABJlBMVEXr6eb/2oD/wi7/xjr/0mP/ykf/tQD/vBj/3o7/uQ//vyL/twebhgD/4pzX1K3z8e349vK6tHCilCWbiQymn0jGworr6dXQza3HxcKkn1vWvV/5uRfk4dXZ1bD18+/52YebiAmyr5S9mhCzrWq5t6ufjRH54aLs0oS+qD751XqPhAybhwXsujG3sm+Zk0PTwG6Shg+PhhObhwOPgQL4zV2nlyrf27uLfgCPhRHu7OmLgAafkyiWkD3l49ibiAfTs0C+lgCniwD4sgDJxqOilzDWowWFfAH08uebig6qpFHBvH/aw26FfQTQzsvy8OyEfz20r3jAvaKbhgG9q0nc2LbZxXanoUu/u5WSggCtp1anpJKdmFz/zlX/1nGJiYmuq5Dx7+sAAADoPUZSAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfdBgUBGhh4aah5AAAAlklEQVQY02NgoBIIE8EUcwn1FkIXM1Tj5dDUQhPU502Mi7XXQxGz5uVIjGOJUUUW81HnYEyMi2HVcUOICQZzMMYmxrEyMylJwgUt5BljWRLjmJm4pI1hYp5SQLGYxDgmLnZOVxuooClIDKgXKMbN5ggV1ACLJcaBxNgcoiGCBiZwdWxOETBDrTyEFey0jYJ4eHjMGWgEAIpRFRCUt08qAAAAAElFTkSuQmCC)"}}});n(function(){y(k.css).attr("id","core-notify");n(document).on("click","."+t+"-hidable",function(){n(this).trigger("notify-hide")});n(document).on("notify-hide","."+t+"-wrapper",function(){var i=n(this).data(t);i&&i.show(!1)})})})