Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

roo-tool

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roo-tool - npm Package Compare versions

Comparing version 0.1.2 to 1.0.2

5

CHANGELOG.md

@@ -11,1 +11,6 @@ #### 版本迭代

```
#### version 1.0.2
1.更新js-cookie、urijs依赖版本为安装当前最新版本。
2.规范工具函数命名、修改Tool.checkURLExist函数名为Tool.isRealUrl。
3.补充isFunction、toThousands、debounceFunc函数到Tool函数。

2

lib/roo-tool.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.RooTool=t()}(this,function(){"use strict";var E="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(e,t){return e(t={exports:{}},t.exports),t.exports}var t=e(function(e,t){var r;r=function(){function g(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}return function e(d){function m(e,t,r){var n;if("undefined"!=typeof document){if(1<arguments.length){if("number"==typeof(r=g({path:"/"},m.defaults,r)).expires){var o=new Date;o.setMilliseconds(o.getMilliseconds()+864e5*r.expires),r.expires=o}r.expires=r.expires?r.expires.toUTCString():"";try{n=JSON.stringify(t),/^[\{\[]/.test(n)&&(t=n)}catch(e){}t=d.write?d.write(t,e):encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var i="";for(var a in r)r[a]&&(i+="; "+a,!0!==r[a]&&(i+="="+r[a]));return document.cookie=e+"="+t+i}e||(n={});for(var s=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,c=0;c<s.length;c++){var h=s[c].split("="),l=h.slice(1).join("=");this.json||'"'!==l.charAt(0)||(l=l.slice(1,-1));try{var p=h[0].replace(u,decodeURIComponent);if(l=d.read?d.read(l,p):d(l,p)||l.replace(u,decodeURIComponent),this.json)try{l=JSON.parse(l)}catch(e){}if(e===p){n=l;break}e||(n[p]=l)}catch(e){}}return n}}return(m.set=m).get=function(e){return m.call(m,e)},m.getJSON=function(){return m.apply({json:!0},[].slice.call(arguments))},m.defaults={},m.remove=function(e,t){m(e,"",g(t,{expires:-1}))},m.withConverter=e,m}(function(){})},e.exports=r()});function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r={set:function(e,t){if(t){var r="object"===n(t)?JSON.stringify(t):t;window.localStorage[e]=r}else delete window.localStorage[e]},get:function(e){var t=window.localStorage[e]||"";return this.isJSONStr(t)?JSON.parse(t):t},isJSONStr:function(e){return"{"===e.charAt(0)&&"}"===e.charAt(e.length-1)||"["===e.charAt(0)&&"]"===e.charAt(e.length-1)},clear:function(){window.localStorage.clear()}},o=e(function(j,R){!function(e){var t=R&&!R.nodeType&&R,r=j&&!j.nodeType&&j,n="object"==typeof E&&E;n.global!==n&&n.window!==n&&n.self!==n||(e=n);var o,i,v=2147483647,y=36,b=1,_=26,a=38,s=700,w=72,k=128,x="-",u=/^xn--/,c=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=y-b,z=Math.floor,A=String.fromCharCode;function S(e){throw new RangeError(l[e])}function d(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function m(e,t){var r=e.split("@"),n="";return 1<r.length&&(n=r[0]+"@",e=r[1]),n+d((e=e.replace(h,".")).split("."),t).join(".")}function Q(e){for(var t,r,n=[],o=0,i=e.length;o<i;)55296<=(t=e.charCodeAt(o++))&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function I(e){return d(e,function(e){var t="";return 65535<e&&(t+=A((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=A(e)}).join("")}function P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function U(e,t,r){var n=0;for(e=r?z(e/s):e>>1,e+=z(e/t);p*_>>1<e;n+=y)e=z(e/p);return z(n+(p+1)*e/(e+a))}function g(e){var t,r,n,o,i,a,s,u,c,h,l,p=[],d=e.length,m=0,g=k,f=w;for((r=e.lastIndexOf(x))<0&&(r=0),n=0;n<r;++n)128<=e.charCodeAt(n)&&S("not-basic"),p.push(e.charCodeAt(n));for(o=0<r?r+1:0;o<d;){for(i=m,a=1,s=y;d<=o&&S("invalid-input"),l=e.charCodeAt(o++),(y<=(u=l-48<10?l-22:l-65<26?l-65:l-97<26?l-97:y)||u>z((v-m)/a))&&S("overflow"),m+=u*a,!(u<(c=s<=f?b:f+_<=s?_:s-f));s+=y)a>z(v/(h=y-c))&&S("overflow"),a*=h;f=U(m-i,t=p.length+1,0==i),z(m/t)>v-g&&S("overflow"),g+=z(m/t),m%=t,p.splice(m++,0,g)}return I(p)}function f(e){var t,r,n,o,i,a,s,u,c,h,l,p,d,m,g,f=[];for(p=(e=Q(e)).length,t=k,i=w,a=r=0;a<p;++a)(l=e[a])<128&&f.push(A(l));for(n=o=f.length,o&&f.push(x);n<p;){for(s=v,a=0;a<p;++a)t<=(l=e[a])&&l<s&&(s=l);for(s-t>z((v-r)/(d=n+1))&&S("overflow"),r+=(s-t)*d,t=s,a=0;a<p;++a)if((l=e[a])<t&&++r>v&&S("overflow"),l==t){for(u=r,c=y;!(u<(h=c<=i?b:i+_<=c?_:c-i));c+=y)g=u-h,m=y-h,f.push(A(P(h+g%m,0))),u=z(g/m);f.push(A(P(u,0))),i=U(r,d,n==o),r=0,++n}++r,++t}return f.join("")}if(o={version:"1.3.2",ucs2:{decode:Q,encode:I},decode:g,encode:f,toASCII:function(e){return m(e,function(e){return c.test(e)?"xn--"+f(e):e})},toUnicode:function(e){return m(e,function(e){return u.test(e)?g(e.slice(4).toLowerCase()):e})}},t&&r)if(j.exports==t)r.exports=o;else for(i in o)o.hasOwnProperty(i)&&(t[i]=o[i]);else e.punycode=o}(E)}),i=e(function(e){var t,r;t=E,r=function(e){var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),o=n.length,i=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),-1!==n[(o=n.length)-1].indexOf(".")&&(i=7),t=0;t<o&&""!==n[t];t++);if(t<i)for(n.splice(t,1,"0000");n.length<i;)n.splice(t,0,"0000");for(var a=0;a<i;a++){r=n[a].split("");for(var s=0;s<3&&"0"===r[0]&&1<r.length;s++)r.splice(0,1);n[a]=r.join("")}var u=-1,c=0,h=0,l=-1,p=!1;for(a=0;a<i;a++)p?"0"===n[a]?h+=1:(p=!1,c<h&&(u=l,c=h)):"0"===n[a]&&(p=!0,l=a,h=1);c<h&&(u=l,c=h),1<c&&n.splice(u,c,""),o=n.length;var d="";for(""===n[0]&&(d=":"),a=0;a<o&&(d+=n[a],a!==o-1);a++)d+=":";return""===n[o-1]&&(d+=":"),d},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}},e.exports?e.exports=r():t.IPv6=r(t)}),a=e(function(e){var t,r;t=E,r=function(e){var t=e&&e.SecondLevelDomains,o={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var r=e.lastIndexOf(".",t-1);if(r<=0||t-1<=r)return!1;var n=o.list[e.slice(t+1)];return!!n&&0<=n.indexOf(" "+e.slice(r+1,t)+" ")},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(0<=e.lastIndexOf(".",t-1))return!1;var r=o.list[e.slice(t+1)];return!!r&&0<=r.indexOf(" "+e.slice(0,t)+" ")},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var r=e.lastIndexOf(".",t-1);if(r<=0||t-1<=r)return null;var n=o.list[e.slice(t+1)];return n?n.indexOf(" "+e.slice(r+1,t)+" ")<0?null:e.slice(r+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return o},e.exports?e.exports=r():t.SecondLevelDomains=r(t)});return{Cookie:t,LocalDb:r,URI:e(function(e){var t,r;t=E,r=function(s,t,c,r){var n=r&&r.URI;function v(e,t){var r=1<=arguments.length,n=2<=arguments.length;if(!(this instanceof v))return r?n?new v(e,t):new v(e):new v;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}v.version="1.19.1";var e=v.prototype,h=Object.prototype.hasOwnProperty;function u(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function a(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===a(e)}function p(e,t){var r,n,o={};if("RegExp"===a(t))o=null;else if(l(t))for(r=0,n=t.length;r<n;r++)o[t[r]]=!0;else o[t]=!0;for(r=0,n=e.length;r<n;r++){(o&&void 0!==o[e[r]]||!o&&t.test(e[r]))&&(e.splice(r,1),n--,r--)}return e}function d(e,t){var r,n;if(l(t)){for(r=0,n=t.length;r<n;r++)if(!d(e,t[r]))return!1;return!0}var o=a(t);for(r=0,n=e.length;r<n;r++)if("RegExp"===o){if("string"==typeof e[r]&&e[r].match(t))return!0}else if(e[r]===t)return!0;return!1}function m(e,t){if(!l(e)||!l(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function g(e){return e.replace(/^\/+|\/+$/g,"")}function o(e){return escape(e)}function i(e){return encodeURIComponent(e).replace(/[!'()*]/g,o).replace(/\*/g,"%2A")}v._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:v.preventInvalidHostname,duplicateQueryParameters:v.duplicateQueryParameters,escapeQuerySpace:v.escapeQuerySpace}},v.preventInvalidHostname=!1,v.duplicateQueryParameters=!1,v.escapeQuerySpace=!0,v.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,v.idn_expression=/[^a-z0-9\._-]/i,v.punycode_expression=/(xn--)/i,v.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,v.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,v.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,v.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},v.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},v.hostProtocols=["http","https"],v.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,v.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},v.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return v.domAttributes[t]}},v.encode=i,v.decode=decodeURIComponent,v.iso8859=function(){v.encode=escape,v.decode=unescape},v.unicode=function(){v.encode=i,v.decode=decodeURIComponent},v.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},v.encodeQuery=function(e,t){var r=v.encode(e+"");return void 0===t&&(t=v.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},v.decodeQuery=function(t,e){t+="",void 0===e&&(e=v.escapeQuerySpace);try{return v.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var f,y={encode:"encode",decode:"decode"},b=function(r,n){return function(t){try{return v[n](t+"").replace(v.characters[r][n].expression,function(e){return v.characters[r][n].map[e]})}catch(e){return t}}};for(f in y)v[f+"PathSegment"]=b("pathname",y[f]),v[f+"UrnPathSegment"]=b("urnpath",y[f]);var _=function(i,a,s){return function(e){var t;t=s?function(e){return v[a](v[s](e))}:v[a];for(var r=(e+"").split(i),n=0,o=r.length;n<o;n++)r[n]=t(r[n]);return r.join(i)}};function w(r){return function(e,t){return void 0===e?this._parts[r]||"":(this._parts[r]=e||null,this.build(!t),this)}}function k(r,n){return function(e,t){return void 0===e?this._parts[r]||"":(null!==e&&(e+="").charAt(0)===n&&(e=e.substring(1)),this._parts[r]=e,this.build(!t),this)}}v.decodePath=_("/","decodePathSegment"),v.decodeUrnPath=_(":","decodeUrnPathSegment"),v.recodePath=_("/","encodePathSegment","decode"),v.recodeUrnPath=_(":","encodeUrnPathSegment","decode"),v.encodeReserved=b("reserved","encode"),v.parse=function(e,t){var r;return t||(t={preventInvalidHostname:v.preventInvalidHostname}),-1<(r=e.indexOf("#"))&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),-1<(r=e.indexOf("?"))&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=v.parseAuthority(e,t)):-1<(r=e.indexOf(":"))&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(v.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3)?(e=e.substring(r+3),e=v.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},v.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var i=e.indexOf(":"),a=e.indexOf("/"),s=e.indexOf(":",i+1);t.port=-1!==s&&(-1===a||s<a)?(t.hostname=e.substring(0,o)||null,null):(n=e.substring(0,o).split(":"),t.hostname=n[0]||null,n[1]||null)}return t.hostname&&"/"!==e.substring(o).charAt(0)&&(o++,e="/"+e),t.preventInvalidHostname&&v.ensureValidHostname(t.hostname,t.protocol),t.port&&v.ensureValidPort(t.port),e.substring(o)||"/"},v.parseAuthority=function(e,t){return e=v.parseUserinfo(e,t),v.parseHost(e,t)},v.parseUserinfo=function(e,t){var r,n=e.indexOf("/"),o=e.lastIndexOf("@",-1<n?n:e.length-1);return-1<o&&(-1===n||o<n)?(r=e.substring(0,o).split(":"),t.username=r[0]?v.decode(r[0]):null,r.shift(),t.password=r[0]?v.decode(r.join(":")):null,e=e.substring(o+1)):(t.username=null,t.password=null),e},v.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,o,i={},a=e.split("&"),s=a.length,u=0;u<s;u++)r=a[u].split("="),n=v.decodeQuery(r.shift(),t),o=r.length?v.decodeQuery(r.join("="),t):null,h.call(i,n)?("string"!=typeof i[n]&&null!==i[n]||(i[n]=[i[n]]),i[n].push(o)):i[n]=o;return i},v.build=function(e){var t="";return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//"),t+=v.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&"string"==typeof e.hostname&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},v.buildHost=function(e){var t="";return e.hostname?(v.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},v.buildAuthority=function(e){return v.buildUserinfo(e)+v.buildHost(e)},v.buildUserinfo=function(e){var t="";return e.username&&(t+=v.encode(e.username)),e.password&&(t+=":"+v.encode(e.password)),t&&(t+="@"),t},v.buildQuery=function(e,t,r){var n,o,i,a,s="";for(o in e)if(h.call(e,o)&&o)if(l(e[o]))for(n={},i=0,a=e[o].length;i<a;i++)void 0!==e[o][i]&&void 0===n[e[o][i]+""]&&(s+="&"+v.buildQueryParameter(o,e[o][i],r),!0!==t&&(n[e[o][i]+""]=!0));else void 0!==e[o]&&(s+="&"+v.buildQueryParameter(o,e[o],r));return s.substring(1)},v.buildQueryParameter=function(e,t,r){return v.encodeQuery(e,r)+(null!==t?"="+v.encodeQuery(t,r):"")},v.addQuery=function(e,t,r){if("object"==typeof t)for(var n in t)h.call(t,n)&&v.addQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=r);"string"==typeof e[t]&&(e[t]=[e[t]]),l(r)||(r=[r]),e[t]=(e[t]||[]).concat(r)}},v.setQuery=function(e,t,r){if("object"==typeof t)for(var n in t)h.call(t,n)&&v.setQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===r?null:r}},v.removeQuery=function(e,t,r){var n,o,i;if(l(t))for(n=0,o=t.length;n<o;n++)e[t[n]]=void 0;else if("RegExp"===a(t))for(i in e)t.test(i)&&(e[i]=void 0);else if("object"==typeof t)for(i in t)h.call(t,i)&&v.removeQuery(e,i,t[i]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===a(r)?!l(e[t])&&r.test(e[t])?e[t]=void 0:e[t]=p(e[t],r):e[t]!==String(r)||l(r)&&1!==r.length?l(e[t])&&(e[t]=p(e[t],r)):e[t]=void 0:e[t]=void 0}},v.hasQuery=function(e,t,r,n){switch(a(t)){case"String":break;case"RegExp":for(var o in e)if(h.call(e,o)&&t.test(o)&&(void 0===r||v.hasQuery(e,o,r)))return!0;return!1;case"Object":for(var i in t)if(h.call(t,i)&&!v.hasQuery(e,i,t[i]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(a(r)){case"Undefined":return t in e;case"Boolean":return r===Boolean(l(e[t])?e[t].length:e[t]);case"Function":return!!r(e[t],t,e);case"Array":return!!l(e[t])&&(n?d:m)(e[t],r);case"RegExp":return l(e[t])?!!n&&d(e[t],r):Boolean(e[t]&&e[t].match(r));case"Number":r=String(r);case"String":return l(e[t])?!!n&&d(e[t],r):e[t]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},v.joinPaths=function(){for(var e=[],t=[],r=0,n=0;n<arguments.length;n++){var o=new v(arguments[n]);e.push(o);for(var i=o.segment(),a=0;a<i.length;a++)"string"==typeof i[a]&&t.push(i[a]),i[a]&&r++}if(!t.length||!r)return new v("");var s=new v("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||s.path("/"+s.path()),s.normalize()},v.commonPath=function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r)){r--;break}return r<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(r)&&"/"===t.charAt(r)||(r=e.substring(0,r).lastIndexOf("/")),e.substring(0,r+1))},v.withinString=function(e,t,r){r||(r={});var n=r.start||v.findUri.start,o=r.end||v.findUri.end,i=r.trim||v.findUri.trim,a=r.parens||v.findUri.parens,s=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var u=n.exec(e);if(!u)break;var c=u.index;if(r.ignoreHtml){var h=e.slice(Math.max(c-3,0),c);if(h&&s.test(h))continue}for(var l=c+e.slice(c).search(o),p=e.slice(c,l),d=-1;;){var m=a.exec(p);if(!m)break;var g=m.index+m[0].length;d=Math.max(d,g)}if(!((p=-1<d?p.slice(0,d)+p.slice(d).replace(i,""):p.replace(i,"")).length<=u[0].length||r.ignore&&r.ignore.test(p))){var f=t(p,c,l=c+p.length,e);n.lastIndex=void 0!==f?(f=String(f),e=e.slice(0,c)+f+e.slice(l),c+f.length):l}}return n.lastIndex=0,e},v.ensureValidHostname=function(e,t){var r=!!e,n=!1;if(!!t&&(n=d(v.hostProtocols,t)),n&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+t);if(e&&e.match(v.invalid_hostname_characters)){if(!s)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(s.toASCII(e).match(v.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},v.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&0<t&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},v.noConflict=function(e){if(e){var t={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(t.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(t.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=r.SecondLevelDomains.noConflict()),t}return r.URI===this&&(r.URI=n),this},e.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=v.build(this._parts),this._deferred_build=!1),this},e.clone=function(){return new v(this)},e.valueOf=e.toString=function(){return this.build(!1)._string},e.protocol=w("protocol"),e.username=w("username"),e.password=w("password"),e.hostname=w("hostname"),e.port=w("port"),e.query=k("query","?"),e.fragment=k("fragment","#"),e.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},e.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},e.pathname=function(e,t){if(void 0!==e&&!0!==e)return this._parts.urn?this._parts.path=e?v.recodeUrnPath(e):"":this._parts.path=e?v.recodePath(e):"/",this.build(!t),this;var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?v.decodeUrnPath:v.decodePath)(r):r},e.path=e.pathname,e.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=v._parts();var n=e instanceof v,o="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[v.getDomAttribute(e)]||"",o=!1);if(!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=v.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var i=n?e._parts:e;for(r in i)"query"!==r&&h.call(this._parts,r)&&(this._parts[r]=i[r]);i.query&&this.query(i.query,!1)}return this.build(!t),this},e.is=function(e){var t=!1,r=!1,n=!1,o=!1,i=!1,a=!1,s=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,r=v.ip4_expression.test(this._parts.hostname),n=v.ip6_expression.test(this._parts.hostname),i=(o=!(t=r||n))&&c&&c.has(this._parts.hostname),a=o&&v.idn_expression.test(this._parts.hostname),s=o&&v.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return o;case"sld":return i;case"ip":return t;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return n;case"idn":return a;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return s}return null};var x=e.protocol,z=e.port,A=e.hostname;e.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(v.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,e,t)},e.scheme=e.protocol,e.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),v.ensureValidPort(e))),z.call(this,e,t))},e.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==v.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&v.ensureValidHostname(e,this._parts.protocol)}return A.call(this,e,t)},e.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=v(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},e.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?v.buildHost(this._parts):"";if("/"!==v.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},e.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?v.buildAuthority(this._parts):"";if("/"!==v.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},e.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e)return"@"!==e[e.length-1]&&(e+="@"),v.parseUserinfo(e,this._parts),this.build(!t),this;var r=v.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r},e.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=v.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},e.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),i=new RegExp("^"+u(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&v.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(i,e),this.build(!t),this},e.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(v.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},e.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),n=this._parts.hostname.substring(r+1);return!0!==t&&c&&c.list[n.toLowerCase()]&&c.get(this._parts.hostname)||n}var o;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!c||!c.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},e.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?v.decodePath(n):n}var o=this._parts.path.length-this.filename().length,i=this._parts.path.substring(0,o),a=new RegExp("^"+u(i));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=v.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},e.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?v.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var i=new RegExp(u(this.filename())+"$");return e=v.recodePath(e),this._parts.path=this._parts.path.replace(i,e),o?this.normalizePath(t):this.build(!t),this},e.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),i=o.lastIndexOf(".");return-1===i?"":(r=o.substring(i+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?v.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var a,s=this.suffix();if(s)a=e?new RegExp(u(s)+"$"):new RegExp(u("."+s)+"$");else{if(!e)return this;this._parts.path+="."+v.recodePath(e)}return a&&(e=v.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},e.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),a=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&a.shift(),e<0&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(l(t)){a=[];for(var s=0,u=t.length;s<u;s++)(t[s].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(g(t[s])))}else(t||"string"==typeof t)&&(t=g(t),""===a[a.length-1]?a[a.length-1]=t:a.push(t));else t?a[e]=g(t):a.splice(e,1);return i&&a.unshift(""),this.path(a.join(n),r)},e.segmentCoded=function(e,t,r){var n,o,i;if("number"!=typeof e&&(r=t,t=e,e=void 0),void 0===t){if(l(n=this.segment(e,t,r)))for(o=0,i=n.length;o<i;o++)n[o]=v.decode(n[o]);else n=void 0!==n?v.decode(n):void 0;return n}if(l(t))for(o=0,i=t.length;o<i;o++)t[o]=v.encode(t[o]);else t="string"==typeof t||t instanceof String?v.encode(t):t;return this.segment(e,t,r)};var S=e.query;return e.query=function(e,t){if(!0===e)return v.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"!=typeof e)return void 0!==e&&"string"!=typeof e?(this._parts.query=v.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):S.call(this,e,t);var r=v.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,r);return this._parts.query=v.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this},e.setQuery=function(e,t,r){var n=v.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)h.call(e,o)&&(n[o]=e[o])}return this._parts.query=v.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},e.addQuery=function(e,t,r){var n=v.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return v.addQuery(n,e,void 0===t?null:t),this._parts.query=v.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},e.removeQuery=function(e,t,r){var n=v.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return v.removeQuery(n,e,t),this._parts.query=v.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},e.hasQuery=function(e,t,r){var n=v.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return v.hasQuery(n,e,t,r)},e.setSearch=e.setQuery,e.addSearch=e.addQuery,e.removeSearch=e.removeQuery,e.hasSearch=e.hasQuery,e.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},e.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},e.normalizeHostname=function(e){return this._parts.hostname&&(this.is("IDN")&&s?this._parts.hostname=s.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!e)),this},e.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===v.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},e.normalizePath=function(e){var t,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=v.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var n,o,i="";for("/"!==(r=v.recodePath(r)).charAt(0)&&(t=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(i=r.substring(1).match(/^(\.\.\/)+/)||"")&&(i=i[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)r=0!==n?(-1===(o=r.substring(0,n).lastIndexOf("/"))&&(o=n),r.substring(0,o)+r.substring(n+3)):r.substring(3);return t&&this.is("relative")&&(r=i+r.substring(1)),this._parts.path=r,this.build(!e),this},e.normalizePathname=e.normalizePath,e.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(v.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},e.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},e.normalizeSearch=e.normalizeQuery,e.normalizeHash=e.normalizeFragment,e.iso8859=function(){var e=v.encode,t=v.decode;v.encode=escape,v.decode=decodeURIComponent;try{this.normalize()}finally{v.encode=e,v.decode=t}return this},e.unicode=function(){var e=v.encode,t=v.decode;v.encode=i,v.decode=unescape;try{this.normalize()}finally{v.encode=e,v.decode=t}return this},e.readable=function(){var e=this.clone();e.username("").password("").normalize();var t="";if(e._parts.protocol&&(t+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&s?(t+=s.toUnicode(e._parts.hostname),e._parts.port&&(t+=":"+e._parts.port)):t+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(t+="/"),t+=e.path(!0),e._parts.query){for(var r="",n=0,o=e._parts.query.split("&"),i=o.length;n<i;n++){var a=(o[n]||"").split("=");r+="&"+v.decodeQuery(a[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==a[1]&&(r+="="+v.decodeQuery(a[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}t+="?"+r.substring(1)}return t+=v.decodeQuery(e.hash(),!0)},e.absoluteTo=function(e){var t,r,n,o=this.clone(),i=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof v||(e=new v(e)),o._parts.protocol)return o;if(o._parts.protocol=e._parts.protocol,this._parts.hostname)return o;for(r=0;n=i[r];r++)o._parts[n]=e._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),o._parts.path=(t?t+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=e._parts.path,o._parts.query||(o._parts.query=e._parts.query)),o.build(),o},e.relativeTo=function(e){var t,r,n,o,i,a=this.clone().normalize();if(a._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new v(e).normalize(),t=a._parts,r=e._parts,o=a.path(),i=e.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==i.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===r.protocol&&(t.protocol=null),t.username!==r.username||t.password!==r.password)return a.build();if(null!==t.protocol||null!==t.username||null!==t.password)return a.build();if(t.hostname!==r.hostname||t.port!==r.port)return a.build();if(t.hostname=null,t.port=null,o===i)return t.path="",a.build();if(!(n=v.commonPath(o,i)))return a.build();var s=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=s+t.path.substring(n.length)||"./",a.build()},e.equals=function(e){var t,r,n,o,i,a=this.clone(),s=new v(e),u={};if(a.normalize(),s.normalize(),a.toString()===s.toString())return!0;if(n=a.query(),o=s.query(),a.query(""),s.query(""),a.toString()!==s.toString())return!1;if(n.length!==o.length)return!1;for(i in t=v.parseQuery(n,this._parts.escapeQuerySpace),r=v.parseQuery(o,this._parts.escapeQuerySpace),t)if(h.call(t,i)){if(l(t[i])){if(!m(t[i],r[i]))return!1}else if(t[i]!==r[i])return!1;u[i]=!0}for(i in r)if(h.call(r,i)&&!u[i])return!1;return!0},e.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},e.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},e.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},v},e.exports?e.exports=r(o,i,a):t.URI=r(t.punycode,t.IPv6,t.SecondLevelDomains,t)}),Tool:{getDocumentTop:function(){var e=0,t=0;return document.body&&(e=document.body.scrollTop),document.documentElement&&(t=document.documentElement.scrollTop),0<e-t?e:t},getWindowHeight:function(){return"CSS1Compat"==document.compatMode?document.documentElement.clientHeight:document.body.clientHeight},getScrollHeight:function(){var e=0,t=0;return document.body&&(e=document.body.scrollHeight),document.documentElement&&(t=document.documentElement.scrollHeight),0<e-t?e:t},checkURLExist:function(e){return/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/.test(e)},getObjectURL:function(e){var t=null;return null!=window.createObjectURL?t=window.createObjectURL(e):null!=window.URL?t=window.URL.createObjectURL(e):null!=window.webkitURL&&(t=window.webkitURL.createObjectURL(e)),t},getStrlen:function(e){for(var t=0,r=0;r<e.length;r++){var n=e.charCodeAt(r);1<=n&&n<=126||65376<=n&&n<=65439?t++:t+=2}return t},isJSONStr:function(e){return"{"===e.charAt(0)&&"}"===e.charAt(e.length-1)||"["===e.charAt(0)&&"]"===e.charAt(e.length-1)},isPhoneNumber:function(e){return/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(e)},trim:function(e){return"string"==typeof e?e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""):e}}}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.RooTool=t()}(this,function(){"use strict";var E="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(e,t){return e(t={exports:{}},t.exports),t.exports}var t=e(function(e,t){var r;r=function(){function g(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}return function e(d){function m(e,t,r){var n;if("undefined"!=typeof document){if(1<arguments.length){if("number"==typeof(r=g({path:"/"},m.defaults,r)).expires){var o=new Date;o.setMilliseconds(o.getMilliseconds()+864e5*r.expires),r.expires=o}r.expires=r.expires?r.expires.toUTCString():"";try{n=JSON.stringify(t),/^[\{\[]/.test(n)&&(t=n)}catch(e){}t=d.write?d.write(t,e):encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var i="";for(var a in r)r[a]&&(i+="; "+a,!0!==r[a]&&(i+="="+r[a]));return document.cookie=e+"="+t+i}e||(n={});for(var s=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,c=0;c<s.length;c++){var h=s[c].split("="),l=h.slice(1).join("=");this.json||'"'!==l.charAt(0)||(l=l.slice(1,-1));try{var p=h[0].replace(u,decodeURIComponent);if(l=d.read?d.read(l,p):d(l,p)||l.replace(u,decodeURIComponent),this.json)try{l=JSON.parse(l)}catch(e){}if(e===p){n=l;break}e||(n[p]=l)}catch(e){}}return n}}return(m.set=m).get=function(e){return m.call(m,e)},m.getJSON=function(){return m.apply({json:!0},[].slice.call(arguments))},m.defaults={},m.remove=function(e,t){m(e,"",g(t,{expires:-1}))},m.withConverter=e,m}(function(){})},e.exports=r()});function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r={set:function(e,t){if(t){var r="object"===n(t)?JSON.stringify(t):t;window.localStorage[e]=r}else delete window.localStorage[e]},get:function(e){var t=window.localStorage[e]||"";return this.isJSONStr(t)?JSON.parse(t):t},isJSONStr:function(e){return"{"===e.charAt(0)&&"}"===e.charAt(e.length-1)||"["===e.charAt(0)&&"]"===e.charAt(e.length-1)},clear:function(){window.localStorage.clear()}},o=e(function(j,R){!function(e){var t=R&&!R.nodeType&&R,r=j&&!j.nodeType&&j,n="object"==typeof E&&E;n.global!==n&&n.window!==n&&n.self!==n||(e=n);var o,i,v=2147483647,y=36,b=1,_=26,a=38,s=700,w=72,k=128,x="-",u=/^xn--/,c=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=y-b,z=Math.floor,A=String.fromCharCode;function S(e){throw new RangeError(l[e])}function d(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function m(e,t){var r=e.split("@"),n="";return 1<r.length&&(n=r[0]+"@",e=r[1]),n+d((e=e.replace(h,".")).split("."),t).join(".")}function Q(e){for(var t,r,n=[],o=0,i=e.length;o<i;)55296<=(t=e.charCodeAt(o++))&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function I(e){return d(e,function(e){var t="";return 65535<e&&(t+=A((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=A(e)}).join("")}function P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function U(e,t,r){var n=0;for(e=r?z(e/s):e>>1,e+=z(e/t);p*_>>1<e;n+=y)e=z(e/p);return z(n+(p+1)*e/(e+a))}function g(e){var t,r,n,o,i,a,s,u,c,h,l,p=[],d=e.length,m=0,g=k,f=w;for((r=e.lastIndexOf(x))<0&&(r=0),n=0;n<r;++n)128<=e.charCodeAt(n)&&S("not-basic"),p.push(e.charCodeAt(n));for(o=0<r?r+1:0;o<d;){for(i=m,a=1,s=y;d<=o&&S("invalid-input"),l=e.charCodeAt(o++),(y<=(u=l-48<10?l-22:l-65<26?l-65:l-97<26?l-97:y)||u>z((v-m)/a))&&S("overflow"),m+=u*a,!(u<(c=s<=f?b:f+_<=s?_:s-f));s+=y)a>z(v/(h=y-c))&&S("overflow"),a*=h;f=U(m-i,t=p.length+1,0==i),z(m/t)>v-g&&S("overflow"),g+=z(m/t),m%=t,p.splice(m++,0,g)}return I(p)}function f(e){var t,r,n,o,i,a,s,u,c,h,l,p,d,m,g,f=[];for(p=(e=Q(e)).length,t=k,i=w,a=r=0;a<p;++a)(l=e[a])<128&&f.push(A(l));for(n=o=f.length,o&&f.push(x);n<p;){for(s=v,a=0;a<p;++a)t<=(l=e[a])&&l<s&&(s=l);for(s-t>z((v-r)/(d=n+1))&&S("overflow"),r+=(s-t)*d,t=s,a=0;a<p;++a)if((l=e[a])<t&&++r>v&&S("overflow"),l==t){for(u=r,c=y;!(u<(h=c<=i?b:i+_<=c?_:c-i));c+=y)g=u-h,m=y-h,f.push(A(P(h+g%m,0))),u=z(g/m);f.push(A(P(u,0))),i=U(r,d,n==o),r=0,++n}++r,++t}return f.join("")}if(o={version:"1.3.2",ucs2:{decode:Q,encode:I},decode:g,encode:f,toASCII:function(e){return m(e,function(e){return c.test(e)?"xn--"+f(e):e})},toUnicode:function(e){return m(e,function(e){return u.test(e)?g(e.slice(4).toLowerCase()):e})}},t&&r)if(j.exports==t)r.exports=o;else for(i in o)o.hasOwnProperty(i)&&(t[i]=o[i]);else e.punycode=o}(E)}),i=e(function(e){var t,r;t=E,r=function(e){var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),o=n.length,i=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),-1!==n[(o=n.length)-1].indexOf(".")&&(i=7),t=0;t<o&&""!==n[t];t++);if(t<i)for(n.splice(t,1,"0000");n.length<i;)n.splice(t,0,"0000");for(var a=0;a<i;a++){r=n[a].split("");for(var s=0;s<3&&"0"===r[0]&&1<r.length;s++)r.splice(0,1);n[a]=r.join("")}var u=-1,c=0,h=0,l=-1,p=!1;for(a=0;a<i;a++)p?"0"===n[a]?h+=1:(p=!1,c<h&&(u=l,c=h)):"0"===n[a]&&(p=!0,l=a,h=1);c<h&&(u=l,c=h),1<c&&n.splice(u,c,""),o=n.length;var d="";for(""===n[0]&&(d=":"),a=0;a<o&&(d+=n[a],a!==o-1);a++)d+=":";return""===n[o-1]&&(d+=":"),d},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}},e.exports?e.exports=r():t.IPv6=r(t)}),a=e(function(e){var t,r;t=E,r=function(e){var t=e&&e.SecondLevelDomains,o={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var r=e.lastIndexOf(".",t-1);if(r<=0||t-1<=r)return!1;var n=o.list[e.slice(t+1)];return!!n&&0<=n.indexOf(" "+e.slice(r+1,t)+" ")},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(0<=e.lastIndexOf(".",t-1))return!1;var r=o.list[e.slice(t+1)];return!!r&&0<=r.indexOf(" "+e.slice(0,t)+" ")},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var r=e.lastIndexOf(".",t-1);if(r<=0||t-1<=r)return null;var n=o.list[e.slice(t+1)];return n?n.indexOf(" "+e.slice(r+1,t)+" ")<0?null:e.slice(r+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return o},e.exports?e.exports=r():t.SecondLevelDomains=r(t)});return{Cookie:t,LocalDb:r,URI:e(function(e){var t,r;t=E,r=function(s,t,c,r){var n=r&&r.URI;function v(e,t){var r=1<=arguments.length,n=2<=arguments.length;if(!(this instanceof v))return r?n?new v(e,t):new v(e):new v;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}v.version="1.19.1";var e=v.prototype,h=Object.prototype.hasOwnProperty;function u(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function a(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===a(e)}function p(e,t){var r,n,o={};if("RegExp"===a(t))o=null;else if(l(t))for(r=0,n=t.length;r<n;r++)o[t[r]]=!0;else o[t]=!0;for(r=0,n=e.length;r<n;r++){(o&&void 0!==o[e[r]]||!o&&t.test(e[r]))&&(e.splice(r,1),n--,r--)}return e}function d(e,t){var r,n;if(l(t)){for(r=0,n=t.length;r<n;r++)if(!d(e,t[r]))return!1;return!0}var o=a(t);for(r=0,n=e.length;r<n;r++)if("RegExp"===o){if("string"==typeof e[r]&&e[r].match(t))return!0}else if(e[r]===t)return!0;return!1}function m(e,t){if(!l(e)||!l(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function g(e){return e.replace(/^\/+|\/+$/g,"")}function o(e){return escape(e)}function i(e){return encodeURIComponent(e).replace(/[!'()*]/g,o).replace(/\*/g,"%2A")}v._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:v.preventInvalidHostname,duplicateQueryParameters:v.duplicateQueryParameters,escapeQuerySpace:v.escapeQuerySpace}},v.preventInvalidHostname=!1,v.duplicateQueryParameters=!1,v.escapeQuerySpace=!0,v.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,v.idn_expression=/[^a-z0-9\._-]/i,v.punycode_expression=/(xn--)/i,v.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,v.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,v.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,v.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},v.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},v.hostProtocols=["http","https"],v.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,v.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},v.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return v.domAttributes[t]}},v.encode=i,v.decode=decodeURIComponent,v.iso8859=function(){v.encode=escape,v.decode=unescape},v.unicode=function(){v.encode=i,v.decode=decodeURIComponent},v.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},v.encodeQuery=function(e,t){var r=v.encode(e+"");return void 0===t&&(t=v.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},v.decodeQuery=function(t,e){t+="",void 0===e&&(e=v.escapeQuerySpace);try{return v.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var f,y={encode:"encode",decode:"decode"},b=function(r,n){return function(t){try{return v[n](t+"").replace(v.characters[r][n].expression,function(e){return v.characters[r][n].map[e]})}catch(e){return t}}};for(f in y)v[f+"PathSegment"]=b("pathname",y[f]),v[f+"UrnPathSegment"]=b("urnpath",y[f]);var _=function(i,a,s){return function(e){var t;t=s?function(e){return v[a](v[s](e))}:v[a];for(var r=(e+"").split(i),n=0,o=r.length;n<o;n++)r[n]=t(r[n]);return r.join(i)}};function w(r){return function(e,t){return void 0===e?this._parts[r]||"":(this._parts[r]=e||null,this.build(!t),this)}}function k(r,n){return function(e,t){return void 0===e?this._parts[r]||"":(null!==e&&(e+="").charAt(0)===n&&(e=e.substring(1)),this._parts[r]=e,this.build(!t),this)}}v.decodePath=_("/","decodePathSegment"),v.decodeUrnPath=_(":","decodeUrnPathSegment"),v.recodePath=_("/","encodePathSegment","decode"),v.recodeUrnPath=_(":","encodeUrnPathSegment","decode"),v.encodeReserved=b("reserved","encode"),v.parse=function(e,t){var r;return t||(t={preventInvalidHostname:v.preventInvalidHostname}),-1<(r=e.indexOf("#"))&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),-1<(r=e.indexOf("?"))&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=v.parseAuthority(e,t)):-1<(r=e.indexOf(":"))&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(v.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3)?(e=e.substring(r+3),e=v.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},v.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var i=e.indexOf(":"),a=e.indexOf("/"),s=e.indexOf(":",i+1);t.port=-1!==s&&(-1===a||s<a)?(t.hostname=e.substring(0,o)||null,null):(n=e.substring(0,o).split(":"),t.hostname=n[0]||null,n[1]||null)}return t.hostname&&"/"!==e.substring(o).charAt(0)&&(o++,e="/"+e),t.preventInvalidHostname&&v.ensureValidHostname(t.hostname,t.protocol),t.port&&v.ensureValidPort(t.port),e.substring(o)||"/"},v.parseAuthority=function(e,t){return e=v.parseUserinfo(e,t),v.parseHost(e,t)},v.parseUserinfo=function(e,t){var r,n=e.indexOf("/"),o=e.lastIndexOf("@",-1<n?n:e.length-1);return-1<o&&(-1===n||o<n)?(r=e.substring(0,o).split(":"),t.username=r[0]?v.decode(r[0]):null,r.shift(),t.password=r[0]?v.decode(r.join(":")):null,e=e.substring(o+1)):(t.username=null,t.password=null),e},v.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,o,i={},a=e.split("&"),s=a.length,u=0;u<s;u++)r=a[u].split("="),n=v.decodeQuery(r.shift(),t),o=r.length?v.decodeQuery(r.join("="),t):null,h.call(i,n)?("string"!=typeof i[n]&&null!==i[n]||(i[n]=[i[n]]),i[n].push(o)):i[n]=o;return i},v.build=function(e){var t="";return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//"),t+=v.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&"string"==typeof e.hostname&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},v.buildHost=function(e){var t="";return e.hostname?(v.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},v.buildAuthority=function(e){return v.buildUserinfo(e)+v.buildHost(e)},v.buildUserinfo=function(e){var t="";return e.username&&(t+=v.encode(e.username)),e.password&&(t+=":"+v.encode(e.password)),t&&(t+="@"),t},v.buildQuery=function(e,t,r){var n,o,i,a,s="";for(o in e)if(h.call(e,o)&&o)if(l(e[o]))for(n={},i=0,a=e[o].length;i<a;i++)void 0!==e[o][i]&&void 0===n[e[o][i]+""]&&(s+="&"+v.buildQueryParameter(o,e[o][i],r),!0!==t&&(n[e[o][i]+""]=!0));else void 0!==e[o]&&(s+="&"+v.buildQueryParameter(o,e[o],r));return s.substring(1)},v.buildQueryParameter=function(e,t,r){return v.encodeQuery(e,r)+(null!==t?"="+v.encodeQuery(t,r):"")},v.addQuery=function(e,t,r){if("object"==typeof t)for(var n in t)h.call(t,n)&&v.addQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=r);"string"==typeof e[t]&&(e[t]=[e[t]]),l(r)||(r=[r]),e[t]=(e[t]||[]).concat(r)}},v.setQuery=function(e,t,r){if("object"==typeof t)for(var n in t)h.call(t,n)&&v.setQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===r?null:r}},v.removeQuery=function(e,t,r){var n,o,i;if(l(t))for(n=0,o=t.length;n<o;n++)e[t[n]]=void 0;else if("RegExp"===a(t))for(i in e)t.test(i)&&(e[i]=void 0);else if("object"==typeof t)for(i in t)h.call(t,i)&&v.removeQuery(e,i,t[i]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===a(r)?!l(e[t])&&r.test(e[t])?e[t]=void 0:e[t]=p(e[t],r):e[t]!==String(r)||l(r)&&1!==r.length?l(e[t])&&(e[t]=p(e[t],r)):e[t]=void 0:e[t]=void 0}},v.hasQuery=function(e,t,r,n){switch(a(t)){case"String":break;case"RegExp":for(var o in e)if(h.call(e,o)&&t.test(o)&&(void 0===r||v.hasQuery(e,o,r)))return!0;return!1;case"Object":for(var i in t)if(h.call(t,i)&&!v.hasQuery(e,i,t[i]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(a(r)){case"Undefined":return t in e;case"Boolean":return r===Boolean(l(e[t])?e[t].length:e[t]);case"Function":return!!r(e[t],t,e);case"Array":return!!l(e[t])&&(n?d:m)(e[t],r);case"RegExp":return l(e[t])?!!n&&d(e[t],r):Boolean(e[t]&&e[t].match(r));case"Number":r=String(r);case"String":return l(e[t])?!!n&&d(e[t],r):e[t]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},v.joinPaths=function(){for(var e=[],t=[],r=0,n=0;n<arguments.length;n++){var o=new v(arguments[n]);e.push(o);for(var i=o.segment(),a=0;a<i.length;a++)"string"==typeof i[a]&&t.push(i[a]),i[a]&&r++}if(!t.length||!r)return new v("");var s=new v("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||s.path("/"+s.path()),s.normalize()},v.commonPath=function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r)){r--;break}return r<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(r)&&"/"===t.charAt(r)||(r=e.substring(0,r).lastIndexOf("/")),e.substring(0,r+1))},v.withinString=function(e,t,r){r||(r={});var n=r.start||v.findUri.start,o=r.end||v.findUri.end,i=r.trim||v.findUri.trim,a=r.parens||v.findUri.parens,s=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var u=n.exec(e);if(!u)break;var c=u.index;if(r.ignoreHtml){var h=e.slice(Math.max(c-3,0),c);if(h&&s.test(h))continue}for(var l=c+e.slice(c).search(o),p=e.slice(c,l),d=-1;;){var m=a.exec(p);if(!m)break;var g=m.index+m[0].length;d=Math.max(d,g)}if(!((p=-1<d?p.slice(0,d)+p.slice(d).replace(i,""):p.replace(i,"")).length<=u[0].length||r.ignore&&r.ignore.test(p))){var f=t(p,c,l=c+p.length,e);n.lastIndex=void 0!==f?(f=String(f),e=e.slice(0,c)+f+e.slice(l),c+f.length):l}}return n.lastIndex=0,e},v.ensureValidHostname=function(e,t){var r=!!e,n=!1;if(!!t&&(n=d(v.hostProtocols,t)),n&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+t);if(e&&e.match(v.invalid_hostname_characters)){if(!s)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(s.toASCII(e).match(v.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},v.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&0<t&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},v.noConflict=function(e){if(e){var t={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(t.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(t.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=r.SecondLevelDomains.noConflict()),t}return r.URI===this&&(r.URI=n),this},e.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=v.build(this._parts),this._deferred_build=!1),this},e.clone=function(){return new v(this)},e.valueOf=e.toString=function(){return this.build(!1)._string},e.protocol=w("protocol"),e.username=w("username"),e.password=w("password"),e.hostname=w("hostname"),e.port=w("port"),e.query=k("query","?"),e.fragment=k("fragment","#"),e.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},e.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},e.pathname=function(e,t){if(void 0!==e&&!0!==e)return this._parts.urn?this._parts.path=e?v.recodeUrnPath(e):"":this._parts.path=e?v.recodePath(e):"/",this.build(!t),this;var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?v.decodeUrnPath:v.decodePath)(r):r},e.path=e.pathname,e.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=v._parts();var n=e instanceof v,o="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[v.getDomAttribute(e)]||"",o=!1);if(!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=v.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var i=n?e._parts:e;for(r in i)"query"!==r&&h.call(this._parts,r)&&(this._parts[r]=i[r]);i.query&&this.query(i.query,!1)}return this.build(!t),this},e.is=function(e){var t=!1,r=!1,n=!1,o=!1,i=!1,a=!1,s=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,r=v.ip4_expression.test(this._parts.hostname),n=v.ip6_expression.test(this._parts.hostname),i=(o=!(t=r||n))&&c&&c.has(this._parts.hostname),a=o&&v.idn_expression.test(this._parts.hostname),s=o&&v.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return o;case"sld":return i;case"ip":return t;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return n;case"idn":return a;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return s}return null};var x=e.protocol,z=e.port,A=e.hostname;e.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(v.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,e,t)},e.scheme=e.protocol,e.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),v.ensureValidPort(e))),z.call(this,e,t))},e.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==v.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&v.ensureValidHostname(e,this._parts.protocol)}return A.call(this,e,t)},e.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=v(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},e.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?v.buildHost(this._parts):"";if("/"!==v.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},e.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?v.buildAuthority(this._parts):"";if("/"!==v.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},e.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e)return"@"!==e[e.length-1]&&(e+="@"),v.parseUserinfo(e,this._parts),this.build(!t),this;var r=v.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r},e.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=v.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},e.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),i=new RegExp("^"+u(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&v.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(i,e),this.build(!t),this},e.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(v.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},e.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),n=this._parts.hostname.substring(r+1);return!0!==t&&c&&c.list[n.toLowerCase()]&&c.get(this._parts.hostname)||n}var o;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!c||!c.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},e.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?v.decodePath(n):n}var o=this._parts.path.length-this.filename().length,i=this._parts.path.substring(0,o),a=new RegExp("^"+u(i));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=v.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},e.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?v.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var i=new RegExp(u(this.filename())+"$");return e=v.recodePath(e),this._parts.path=this._parts.path.replace(i,e),o?this.normalizePath(t):this.build(!t),this},e.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),i=o.lastIndexOf(".");return-1===i?"":(r=o.substring(i+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?v.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var a,s=this.suffix();if(s)a=e?new RegExp(u(s)+"$"):new RegExp(u("."+s)+"$");else{if(!e)return this;this._parts.path+="."+v.recodePath(e)}return a&&(e=v.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},e.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),a=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&a.shift(),e<0&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(l(t)){a=[];for(var s=0,u=t.length;s<u;s++)(t[s].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(g(t[s])))}else(t||"string"==typeof t)&&(t=g(t),""===a[a.length-1]?a[a.length-1]=t:a.push(t));else t?a[e]=g(t):a.splice(e,1);return i&&a.unshift(""),this.path(a.join(n),r)},e.segmentCoded=function(e,t,r){var n,o,i;if("number"!=typeof e&&(r=t,t=e,e=void 0),void 0===t){if(l(n=this.segment(e,t,r)))for(o=0,i=n.length;o<i;o++)n[o]=v.decode(n[o]);else n=void 0!==n?v.decode(n):void 0;return n}if(l(t))for(o=0,i=t.length;o<i;o++)t[o]=v.encode(t[o]);else t="string"==typeof t||t instanceof String?v.encode(t):t;return this.segment(e,t,r)};var S=e.query;return e.query=function(e,t){if(!0===e)return v.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"!=typeof e)return void 0!==e&&"string"!=typeof e?(this._parts.query=v.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):S.call(this,e,t);var r=v.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,r);return this._parts.query=v.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this},e.setQuery=function(e,t,r){var n=v.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)h.call(e,o)&&(n[o]=e[o])}return this._parts.query=v.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},e.addQuery=function(e,t,r){var n=v.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return v.addQuery(n,e,void 0===t?null:t),this._parts.query=v.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},e.removeQuery=function(e,t,r){var n=v.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return v.removeQuery(n,e,t),this._parts.query=v.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},e.hasQuery=function(e,t,r){var n=v.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return v.hasQuery(n,e,t,r)},e.setSearch=e.setQuery,e.addSearch=e.addQuery,e.removeSearch=e.removeQuery,e.hasSearch=e.hasQuery,e.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},e.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},e.normalizeHostname=function(e){return this._parts.hostname&&(this.is("IDN")&&s?this._parts.hostname=s.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!e)),this},e.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===v.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},e.normalizePath=function(e){var t,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=v.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var n,o,i="";for("/"!==(r=v.recodePath(r)).charAt(0)&&(t=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(i=r.substring(1).match(/^(\.\.\/)+/)||"")&&(i=i[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)r=0!==n?(-1===(o=r.substring(0,n).lastIndexOf("/"))&&(o=n),r.substring(0,o)+r.substring(n+3)):r.substring(3);return t&&this.is("relative")&&(r=i+r.substring(1)),this._parts.path=r,this.build(!e),this},e.normalizePathname=e.normalizePath,e.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(v.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},e.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},e.normalizeSearch=e.normalizeQuery,e.normalizeHash=e.normalizeFragment,e.iso8859=function(){var e=v.encode,t=v.decode;v.encode=escape,v.decode=decodeURIComponent;try{this.normalize()}finally{v.encode=e,v.decode=t}return this},e.unicode=function(){var e=v.encode,t=v.decode;v.encode=i,v.decode=unescape;try{this.normalize()}finally{v.encode=e,v.decode=t}return this},e.readable=function(){var e=this.clone();e.username("").password("").normalize();var t="";if(e._parts.protocol&&(t+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&s?(t+=s.toUnicode(e._parts.hostname),e._parts.port&&(t+=":"+e._parts.port)):t+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(t+="/"),t+=e.path(!0),e._parts.query){for(var r="",n=0,o=e._parts.query.split("&"),i=o.length;n<i;n++){var a=(o[n]||"").split("=");r+="&"+v.decodeQuery(a[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==a[1]&&(r+="="+v.decodeQuery(a[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}t+="?"+r.substring(1)}return t+=v.decodeQuery(e.hash(),!0)},e.absoluteTo=function(e){var t,r,n,o=this.clone(),i=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof v||(e=new v(e)),o._parts.protocol)return o;if(o._parts.protocol=e._parts.protocol,this._parts.hostname)return o;for(r=0;n=i[r];r++)o._parts[n]=e._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),o._parts.path=(t?t+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=e._parts.path,o._parts.query||(o._parts.query=e._parts.query)),o.build(),o},e.relativeTo=function(e){var t,r,n,o,i,a=this.clone().normalize();if(a._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new v(e).normalize(),t=a._parts,r=e._parts,o=a.path(),i=e.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==i.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===r.protocol&&(t.protocol=null),t.username!==r.username||t.password!==r.password)return a.build();if(null!==t.protocol||null!==t.username||null!==t.password)return a.build();if(t.hostname!==r.hostname||t.port!==r.port)return a.build();if(t.hostname=null,t.port=null,o===i)return t.path="",a.build();if(!(n=v.commonPath(o,i)))return a.build();var s=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=s+t.path.substring(n.length)||"./",a.build()},e.equals=function(e){var t,r,n,o,i,a=this.clone(),s=new v(e),u={};if(a.normalize(),s.normalize(),a.toString()===s.toString())return!0;if(n=a.query(),o=s.query(),a.query(""),s.query(""),a.toString()!==s.toString())return!1;if(n.length!==o.length)return!1;for(i in t=v.parseQuery(n,this._parts.escapeQuerySpace),r=v.parseQuery(o,this._parts.escapeQuerySpace),t)if(h.call(t,i)){if(l(t[i])){if(!m(t[i],r[i]))return!1}else if(t[i]!==r[i])return!1;u[i]=!0}for(i in r)if(h.call(r,i)&&!u[i])return!1;return!0},e.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},e.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},e.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},v},e.exports?e.exports=r(o,i,a):t.URI=r(t.punycode,t.IPv6,t.SecondLevelDomains,t)}),Tool:{getDocumentTop:function(){var e=0,t=0;return document.body&&(e=document.body.scrollTop),document.documentElement&&(t=document.documentElement.scrollTop),0<e-t?e:t},getWindowHeight:function(){return"CSS1Compat"==document.compatMode?document.documentElement.clientHeight:document.body.clientHeight},getScrollHeight:function(){var e=0,t=0;return document.body&&(e=document.body.scrollHeight),document.documentElement&&(t=document.documentElement.scrollHeight),0<e-t?e:t},getObjectURL:function(e){var t=null;return null!=window.createObjectURL?t=window.createObjectURL(e):null!=window.URL?t=window.URL.createObjectURL(e):null!=window.webkitURL&&(t=window.webkitURL.createObjectURL(e)),t},getStrlen:function(e){for(var t=0,r=0;r<e.length;r++){var n=e.charCodeAt(r);1<=n&&n<=126||65376<=n&&n<=65439?t++:t+=2}return t},trim:function(e){return"string"==typeof e?e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""):e},isRealUrl:function(e){return/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/.test(e)},isJSONStr:function(e){return"{"===e.charAt(0)&&"}"===e.charAt(e.length-1)||"["===e.charAt(0)&&"]"===e.charAt(e.length-1)},isPhoneNumber:function(e){return/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(e)},isFunction:function(e){return!!e&&"function"==typeof e},toThousands:function(e){return(e||0).toString().replace(/^\d+/g,function(e){return e.replace(/(?=(?!^)(\d{3})+$)/g,",")})},debounceFunc:function(n,o,i){var a,s,e=function(){var e=this,t=arguments;if(a&&clearTimeout(a),i){var r=!a;a=setTimeout(function(){a=null},o),r&&(s=n.apply(e,t))}else a=setTimeout(function(){n.apply(e,t)},o);return s};return e.cancel=function(){clearTimeout(a),a=null},e}}}});
{
"name": "roo-tool",
"version": "0.1.2",
"version": "1.0.2",
"description": "This is a front-end scaffold commonly used tool library, integrates the Cookie, with indexedDB and custom event operations",

@@ -22,4 +22,4 @@ "repository": "git@github.com:dtux-kangaroo/roo-tool.git",

"dependencies": {
"js-cookie": "^2.2.0",
"urijs": "^1.19.1"
"js-cookie": "latest",
"urijs": "latest"
},

@@ -26,0 +26,0 @@ "devDependencies": {

@@ -14,6 +14,6 @@

```
####Package Managers
#### Package Managers
JavaScript RooTool supports npm and yarn under the name roo-tool.
Module Loaders
####Module Loaders
#### Module Loaders
JavaScript RooTool can also be loaded as an AMD, CommonJS or ES6 module.

