-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonavo.hex.js
10 lines (10 loc) · 12.3 KB
/
onavo.hex.js
1
2
3
4
5
6
7
8
9
10
/**
* onavojs v0.19
* @ 开发 jiewwang dainli miyagong
* { JavaScript 工具库 }
* github@ https://github.com/jiayi2/onavo
* email:[email protected]
* @Organizations https://github.com/3JTeam
* $$代表onavojs库/Object的对象
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([7cfhlmo-qt-wyCG-NP-RVWY]|[1-4]\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';h $$,$$T,$$TB,$$A,$$S,$$D,$$jx,$$F,$$E,$$CE;(7(1G){f(!1H.1C.1a){1H.1C.1a=7(3L,3M){h k;f(q==1p){3N 1D TypeError(\'"q" is 1p or not defined\');}h O=2R(q);h G=O.M>>>0;f(G===0){c-1}h n=+3M||0;f(1v.3P(n)===Infinity){n=0}f(n>=G){c-1}k=1v.2S(n>=0?n:G-1v.3P(n),0);2l(k<G){f(k in O&&O[k]===3L){c k}k++}c-1}}h O,T,TB,A,S,D,jx,F,E,CE;O=7(id){c"2T"==1V id?I.getElementById(id):id};O.o={1w:7(N){f(!N)c 1G;f(1N==I&&I!=1N){c\'1N\'}J f(N.2U===9){c\'I\'}J f(N.3Q){c\'17\'}J f(isFinite(N.M)&&N.w){c\'nodeList\'}J{h 1q=2R.1C.2V.1x(N),3R=/\\[m (.*)\\]/,1y=3R.exec(1q);c 1y[1].1z()}},2W:7(N){c(q.1w(N)===\'1j\')?12:y},isFunction:7(N){c(q.1w(N)===\'7\')?12:y},isObject:7(N){c(q.1w(N)===\'m\')?12:y},isString:7(N){c(q.1w(N)===\'2T\')?12:y},isNumber:7(N){c(q.1w(N)===\'3S\')?12:y},isBoolen:7(N){c(q.1w(N)===\'boolean\')?12:y},isUndefined:7(N){c(q.1w(N)===\'1G\')?12:y},isNull:7(N){c(q.1w(N)===\'1p\')?12:y}};O.emptyFun=7(){};O.extend=7(1A,1W,2z){f(2z===1G)2z=12;R(h 1E in 1W){f(2z||!(1E in 1A)){1A[1E]=1W[1E]}}c 1A};O.deepextend=7(1A,1W){R(h 1E in 1W){h 2m=1W[1E];f(1A===2m)3T;f(1V 2m==="m"){1A[1E]=17.3Q(1A[1E]||{},2m)}J{1A[1E]=2m}}c 1A};O.warpp=7(me,1X){h 2X=7(){me.1l(q,17)};h 2Y=7(){};2Y.1C=1X.1C;2X.1C=1D 2Y;c 2X};T={jsload:7(p,t){h 1I=I.3V(\'2Z\');1I.31=7(){f(1I.32===\'loaded\'||1I.32===\'complete\'){1I.31=1p;t&&t()}};1I.onload=7(){t&&t()};1I.src=p;I.2A.3W.33(1I)},3X:7(1r,t){f(!1r){showError(\'3X=>异步加载的1r地址不正确\')}f(I.3Y){I.3Y(1r);t&&t()}J{h 1Y=I.3V(\'1Y\');1Y.rel=\'stylesheet\';1Y.o=\'34/css\';1Y.href=1r;t&&t();I.2A.3W.33(1Y)}}};TB=(7(ua){h B={mobile:(/35|nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|wap|2C|iPod/i.1s(ua)),ios:!!ua.1B(/\\(i[^;]+;( U;)? CPU.+Mac OS X/),2C:ua.1B(/2C/i)=="2C",iPhone:ua.1B(/35 os/i)=="35 os",iPad:ua.1B(/41/i)=="41",webApp:ua.1a(\'Safari\')==-1,36:/36/.1s(ua),42:/42/.1s(ua),safari:/webkit/.1s(ua)&&!/36/.1s(ua),43:/43/.1s(ua)};h IE=7(){h 2o={};h s;(s=ua.1B(/rv:([\\d.]+)\\) like gecko/))?2o.ie=s[1]:(s=ua.1B(/msie ([\\d.]+)/))?2o.ie=s[1]:0;h 44=45(2o.ie,10);f(2o.ie){c{is:12,37:44}};c y};h 38=7(){f(ua.1B(/MicroMessenger/i)=="micromessenger"){c 12}J{c y}};h 13=7(){7 39(){h i=0;h P={};R(;i<17.M;i++){h 14=17[i];R(h Y in 14){P[Y]=14[Y]}}c P}7 2p(20){7 1f(Y,1g,14){h P;f(1V I===\'1G\'){c}f(17.M>1){14=39({2D:\'/\'},1f.46,14);f(1V 14.1t===\'3S\'){h 1t=1D 47();1t.setMilliseconds(1t.getMilliseconds()+14.1t*864e+5);14.1t=1t}1O{P=48.stringify(1g);f(/^[\\{\\[]/.1s(P)){1g=P}}1P(e){}f(!20.49){1g=4a(3a(1g)).1h(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,2E)}J{1g=20.49(1g,Y)}Y=4a(3a(Y));Y=Y.1h(/%(23|24|26|2B|5E|60|7C)/g,2E);Y=Y.1h(/[\\(\\)]/g,escape);c(I.13=[Y,\'=\',1g,14.1t?\'; 1t=\'+14.1t.toUTCString():\'\',14.2D?\'; 2D=\'+14.2D:\'\',14.3b?\'; 3b=\'+14.3b:\'\',14.4c?\'; 4c\':\'\'].3c(\'\'))}f(!Y){P={}}h 3d=I.13?I.13.4d(\'; \'):[];h 3e=/(%[0-9A-Z]{2})+/g;h i=0;R(;i<3d.M;i++){h 3f=3d[i].4d(\'=\');h 13=3f.19(1).3c(\'=\');f(13.2q(0)===\'"\'){13=13.19(1,-1)}1O{h p=3f[0].1h(3e,2E);13=20.4e?20.4e(13,p):20(13,p)||13.1h(3e,2E);f(q.4f){1O{13=48.parse(13)}1P(e){}}f(Y===p){P=13;21}f(!Y){P[p]=13}}1P(e){}}c P}1f.set=1f;1f.get=7(Y){c 1f.1x(1f,Y)};1f.getJSON=7(){c 1f.1l({4f:12},[].19.1x(17))};1f.46={};1f.4g=7(Y,14){1f(Y,\'\',39(14,{1t:-1}))};1f.withConverter=2p;c 1f}c 2p(7(){})};c{B:B,IE:IE,38:38,13:13}})(1N.navigator.userAgent.1z());f(TB.IE().37==6){1O{I.execCommand("BackgroundImageCache",y,12)}1P(e){}};A=7(){h V={2W:7(4h){c 2R.1C.2V.1x(4h)==="[m 1H]"},4i:7(l){h 1q=[];4j:R(h i=0,G=l.M;i<G;i++){R(h j=i+1;j<G;j++){f(l[i]===l[j]){3T 4j}}1q.22(l[i])}c 1q},3g:7(l){c l[1v.3h(1v.3g()*l.M)]},shuffle:7(l){f(!l.M==0){h 1q=l,j,x,i=l.M;R(;i>0;j=45(1v.3g()*i),x=l[--i],l[i]=l[j],l[j]=x){}c 1q};c},25:7(l,w){c l.1a(w)>-1},4k:7(l,1F){c!!l.4l(1F,1).M},4g:7(l,w){h 1F=l.1a(w);c 1F>-1?q.4k(l,1F):y},compact:7(l){f(!o.2W(l)){3N 1D Error(\'l 3i o\');}c l.27(7(w){c w!=1G})},pluck:7(l,p){h P=[],1q;l.3j(7(w){1q=w[p];f(1q!=1p){P.22(1q)}});c P},union:7(t1,t2){c q.4i(t1.3k(t2))},intersect:7(t1,t2){c t1.27(7(w){c~t2.1a(w)})},diff:7(t1,t2){h r=t1;R(h i=0;i<t1.M;i++){R(h j=0;j<t2.M;j++){f(r[i]===t2[j]){r.4l(i,1);i--;21}}}c r},2S:7(l){c 1H.2S.1l(0,l)},4m:7(l){c 1H.4m.1l(0,l)},1a:7(1j,1J,K){f(1j.1a){c 2G(K)?1j.1a(1J):1j.1a(1J,K)}J{h G=1j.M;K=2G(K)?0:K<0?1v.4n(K)+G:1v.3h(K);R(;K<G;K++){f(1j[K]===1J)c K}c-1}},2H:7(1j,1J,K){f(1j.2H){c 2G(K)?1j.2H(1J):1j.2H(1J,K)}J{h G=1j.M;K=2G(K)||K>=G-1?G-1:K<0?1v.4n(K)+G:1v.3h(K);R(;K>-1;K--){f(1j[K]===1J)c K}c-1}}};7 1S(m,t){f(1G===m.M){R(h p in m){f(y===t(m[p],p,m))21}}J{R(h i=0,G=m.M;i<G;i++){f(i in m){f(y===t(m[i],i,m))21}}}};1S({3j:7(m,t,18){1S(m,7(){t.1l(18,17)})},map:7(m,t,18){h V=[];1S(m,7(){V.22(t.1l(18,17))});c V},27:7(m,t,18){h V=[];1S(m,7(w){t.1l(18,17)&&V.22(w)});c V},every:7(m,t,18){h V=12;1S(m,7(){f(!t.1l(18,17)){V=y;c y}});c V},some:7(m,t,18){h V=y;1S(m,7(){f(t.1l(18,17)){V=12;c y}});c V}},7(4o,p){V[p]=7(m,t,18){f(m[p]){c m[p](t,18)}J{c 4o(m,t,18)}}});c V}();S={trim:7(Q){Q=Q.1h(/^\\s+/,\'\');R(h i=Q.M-1;i>=0;i--){f(/\\S/.1s(Q.2q(i))){Q=Q.19(0,i+1);21}}c Q},print:7(Q,m){h 1y=[].19.1x(17,1),1F;c Q.1h(/#{([^{}]+)}/gm,7(1B,p){1F=Number(p);f(1F>=0){c 1y[1F]}f(m&&m[p]!==\'\'){c m[p]}c\'\'})},fillZero:7(l,n){h z=1D 1H(n).3c(\'0\'),Q=z+l,P=Q.19(-n);c P},stripTags:7(l){f(o.1w(l)===\'3a\'){c l.1h(/<2Z[^>]*>(\\S\\s*?)<\\/2Z>/img,\'\').1h(/<[^>]+>/g,\'\')}},capitalize:7(l){c l.2q(0).4p()+l.19(1).1z()},3l:7(l){f(l.1a(\'-\')<0&&l.1a(\'_\')<0){c l}c l.1h(/[-_][^-_]/g,7(1B){c 1B.2q(1).4p()})},4q:7(l){c l.1h(/([a-z0-9])([A-Z])/g,\'$1_$2\').1z()},dasherize:7(l){c q.4q(l).1h(/_/g,\'-\')},truncate:7(l,G,28){G=G||30;28=28?28:\'...\';c(l.M>G)?l.19(0,(G-28.M))+28:l.2V()},byteLen:7(Q,29){h l=0,1T,i,G;29=29?29.1z():\'\';f(29===\'utf-16\'||29===\'utf16\'){R(i=0,G=Q.M;i<G;i++){1T=Q.4r(i);f(1T<=4s){l+=2}J{l+=4}}}J{R(i=0,G=Q.M;i<G;i++){1T=Q.4r(i);f(1T<=0x007f){l+=1}J f(1T<=0x07ff){l+=2}J f(1T<=4s){l+=3}J{l+=4}}}c l},repeat:7(w,2a){h s=w,l=\'\';2l(2a>0){f(2a%2==1){l+=s}f(2a==1){21}s+=s;2a=2a>>1}c l},endsWith:7(l,w,2I){h Q=l.19(-(w.M));c 2I?Q.1z()===w.1z():Q===w},startsWith:7(l,w,2I){h Q=l.19(0,w.M);c 2I?Q.1z()===w.1z():Q===w},containsClass:7(l,w,2b){c 2b?(2b+l+2b).1a(2b+w+2b)>-1:q.25(l,w)},25:7(l,w){c l.1a(w)!=-1}};D={2J:7(15){h 2c=15?15.4t:I;c 2c.2A.4u||2c.2d.4u},2K:7(15){h 2c=15?15.4t:I;c 2c.2A.4v||2c.2d.4v},25:I.2r?7(a,b){c!!(a.4w(b)&16)}:7(a,b){c a!=b&&a.25(b)},4x:7(15){h W=0,1m=0,1K=0,1L=0;f(!15.4y||TB.IE().37==8){h n=15;2l(n){W+=n.offsetLeft,1m+=n.offsetTop;n=n.offsetParent};1K=W+15.3m;1L=1m+15.3n}J{h 1u=15.4y();W=1K=D.2K(15);1m=1L=D.2J(15);W+=1u.W;1K+=1u.1K;1m+=1u.1m;1L+=1u.1L};c{"W":W,"1m":1m,"1K":1K,"1L":1L}},getClientRect:7(15){h 1u=D.4x(15),3o=D.2K(15),3p=D.2J(15);1u.W-=3o;1u.1K-=3o;1u.1m-=3p;1u.1L-=3p;c 1u},2e:I.2r?7(u){c I.2r.4z(u,1p)}:7(u){c u.2L},getStyle:I.2r?7(u,p){h H=I.2r.4z(u,1p);c p in H?H[p]:H.getPropertyValue(p)}:7(u,p){h H=u.H,2e=u.2L;f(p=="1U"){f(/3q\\(1U=(.*)\\)/i.1s(2e.27)){h 1U=parseFloat(RegExp.$1);c 1U?1U/4A:0}c 1}f(p=="4B"){p="4C"}h V=2e[p]||2e[S.3l(p)];f(!/^-?\\d+(?:px)?$/i.1s(V)&&/^\\-?\\d/.1s(V)){h W=H.W,2M=u.runtimeStyle,4E=2M.W;2M.W=2e.W;H.W=V||0;V=H.pixelLeft+"px";H.W=W;2M.W=4E}c V},3r:7(2s,H,1g){f(!2s.M){2s=[2s]}f(1V H=="2T"){h s=H;H={};H[s]=1g}A.3j(2s,7(u){R(h p in H){h 1g=H[p];f(p=="1U"&&B.ie){u.H.27=(u.2L&&u.2L.27||"").1h(/3q\\([^)]*\\)/,"")+" 3q(1U="+(1g*4A|0)+")"}J f(p=="4B"){u.H[B.ie?"4C":"cssFloat"]=1g}J{u.H[S.3l(p)]=1g}}})},getSize:7(u){h 2t=u.3m,2u=u.3n;f(!2t&&!2u){h 3s=!D.25(I.2d,u),1X;f(3s){1X=u.parentNode;I.2d.insertBefore(u,I.2d.childNodes[0])}h H=u.H,4F={3t:"absolute",3u:"hidden",3v:"block",W:"-4G",1m:"-4G"},4H={3t:H.3t,3u:H.3u,3v:H.3v,W:H.W,1m:H.1m};D.3r(u,4F);2t=u.3m;2u=u.3n;D.3r(u,4H);f(3s){1X?1X.33(u):I.2d.removeChild(u)}}c{"2t":2t,"2u":2u}},3w:7(el){c(el.4I)?el.4I:el.nextSibling},3x:7(el){c(el.4J)?el.4J:el.previousSibling},nextBs:7(el){h 1y=[],1o=q.3w(el);2l(1o&&1o.2U===1){1y.22(1o);1o=q.3w(1o)}c 1y},prevBs:7(el){h 1y=[],1o=q.3x(el);2l(1o&&1o.2U===1){1y.22(1o);1o=q.3x(1o)}c 1y}};jx={4K:7(){h 11=y;f(1V 3y!=\'1G\'){1O{11=1D 3y("Msxml2.4L")}1P(e){1O{11=1D 3y("Microsoft.4L")}1P(E){11=y}}}J f(1N.4M){1O{11=1D 4M()}1P(e){11=y}};c 11},load:7(1r,t,2f){h 11=q.2p();f(!11||!1r)c;f(11.4N)11.4N(\'34/xml\');f(!2f)h 2f="34";2f=2f.1z();h 4O="uid="+1D 47().getTime();1r+=(1r.1a("?")+1)?"&":"?";1r+=4O;11.open("GET",1r,12);11.31=7(){f(11.32==4){f(11.4P==200){h P="";f(11.4Q)P=11.4Q;f(2f.2q(0)=="j"){P=P.1h(/[\\n\\r]/g,"");P=eval(\'(\'+P+\')\')};f(t)t(P)}J{f(3i)3i(11.4P)}}};11.send(1p)},2p:7(){c q.4K()}};F=(7(){h 19=1H.1C.19;c{bind:7(2N,18){h 2g=19.1x(17,2);c 7(){c 2N.1l(18,2g.3k(19.1x(17)))}},bindAsEventListener:7(2N,18){h 2g=19.1x(17,2);c 7(C){c 2N.1l(18,[E.2v(C)].3k(2g))}}}})();E=(7(){h 2h,2i,1d=1,3z=7(v,o,L){f(!L.$$1d)L.$$1d=1d++;f(!v.1i)v.1i={};h 1k=v.1i[o];f(!1k){1k=v.1i[o]={};f(v["on"+o]){1k[0]=v["on"+o]}}};f(1N.3G){h 2w={"mouseenter":"4R","mouseleave":"4S"};2h=7(v,o,L){f(o in 2w){3z(v,o,L);h 4T=v.1i[o][L.$$1d]=7(C){h 2O=C.2x;f(!2O||(v!=2O&&!(v.4w(2O)&16))){L.1x(q,C)}};v.3G(2w[o],4T,y)}J{v.3G(o,L,y)}};2i=7(v,o,L){f(o in 2w){f(v.1i&&v.1i[o]){v.4U(2w[o],v.1i[o][L.$$1d],y);3H v.1i[o][L.$$1d]}}J{v.4U(o,L,y)}}}J{2h=7(v,o,L){3z(v,o,L);v.1i[o][L.$$1d]=L;v["on"+o]=2P};2i=7(v,o,L){f(v.1i&&v.1i[o]){3H v.1i[o][L.$$1d]}};7 2P(){h 2Q=12,C=2v();h 1k=q.1i[C.o];R(h i in 1k){q.$$2P=1k[i];f(q.$$2P(C)===y){2Q=y}}c 2Q}}7 2v(C){f(C)c C;C=1N.C;C.pageX=C.clientX+D.2K(C.3I);C.pageY=C.clientY+D.2J(C.3I);C.l=C.3I;C.3J=3J;C.3K=3K;h 2x={"4S":C.toElement,"4R":C.fromElement}[C.o];f(2x){C.2x=2x}c C};7 3J(){q.cancelBubble=12};7 3K(){q.2Q=y};c{"2h":2h,"2i":2i,"2v":2v}})();CE=(7(){h 1d=1;c{2h:7(m,o,L){f(!L.$$$1d)L.$$$1d=1d++;f(!m.1e)m.1e={};f(!m.1e[o])m.1e[o]={};m.1e[o][L.$$$1d]=L},2i:7(m,o,L){f(m.1e&&m.1e[o]){3H m.1e[o][L.$$$1d]}},fireEvent:7(m,o){f(!m.1e)c;h 2g=1H.1C.19.1x(17,2),1k=m.1e[o];R(h i in 1k){1k[i].1l(m,2g)}},clearEvent:7(m){f(!m.1e)c;R(h o in m.1e){h 1k=m.1e[o];R(h i in 1k){1k[i]=1p}m.1e[o]=1p}m.1e=1p}}})();$$=O;$$T=T;$$TB=TB;$$A=A;$$S=S;$$D=D;$$jx=jx;$$F=F;$$E=E;$$CE=CE})();',[],305,'|||||||function|||||return|||if||var||||target|object||type|name|this|||callback|elem|element|item||false||||event||||len|style|document|else|from|handler|length|ele||result|str|for||||ret|left||key|||http|true|cookie|attributes|node||arguments|thisp|slice|indexOf|||guid|cusevents|api|value|replace|events|array|handlers|apply|top||curr|null|temp|url|test|expires|rect|Math|getType|call|arr|toLowerCase|destination|match|prototype|new|property|index|undefined|Array|newJs|elt|right|bottom||window|try|catch|||each|charCode|opacity|typeof|source|parent|link||converter|break|push|||contains||filter|truncation|charset|times|separator|doc|body|curStyle|format|args|addEvent|removeEvent|||while|copy||sys|init|charAt|defaultView|elems|width|height|fixEvent|fix|relatedTarget||override|documentElement||android|path|decodeURIComponent||isNaN|lastIndexOf|ignorecase|getScrollTop|getScrollLeft|currentStyle|rtStyle|fun|related|handleEvent|returnValue|Object|max|string|nodeType|toString|isArray|ins|subclass|script||onreadystatechange|readyState|appendChild|text|iphone|chrome|version|weixin|_extend|String|domain|join|cookies|rdecode|parts|random|floor|error|forEach|concat|camelize|offsetWidth|offsetHeight|sLeft|sTop|alpha|setStyle|repair|position|visibility|display|nextB|prevB|ActiveXObject|storage|||||||addEventListener|delete|srcElement|stopPropagation|preventDefault|searchElement|fromIndex|throw||abs|callee|reg|number|continue||createElement|firstChild|cssload|createStyleSheet|||ipad|firefox|opera|_version|parseInt|defaults|Date|JSON|write|encodeURIComponent||secure|split|read|json|remove|obj|unique|_that|removeAt|splice|min|ceil|method|toUpperCase|underscored|charCodeAt|0xffff|ownerDocument|scrollTop|scrollLeft|compareDocumentPosition|getRect|getBoundingClientRect|getComputedStyle|100|float|styleFloat||rsLeft|cssShow|9999px|cssBack|nextElementSibling|previousElementSibling|getHTTPObject|XMLHTTP|XMLHttpRequest|overrideMimeType|now|status|responseText|mouseover|mouseout|fixhandler|removeEventListener'.split('|'),0,{}))