1/* 2 * Copyright © 2017 Regular Labs - All Rights Reserved 3 * License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL 4 */ 5var modals_class=modals_class||'modal';var modals_defaults=modals_defaults||{};var initModals=null;var modalsResize=null;(function($){"use strict";$(document).ready(function(){if(typeof(window['modals_defaults'])!="undefined"){initModals();}});initModals=function(){var modal_delay=null;$.each($('.'+modals_class),function(i,el){var $el=$(el);if($el.attr('data-modal-done')){return;} 6var defaults=$.extend({},modals_defaults);$.each(el.attributes,function(index,attr){if(attr.name.indexOf("data-modal-")===0){var key=$.camelCase(attr.name.substring(11));defaults[key]=attr.value;}});$el.attr('data-modal-done','1');if(defaults['innerWidth']!=undefined){delete defaults['width'];} 7if(defaults['innerHeight']!=undefined){delete defaults['height'];}for(var key in defaults){if(defaults[key]=='true'){defaults[key]=true;}else if(defaults[key]=='false'){defaults[key]=false;}else if(!isNaN(defaults[key])){defaults[key]=parseFloat(defaults[key]);}}defaults['onComplete']=function(){$('.cboxIframe').attr({webkitAllowFullScreen:true,mozallowfullscreen:true,allowFullScreen:true});if(!$el.attr('data-modal-video')){modalsResize();}$('#colorbox').addClass('complete');$el.addClass('modal_active');};defaults['onClosed']=function(){$('#colorbox').removeClass('complete');$el.removeClass('modal_active');};$el.data('modals_settings',defaults);if(!isNaN(defaults.maxWidth)&&defaults.maxWidth>($(window).width()*.95)){defaults.maxWidth='95%';} 8$el.colorbox(defaults);});$(document).bind('cbox_open',function(){modals_window_width=$(window).width();$("#colorbox").swipe({swipeLeft:function(event,direction,distance,duration,fingerCount){$.colorbox.next();},swipeRight:function(event,direction,distance,duration,fingerCount){$.colorbox.prev();},fallbackToMouseEvents:false});});};modalsResize=function(){$.each($('#colorbox'),function(i,el){var $el=$(el);var $title=$('#cboxTitle');var $content=$('#cboxLoadedContent');var $title_height=$el.hasClass('no_title')?0:$title.outerHeight()+1;var $margin_top=parseInt($content.css('marginTop'));if($el.hasClass('no_title')){$el.removeClass('has_scrollbar');if($content.outerHeight()<$content.get(0).scrollHeight){$el.addClass('has_scrollbar');}} 9if($title_height<=$margin_top){return;} 10var $div_height=$title_height-$margin_top;$content.css('marginTop',$title_height);if(parseInt($el.css('top'))<23){$content.css('height',parseInt($content.css('height'))-$div_height);return;} 11$el.css('height',parseInt($el.css('height'))+$div_height);$el.css('top',parseInt($el.css('top'))-($div_height/2));$('#cboxWrapper').css('height',parseInt($('#cboxWrapper').css('height'))+$div_height);$('#cboxContent').css('height',parseInt($('#cboxContent').css('height'))+$div_height);$('#cboxMiddleLeft').css('height',parseInt($('#cboxMiddleLeft').css('height'))+$div_height);$('#cboxMiddleRight').css('height',parseInt($('#cboxMiddleRight').css('height'))+$div_height);});};var resizeTimer;var modals_window_width=$(window).width();$(document).ready(function(){modals_window_width=$(window).width();});var resizeColorBoxOnBrowserResize=function(){if(resizeTimer){clearTimeout(resizeTimer);} 12resizeTimer=setTimeout(function(){var modal_content=$("#cboxWrapper");if(!modal_content.is(':visible')){return;} 13var modal=$('.modal_active').first();if(modal.attr('data-modal-video')){} 14var smaller_margin=5;var larger_margin=50;var new_window_width=$(window).width();var resize_type=new_window_width<modals_window_width?'smaller':(new_window_width==modals_window_width?'same':'larger');if(resize_type=='same'){return;} 15if(modal.attr('data-modal-video')&&screen.height==$(window).height()){return;} 16if(resize_type=='smaller'&&new_window_width>(modals_window_width-smaller_margin)){return;} 17if(resize_type=='smaller'&&modal_content.outerWidth()<(new_window_width*.95)){return;} 18if(resize_type=='larger'&&new_window_width<(modals_window_width+larger_margin)){return;} 19var modals_settings=modal.data('modals_settings');var max_width=modal.attr('data-modal-inner-width')?modal.attr('data-modal-inner-width'):modals_settings.maxWidth;
19if(resize_type=='larger'&&!isNaN(max_width)&&$('#cboxLoadedContent').width()==max_width){return;} 20var original_fadeOut=modal.colorbox.settings.fadeOut;var original_maxWidth=modals_settings.maxWidth;if(!isNaN(modals_settings.maxWidth)&&modals_settings.maxWidth>(new_window_width*.95)){modals_settings.maxWidth='95%';modal.colorbox(modals_settings);modals_settings.maxWidth=original_maxWidth;} 21modal.colorbox.settings.fadeOut=0;modal.colorbox.close();modal.colorbox.settings.fadeOut=original_fadeOut;setTimeout(function(){modal.click();},10);},300)};$(window).resize(resizeColorBoxOnBrowserResize);window.addEventListener("orientationchange",resizeColorBoxOnBrowserResize,false);})(jQuery);
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.