PageSourceSearch

https://mkzhizn.ru/local/templates/roso/vendor/custom_mask/mask.js?16391292757520

js mkzhizn.ru collected 2026-10-02 22:16:11 UTC 7,520 bytes, 121 lines download raw bytes

1/*!
2 * jQuery Browser Plugin v0.0.6
3 * https://github.com/gabceb/jquery-browser-plugin
4 *
5 * Original jquery-browser code Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
6 * http://jquery.org/license
7 
8 * Modifications Copyright 2013 Gabriel Cebrian
9 * https://github.com/gabceb
10 *
11 * Released under the MIT license
12 *
13 * Date: 2013-07-29T17:23:27-07:00
14 
15 https://github.com/gabceb/jquery-browser-plugin/blob/master/dist/jquery.browser.js
16 */
17
18(function (jQuery, window, undefined) {
19    "use strict";
20    
21
22    var matched, browser;
23
24    jQuery.uaMatch = function (ua) {
25        ua = ua.toLowerCase();
26
27        var match = /(opr)[\/]([\w.]+)/.exec(ua) ||
28            /(chrome)[ \/]([\w.]+)/.exec(ua) ||
29            /(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(ua) ||
30            /(webkit)[ \/]([\w.]+)/.exec(ua) ||
31            /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
32            /(msie) ([\w.]+)/.exec(ua) ||
33            ua.indexOf("trident") >= 0 && /(rv)(?::| )([\w.]+)/.exec(ua) ||
34            ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
35            [];
36
37        var platform_match = /(ipad)/.exec(ua) ||
38            /(iphone)/.exec(ua) ||
39            /(android)/.exec(ua) ||
40            /(windows phone)/.exec(ua) ||
41            /(win)/.exec(ua) ||
42            /(mac)/.exec(ua) ||
43            /(linux)/.exec(ua) ||
44            /(cros)/i.exec(ua) ||
45            [];
46
47        return {
48            browser: match[3] || match[1] || "",
49            version: match[2] || "0",
50            platform: platform_match[0] || ""
51        };
52    };
53
54    matched = jQuery.uaMatch(window.navigator.userAgent);
55    browser = {};
56
57    if (matched.browser) {
58        browser[matched.browser] = true;
59        browser.version = matched.version;
60        browser.versionNumber = parseInt(matched.version);
61    }
62
63    if (matched.platform) {
64        browser[matched.platform] = true;
65    }
66
67    // These are all considered mobile platforms, meaning they run a mobile browser
68    if (browser.android || browser.ipad || browser.iphone || browser["windows phone"]) {
69        browser.mobile = true;
70    }
71
72    // These are all considered desktop platforms, meaning they run a desktop browser
73    if (browser.cros || browser.mac || browser.linux || browser.win) {
74        browser.desktop = true;
75    }
76
77    // Chrome, Opera 15+ and Safari are webkit based browsers
78    if (browser.chrome || browser.opr || browser.safari) {
79        browser.webkit = true;
80    }
81
82    // IE11 has a new token so we will assign it msie to avoid breaking changes
83    if (browser.rv) {
84        var ie = "msie";
85
86        matched.browser = ie;
87        browser[ie] = true;
88    }
89
90    // Opera 15+ are identified as opr
91    if (browser.opr) {
92        var opera = "opera";
93
94        matched.browser = opera;
95        browser[opera] = true;
96    }
97
98    // Stock Android browsers are marked as Safari on Android.
99    if (browser.safari && browser.android) {
100        var android = "android";
101
102        matched.browser = android;
103        browser[android] = true;
104    }
105
106    // Assign the name and platform variable
107    browser.name = matched.browser;
108    browser.platform = matched.platform;
109
110
111    jQuery.browser = browser;
112})(jQuery, window);
113
114/*
115	Masked Input plugin for jQuery
116	Copyright (c) 2007-2011 Josh Bush (digitalbush.com)
117	Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) 
118	Version: 1.3
119  https://cloud.github.com/downloads/digitalBush/jquery.maskedinput/jquery.maskedinput-1.3.min.js
120*/
121(function (a) { console.log('TESTLOAD'); var b = (a.browser.msie ? "paste" : "input") + ".mask", c = window.orientation != undefined; a.mask = { definitions: { 9: "[0-9]", a: "[A-Za-z]", "*": "[A-Za-z0-9]" }, dataName: "rawMaskFn" }, a.fn.extend({ caret: function (a, b) { if (this.length != 0) { if (typeof a == "number") { b = typeof b == "number" ? b : a; return this.each(function () { if (this.setSelectionRange) this.setSelectionRange(a, b); else if (this.createTextRange) { var c = this.createTextRange(); c.collapse(!0), c.moveEnd("character", b), c.moveStart("character", a), c.select() } }) } if (this[0].setSelectionRange) a = this[0].selectionStart, b = this[0].selectionEnd; else if (document.selection && document.selection.createRange) { var c = document.selection.createRange(); a = 0 - c.duplicate().moveStart("character", -1e5), b = a + c.text.length } return { begin: a, end: b } } }, unmask: function () { return this.trigger("unmask") }, mask: function (d, e) { if (!d && this.length > 0) { var f = a(this[0]); return f.data(a.mask.dataName)() } e = a.extend({ placeholder: "_", completed: null }, e); var g = a.mask.definitions, h = [], i = d.length, j = null, k = d.length; a.each(d.split(""), function (a, b) { b == "?" ? (k-- , i = a) : g[b] ? (h.push(new RegExp(g[b])), j == null && (j = h.length - 1)) : h.push(null) }); return this.trigger("unmask").each(function () { function v(a) { var b = f.val(), c = -1; for (var d = 0, g = 0; d < k; d++)if (h[d]) { l[d] = e.placeholder; while (g++ < b.length) { var m = b.charAt(g - 1); if (h[d].test(m)) { l[d] = m, c = d; break } } if (g > b.length) break } else l[d] == b.charAt(g) && d != i && (g++ , c = d);
121 if (!a && c + 1 < i) f.val(""), t(0, k); else if (a || c + 1 >= i) u(), a || f.val(f.val().substring(0, c + 1)); return i ? d : j } function u() { return f.val(l.join("")).val() } function t(a, b) { for (var c = a; c < b && c < k; c++)h[c] && (l[c] = e.placeholder) } function s(a) { var b = a.which, c = f.caret(); if (a.ctrlKey || a.altKey || a.metaKey || b < 32) return !0; if (b) { c.end - c.begin != 0 && (t(c.begin, c.end), p(c.begin, c.end - 1)); var d = n(c.begin - 1); if (d < k) { var g = String.fromCharCode(b); if (h[d].test(g)) { q(d), l[d] = g, u(); var i = n(d); f.caret(i), e.completed && i >= k && e.completed.call(f) } } return !1 } } function r(a) { var b = a.which; if (b == 8 || b == 46 || c && b == 127) { var d = f.caret(), e = d.begin, g = d.end; g - e == 0 && (e = b != 46 ? o(e) : g = n(e - 1), g = b == 46 ? n(g) : g), t(e, g), p(e, g - 1); return !1 } if (b == 27) { f.val(m), f.caret(0, v()); return !1 } } function q(a) { for (var b = a, c = e.placeholder; b < k; b++)if (h[b]) { var d = n(b), f = l[b]; l[b] = c; if (d < k && h[d].test(f)) c = f; else break } } function p(a, b) { if (!(a < 0)) { for (var c = a, d = n(b); c < k; c++)if (h[c]) { if (d < k && h[c].test(l[d])) l[c] = l[d], l[d] = e.placeholder; else break; d = n(d) } u(), f.caret(Math.max(j, a)) } } function o(a) { while (--a >= 0 && !h[a]); return a } function n(a) { while (++a <= k && !h[a]); return a } var f = a(this), l = a.map(d.split(""), function (a, b) { if (a != "?") return g[a] ? e.placeholder : a }), m = f.val(); f.data(a.mask.dataName, function () { return a.map(l, function (a, b) { return h[b] && a != e.placeholder ? a : null }).join("") }), f.attr("readonly") || f.one("unmask", function () { f.unbind(".mask").removeData(a.mask.dataName) }).bind("focus.mask", function () { m = f.val(); var b = v(); u(); var c = function () { b == d.length ? f.caret(0, b) : f.caret(b) }; (a.browser.msie ? c : function () { setTimeout(c, 0) })() }).bind("blur.mask", function () { v(), f.val() != m && f.change() }).bind("keydown.mask", r).bind("keypress.mask", s).bind(b, function () { setTimeout(function () { f.caret(v(!0)) }, 0) }), v() }) } }) })(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.