'use strict';Registry.require(["helper","compat","i18n"],function(){var h=Registry.get("helper"),m=Registry.get("compat"),r=Registry.get("i18n"),q=function(){this.uuid=null;this.observers=[];this.name=this.supportURL=this.updateURL=this.downloadURL=this.fileURL=this.icon64=this.icon=null;this.name_i18n={};this.description=this.homepage=this.namespace=this.version=null;this.description_i18n={};this.system=!1;this.enabled=!0;this.position=0;this.grant=[];this.requires=[];this.includes=[];this.matches= [];this.excludes=[];this.resources=[];this.connects=[];this.blockers=[];this.lastModified=this.lastUpdated=0;this.version=null;this.sync={imported:!1};this.options={comment:null,compatopts_for_requires:!0,compat_wrappedjsobject:!1,compat_metadata:!1,compat_foreach:!1,compat_arrayleft:!1,compat_prototypes:!1,compat_uW_gmonkey:!1,compat_forvarin:!1,noframes:null,awareOfChrome:!1,run_at:null,override:{use_includes:[],orig_includes:[],merge_includes:!0,use_matches:[],orig_matches:[],merge_matches:!0, use_excludes:[],orig_excludes:[],merge_excludes:!0,use_connects:[],merge_connects:!0,use_blockers:[],orig_run_at:null,orig_noframes:null}}},p={Script:q,processMetaHeader:function(a){var c={};a=a.replace(/\t/g," ");a=a.replace(/\r/g,"\n");a=a.replace(/\n\n+/g,"\n");a=a.replace(/[^|\n][ \t]+\/\//g,"//");var b,e;a.split("\n").forEach(function(a){b=a.replace(/^[\t\s]*\/\//gi,"").replace(/^[\t\s]*/gi,"").replace(/\s\s+/gi," ");h.each({"uso:hash":!1,version:!1},function(a,f){var d=new RegExp("^@"+f+ "[\\t\\s]","i"),k=a||f;-1!=b.search(d)&&(e=b.replace(d,"").replace(/[ \b\r\n]/gi,"").trim(),""!==e&&(c[k]=c[k]||e))})});return c},processHeader:function(a){var c=new q;a=a.replace(/\t/g," ");a=a.replace(/\r/g,"\n");a=a.replace(/\n\n+/g,"\n");a=a.replace(/[^|\n][ \t]+\/\//g,"//");var b,e,f;a.split("\n").forEach(function(a){e=a.replace(/^[\t\s]*\/\//gi,"").replace(/^[\t\s]*/gi,"").replace(/\s\s+/gi," ");f=!1;h.each({name:!1,description:!1},function(a,b){var n=a||b,d=null!==c[n],g=e.match(new RegExp("^@"+ b+"(\\[[a-zA-Z_\\-0-9]+\\]|:[a-zA-Z_\\-0-9]+|#[a-zA-Z_\\-0-9]+"+(d?"| [a-zA-Z_\\-0-9]+":"")+")?[\\t\\s]+(.*)$"));if(g&&3===g.length&&(f=g[2].replace(/[\r\n]/gi,"").trim(),void 0!==f&&""!==f))if(d){var h,n=n+"_i18n";g[1]&&(h=g[1].match("[a-zA-Z_\\-0-9]+"))&&h[0]&&(g=r.parseLocale(h[0]),c[n][g]=f)}else c[n]=f});h.each({version:!1,updateURL:!1,downloadURL:!1,supportURL:!1,homepage:!1,homepageURL:"homepage",website:"homepage",source:"homepage",icon:!1,iconURL:"icon",defaulticon:"icon",icon64:!1,iconURL64:"icon64", uuid:!1},function(a,b){var d=new RegExp("^@"+b+"[\\t\\s]","i"),g=a||b;-1!=e.search(d)&&(f=e.replace(d,"").replace(/[ \b\r\n]/gi,"").trim(),""!==f&&(c[g]=c[g]||f))});h.each({namespace:!1,author:!1,copyright:!1},function(a,b){var d=new RegExp("^@"+b+"[\\t\\s]","i"),g=a||b;-1!=e.search(d)&&(f=e.replace(d,"").replace(/[\b\r\n]/gi,"").trim(),""!==f&&(c[g]=c[g]||f))});h.each({"run-at":"run_at"},function(a,b){var d=new RegExp("^@"+b+"[\\t\\s]","i"),g=a||b;-1!=e.search(d)&&(f=e.replace(d,"").replace(/[\r\n]/gi, "").trim(),""!==f&&(c.options[g]=c.options[g]||f))});var g=function(a){return a.trim().replace(/ /gi,"%20").replace(/[\b\r\n]/gi,"")};h.each({include:"includes",match:"matches",exclude:"excludes",connect:"connects","connect-src":"connects",domain:"connects"},function(a,b){var d=new RegExp("^@"+b+"[\\t\\s]","i"),h=a||b;-1!=e.search(d)&&(f=g(e.replace(d,"")).trim())&&c[h].push(f)});-1!=e.search(/^@require[\t\s]/)&&(f=g(e.replace(/^@require[\t\s]*/gi,"")).trim())&&c.requires.push({url:f,loaded:!1,textContent:""}); if(-1!=e.search(/^@resource[\t\s]/)&&(f=e.replace(/^@resource[\t\s]*/gi,"").trim(),b=f.split(" "),2<=b.length)){a=b.shift();var d=g(b.join(" "));""!==a&&d&&c.resources.push({name:a,url:d,loaded:!1})}-1!=e.search(/^@grant[\t\s]/)&&(f=e.replace(/^@grant/gi,"").replace(/[\b\r\n]/gi,"").trim())&&c.grant.push(f);h.each({noframes:!1,nocompat:"awareOfChrome"},function(a,b){var d=a||b;-1!=e.search(new RegExp("^@"+b+"[\\t\\s\\r\\n]?"))&&(c.options[d]=!0)})});c.version||(c.version="0.0");return c},getHeaderTags:function(){return{start:"==UserScript==", stop:"==/UserScript=="}},getHeader:function(a){var c=h.getStringBetweenTags(a,"==UserScript==","==/UserScript==");if(!c)return null;var b=a.search("==UserScript=="),e=a.search("");a=a.search("");return 0g;g++){var d=f[g],k=h[g];if(1===g%2){if(!d&&k)return c.eNEWER;if(d&&!k)return c.eOLDER;for(var d=d.match(/\w/g)||[],k=k.match(/\w/g)||[],l=0;lk[l].charCodeAt(0))return c.eNEWER;if(d[l].charCodeAt(0)k.length)return c.eNEWER;if(d.length Number(k))return c.eNEWER;if(Number(d)