1"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}var LiveBox={initSettings:{},url:null,contentText:null,contentSelector:null,fullscreen:!1,width:null,height:null,showCloseButton:!0,closeViaBackdrop:!0,closeViaContent:!1,closeViaESC:!0,beforeShow:null,beforeShown:null,afterShown:null,beforeClose:null,afterClose:null,ajaxBeforeSend:null,ajaxSuccess:null,ajaxError:null,ajaxComplete:null,parent:"body",customParams:{},ajaxSettings:{},wrapperOptions:{class:["livebox","livebox-wrapper"]},backdropOptions:{class:["livebox-backdrop"],"data-fadespeed":150},loadingOptions:{class:["livebox-loading"],"data-fadespeed":150,"data-color":"blue"},popupOptions:{class:["livebox-popup"]},getSpinnerMarkup:function(){return'<div class="loader"><svg class="circular" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/> </svg></div>'},getMarkup:function(){return"<div {wrapperOptions}> <div {backdropOptions}></div> <div {loadingOptions}>"+this.getSpinnerMarkup()+"</div> <div {popupOptions}></div></div>"},_lid:null,_plid:null,_order:0,_mode:null,_loadingTimeout:null,_contentRetrieved:!1,_content:null,_virtualKeyboardActive:null,_triggerEl:null,_formInside:!1,_documentWidthBeforeShow:null,_defaultSpinnerCssTemplate:"@-webkit-keyframes loading-color{0%,100%,40%,66%,80%,90%{stroke:@colorLoading}}@-moz-keyframes loading-color{0%,100%,40%,66%,80%,90%{stroke:@colorLoading}}@-ms-keyframes loading-color{0%,100%,40%,66%,80%,90%{stroke:@colorLoading}}@-o-keyframes loading-color{0%,100%,40%,66%,80%,90%{stroke:@colorLoading}}@keyframes loading-color{0%,100%,40%,66%,80%,90%{stroke:@colorLoading}}",init:function(initOptions){window.LiveBoxInstances=[],this._registerEventsHandlers(),this._handleInitOptions(initOptions)},create:function(paramsOrEl){var inst=jQuery.extend({},this);return inst._loadParams(paramsOrEl),inst._setPrivateParams(),LiveBoxInstances.push(inst),inst},destroy:function(){this._removeInstance()},close:function(callback){var lbi=this,r=!0;lbi.beforeClose&&(r=lbi.beforeClose()),!1!==r&&(lbi._getPopupEl().removeClass("shown"),lbi._getBackdropEl().fadeTo(lbi._getBackdropEl().data("fadespeed"),0,null,function(){document.documentElement.style.width=lbi._documentWidthBeforeShow,lbi._getBackdropEl().removeClass("shown"),lbi._getWrapperEl().remove(),lbi.afterClose&&lbi.afterClose(),lbi._removeInstance(),0==LiveBoxInstances.length&&($("html").removeClass("livebox-open"),document.documentElement.removeAttribute("style")),callback&&callback()}))},closeAll:function(){for(var i=0;i<LiveBoxInstances.length;i++)LiveBoxInstances[i].close()},show:function(paramsOrEl_optional){var lbi=this;return lbi.beforeShow&&lbi.beforeShow(),null!=paramsOrEl_optional&&(lbi=this.create(paramsOrEl_optional)),lbi._injectMarkup(),lbi._showBackdrop(),lbi._retrieveContent()?("ajax"!=lbi._mode&&lbi._contentRetrieved?(lbi._setContent(),lbi._showPopupEl()):lbi._loadingTimeout=setTimeout(function(){lbi._startLoading()},150),!0):(lbi.destroy(),!1)},set:function set(paramName,paramValue){var isArray=function(a){return!!a&&a.constructor===Array},isObject=function(a){return!!a&&a.constructor===Object};"string"==typeof paramValue&&(paramName.endsWith("Params")||paramName.endsWith("Options")||paramName.endsWith("Settings"))&&(paramValue=eval("("+paramValue+")")),isArray(paramValue)||isObject(paramValue)?this[paramName]=this._merge(this[paramName],paramValue):this[paramName]=paramValue},getTopInstance:function(){return LiveBoxInstances.slice(-1)[0]},ensureProperPosition:function(){this._isLiveboxHigherThanWindow(!0)?this._getWrapperEl().addClass("higher-than-window"):this._getWrapperEl().removeClass("higher-than-window")},getInstance:function(lid){for(var i=0;i<LiveBoxInstances.length;i++)if(LiveBoxInstances[i]._lid==lid)return LiveBoxInstances[i];return!1},_getWrapperEl:function(){return $('.livebox-wrapper[data-lid="'+this._lid+'"]')},_getBackdropEl:function(){return this._getWrapperEl().find(".livebox-backdrop")},_getLoadingEl:function(){return this._getWrapperEl().find(".livebox-loading")},_getPopupEl:function(){return this._getWrapperEl().find(".livebox-popup")},_getCloseEl:function(){return this._getPopupEl().find(".livebox-close")},_handleInitOptions:function(initSettings){this.initSettings=this._merge(this.initSettings,initSettings);var inst=this;$.each(this.initSettings,function(k,v){inst.set(k,v)}),$("body").append('<style id="latest-livebox-specific-style"></style>')},_showDownloadedContent:function(){var lbi=this;lbi._setContent(),lbi._stopLoading(function(){lbi.ensureProperPosition(),lbi._showPopupEl()})},_retrieveContent:function(){var lbi=this;if(lbi._contentRetrieved=!1,lbi.contentText)return lbi._content=lbi.contentText,lbi._contentRetrieved=!0,lbi._mode="contentText",!0;
1if(lbi.contentSelector)return $(lbi.contentSelector).length<1?(console.error('LiveBox: Element "'+lbi.contentSelector+'" requested via contentSelector does not exist.'),!1):(lbi._content=$(lbi.contentSelector).html(),lbi._contentRetrieved=!0,lbi._mode="contentSelector",!0);var url=lbi.url;if(null!=lbi._triggerEl&&lbi._triggerEl[0].hasAttribute("href")&&(null==url||""==url||"#"==url)){var href=lbi._triggerEl.attr("href");null!=href&&""!=href&&"#"!=href&&(url=href)}return null!=url&&""!=url&&"#"!=url?(lbi._mode="ajax",$.ajax(lbi._merge({type:"GET",cache:!1,url:url,beforeSend:function(xhr,settings){xhr.setRequestHeader("X-LIVEBOX",!0),xhr.setRequestHeader("X-LIVEBOX-Container","#"+lbi.wrapperOptions.id),lbi.ajaxBeforeSend&&lbi.ajaxBeforeSend(xhr,settings)},success:function(result,status,xhr){lbi._content=result,lbi.ajaxSuccess&&lbi.ajaxSuccess(result,status,xhr),lbi._contentRetrieved=!0},error:function(xhr,status,_error){lbi._content="Ajax error response.",lbi.ajaxError&&lbi.ajaxError(xhr,status,_error)},complete:function(event,xhr,settings){lbi._contentRetrieved=!0,lbi._showDownloadedContent(),clearTimeout(lbi._loadingTimeout),lbi.ajaxComplete&&lbi.ajaxComplete(event,xhr,settings)}},lbi.ajaxSettings)),!0):(console.error("LiveBox: No content retrievable method was provided. Set contentText, contentSelector, url or valid href attribute."),!1)},_setContent:function(){if(!this._content)return!1;this._getPopupEl().html(this._content),0<this._getPopupEl().find("form").length&&(this._formInside=!0),this._contentRetrieved=!1,this._content=null,this._injectAddonsToContent()},_showBackdrop:function(callback){var lbi=this;lbi._getWrapperEl().show().addClass("shown"),lbi._getBackdropEl().fadeTo(lbi._getBackdropEl().data("fadespeed"),1,null,function(){lbi._getBackdropEl().addClass("shown"),callback&&callback()})},_startLoading:function(){$("#latest-livebox-specific-style").html(this._defaultSpinnerCssTemplate.replace(/@colorLoading/g,this._getLoadingEl().data("color"))),this._getLoadingEl().fadeTo(this._getLoadingEl().data("fadespeed"),1)},_stopLoading:function(callback){this._getLoadingEl().fadeTo(this._getLoadingEl().data("fadespeed"),0,function(){callback()})},_removeInstance:function(){for(var i=0;i<LiveBoxInstances.length;i++)if(LiveBoxInstances[i]._lid==this._lid){LiveBoxInstances.splice(i,1);break}},_injectAddonsToContent:function(){var lbi=this;this.showCloseButton&&this._getPopupEl().prepend('<span class="livebox-close-btn close-livebox">×</span>'),this.closeViaBackdrop&&this._getWrapperEl().click(function(e){$(e.target).hasClass("livebox-wrapper")&&$(e.target).find(".livebox-popup").closestLiveBox().close()}),1==this.closeViaContent&&this._getPopupEl().click(function(){lbi.close()}),1==this.closeViaESC&&$(document).keydown(function(e){27==e.keyCode&&lbi.close()})},_showPopupEl:function(){this.beforeShown&&this.beforeShown(),$("html").addClass("livebox-open");var scrollBarWidth=this._getScrollbarWidth(),doc=document.documentElement;this._documentWidthBeforeShow=doc.style.width,doc.style.width="initial",this._isLiveboxHigherThanWindow()?doc.style.paddingRight=scrollBarWidth+"px":doc.scrollHeight>doc.clientHeight&&(doc.style.paddingRight=scrollBarWidth+"px"),this.ensureProperPosition(),this._getPopupEl().addClass("shown"),this.afterShown&&this.afterShown()},_isJson:function(str){try{JSON.parse(str)}catch(e){return!1}return!0},_setPrivateParams:function(){if(this._lid=Math.random().toString(36).substring(3),this._order=LiveBoxInstances.length,this.set("wrapperOptions",{"data-lid":this._lid,id:"livebox-"+this._lid}),this.set("wrapperOptions",{"data-order":this._order}),this.fullscreen&&this.set("wrapperOptions",{class:["fullscreen"]}),this.width&&this.set("popupOptions",{style:{width:this.width}}),this.height&&this.set("popupOptions",{style:{height:this.height}}),this._triggerEl){var parentLbi=$(this._triggerEl).closest(".livebox");0<parentLbi.length&&(this._plid=parentLbi.data("lid"),this.set("wrapperOptions",{"data-plid":this._plid}))}},_findAll:function(elems,selector){return elems.filter(selector).add(elems.find(selector))},_merge:function(array1,array2){var array_merge=function(){var arg,args=Array.prototype.slice.call(arguments),argl=args.length,retObj={},k="",argil=0,j=0,i=0,ct=0,toStr=Object.prototype.toString,retArr=!0;for(i=0;i<argl;i++)if("[object Array]"!==toStr.call(args[i])){retArr=!1;break}if(retArr){for(retArr=[],i=0;i<argl;i++)retArr=retArr.concat(args[i]);return retArr}for(ct=i=0;i<argl;i++)if(arg=args[i],"[object Array]"===toStr.call(arg))for(j=0,argil=
1arg.length;j<argil;j++)retObj[ct++]=arg[j];else for(k in arg)arg.hasOwnProperty(k)&&(parseInt(k,10)+""===k?retObj[ct++]=arg[k]:retObj[k]=arg[k]);return retObj},clone=function(obj){if(null==obj||"object"!=_typeof(obj))return obj;var copy=obj.constructor();for(var attr in obj)obj.hasOwnProperty(attr)&&(copy[attr]=obj[attr]);return copy};return function(a1,a2){var arr1=clone(a1),arr2=clone(a2),idx="";if(arr1&&"[object Array]"===Object.prototype.toString.call(arr1)&&arr2&&"[object Array]"===Object.prototype.toString.call(arr2))for(idx in arr2)arr1.push(arr2[idx]);else if(arr1&&arr1 instanceof Object&&arr2&&arr2 instanceof Object)for(idx in arr2)idx in arr1&&"object"===_typeof(arr1[idx])&&"object"===_typeof(arr2)?arr1[idx]=array_merge(arr1[idx],arr2[idx]):arr1[idx]=arr2[idx];return arr1}(array1,array2)},_getScrollbarWidth:function(){var outer=document.createElement("div");outer.style.visibility="hidden",outer.style.width="100px",document.body.appendChild(outer);var widthNoScroll=outer.offsetWidth;outer.style.overflow="scroll";var inner=document.createElement("div");inner.style.width="100%",outer.appendChild(inner);var widthWithScroll=inner.offsetWidth;return outer.parentNode.removeChild(outer),widthNoScroll-widthWithScroll},_renderStyleAttributes:function(array){var attrs="";for(var key in array)attrs+=key+": "+array[key]+"; ";return attrs.trim()},_renderTagAttributes:function(array){var attrs="";for(var key in array)attrs+="style"==key?key+'="'+this._renderStyleAttributes(array[key])+'" ':"class"==key?key+'="'+array[key].join(" ")+'" ':key+'="'+array[key]+'" ';return attrs.trim()},_injectMarkup:function(){var tmp=this.getMarkup();tmp=(tmp=(tmp=(tmp=tmp.replace(/{wrapperOptions}/g,this._renderTagAttributes(this.wrapperOptions))).replace(/{backdropOptions}/g,this._renderTagAttributes(this.backdropOptions))).replace(/{loadingOptions}/g,this._renderTagAttributes(this.loadingOptions))).replace(/{popupOptions}/g,this._renderTagAttributes(this.popupOptions)),$(this.parent).append(tmp)},_loadParams:function(paramsOrEl){var lbi=this;if(paramsOrEl instanceof jQuery){lbi.set("_triggerEl",paramsOrEl);var paramsKeys=Object.keys(this);$.each(paramsOrEl.data(),function(key,value){if((key=key.toLowerCase().trim()).startsWith("livebox")&&""!=(key=("xxx"+key).replace("xx
1xlivebox","")))for(var i=0;i<paramsKeys.length;i++)paramsKeys[i].toLowerCase()==key&&lbi.set(paramsKeys[i],value)})}else $.each(paramsOrEl,function(key,value){lbi.set(key,value)})},_isLiveboxHigherThanWindow:function(argument_0){var deviation=0<arguments.length&&void 0!==argument_0&&argument_0,$popup=this._getPopupEl();if(deviation)var liveboxHigherTHenWindow=0!=$popup.height()&&$(window).height()<$popup.height()+70;else liveboxHigherTHenWindow=0!=$popup.height()&&$(window).height()<$popup.height();return liveboxHigherTHenWindow},_registerEventsHandlers:function(){$(document).on("click","*[data-livebox]",function(e){e.preventDefault(),LiveBox.show($(this))}),$(window).on("resize",function(e){var lbi=LiveBox.getTopInstance();lbi&&(0<$(".livebox :input").length&&$(".livebox :input").is(":focus")?lbi._virtualKeyboardActive=1:lbi._virtualKeyboardActive?lbi._virtualKeyboardActive=0:lbi.ensureProperPosition())}),$.fn.closestLiveBox=function(){var $lb=$(this).closest(".livebox");return 0<$lb.length&&LiveBox.getInstance($lb.data("lid"))},$.fn.closeClosestLiveBox=function(callback){var lbi;(lbi=$(this).closestLiveBox())&&lbi.close(callback)},$(document).on("click",".close-livebox",function(e){e.preventDefault();var lbi=$(this).closestLiveBox();lbi?lbi.close():LiveBox.closeAll()})}};
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.