PageSourceSearch

https://gsmu.by/bitrix/templates/gsmu2020/js/jquery.formstyler.min.js?165228869015916

js gsmu.by collected 2026-10-02 06:43:43 UTC 15,916 bytes, 32 lines download raw bytes

1/* jQuery Form Styler v1.6.4 | (c) Dimox | https://github.com/Dimox/jQueryFormStyler */
2(function(c){"function"===typeof define&&define.amd?define(["jquery"],c):"object"===typeof exports?module.exports=c(require("jquery")):c(jQuery)})(function(c){c.fn.styler=function(w){var d=c.extend({wrapper:"form",idSuffix:"-styler",filePlaceholder:"\u0424\u0430\u0439\u043b \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d",fileBrowse:"\u041e\u0431\u0437\u043e\u0440...",selectPlaceholder:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435...",selectSearch:!1,selectSearchLimit:10,selectSearchNotFound:"\u0421\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e",
3selectSearchPlaceholder:"\u041f\u043e\u0438\u0441\u043a...",selectVisibleOptions:0,singleSelectzIndex:"100",selectSmartPositioning:!0,onSelectOpened:function(){},onSelectClosed:function(){},onFormStyled:function(){}},w);return this.each(function(){function A(){var c="",t="",b="",h="";void 0!==a.attr("id")&&""!==a.attr("id")&&(c=' id="'+a.attr("id")+d.idSuffix+'"');void 0!==a.attr("title")&&""!==a.attr("title")&&(t=' title="'+a.attr("title")+'"');void 0!==a.attr("class")&&""!==a.attr("class")&&(b=
4" "+a.attr("class"));var e=a.data(),g;for(g in e)""!==e[g]&&(h+=" data-"+g+'="'+e[g]+'"');this.id=c+h;this.title=t;this.classes=b}var a=c(this),E=navigator.userAgent.match(/(iPad|iPhone|iPod)/i)&&!navigator.userAgent.match(/(Windows\sPhone)/i)?!0:!1,w=navigator.userAgent.match(/Android/i)&&!navigator.userAgent.match(/(Windows\sPhone)/i)?!0:!1;if(a.is(":checkbox"))a.each(function(){if(1>a.parent("div.jq-checkbox").length){var d=function(){var d=new A,b=c("<div"+d.id+' class="jq-checkbox'+d.classes+
5'"'+d.title+'><div class="jq-checkbox__div"></div></div>');a.css({position:"absolute",zIndex:"-1",opacity:0,margin:0,padding:0}).after(b).prependTo(b);b.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"});a.is(":checked")&&b.addClass("checked");a.is(":disabled")&&b.addClass("disabled");b.on("click.styler",function(){b.is(".disabled")||
6(a.is(":checked")?(a.prop("checked",!1),b.removeClass("checked")):(a.prop("checked",!0),b.addClass("checked")),a.change());return!1});a.closest("label").add('label[for="'+a.attr("id")+'"]').click(function(a){c(a.target).is("a")||(b.click(),a.preventDefault())});a.on("change.styler",function(){a.is(":checked")?b.addClass("checked"):b.removeClass("checked")}).on("keydown.styler",function(a){32==a.which&&b.click()}).on("focus.styler",function(){b.is(".disabled")||b.addClass("focused")}).on("blur.styler",
7function(){b.removeClass("focused")})};d();a.on("refresh",function(){a.off(".styler").parent().before(a).remove();d()})}});else if(a.is(":radio"))a.each(function(){if(1>a.parent("div.jq-radio").length){var s=function(){var t=new A,b=c("<div"+t.id+' class="jq-radio'+t.classes+'"'+t.title+'><div class="jq-radio__div"></div></div>');a.css({position:"absolute",zIndex:"-1",opacity:0,margin:0,padding:0}).after(b).prependTo(b);b.attr("unselectable","on").css({"-webkit-user-select":"none","-moz-user-select":"none",
8"-ms-user-select":"none","-o-user-select":"none","user-select":"none",display:"inline-block",position:"relative"});a.is(":checked")&&b.addClass("checked");a.is(":disabled")&&b.addClass("disabled");b.on("click.styler",function(){b.is(".disabled")||(b.closest(d.wrapper).find('input[name="'+a.attr("name")+'"]').prop("checked",!1).parent().removeClass("checked"),a.prop("checked",!0).parent().addClass("checked"),a.change());return!1});a.closest("label").add('label[for="'+a.attr("id")+'"]').click(function(a){c(a.target).is("a")||
9(b.click(),a.preventDefault())});a.on("change.styler",function(){a.parent().addClass("checked")}).on("focus.styler",function(){b.is(".disabled")||b.addClass("focused")}).on("blur.styler",function(){b.removeClass("focused")})};s();a.on("refresh",function(){a.off(".styler").parent().before(a).remove();s()})}});else if(a.is(":file"))a.css({position:"absolute",top:0,right:0,width:"100%",height:"100%",opacity:0,margin:0,padding:0}).each(function(){if(1>a.parent("div.jq-file").length){var s=function(){var t=
10new A,b=a.data("placeholder");void 0===b&&(b=d.filePlaceholder);var h=a.data("browse");if(void 0===h||""===h)h=d.fileBrowse;var e=c("<div"+t.id+' class="jq-file'+t.classes+'"'+t.title+' style="display: inline-block; position: relative; overflow: hidden"></div>'),g=c('<div class="jq-file__name">'+b+"</div>").appendTo(e);c('<div class="jq-file__browse">'+h+"</div>").appendTo(e);a.after(e);e.append(a);a.is(":disabled")&&e.addClass("disabled");a.on("change.styler",function(){var c=a.val();if(a.is("[multiple]"))for(var c=
11"",F=a[0].files,q=0;q<F.length;q++)c+=(0<q?", ":"")+F[q].name;g.text(c.replace(/.+[\\\/]/,""));""===c?(g.text(b),e.removeClass("changed")):e.addClass("changed")}).on("focus.styler",function(){e.addClass("focused")}).on("blur.styler",function(){e.removeClass("focused")}).on("click.styler",function(){e.removeClass("focused")})};s();a.on("refresh",function(){a.off(".styler").parent().before(a).remove();s()})}});else if(a.is("select"))a.each(function(){if(1>a.parent("div.jqselect").length){var s=function(){function t(a){a.off("mousewheel DOMMouseScroll").on("mousewheel DOMMouseScroll",
12function(a){var b=null;"mousewheel"==a.type?b=-1*a.originalEvent.wheelDelta:"DOMMouseScroll"==a.type&&(b=40*a.originalEvent.detail);b&&(a.stopPropagation(),a.preventDefault(),c(this).scrollTop(b+c(this).scrollTop()))})}function b(){for(var a=0,c=g.length;a<c;a++){var b="",d="",e=b="",r="",n="",x="";g.eq(a).prop("selected")&&(d="selected sel");g.eq(a).is(":disabled")&&(d="disabled");g.eq(a).is(":selected:disabled")&&(d="selected sel disabled");void 0!==g.eq(a).attr("class")&&(r=" "+g.eq(a).attr("class"),
13x=' data-jqfs-class="'+g.eq(a).attr("class")+'"');var v=g.eq(a).data(),f;for(f in v)""!==v[f]&&(e+=" data-"+f+'="'+v[f]+'"');""!==d+r&&(b=' class="'+d+r+'"');b="<li"+x+e+b+">"+g.eq(a).html()+"</li>";g.eq(a).parent().is("optgroup")&&(void 0!==g.eq(a).parent().attr("class")&&(n=" "+g.eq(a).parent().attr("class")),b="<li"+x+e+' class="'+d+r+" option"+n+'">'+g.eq(a).html()+"</li>",g.eq(a).is(":first-child")&&(b='<li class="optgroup'+n+'">'+g.eq(a).parent().attr("label")+"</li>"+b));s+=b}}function h(){var e=
14new A,q="",k=a.data("placeholder"),y=a.data("search"),h=a.data("search-limit"),r=a.data("search-not-found"),n=a.data("search-placeholder"),x=a.data("z-index"),v=a.data("smart-positioning");void 0===k&&(k=d.selectPlaceholder);if(void 0===y||""===y)y=d.selectSearch;if(void 0===h||""===h)h=d.selectSearchLimit;if(void 0===r||""===r)r=d.selectSearchNotFound;void 0===n&&(n=d.selectSearchPlaceholder);if(void 0===x||""===x)x=d.singleSelectzIndex;if(void 0===v||""===v)v=d.selectSmartPositioning;var f=c("<div"+
15e.id+' class="jq-selectbox jqselect'+e.classes+'" style="display: inline-block; position: relative; z-index:'+x+'"><div class="jq-selectbox__select"'+e.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>');a.css({margin:0,padding:0}).after(f).prependTo(f);var G=c("div.jq-selectbox__select",f),u=c("div.jq-selectbox__select-text",f),e=g.filter(":selected");b();y&&(q='<div class="jq-selectbox__search"><input type="search" autocomplete="off" placeholder="'+
16n+'"></div><div class="jq-selectbox__not-found">'+r+"</div>");var l=c('<div class="jq-selectbox__dropdown" style="position: absolute">'+q+'<ul style="position: relative; list-style: none; overflow: auto; overflow-x: hidden">'+s+"</ul></div>");f.append(l);var p=c("ul",l),m=c("li",l),z=c("input",l),w=c("div.jq-selectbox__not-found",l).hide();m.length<h&&z.parent().hide();""===a.val()?u.text(k).addClass("placeholder"):u.text(e.text());var B=0,H=0;m.each(function(){var a=c(this);a.css({display:"inline-block"});
17a.innerWidth()>B&&(B=a.innerWidth(),H=a.width());a.css({display:""})});u.is(".placeholder")&&u.width()>B?u.width(u.width()):u.width(H);B>f.width()&&l.width(B);""===g.first().text()&&""!==a.data("placeholder")&&m.first().hide();a.css({position:"absolute",left:0,top:0,width:"100%",height:"100%",opacity:0}
17);var I=f.outerHeight(),C=z.outerHeight(),D=p.css("max-height"),q=m.filter(".selected");1>q.length&&m.first().addClass("selected sel");void 0===m.data("li-height")&&m.data("li-height",m.outerHeight());
18var J=l.css("top");"auto"==l.css("left")&&l.css({left:0});"auto"==l.css("top")&&l.css({top:I});l.hide();q.length&&(g.first().text()!=e.text()&&f.addClass("changed"),f.data("jqfs-class",q.data("jqfs-class")),f.addClass(q.data("jqfs-class")));if(a.is(":disabled"))return f.addClass("disabled"),!1;G.click(function(){c("div.jq-selectbox").filter(".opened").length&&d.onSelectClosed.call(c("div.jq-selectbox").filter(".opened"));a.focus();if(!E){var b=c(window),n=m.data("li-height"),e=f.offset().top,q=b.height()-
19I-(e-b.scrollTop()),k=a.data("visible-options");if(void 0===k||""===k)k=d.selectVisibleOptions;var y=5*n,h=n*k;0<k&&6>k&&(y=h);0===k&&(h="auto");var k=function(){l.height("auto").css({bottom:"auto",top:J});var a=function(){p.css("max-height",Math.floor((q-20-C)/n)*n)};a();p.css("max-height",h);"none"!=D&&p.css("max-height",D);q<l.outerHeight()+20&&a()},u=function(){l.height("auto").css({top:"auto",bottom:J});var a=function(){p.css("max-height",Math.floor((e-b.scrollTop()-20-C)/n)*n)};a();p.css("max-height",
20h);"none"!=D&&p.css("max-height",D);e-b.scrollTop()-20<l.outerHeight()+20&&a()};!0===v||1===v?q>y+C+20?(k(),f.removeClass("dropup").addClass("dropdown")):(u(),f.removeClass("dropdown").addClass("dropup")):(!1===v||0===v)&&q>y+C+20&&(k(),f.removeClass("dropup").addClass("dropdown"));f.offset().left+l.outerWidth()>b.width()&&l.css({left:"auto",right:0});c("div.jqselect").css({zIndex:x-1}).removeClass("opened");f.css({zIndex:x});l.is(":hidden")?(c("div.jq-selectbox__dropdown:visible").hide(),l.show(),
21f.addClass("opened focused"),d.onSelectOpened.call(f)):(l.hide(),f.removeClass("opened dropup dropdown"),c("div.jq-selectbox").filter(".opened").length&&d.onSelectClosed.call(f));z.length&&(z.val("").keyup(),w.hide(),z.keyup(function(){var b=c(this).val();m.each(function(){c(this).html().match(RegExp(".*?"+b+".*?","i"))?c(this).show():c(this).hide()});""===g.first().text()&&""!==a.data("placeholder")&&m.first().hide();1>m.filter(":visible").length?w.show():w.hide()}));m.filter(".selected").length&&
22(""===a.val()?p.scrollTop(0):(0!==p.innerHeight()/n%2&&(n/=2),p.scrollTop(p.scrollTop()+m.filter(".selected").position().top-p.innerHeight()/2+n)));t(p);return!1}});m.hover(function(){c(this).siblings().removeClass("selected")});m.filter(".selected").text();m.filter(":not(.disabled):not(.optgroup)").click(function(){a.focus();var b=c(this),n=b.text();if(!b.is(".selected")){var e=b.index(),e=e-b.prevAll(".optgroup").length;b.addClass("selected sel").siblings().removeClass("selected sel");g.prop("selected",
23!1).eq(e).prop("selected",!0);u.text(n);f.data("jqfs-class")&&f.removeClass(f.data("jqfs-class"));f.data("jqfs-class",b.data("jqfs-class"));f.addClass(b.data("jqfs-class"));a.change()}l.hide();f.removeClass("opened dropup dropdown");d.onSelectClosed.call(f)});l.mouseout(function(){c("li.sel",l).addClass("selected")});a.on("change.styler",function(){u.text(g.filter(":selected").text()).removeClass("placeholder");m.removeClass("selected sel").not(".optgroup").eq(a[0].selectedIndex).addClass("selected sel");
24g.first().text()!=m.filter(".selected").text()?f.addClass("changed"):f.removeClass("changed")}).on("focus.styler",function(){f.addClass("focused");c("div.jqselect").not(".focused").removeClass("opened dropup dropdown").find("div.jq-selectbox__dropdown").hide()}).on("blur.styler",function(){f.removeClass("focused")}).on("keydown.styler keyup.styler",function(c){var b=m.data("li-height");""===a.val()?u.text(k).addClass("placeholder"):u.text(g.filter(":selected").text());m.removeClass("selected sel").not(".optgroup").eq(a[0].selectedIndex).addClass("selected sel");
25if(38==c.which||37==c.which||33==c.which||36==c.which)""===a.val()?p.scrollTop(0):p.scrollTop(p.scrollTop()+m.filter(".selected").position().top);40!=c.which&&39!=c.which&&34!=c.which&&35!=c.which||p.scrollTop(p.scrollTop()+m.filter(".selected").position().top-p.innerHeight()+b);13==c.which&&(c.preventDefault(),l.hide(),f.removeClass("opened dropup dropdown"),d.onSelectClosed.call(f))}).on("keydown.styler",function(a){32==a.which&&(a.preventDefault(),G.click())});c(document).on("click",function(a){c(a.target).parents().hasClass("jq-selectbox")||
26"OPTION"==a.target.nodeName||(c("div.jq-selectbox").filter(".opened").length&&d.onSelectClosed.call(c("div.jq-selectbox").filter(".opened")),z.length&&z.val("").keyup(),l.hide().find("li.sel").addClass("selected"),f.removeClass("focused opened dropup dropdown"))})}function e(){var e=new A,d=c("<div"+e.id+' class="jq-select-multiple jqselect'+e.classes+'"'+e.title+' style="display: inline-block; position: relative"></div>');a.css({margin:0,padding:0}).after(d);b();d.append("<ul>"+s+"</ul>");var k=
27c("ul",d).css({position:"relative","overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}),h=c("li",d).attr("unselectable","on"),e=a.attr("size"),w=k.outerHeight(),r=h.outerHeight();void 0!==e&&0<e?k.css({height:r*e}):k.css({height:4*r});w>d.height()&&(k.css("overflowY","scroll"),t(k),h.filter(".selected").length&&k.scrollTop(k.scrollTop()+h.filter(".selected").position().top));a.prependTo(d).css({position:"absolute",left:0,top:0,width:"100%",height:"100%",opacity:0}
27);if(a.is(":disabled"))d.addClass("disabled"),
28g.each(function(){c(this).is(":selected")&&h.eq(c(this).index()).addClass("selected")});else if(h.filter(":not(.disabled):not(.optgroup)").click(function(b){a.focus();var d=c(this);b.ctrlKey||b.metaKey||d.addClass("selected");b.shiftKey||d.addClass("first");b.ctrlKey||(b.metaKey||b.shiftKey)||d.siblings().removeClass("selected first");if(b.ctrlKey||b.metaKey)d.is(".selected")?d.removeClass("selected first"):d.addClass("selected first"),d.siblings().removeClass("first");if(b.shiftKey){var e=!1,f=!1;
29d.siblings().removeClass("selected").siblings(".first").addClass("selected");d.prevAll().each(function(){c(this).is(".first")&&(e=!0)});d.nextAll().each(function(){c(this).is(".first")&&(f=!0)});e&&d.prevAll().each(function(){if(c(this).is(".selected"))return!1;c(this).not(".disabled, .optgroup").addClass("selected")});f&&d.nextAll().each(function(){if(c(this).is(".selected"))return!1;c(this).not(".disabled, .optgroup").addClass("selected")});1==h.filter(".selected").length&&d.addClass("first")}g.prop("selected",
30!1);h.filter(".selected").each(function(){var a=c(this),b=a.index();a.is(".option")&&(b-=a.prevAll(".optgroup").length);g.eq(b).prop("selected",!0)});a.change()}),g.each(function(a){c(this).data("optionIndex",a)}),a.on("change.styler",function(){h.removeClass("selected");var a=[];g.filter(":selected").each(function(){a.push(c(this).data("optionIndex"))});h.not(".optgroup").filter(function(b){return-1<c.inArray(b,a)}).addClass("selected")}).on("focus.styler",function(){d.addClass("focused")}).on("blur.styler",
31function(){d.removeClass("focused")}),w>d.height())a.on("keydown.styler",function(a){38!=a.which&&37!=a.which&&33!=a.which||k.scrollTop(k.scrollTop()+h.filter(".selected").position().top-r);40!=a.which&&39!=a.which&&34!=a.which||k.scrollTop(k.scrollTop()+h.filter(".selected:last").position().top-k.innerHeight()+2*r)})}var g=c("option",a),s="";a.is("[multiple]")?w||E||e():h()};s();a.on("refresh",function(){a.off(".styler").parent().before(a).remove();s()})}});else if(a.is(":reset"))a.on("click",function(){setTimeout(function(){a.closest(d.wrapper).find("input, select").trigger("refresh")},
321)})}).promise().done(function(){d.onFormStyled.call()})}});

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.