1 line
11 KiB
JSON
1 line
11 KiB
JSON
{"ast":null,"code":"// https://github.com/kevva/url-regex/blob/master/index.js\nvar urlReg;\nexport default (function () {\n if (urlReg) {\n return urlReg;\n }\n var word = '[a-fA-F\\\\d:]';\n var b = function b(options) {\n return options && options.includeBoundaries ? \"(?:(?<=\\\\s|^)(?=\".concat(word, \")|(?<=\").concat(word, \")(?=\\\\s|$))\") : '';\n };\n var v4 = '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}';\n var v6seg = '[a-fA-F\\\\d]{1,4}';\n var v6List = [\"(?:\".concat(v6seg, \":){7}(?:\").concat(v6seg, \"|:)\"),\n // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n \"(?:\".concat(v6seg, \":){6}(?:\").concat(v4, \"|:\").concat(v6seg, \"|:)\"),\n // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::\n \"(?:\".concat(v6seg, \":){5}(?::\").concat(v4, \"|(?::\").concat(v6seg, \"){1,2}|:)\"),\n // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::\n \"(?:\".concat(v6seg, \":){4}(?:(?::\").concat(v6seg, \"){0,1}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,3}|:)\"),\n // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::\n \"(?:\".concat(v6seg, \":){3}(?:(?::\").concat(v6seg, \"){0,2}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,4}|:)\"),\n // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::\n \"(?:\".concat(v6seg, \":){2}(?:(?::\").concat(v6seg, \"){0,3}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,5}|:)\"),\n // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::\n \"(?:\".concat(v6seg, \":){1}(?:(?::\").concat(v6seg, \"){0,4}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,6}|:)\"),\n // 1:: 1::3:4:5:6:7:8 1::8 1::\n \"(?::(?:(?::\".concat(v6seg, \"){0,5}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,7}|:))\") // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::\n ];\n var v6Eth0 = \"(?:%[0-9a-zA-Z]{1,})?\"; // %eth0 %1\n\n var v6 = \"(?:\".concat(v6List.join('|'), \")\").concat(v6Eth0);\n\n // Pre-compile only the exact regexes because adding a global flag make regexes stateful\n var v46Exact = new RegExp(\"(?:^\".concat(v4, \"$)|(?:^\").concat(v6, \"$)\"));\n var v4exact = new RegExp(\"^\".concat(v4, \"$\"));\n var v6exact = new RegExp(\"^\".concat(v6, \"$\"));\n var ip = function ip(options) {\n return options && options.exact ? v46Exact : new RegExp(\"(?:\".concat(b(options)).concat(v4).concat(b(options), \")|(?:\").concat(b(options)).concat(v6).concat(b(options), \")\"), 'g');\n };\n ip.v4 = function (options) {\n return options && options.exact ? v4exact : new RegExp(\"\".concat(b(options)).concat(v4).concat(b(options)), 'g');\n };\n ip.v6 = function (options) {\n return options && options.exact ? v6exact : new RegExp(\"\".concat(b(options)).concat(v6).concat(b(options)), 'g');\n };\n var protocol = \"(?:(?:[a-z]+:)?//)\";\n var auth = '(?:\\\\S+(?::\\\\S*)?@)?';\n var ipv4 = ip.v4().source;\n var ipv6 = ip.v6().source;\n var host = \"(?:(?:[a-z\\\\u00a1-\\\\uffff0-9][-_]*)*[a-z\\\\u00a1-\\\\uffff0-9]+)\";\n var domain = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*\";\n var tld = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,}))\";\n var port = '(?::\\\\d{2,5})?';\n var path = '(?:[/?#][^\\\\s\"]*)?';\n var regex = \"(?:\".concat(protocol, \"|www\\\\.)\").concat(auth, \"(?:localhost|\").concat(ipv4, \"|\").concat(ipv6, \"|\").concat(host).concat(domain).concat(tld, \")\").concat(port).concat(path);\n urlReg = new RegExp(\"(?:^\".concat(regex, \"$)\"), 'i');\n return urlReg;\n});","map":{"version":3,"names":["urlReg","word","b","options","includeBoundaries","concat","v4","v6seg","v6List","v6Eth0","v6","join","v46Exact","RegExp","v4exact","v6exact","ip","exact","protocol","auth","ipv4","source","ipv6","host","domain","tld","port","path","regex"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/@rc-component/async-validator/es/rule/url.js"],"sourcesContent":["// https://github.com/kevva/url-regex/blob/master/index.js\nvar urlReg;\nexport default (function () {\n if (urlReg) {\n return urlReg;\n }\n var word = '[a-fA-F\\\\d:]';\n var b = function b(options) {\n return options && options.includeBoundaries ? \"(?:(?<=\\\\s|^)(?=\".concat(word, \")|(?<=\").concat(word, \")(?=\\\\s|$))\") : '';\n };\n var v4 = '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}';\n var v6seg = '[a-fA-F\\\\d]{1,4}';\n var v6List = [\"(?:\".concat(v6seg, \":){7}(?:\").concat(v6seg, \"|:)\"), // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n \"(?:\".concat(v6seg, \":){6}(?:\").concat(v4, \"|:\").concat(v6seg, \"|:)\"), // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::\n \"(?:\".concat(v6seg, \":){5}(?::\").concat(v4, \"|(?::\").concat(v6seg, \"){1,2}|:)\"), // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::\n \"(?:\".concat(v6seg, \":){4}(?:(?::\").concat(v6seg, \"){0,1}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,3}|:)\"), // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::\n \"(?:\".concat(v6seg, \":){3}(?:(?::\").concat(v6seg, \"){0,2}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,4}|:)\"), // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::\n \"(?:\".concat(v6seg, \":){2}(?:(?::\").concat(v6seg, \"){0,3}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,5}|:)\"), // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::\n \"(?:\".concat(v6seg, \":){1}(?:(?::\").concat(v6seg, \"){0,4}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,6}|:)\"), // 1:: 1::3:4:5:6:7:8 1::8 1::\n \"(?::(?:(?::\".concat(v6seg, \"){0,5}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,7}|:))\") // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::\n ];\n var v6Eth0 = \"(?:%[0-9a-zA-Z]{1,})?\"; // %eth0 %1\n\n var v6 = \"(?:\".concat(v6List.join('|'), \")\").concat(v6Eth0);\n\n // Pre-compile only the exact regexes because adding a global flag make regexes stateful\n var v46Exact = new RegExp(\"(?:^\".concat(v4, \"$)|(?:^\").concat(v6, \"$)\"));\n var v4exact = new RegExp(\"^\".concat(v4, \"$\"));\n var v6exact = new RegExp(\"^\".concat(v6, \"$\"));\n var ip = function ip(options) {\n return options && options.exact ? v46Exact : new RegExp(\"(?:\".concat(b(options)).concat(v4).concat(b(options), \")|(?:\").concat(b(options)).concat(v6).concat(b(options), \")\"), 'g');\n };\n ip.v4 = function (options) {\n return options && options.exact ? v4exact : new RegExp(\"\".concat(b(options)).concat(v4).concat(b(options)), 'g');\n };\n ip.v6 = function (options) {\n return options && options.exact ? v6exact : new RegExp(\"\".concat(b(options)).concat(v6).concat(b(options)), 'g');\n };\n var protocol = \"(?:(?:[a-z]+:)?//)\";\n var auth = '(?:\\\\S+(?::\\\\S*)?@)?';\n var ipv4 = ip.v4().source;\n var ipv6 = ip.v6().source;\n var host = \"(?:(?:[a-z\\\\u00a1-\\\\uffff0-9][-_]*)*[a-z\\\\u00a1-\\\\uffff0-9]+)\";\n var domain = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*\";\n var tld = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,}))\";\n var port = '(?::\\\\d{2,5})?';\n var path = '(?:[/?#][^\\\\s\"]*)?';\n var regex = \"(?:\".concat(protocol, \"|www\\\\.)\").concat(auth, \"(?:localhost|\").concat(ipv4, \"|\").concat(ipv6, \"|\").concat(host).concat(domain).concat(tld, \")\").concat(port).concat(path);\n urlReg = new RegExp(\"(?:^\".concat(regex, \"$)\"), 'i');\n return urlReg;\n});"],"mappings":"AAAA;AACA,IAAIA,MAAM;AACV,gBAAgB,YAAY;EAC1B,IAAIA,MAAM,EAAE;IACV,OAAOA,MAAM;EACf;EACA,IAAIC,IAAI,GAAG,cAAc;EACzB,IAAIC,CAAC,GAAG,SAASA,CAACA,CAACC,OAAO,EAAE;IAC1B,OAAOA,OAAO,IAAIA,OAAO,CAACC,iBAAiB,GAAG,kBAAkB,CAACC,MAAM,CAACJ,IAAI,EAAE,QAAQ,CAAC,CAACI,MAAM,CAACJ,IAAI,EAAE,aAAa,CAAC,GAAG,EAAE;EAC1H,CAAC;EACD,IAAIK,EAAE,GAAG,gGAAgG;EACzG,IAAIC,KAAK,GAAG,kBAAkB;EAC9B,IAAIC,MAAM,GAAG,CAAC,KAAK,CAACH,MAAM,CAACE,KAAK,EAAE,UAAU,CAAC,CAACF,MAAM,CAACE,KAAK,EAAE,KAAK,CAAC;EAAE;EACpE,KAAK,CAACF,MAAM,CAACE,KAAK,EAAE,UAAU,CAAC,CAACF,MAAM,CAACC,EAAE,EAA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