(function(){function b(c){function b(g,a){var k,h,e=g==window,f=a&&void 0!==a.message?a.message:void 0;a=c.extend({},c.blockUI.defaults,a||{});if(!a.ignoreIfBlocked||!c(g).data("blockUI.isBlocked")){a.overlayCSS=c.extend({},c.blockUI.defaults.overlayCSS,a.overlayCSS||{});k=c.extend({},c.blockUI.defaults.css,a.css||{});a.onOverlayClick&&(a.overlayCSS.cursor="pointer");h=c.extend({},c.blockUI.defaults.themedCSS,a.themedCSS||{});f=void 0===f?a.message:f;e&&q&&n(window,{fadeOut:0});if(f&&"string"!=typeof f&&
(f.parentNode||f.jquery)){var m=f.jquery?f[0]:f,d={};c(g).data("blockUI.history",d);d.el=m;d.parent=m.parentNode;d.display=m.style.display;d.position=m.style.position;d.parent&&d.parent.removeChild(m)}c(g).data("blockUI.onUnblock",a.onUnblock);var d=a.baseZ,l;l=u||a.forceIframe?c('\x3ciframe class\x3d"blockUI" style\x3d"z-index:'+d++ +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src\x3d"'+a.iframeSrc+'"\x3e\x3c/iframe\x3e'):c('\x3cdiv class\x3d"blockUI" style\x3d"display:none"\x3e\x3c/div\x3e');
m=a.theme?c('\x3cdiv class\x3d"blockUI blockOverlay ui-widget-overlay" style\x3d"z-index:'+d++ +';display:none"\x3e\x3c/div\x3e'):c('\x3cdiv class\x3d"blockUI blockOverlay" style\x3d"z-index:'+d++ +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"\x3e\x3c/div\x3e');a.theme&&e?(d='\x3cdiv class\x3d"blockUI '+a.blockMsgClass+' blockPage pe-blockui ui-widget ui-corner-all" style\x3d"z-index:'+(d+10)+';display:none;position:fixed"\x3e',a.title&&(d+='\x3cdiv class\x3d"ui-widget-header pe-blockui-titlebar ui-corner-all blockTitle"\x3e'+
(a.title||"\x26nbsp;")+"\x3c/div\x3e"),d+='\x3cdiv class\x3d"ui-widget-content pe-blockui-content"\x3e\x3c/div\x3e\x3c/div\x3e'):a.theme?(d='\x3cdiv class\x3d"blockUI '+a.blockMsgClass+' blockElement pe-blockui ui-widget ui-corner-all" style\x3d"z-index:'+(d+10)+';display:none;position:absolute"\x3e',a.title&&(d+='\x3cdiv class\x3d"ui-widget-header pe-blockui-titlebar ui-corner-all blockTitle"\x3e'+(a.title||"\x26nbsp;")+"\x3c/div\x3e"),d+='\x3cdiv class\x3d"ui-widget-content pe-blockui-content"\x3e\x3c/div\x3e',
d+="\x3c/div\x3e"):d=e?'\x3cdiv class\x3d"blockUI '+a.blockMsgClass+' blockPage" style\x3d"z-index:'+(d+10)+';display:none;position:fixed"\x3e\x3c/div\x3e':'\x3cdiv class\x3d"blockUI '+a.blockMsgClass+' blockElement" style\x3d"z-index:'+(d+10)+';display:none;position:absolute"\x3e\x3c/div\x3e';d=c(d);f&&(a.theme?(d.css(h),d.addClass("ui-widget-content")):d.css(k));m.css(a.overlayCSS);m.css("position",e?"fixed":"absolute");(u||a.forceIframe)&&l.css("opacity",0);k=[l,m,d];var p=e?c("body"):c(g);c.each(k,
function(){this.appendTo(p)});a.theme&&a.draggable&&c.fn.draggable&&d.draggable({handle:".pe-blockui-titlebar",cancel:"li"});h=B&&(!c.support.boxModel||0<c("object,embed",e?null:g).length);if(w||h){e&&a.allowBodyStretch&&c.support.boxModel&&c("html,body").css("height","100%");if((w||!c.support.boxModel)&&!e){h=parseInt(c.css(g,"borderTopWidth"),10)||0;var t=parseInt(c.css(g,"borderLeftWidth"),10)||0,x=h?"(0 - "+h+")":0,y=t?"(0 - "+t+")":0}c.each(k,function(c,g){var b=g[0].style;b.position="absolute";
if(2>c)e?b.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+a.quirksmodeOffsetHack+') + "px"'):b.setExpression("height",'this.parentNode.offsetHeight + "px"'),e?b.setExpression("width",'jQuery.support.boxModel \x26\x26 document.documentElement.clientWidth || document.body.clientWidth + "px"'):b.setExpression("width",'this.parentNode.offsetWidth + "px"'),y&&b.setExpression("left",y),x&&b.setExpression("top",x);else if(a.centerY)e&&
b.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah \x3d document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),b.marginTop=0;else if(!a.centerY&&e){var d="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(a.css&&a.css.top?parseInt(a.css.top,10):0)+') + "px"';b.setExpression("top",d)}})}f&&(a.theme?d.find(".ui-widget-content").append(f):
d.append(f),(f.jquery||f.nodeType)&&c(f).show());(u||a.forceIframe)&&a.showOverlay&&l.show();if(a.fadeIn)k=a.onBlock?a.onBlock:v,l=a.showOverlay&&!f?k:v,k=f?k:v,a.showOverlay&&m._fadeIn(a.fadeIn,l),f&&d._fadeIn(a.fadeIn,k);else if(a.showOverlay&&m.show(),f&&d.show(),a.onBlock)a.onBlock();z(1,g,a);e?(q=d[0],r=c(a.focusableElements,q),a.focusInput&&setTimeout(A,20)):C(d[0],a.centerX,a.centerY);a.timeout&&(f=setTimeout(function(){e?c.unblockUI(a):c(g).unblock(a)},a.timeout),c(g).data("blockUI.timeout",
f))}}function n(g,a){var b,h=g==window,e=c(g),f=e.data("blockUI.history"),m=e.data("blockUI.timeout");m&&(clearTimeout(m),e.removeData("blockUI.timeout"));a=c.extend({},c.blockUI.defaults,a||{});z(0,g,a);null===a.onUnblock&&(a.onUnblock=e.data("blockUI.onUnblock"),e.removeData("blockUI.onUnblock"));var d;d=h?c("body").children().filter(".blockUI").add("body \x3e .blockUI"):e.find("\x3e.blockUI");a.cursorReset&&(1<d.length&&(d[1].style.cursor=a.cursorReset),2<d.length&&(d[2].style.cursor=a.cursorReset));
h&&(q=r=null);a.fadeOut?(b=d.length,d.stop().fadeOut(a.fadeOut,function(){0===--b&&p(d,f,a,g)})):p(d,f,a,g)}function p(g,a,b,h){var e=c(h);if(!e.data("blockUI.isBlocked")){g.each(function(a,c){this.parentNode&&this.parentNode.removeChild(this)});a&&a.el&&(a.el.style.display=a.display,a.el.style.position=a.position,a.parent&&a.parent.appendChild(a.el),e.removeData("blockUI.history"));e.data("blockUI.static")&&e.css("position","static");if("function"==typeof b.onUnblock)b.onUnblock(h,b);g=c(document.body);
a=g.width();b=g[0].style.width;g.width(a-1).width(a);g[0].style.width=b}}function z(b,a,k){var h=a==window;a=c(a);if(b||(!h||q)&&(h||a.data("blockUI.isBlocked")))a.data("blockUI.isBlocked",b),h&&k.bindEvents&&(!b||k.showOverlay)&&(b?c(document).bind("mousedown mouseup keydown keypress keyup touchstart touchend touchmove",k,t):c(document).unbind("mousedown mouseup keydown keypress keyup touchstart touchend touchmove",t))}function t(b){if("keydown"===b.type&&b.keyCode&&9==b.keyCode&&q&&b.data.constrainTabKey){var a=
r,k=b.shiftKey&&b.target===a[0];if(!b.shiftKey&&b.target===a[a.length-1]||k)return setTimeout(function(){A(k)},10),!1}a=b.data;b=c(b.target);if(b.hasClass("blockOverlay")&&a.onOverlayClick)a.onOverlayClick();return 0<b.parents("div."+a.blockMsgClass).length?!0:0===b.parents().children().filter("div.blockUI").length}function A(c){r&&(c=r[!0===c?r.length-1:0])&&c.focus()}function C(b,a,k){var h=b.parentNode,e=b.style,f=(h.offsetWidth-b.offsetWidth)/2-(parseInt(c.css(h,"borderLeftWidth"),10)||0);b=(h.offsetHeight-
b.offsetHeight)/2-(parseInt(c.css(h,"borderTopWidth"),10)||0);a&&(e.left=0<f?f+"px":"0");k&&(e.top=0<b?b+"px":"0")}c.fn._fadeIn=c.fn.fadeIn;var v=c.noop||function(){},u=/MSIE/.test(navigator.userAgent),w=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),B=c.isFunction(document.createElement("div").style.setExpression);c.blockUI=function(c){b(window,c)};c.unblockUI=function(c){n(window,c)};c.growlUI=function(b,a,k,h){var e=c('\x3cdiv class\x3d"growlUI"\x3e\x3c/div\x3e');b&&
e.append("\x3ch1\x3e"+b+"\x3c/h1\x3e");a&&e.append("\x3ch2\x3e"+a+"\x3c/h2\x3e");void 0===k&&(k=3E3);var f=function(a){a=a||{};c.blockUI({message:e,fadeIn:"undefined"!==typeof a.fadeIn?a.fadeIn:700,fadeOut:"undefined"!==typeof a.fadeOut?a.fadeOut:1E3,timeout:"undefined"!==typeof a.timeout?a.timeout:k,centerY:!1,showOverlay:!1,onUnblock:h,css:c.blockUI.defaults.growlCSS})};f();e.css("opacity");e.mouseover(function(){f({fadeIn:0,timeout:3E4});var a=c(".blockMsg");a.stop();a.fadeTo(300,1)}).mouseout(function(){c(".blockMsg").fadeOut(1E3)})};
c.fn.block=function(g){if(this[0]===window)return c.blockUI(g),this;var a=c.extend({},c.blockUI.defaults,g||{});this.each(function(){var b=c(this);a.ignoreIfBlocked&&b.data("blockUI.isBlocked")||b.unblock({fadeOut:0})});return this.each(function(){"static"==c.css(this,"position")&&(this.style.position="relative",c(this).data("blockUI.static",!0));this.style.zoom=1;b(this,g)})};c.fn.unblock=function(b){return this[0]===window?(c.unblockUI(b),this):this.each(function(){n(this,b)})};c.blockUI.version=
2.6;c.blockUI.defaults={message:"\x3ch1\x3ePlease wait...\x3c/h1\x3e",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"auto",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"auto",top:"40%",left:"35%"},overlayCSS:{cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px",
"-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1E3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var q=null,r=[]}"function"===typeof define&&
define.amd&&define.amd.jQuery?define(["jquery"],b):b(jQuery)})();
PrimeFacesExt.widget.BlockUI=PrimeFaces.widget.BaseWidget.extend({init:function(b){this.id=b.id;this.source=b.source;this.target=b.target;this.contentId=b.content;this.contentExtern=b.contentExtern;this.namingContSep=b.namingContSep;this.eventRegEx=b.regEx;this.css=b.css;this.overlayCSS=b.overlayCSS;this.timeout=b.timeout;this.centerX=b.centerX;this.centerY=b.centerY;b.autoShow&&this.setupAjaxHandlers();$.blockUI.defaults.theme=!0;$.blockUI.defaults.ignoreIfBlocked=!0;this.removeScriptElement(this.id)},
refresh:function(b){$(document).off("pfAjaxSend."+this.id+" pfAjaxComplete."+this.id);this._super(b)},setupAjaxHandlers:function(){var b=this,c=$(document);c.on("pfAjaxSend."+this.id,function(c,n,p){c=PrimeFaces.expressions.SearchExpressionFacade.resolveComponents(b.source);b.isAppropriateEvent(c,p)&&b.block()});c.on("pfAjaxComplete."+this.id,function(c,n,p){c=PrimeFaces.expressions.SearchExpressionFacade.resolveComponents(b.source);b.isAppropriateEvent(c,p)&&b.unblock()})},block:function(){var b;
if(this.target){var c=PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector(this.target);0<c.length&&((b=this.getOptions())?c.block(b):c.block(),b=c.data("blockUI.blocksCount"),"undefined"===typeof b&&(b=0),c.data("blockUI.blocksCount",b+1))}else(b=this.getOptions())?$.blockUI(b):$.blockUI()},unblock:function(){if(this.target){var b=PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector(this.target);if(0<b.length){var c=b.data("blockUI.blocksCount");"undefined"!==
typeof c&&(1==c?(b.unblock(),b.data("blockUI.blocksCount",0)):1<c&&b.data("blockUI.blocksCount",c-1))}}else $.unblockUI()},getOptions:function(){var b=null;null!=this.contentId&&(b={},b.message=this.contentExtern?$(this.contentId).clone().show().wrap("\x3cdiv\x3e").parent().html():$(this.contentId).html(),this.css&&(b.themedCSS=this.css),this.overlayCSS&&(b.overlayCSS=this.overlayCSS),this.timeout&&(b.timeout=this.timeout),b.centerX=this.centerX,b.centerY=this.centerY);return b},isAppropriateEvent:function(b,
c){if("undefined"===typeof c||null==c||null==c.source||"undefined"===typeof c.data||null==c.data)return!1;var l;"[object String]"===Object.prototype.toString.call(c.source)?l=c.source:(l=c.source.id.lastIndexOf(this.namingContSep),l=-1==l?c.source.id:c.source.id.substring(0,l));if(-1==$.inArray(l,b))return!1;l=c.data.split(/&/g);for(var n=0;n<l.length;n++)if(this.eventRegEx.test(l[n]))return!0;return!1}});
//# sourceMappingURL=https://raw.githubusercontent.com/primefaces-extensions/core/master/src/sourcemap/3.2.0/blockui.js.map