@@ -23,4 +23,4 @@ #### 集成模块

```
js-cookie
urijs
js-cookie //最新版本
urijs //最新版本
```

@@ -91,15 +91,18 @@ ### Basic Usage

--| -- | -- |--
trim| 去除空串 | string |string
getDocumentTop | 获取文档高度 | 无 |number
getWindowHeight| 可视窗口高度 | 无 |number
getScrollHeight| 滚动条滚动高度 | 无 |number
checkURLExist| 校验Url的有效性 | url |bool
getObjectURL| 自定义上传事件获取文件URl方法 | file |string
getStrlen| 计算字符串长度(英文占1个字符,中文汉字占2个字符) | string |number
isJSONStr| 判断是否是JSON string | string |bool
isRealUrl| 校验Url的有效性 | url |bool
isJSONStr| 判断是否是JSON | string |bool
isFunction| 判断是否是函数 | function |bool
isPhoneNumber| 校验手机号格式 | string |bool
trim| 去除空串 | string |string
toThousands| 分隔数值千分位符 | number |number
debounceFunc| 防抖函数 |func,wait,immediate|null
####Changelog
moved to Changelog
####如果封装好更加好用的方法函数,欢迎联系补充
#### 如果封装好更加好用的方法函数,欢迎联系补充
<linhe@dtstack.com>

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc