text: PrimeFaces.widget.Spotlight=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.target=PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector(this.cfg.target);this.eventsToBlock="focus."+this.id+" mousedown."+this.id+" mouseup."+this.id;if(!$(document.body).children(".ui-spotlight").length){this.createMasks()}},createMasks:function(){$(document.body).append('<div class="ui-widget-overlay ui-spotlight ui-spotlight-top ui-helper-hidden"></div><div class="ui-widget-overlay ui-spotlight ui-spotlight-bottom ui-helper-hidden"></div><div class="ui-widget-overlay ui-spotlight ui-spotlight-left ui-helper-hidden"></div><div class="ui-widget-overlay ui-spotlight ui-spotlight-right ui-helper-hidden"></div>')},show:function(){var h=$(document),c=$(document.body),a=this.target.offset(),e=c.children("div.ui-spotlight-top"),b=c.children("div.ui-spotlight-bottom"),i=c.children("div.ui-spotlight-left"),d=c.children("div.ui-spotlight-right");e.css({left:0,top:0,width:h.width(),height:a.top});var f=a.top+this.target.outerHeight();b.css({left:0,top:f,width:h.width(),height:h.height()-f});i.css({left:0,top:a.top,width:a.left,height:this.target.outerHeight()});var g=a.left+this.target.outerWidth();d.css({left:g,top:a.top,width:h.width()-g,height:this.target.outerHeight()});e.appendTo(document.body).show();b.appendTo(document.body).show();i.appendTo(document.body).show();d.appendTo(document.body).show();this.blockEvents()},blockEvents:function(){var a=this;this.target.data("zindex",this.target.zIndex()).css("z-index",++PrimeFaces.zindex);$(document).on("keydown."+this.id,function(d){var e=$(d.target);if(d.keyCode===$.ui.keyCode.TAB){var c=a.target.find(":tabbable");if(c.length){var f=c.filter(":first"),b=c.filter(":last");if(e.is(document.body)){f.focus(1);d.preventDefault()}else{if(d.target===b[0]&&!d.shiftKey){f.focus(1);d.preventDefault()}else{if(d.target===f[0]&&d.shiftKey){b.focus(1);d.preventDefault()}}}}}else{if(!e.is(document.body)&&(e.zIndex()<a.target.zIndex())){d.preventDefault()}}}).on(this.eventsToBlock,function(b){if($(b.target).zIndex()<a.target.zIndex()){b.preventDefault()}})},unblockEvents:function(){$(document).off(this.eventsToBlock).off("keydown."+this.id)},hide:function(){$(document.body).children(".ui-spotlight").hide();this.unblockEvents();this.target.css("z-index",this.target.zIndex())}});