PageSourceSearch

https://clatiurfo.ru/uss-js/jquery.formstyler.min.js

js clatiurfo.ru collected 2026-10-07 18:02:03 UTC 15,766 bytes, 1 lines download raw bytes

1function getRealOffset(e){if(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/Windows Phone/i)){var t=document.body.getBoundingClientRect(),s=e.get(0).getBoundingClientRect();return{left:s.left-t.left,top:s.top-t.top}}return{left:e.offset().left,top:e.offset().top}}function initStyler(){$("select.styler, input.styler").styler()}$.fn.styler=function(e){var t=void 0!==window.formLang&&void 0!==window.formLang.browse?window.formLang.browse:"Îáçîð",s=void 0!==window.formLang&&void 0!==window.formLang.file_not_select?window.formLang.file_not_select:"Ôàéë íå âûáðàí",i=$.extend({wrapper:"form",idSuffix:"-styler",filePlaceholder:t,fileBrowse:s,selectSearch:!0,selectSearchLimit:30,selectSearchNotFound:"Ñîâïàäåíèé íå íàéäåíî",selectSearchPlaceholder:"Ïîèñê...",selectVisibleOptions:0,singleSelectzIndex:"1000",selectSmartPositioning:!0,onSelectOpened:function(){},onSelectClosed:function(){},onFormStyled:function(){}},e);return this.each(function(){function e(){var e="",s="",l="",o="";void 0!==t.attr("id")&&""!==t.attr("id")&&(e=' id="'+t.attr("id")+i.idSuffix+'"'),void 0!==t.attr("title")&&""!==t.attr("title")&&(s=' title="'+t.attr("title")+'"'),void 0!==t.attr("class")&&""!==t.attr("class")&&(l=" "+t.attr("class"));for(var n=$.data(t),d=0;d<n.length;d++)""!==n[d]&&(o+=" data-"+d+'="'+n[d]+'"');e+=o,this.id=e,this.title=s,this.classes=l}var t=$(this);if(t.is(":checkbox")){if(t.parent("div.jq-checkbox").length<1){var s=function(){var s=new e,i=$("<div"+s.id+' class="jq-checkbox'+s.classes+'"'+s.title+'><div class="jq-checkbox__div"></div></div>');t.css({position:"absolute",zIndex:"-1",opacity:0,margin:0,padding:0}).after(i).prependTo(i),i.attr("unselectable","on").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none",display:"inline-block",position:"relative",overflow:"hidden"}),t.is(":checked")&&i.addClass("checked"),t.is(":disabled")&&i.addClass("disabled"),i.bind("click.styler",function(e){return!i.is(".disabled")&&(t.is(":checked")?(t.attr("checked",!1),i.removeClass("checked")):(t.attr("checked",!0),i.addClass("checked")),t.change(),!1)}),t.closest("label").add('label[for="'+t.attr("id")+'"]').click(function(e){if(e.preventDefault(),"A"==e.target.tagName&&$(e.target).attr("href")&&void 0!==$(e.target).attr("href"))return window.location.href=$(e.target).attr("href"),!0;i.click()}),t.bind("change.styler",function(){t.is(":checked")?i.addClass("checked"):i.removeClass("checked")}).bind("keydown.styler",function(e){32==e.which&&i.click()}).bind("focus.styler",function(){i.is(".disabled")||i.addClass("focused")}).bind("blur.styler",function(){i.removeClass("focused")})};s(),t.bind("refresh",function(){t.unbind(".styler").parent().before(t).remove(),s()})}}else if(t.is(":radio")){if(t.parent("div.jq-radio").length<1){var l=function(){var s=new e,l=$("<div"+s.id+' class="jq-radio'+s.classes+'"'+s.title+'><div class="jq-radio__div"></div></div>');t.css({position:"absolute",zIndex:"-1",opacity:0,margin:0,padding:0}).after(l).prependTo(l),l.attr("unselectable","on").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none",display:"inline-block",position:"relative"}),t.is(":checked")&&l.addClass("checked"),t.is(":disabled")&&l.addClass("disabled"),l.bind("click.styler",function(){return!l.is(".disabled")&&(l.closest(i.wrapper).find('input[name="'+t.attr("name")+'"]').attr("checked",!1).parent().removeClass("checked"),t.attr("checked",!0).parent().addClass("checked"),t.change(),!1)}),t.closest("label").add('label[for="'+t.attr("id")+'"]').click(function(e){l.click(),e.preventDefault()}),t.bind("change.styler",function(){t.parent().addClass("checked")}).bind("focus.styler",function(){l.is(".disabled")||l.addClass("focused")}).bind("blur.styler",function(){l.removeClass("focused")})};l(),t.bind("refresh",function(){t.unbind(".styler").parent().before(t).remove(),l()})}}else if(t.is(":file"))t.css({position:"absolute",top:0,right:0,width:"100%",height:"100%",opacity:0,margin:0,padding:0}).each(function(){if(t.parent("div.jq-file").length<1){var s=function(){var s=new e,l=$("<div"+s.id+' class="jq-file'+s.classes+'"'+s.title+' style="display: inline-block; position: relative; overflow: hidden"></div>'),o=$('<div class="jq-file__name">'+i.filePlaceholder+"</div>").appendTo(l);$('<div class="jq-file__browse">'+i.fileBrowse+"</div>").appendTo(l);t.after(l),l.append(t),t.is(":disabled")&&l.addClass("disabled"),t.bind("change.styler",function(){var e=t.val();if(t.is("[multiple]")){e="";for(var s=t[0].files,n=0;n<s.length;n++)e+=(n>0?", ":"")+s[n].name}o.text(e.replace(/.+[\\\/]/,"")),""===e?(o.text(i.filePlaceholder),l.removeClass("changed")):l.addClass("changed")}).bind("focus.styler",function(){l.addClass("focused")}).bind("blur.styler",function(){l.removeClass("focused")}).bind("click.styler",function(){l.removeClass("focused")})};s(),t.bind("refresh",function(){t.unbind(".styler").parent().before(t).remove(),s()})}});else if(t.is("select")){if(t.parent("div.jqselect").length<1){var o=function(){function s(e){e.unbind("mousewheel DOMMouseScroll").bind("mousewheel DOMMouseScroll",function(e){var t=null;"mousewheel"==e.type?t=-1*e.originalEvent.wheelDelta:"DOMMouseScroll"==e.type&&(t=40*e.originalEvent.detail),t&&(e.stopPropagation(),e.preventDefault(),$(this).scrollTop(t+$(this).scrollTop()))})}function l(){for(var e=0;e<o.length;e++){var t=o.eq(e),s="",l="",d="",a="",c="",r="",h="",f="",u="";t.prop("selected")&&(l="selected sel"),t.is(":disabled")&&(l="disabled"),t.is(":selected:disabled")&&(l="selected sel disabled"),void 0!==t.attr("id")&&""!==t.attr("id")&&(a=' id="'+t.attr("id")+i.idSuffix+'"'),void 0!==t.attr("title")&&""!==o.attr("title")&&(c=' title="'+t.attr("title")+'"'),void 0!==t.attr("class")&&(h=" "+t.attr("class"),u=' data-jqfs-class="'+t.attr("class")+'"');var p=t.data();for(var v in p)""!==p[v]&&(r+=" data-"+v+'="'+p[v]+'"');l+h!==""&&(d=' class="'+l+h+'"'),s="<li"+u+r+d+c+a+">"+t.html()+"</li>",t.parent().is("optgroup")&&(void 0!==t.parent().attr("class")&&(f=" "+t.parent().attr("class")),s="<li"+u+r+' class="'+l+h+" option"+f+'"'+c+a+">"+t.html()+"</li>",t.is(":first-child")&&(s='<li class="optgroup'+f+'">'+t.parent().attr("label")+"</li>"+s)),n+=s}}var o=$("option",t),n="";t.is("[multiple]")?function(){var i=new e,d=$("<div"+i.id+' class="jq-select-multiple jqselect'+i.classes+'"'+i.title+' style="display: inline-block; position: relative"></div>');t.css({margin:0,padding:0}).after(d),l(),d.append("<ul>"+n+"</ul>");var a=$("ul",d).css({position:"relative","overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}),c=$("li",d).attr("unselectable","on").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"}),r=t.attr("size"),h=a.outerHeight(),f=c.outerHeight();c.height()<=0&&(f=25),void 0!==r&&r>0?a.css({height:f*r}):a.css({height:4*f}),h>d.height()&&(a.css("overflowY","scroll"),s(a),c.filter(".selected").length&&a.scrollTop(a.scrollTop()+c.filter(".selected").position().top)),t.prependTo(d).css({position:"absolute",left:0,top:0,width:"100%",height:"100%",opacity:0}
vendor: 1,108 bytes, line 1
1),t.is(":disabled")?(d.addClass("disabled"),o.each(function(){$(this).is(":selected")&&c.eq($(this).index()).addClass("selected")})):(c.filter(":not(.disabled):not(.optgroup)").click(function(e){t.focus();var s=$(this);if(e.ctrlKey||e.metaKey||s.addClass("selected"),e.shiftKey||s.addClass("first"),e.ctrlKey||e.metaKey||e.shiftKey||s.siblings().removeClass("selected first"),(e.ctrlKey||e.metaKey)&&(s.is(".selected")?s.removeClass("selected first"):s.addClass("selected first"),s.siblings().removeClass("first")),e.shiftKey){var i=!1,l=!1;s.siblings().removeClass("selected").siblings(".first").addClass("selected"),s.prevAll().each(function(){$(this).is(".first")&&(i=!0)}),s.nextAll().each(function(){$(this).is(".first")&&(l=!0)}),i&&s.prevAll().each(function(){if($(this).is(".selected"))return!1;$(this).not(".disabled, .optgroup").addClass("selected")}),l&&s.nextAll().each(function(){if($(this).is(".selected"))return!1;$(this).not(".disabled, .optgroup").addClass("selected")}),1==c.filter(".selected").length&&s.addClass("first")}o.attr("selected",!1),c.filter(".selected").each(function(){var e=$
1(this),t=c.index(e);e.is(".option")&&(t-=e.prevAll(".optgroup").length),o.eq(t).attr("selected",!0)}),t.change()}),o.each(function(e){$(this).data("optionIndex",e)}),t.bind("change.styler",function(){c.removeClass("selected");var e=[];o.filter(":selected").each(function(){e.push($(this).data("optionIndex"))}),c.not(".optgroup").filter(function(t){return $.inArray(t,e)>-1}).addClass("selected")}).bind("focus.styler",function(){d.addClass("focused")}).bind("blur.styler",function(){d.removeClass("focused")}),h>d.height()&&t.bind("keydown.styler",function(e){0!=c.filter(".selected:last").length&&(38!=e.which&&37!=e.which&&33!=e.which||a.scrollTop(a.scrollTop()+c.filter(".selected").position().top-f),40!=e.which&&39!=e.which&&34!=e.which||a.scrollTop(a.scrollTop()+c.filter(".selected:last").position().top-a.innerHeight()+2*f))}))}():function(){var d=new e,a=$("<div"+d.id+' class="jq-selectbox jqselect'+d.classes+'" style="display: inline-block; position: relative; z-index:'+i.singleSelectzIndex+'"><div class="jq-selectbox__select"'+d.title+' style="position: relative"><div class="jq-selectbox__select-text"></div><div class="jq-selectbox__trigger"><div class="jq-selectbox__trigger-arrow"></div></div></div></div>');t.css({margin:0,padding:0}).after(a).prependTo(a);var c=$("div.jq-selectbox__select",a),r=$("div.jq-selectbox__select-text",a),h=o.filter(":selected");h.length?r.html(h.text()):r.html(o.filter(":first").text()),l();var f="";i.selectSearch&&(f='<div class="jq-selectbox__search"><input type="search" autocomplete="off" placeholder="'+i.selectSearchPlaceholder+'"></div><div class="jq-selectbox__not-found">'+i.selectSearchNotFound+"</div>");var u=$('<div class="jq-selectbox__dropdown" style="position: absolute">'+f+'<ul style="position: relative; list-style: none; overflow: auto; overflow-x: hidden">'+n+"</ul></div>");$("body").append(u);var p=$("ul",u),v=$("li",u),g=$("input",u),b=$("div.jq-selectbox__not-found",u).hide();v.length<i.selectSearchLimit&&g.parent().hide();var m=0,w=0;
1v.each(function(){var e=$(this);e.innerWidth()>m&&(m=e.innerWidth(),w=e.width()+20)});var x=a.clone().appendTo("body").width("auto"),y=x.width();x.remove(),y==a.width()&&(r.width(w),m+=a.find("div.jq-selectbox__trigger").width()),m>a.width()&&u.width(m),t.css({position:"absolute",left:0,top:0,width:"100%",height:"100%",opacity:0});var C=a.outerHeight(),q=g.outerHeight(),k=p.css("max-height"),j=v.filter(".selected");if(j.length<1&&v.filter(":first").addClass("selected sel"),void 0===v.data("li-height")&&v.data("li-height",v.outerHeight()),u.css("top"),"auto"==u.css("left")&&u.css({left:0}),"auto"==u.css("top")&&u.css({top:C}),u.hide(),j.length&&(o.filter(":first").text()!=h.text()&&a.addClass("changed"),a.data("jqfs-class",j.data("jqfs-class")),a.addClass(j.data("jqfs-class"))),t.is(":disabled"))return a.addClass("disabled"),!1;c.click(function(){if($("div.jq-selectbox").filter(".opened").length&&i.onSelectClosed.call($("div.jq-selectbox").filter(".opened")),t.focus(),!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)){var e=$
1(window),l=v.data("li-height"),o=a.offset().top,n=e.height()-C-(o-e.scrollTop()),d=i.selectVisibleOptions,c=5*l,r=l*d;d>0&&d<6&&(c=r),0===d&&(r="auto");var h=getRealOffset(a),f=function(){b.hide();var e=function(){p.css("max-height",Math.floor((n-20-q)/l)*l-l)};e(),$.browser.msie||p.css("max-height",r),"none"!=k&&p.css("max-height",k),n<u.outerHeight()+40&&e(),u.css({width:a.width()+"px",left:h.left+"px",top:h.top+a.height()+"px","z-index":2e3})};return!0===i.selectSmartPositioning?n>c+q+20?f():function(){b.hide();var t=function(){p.css("max-height",Math.floor((o-e.scrollTop()-20-q)/l)*l)};t(),$.browser.msie||p.css("max-height",r),"none"!=k&&p.css("max-height",k),o-e.scrollTop()-20<u.outerHeight()+20&&t(),u.css({width:a.width()+"px",left:h.left+"px",top:h.top-u.outerHeight()+"px",bottom:"auto","z-index":2e3,height:"auto"})}():!1===i.selectSmartPositioning&&n>c+q+20&&f(),$("div.jqselect").css({zIndex:i.singleSelectzIndex-1}).removeClass("opened"),a.css({zIndex:i.singleSelectzIndex}),u.is(":hidden")?($("div.jq-selectbox__dropdown:visible").hide(),u.show(),a.addClass("opened focused"),i.onSelectOpened.call(a)):(u.hide(),a.removeClass("opened"),$("div.jq-selectbox").filter(".opened").length&&i.onSelectClosed.call(a)),v.filter(".selected").length&&(p.innerHeight()/l%2!=0&&(l/=2),p.scrollTop(p.scrollTop()+v.filter(".selected").position().top-p.innerHeight()/2+l)),g.length&&(g.val("").keyup(),b.hide(),g.keyup(function(){var e=$
1(this).val();v.each(function(){$(this).html().match(new RegExp(".*?"+e+".*?","i"))?$(this).show():$(this).hide()}),v.filter(":visible").length<1?b.show():b.hide()})),s(p),!1}}),v.hover(function(){$(this).siblings().removeClass("selected")});var _=v.filter(".selected").text();v.filter(".selected").text(),v.filter(":not(.disabled):not(.optgroup)").click(function(){t.focus();var e=$(this),s=e.text();if(!e.is(".selected")){var l=v.index(e);l-=e.prevAll(".optgroup").length,e.addClass("selected sel").siblings().removeClass("selected sel"),o.attr("selected",!1).eq(l).attr("selected",!0),_=s,r.html(s),a.data("jqfs-class")&&a.removeClass(a.data("jqfs-class")),a.data("jqfs-class",e.data("jqfs-class")),a.addClass(e.data("jqfs-class")),t.change()}g.length&&(g.val("").keyup(),b.hide()),u.hide(),a.removeClass("opened"),i.onSelectClosed.call(a)}),u.mouseout(function(){$("li.sel",u).addClass("selected")}),t.bind("change.styler",function(){r.html(o.filter(":selected").text()),v.removeClass("selected sel").not(".optgroup").eq(t[0].selectedIndex).addClass("selected sel"),o.filter(":first").text()!=v.filter(".selected").text()?a.addClass("changed"):a.removeClass("changed")}).bind("focus.styler",function(){a.addClass("focused"),$("div.jqselect").not(".focused").removeClass("opened")}).bind("blur.styler",function(){a.removeClass("focused")}).bind("keydown.styler keyup.styler",function(e){var s=v.data("li-height");r.html(o.filter(":selected").text()),v.removeClass("selected sel").not(".optgroup").eq(t[0].selectedIndex).addClass("selected sel"),38!=e.which&&37!=e.which&&33!=e.which&&36!=e.which||p.scrollTop(p.scrollTop()+v.filter(".selected").position().top),40!=e.which&&39!=e.which&&34!=e.which&&35!=e.which||p.scrollTop(p.scrollTop()+v.filter(".selected").position().top-p.innerHeight()+s),32==e.which&&e.preventDefault(),13==e.which&&(e.preventDefault(),u.hide(),a.removeClass("opened"),i.onSelectClosed.call(a))}),$(document).bind("click",function(e){$(e.target).parents().hasClass("jq-selectbox__dropdown")||"OPTION"==e.target.nodeName||($("div.jq-selectbox").filter(".opened").length&&i.onSelectClosed.call($("div.jq-selectbox").filter(".opened")),g.length&&g.val("").keyup(),u.hide().find("li.sel").addClass("selected"),a.removeClass("focused opened"))})}()};o(),t.bind("refresh",function(){t.unbind(".styler").parent().before(t).remove(),o()})}}else t.is(":reset")&&t.bind("click",function(){setTimeout(function(){t.closest(i.wrapper).find("input, select").trigger("refresh")},1)});$(window).resize(function(){$("div.jq-selectbox").filter(".opened").length&&i.onSelectClosed.call($("div.jq-selectbox").filter(".opened")),$(".jq-selectbox__search input").length&&$(".jq-selectbox__search input").val().length&&$(".jq-selectbox__search input").val("").keyup(),$(".jq-selectbox__dropdown").hide().find("li.sel").addClass("selected"),$(".jq-selectbox").removeClass("focused opened")})})},$(function(){initStyler()});

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.