第一次提交
This commit is contained in:
commit
8121362a03
4412 files changed
+1091845
No files matched your search
@@ -0,0 +1,17 @@
|
||||
/*!
|
||||
* VERSION: 1.18.5
|
||||
* DATE: 2016-05-24
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin
|
||||
*
|
||||
* @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
|
||||
* This work is subject to the terms at http://greensock.com/standard-license or for
|
||||
* Club GreenSock members, the software agreement that was issued with your membership.
|
||||
*
|
||||
* @author: Jack Doyle, jack@greensock.com
|
||||
**/
|
||||
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},e=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e.call(b[c],c):e[c%e.length];delete a.cycle},f=function(a,b,d){c.call(this,a,b,d),this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._dirty=!0,this.render=f.prototype.render},g=1e-10,h=c._internals,i=h.isSelector,j=h.isArray,k=f.prototype=c.to({},.1,{}),l=[];f.version="1.18.5",k.constructor=f,k.kill()._gc=!1,f.killTweensOf=f.killDelayedCallsTo=c.killTweensOf,f.getTweensOf=c.getTweensOf,f.lagSmoothing=c.lagSmoothing,f.ticker=c.ticker,f.render=c.render,k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),c.prototype.invalidate.call(this)},k.updateTo=function(a,b){var d,e=this.ratio,f=this.vars.immediateRender||a.immediateRender;b&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(d in a)this.vars[d]=a[d];if(this._initted||f)if(b)this._initted=!1,f&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&c._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var g=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(g,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||f)for(var h,i=1/(1-e),j=this._firstPT;j;)h=j.s+j.c,j.c*=i,j.s=h-j.c,j=j._next;return this},k.render=function(a,b,c){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var d,e,f,i,j,k,l,m,n=this._dirty?this.totalDuration():this._totalDuration,o=this._time,p=this._totalTime,q=this._cycle,r=this._duration,s=this._rawPrevTime;if(a>=n-1e-7?(this._totalTime=n,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=r,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===r&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>s||0>=a&&a>=-1e-7||s===g&&"isPause"!==this.data)&&s!==a&&(c=!0,s>g&&(e="onReverseComplete")),this._rawPrevTime=m=!b||a||s===a?a:g)):1e-7>a?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==p||0===r&&s>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===r&&(this._initted||!this.vars.lazy||c)&&(s>=0&&(c=!0),this._rawPrevTime=m=!b||a||s===a?a:g)),this._initted||(c=!0)):(this._totalTime=this._time=a,0!==this._repeat&&(i=r+this._repeatDelay,this._cycle=this._totalTime/i>>0,0!==this._cycle&&this._cycle===this._totalTime/i&&a>=p&&this._cycle--,this._time=this._totalTime-this._cycle*i,this._yoyo&&0!==(1&this._cycle)&&(this._time=r-this._time),this._time>r?this._time=r:this._time<0&&(this._time=0)),this._easeType?(j=this._time/r,k=this._easeType,l=this._easePower,(1===k||3===k&&j>=.5)&&(j=1-j),3===k&&(j*=2),1===l?j*=j:2===l?j*=j*j:3===l?j*=j*j*j:4===l&&(j*=j*j*j*j),1===k?this.ratio=1-j:2===k?this.ratio=j:this._time/r<.5?this.ratio=j/2:this.ratio=1-j/2):this.ratio=this._ease.getRatio(this._time/r)),o===this._time&&!c&&q===this._cycle)return void(p!==this._totalTime&&this._onUpdate&&(b||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=o,this._totalTime=p,this._rawPrevTime=s,this._cycle=q,h.lazyTweens.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/r):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&a>=0&&(this._active=!0),0===p&&(2===this._initted&&a>0&&this._init(),this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===r)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&this._startTime&&this._startAt.render(a,b,c),b||(this._totalTime!==p||e)&&this._callback("onUpdate")),this._cycle!==q&&(b||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===Line truncated
|
||||
priority:-1,version:"1.3.6",API:2,global:!0,init:function(a,b,c){this._target=a,b instanceof Array&&(b={values:b}),this._func={},this._round={},this._props=[],this._timeRes=null==b.timeResolution?6:parseInt(b.timeResolution,10);var d,e,f,g,h,i=b.values||[],j={},k=i[0],n=b.autoRotate||c.vars.orientToBezier;this._autoRotate=n?n instanceof Array?n:[["x","y","rotation",n===!0?0:Number(n)||0]]:null;for(d in k)this._props.push(d);for(f=this._props.length;--f>-1;)d=this._props[f],this._overwriteProps.push(d),e=this._func[d]="function"==typeof a[d],j[d]=e?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]():parseFloat(a[d]),h||j[d]!==i[0][d]&&(h=j);if(this._beziers="cubic"!==b.type&&"quadratic"!==b.type&&"soft"!==b.type?l(i,isNaN(b.curviness)?1:b.curviness,!1,"thruBasic"===b.type,b.correlate,h):m(i,b.type,j),this._segCount=this._beziers[d].length,this._timeRes){var p=o(this._beziers,this._timeRes);this._length=p.length,this._lengths=p.lengths,this._segments=p.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(n=this._autoRotate)for(this._initialRotations=[],n[0]instanceof Array||(this._autoRotate=n=[n]),f=n.length;--f>-1;){for(g=0;3>g;g++)d=n[f][g],this._func[d]="function"==typeof a[d]?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]:!1;d=n[f][2],this._initialRotations[f]=(this._func[d]?this._func[d].call(this._target):this._target[d])||0}return this._startRatio=c.vars.runBackwards?1:0,!0},set:function(b){var c,d,e,f,g,h,i,j,k,l,m=this._segCount,n=this._func,o=this._target,p=b!==this._startRatio;if(this._timeRes){if(k=this._lengths,l=this._curSeg,b*=this._length,e=this._li,b>this._l2&&m-1>e){for(j=m-1;j>e&&(this._l2=k[++e])<=b;);this._l1=k[e-1],this._li=e,this._curSeg=l=this._segments[e],this._s2=l[this._s1=this._si=0]}else if(b<this._l1&&e>0){for(;e>0&&(this._l1=k[--e])>=b;);0===e&&b<this._l1?this._l1=0:e++,this._l2=k[e],this._li=e,this._curSeg=l=this._segments[e],this._s1=l[(this._si=l.length-1)-1]||0,this._s2=l[this._si]}if(c=e,b-=this._l1,e=this._si,b>this._s2&&e<l.length-1){for(j=l.length-1;j>e&&(this._s2=l[++e])<=b;);this._s1=l[e-1],this._si=e}else if(b<this._s1&&e>0){for(;e>0&&(this._s1=l[--e])>=b;);0===e&&b<this._s1?this._s1=0:e++,this._s2=l[e],this._si=e}h=(e+(b-this._s1)/(this._s2-this._s1))*this._prec||0}else c=0>b?0:b>=1?m-1:m*b>>0,h=(b-c*(1/m))*m;for(d=1-h,e=this._props.length;--e>-1;)f=this._props[e],g=this._beziers[f][c],i=(h*h*g.da+3*d*(h*g.ca+d*g.ba))*h+g.a,this._round[f]&&(i=Math.round(i)),n[f]?o[f](i):o[f]=i;if(this._autoRotate){var q,r,s,t,u,v,w,x=this._autoRotate;for(e=x.length;--e>-1;)f=x[e][2],v=x[e][3]||0,w=x[e][4]===!0?1:a,g=this._beziers[x[e][0]],q=this._beziers[x[e][1]],g&&q&&(g=g[c],q=q[c],r=g.a+(g.b-g.a)*h,t=g.b+(g.c-g.b)*h,r+=(t-r)*h,t+=(g.c+(g.d-g.c)*h-t)*h,s=q.a+(q.b-q.a)*h,u=q.b+(q.c-q.b)*h,s+=(u-s)*h,u+=(q.c+(q.d-q.c)*h-u)*h,i=p?Math.atan2(u-s,t-r)*w+v:this._initialRotations[e],n[f]?o[f](i):o[f]=i)}}}),q=p.prototype;p.bezierThrough=l,p.cubicToQuadratic=i,p._autoCSS=!0,p.quadraticToCubic=function(a,b,c){return new g(a,(2*b+a)/3,(2*b+c)/3,c)},p._cssRegister=function(){var a=f.CSSPlugin;if(a){var b=a._internals,c=b._parseToProxy,d=b._setPluginRatio,e=b.CSSPropTween;b._registerComplexSpecialProp("bezier",{parser:function(a,b,f,g,h,i){b instanceof Array&&(b={values:b}),i=new p;var j,k,l,m=b.values,n=m.length-1,o=[],q={};if(0>n)return h;for(j=0;n>=j;j++)l=c(a,m[j],g,h,i,n!==j),o[j]=l.end;for(k in b)q[k]=b[k];return q.values=o,h=new e(a,"bezier",0,0,l.pt,2),h.data=l,h.plugin=i,h.setRatio=d,0===q.autoRotate&&(q.autoRotate=!0),!q.autoRotate||q.autoRotate instanceof Array||(j=q.autoRotate===!0?0:Number(q.autoRotate),q.autoRotate=null!=l.end.left?[["left","top","rotation",j,!1]]:null!=l.end.x?[["x","y","rotation",j,!1]]:!1),q.autoRotate&&(g._transform||g._enableTransforms(!1),l.autoRotate=g._target._gsTransform,l.proxy.rotation=l.autoRotate.rotation||0),i._onInitTween(l.proxy,q,g._tween),h}})}},q._roundProps=function(a,b){for(var c=this._overwriteProps,d=c.length;--d>-1;)(a[c[d]]||a.bezier||a.bezierThrough)&&(this._round[c[d]]=b)},q._kill=function(a){var b,c,d=this._props;for(b in this._beziers)if(b in a)for(delete this._beziers[b],delete this._func[b],c=d.length;--c>-1;)d[c]===b&&d.splice(c,1);return this._super._kill.call(this,a)}}(),_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.18.5",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q=/(?:\-|\.|\b)(\d|\.|e\-)+/g,r=/(?:\d|\-\d|\.\d|\-\.\d|\+=\Line truncated
|
||||
f.xs0=f.e=l[0]+" "+(l[1]||"50%")+" 0px",f=new qa(z,"zOrigin",0,0,f,-1,f.n),f.b=k,f.xs0=f.e=z.zOrigin):f.xs0=f.e=l):ea(l+"",z)),n&&(d._transformType=z.svg&&xa||!m&&3!==this._transformType?2:3),f},prefix:!0}),va("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),va("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j<y.length;j++)this.p.indexOf("border")&&(y[j]=W(y[j])),m=l=Y(a,y[j],e,!1,"0px"),-1!==m.indexOf(" ")&&(l=m.split(" "),m=l[0],l=l[1]),n=k=i[j],o=parseFloat(m),t=m.substr((o+"").length),u="="===n.charAt(1),u?(p=parseInt(n.charAt(0)+"1",10),n=n.substr(2),p*=parseFloat(n),s=n.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=Z(a,"borderLeft",o,t),w=Z(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=Z(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=sa(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:na("0px 0px 0px 0px",!1,!0)}),va("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return sa(a.style,c,this.format(Y(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:na("0px 0px",!1,!0)}),va("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||X(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=Y(a,"backgroundImage").replace(B,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),O.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-O.width:a.offsetHeight-O.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ea}),va("backgroundSize",{defaultValue:"0 0",formatter:ea}),va("perspective",{defaultValue:"0px",prefix:!0}),va("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),va("transformStyle",{prefix:!0}),va("backfaceVisibility",{prefix:!0}),va("userSelect",{prefix:!0}),va("margin",{parser:oa("marginTop,marginRight,marginBottom,marginLeft")}),va("padding",{parser:oa("paddingTop,paddingRight,paddingBottom,paddingLeft")}),va("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(Y(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),va("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),va("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),va("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=Y(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(u,"");return"px"!==j&&(h=parseFloat(h)/Z(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+Y(a,"borderTopStyle",e,!1,"solid")+" "+Y(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(ma)||["#000"])[0]}}),va("borderWidth",{parser:oa("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),va("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new qa(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Qa=function(a){var b,c=this.t,d=c.filter||Y(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!Y(this.data,"filter")):(c.filter=d.replace(x,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(v,"opacity="+e))};va("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(Y(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===Y(a,"visibility",e)&&0!==b&&(h=0),R?f=new qa(i,"opacity",h,b-h,f):(f=new qa(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Qa),j&&(f=new qa(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.Line truncated
|
||||
d.blob=1,l._firstPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,r:o&&4>o}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=M,l},O=function(a,b,c,d,e,f,g,h){var i,j,k="get"===c?a[b]:c,l=typeof a[b],m="string"==typeof d&&"="===d.charAt(1),n={t:a,p:b,s:k,f:"function"===l,pg:0,n:e||b,r:f,pr:0,c:m?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-k||0};return"number"!==l&&("function"===l&&"get"===c&&(j=b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),n.s=k=g?a[j](g):a[j]()),"string"==typeof k&&(g||isNaN(k))?(n.fp=g,i=N(k,d,h||G.defaultStringFilter,n),n={t:i,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0}):m||(n.s=parseFloat(k),n.c=parseFloat(d)-n.s||0)),n.c?((n._next=this._firstPT)&&(n._next._prev=n),this._firstPT=n,n):void 0},P=G._internals={isArray:o,isSelector:H,lazyTweens:J,blobDif:N},Q=G._plugins={},R=P.tweenLookup={},S=0,T=P.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},U={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},V=D._rootFramesTimeline=new F,W=D._rootTimeline=new F,X=30,Y=P.lazyRender=function(){var a,b=J.length;for(K={};--b>-1;)a=J[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);J.length=0};W._startTime=h.time,V._startTime=h.frame,W._active=V._active=!0,setTimeout(Y,1),D._updateRoot=G.render=function(){var a,b,c;if(J.length&&Y(),W.render((h.time-W._startTime)*W._timeScale,!1,!1),V.render((h.frame-V._startTime)*V._timeScale,!1,!1),J.length&&Y(),h.frame>=X){X=h.frame+(parseInt(G.autoSleep,10)||120);for(c in R){for(b=R[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete R[c]}if(c=W._first,(!c||c._paused)&&G.autoSleep&&!V._first&&1===h._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||h.sleep()}}},h.addEventListener("tick",D._updateRoot);var Z=function(a,b,c){var d,e,f=a._gsTweenID;if(R[f||(a._gsTweenID=f="t"+S++)]||(R[f]={target:a,tweens:[]}),b&&(d=R[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return R[f].tweens},$=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=G.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},_=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+l,m=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||aa(b,0,o),0===aa(h,j,o)&&(m[n++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2e-10||(m[n++]=h)));for(f=n;--f>-1;)if(h=m[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!$(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},aa=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*l>f-b?l:(f+=a.totalDuration()/a._timeScale/e)>b+l?0:f-b-l};g._init=function(){var a,b,c,d,e,f=this.vars,g=this._overwrittenProps,h=this._duration,i=!!f.immediateRender,j=f.ease;if(f.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in f.startAt)e[d]=f.startAt[d];if(e.overwrite=!1,e.immediateRender=!0,e.lazy=i&&f.lazy!==!1,e.startAt=e.delay=null,this._startAt=G.to(this.target,0,e),i)if(this._time>0)this._startAt=null;else if(0!==h)return}else if(f.runBackwards&&0!==h)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(i=!1),c={};for(d in f)T[d]&&"autoCSS"!==d||(c[d]=f[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=i&&f.lazy!==!1,c.immediateRender=i,this._startAt=G.to(this.target,0,c),i){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=j=j?j instanceof v?j:"function"==typeof j?new v(j,f.easeParams):w[j]||G.defaultEase:G.defaultEase,f.easeParams instanceof Array&&j.config&&(this._ease=j.config.apply(j,f.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(a=this._targets.length;--a>-1;)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[Line truncated
|
||||
@@ -0,0 +1,468 @@
|
||||
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
*
|
||||
* Version: 1.3.1
|
||||
*
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
jQuery.fn.extend({
|
||||
slimScroll: function(options) {
|
||||
|
||||
var defaults = {
|
||||
|
||||
// width in pixels of the visible scroll area
|
||||
width : 'auto',
|
||||
|
||||
// height in pixels of the visible scroll area
|
||||
height : '250px',
|
||||
|
||||
// width in pixels of the scrollbar and rail
|
||||
size : '7px',
|
||||
|
||||
// scrollbar color, accepts any hex/color value
|
||||
color: '#000',
|
||||
|
||||
// scrollbar position - left/right
|
||||
position : 'right',
|
||||
|
||||
// distance in pixels between the side edge and the scrollbar
|
||||
distance : '1px',
|
||||
|
||||
// default scroll position on load - top / bottom / $('selector')
|
||||
start : 'top',
|
||||
|
||||
// sets scrollbar opacity
|
||||
opacity : .4,
|
||||
|
||||
// enables always-on mode for the scrollbar
|
||||
alwaysVisible : false,
|
||||
|
||||
// check if we should hide the scrollbar when user is hovering over
|
||||
disableFadeOut : false,
|
||||
|
||||
// sets visibility of the rail
|
||||
railVisible : false,
|
||||
|
||||
// sets rail color
|
||||
railColor : '#333',
|
||||
|
||||
// sets rail opacity
|
||||
railOpacity : .2,
|
||||
|
||||
// whether we should use jQuery UI Draggable to enable bar dragging
|
||||
railDraggable : true,
|
||||
|
||||
// defautlt CSS class of the slimscroll rail
|
||||
railClass : 'slimScrollRail',
|
||||
|
||||
// defautlt CSS class of the slimscroll bar
|
||||
barClass : 'slimScrollBar',
|
||||
|
||||
// defautlt CSS class of the slimscroll wrapper
|
||||
wrapperClass : 'slimScrollDiv',
|
||||
|
||||
// check if mousewheel should scroll the window if we reach top/bottom
|
||||
allowPageScroll : false,
|
||||
|
||||
// scroll amount applied to each mouse wheel step
|
||||
wheelStep : 20,
|
||||
|
||||
// scroll amount applied when user is using gestures
|
||||
touchScrollStep : 200,
|
||||
|
||||
// sets border radius
|
||||
borderRadius: '7px',
|
||||
|
||||
// sets border radius of the rail
|
||||
railBorderRadius : '7px'
|
||||
};
|
||||
|
||||
var o = $.extend(defaults, options);
|
||||
|
||||
// do it for every element that matches selector
|
||||
this.each(function(){
|
||||
|
||||
var isOverPanel, isOverBar, isDragg, queueHide, touchDif,
|
||||
barHeight, percentScroll, lastScroll,
|
||||
divS = '<div></div>',
|
||||
minBarHeight = 30,
|
||||
releaseScroll = false;
|
||||
|
||||
// used in event handlers and for better minification
|
||||
var me = $(this);
|
||||
|
||||
// ensure we are not binding it again
|
||||
if (me.parent().hasClass(o.wrapperClass))
|
||||
{
|
||||
// start from last bar position
|
||||
var offset = me.scrollTop();
|
||||
|
||||
// find bar and rail
|
||||
bar = me.parent().find('.' + o.barClass);
|
||||
rail = me.parent().find('.' + o.railClass);
|
||||
|
||||
getBarHeight();
|
||||
|
||||
// check if we should scroll existing instance
|
||||
if ($.isPlainObject(options))
|
||||
{
|
||||
// Pass height: auto to an existing slimscroll object to force a resize after contents have changed
|
||||
if ( 'height' in options && options.height == 'auto' ) {
|
||||
me.parent().css('height', 'auto');
|
||||
me.css('height', 'auto');
|
||||
var height = me.parent().parent().height();
|
||||
me.parent().css('height', height);
|
||||
me.css('height', height);
|
||||
} else if ('height' in options) {
|
||||
var h = options.height;
|
||||
me.parent().css('height', h);
|
||||
me.css('height', h);
|
||||
}
|
||||
|
||||
if ('scrollTo' in options)
|
||||
{
|
||||
// jump to a static point
|
||||
offset = parseInt(o.scrollTo);
|
||||
}
|
||||
else if ('scrollBy' in options)
|
||||
{
|
||||
// jump by value pixels
|
||||
offset += parseInt(o.scrollBy);
|
||||
}
|
||||
else if ('destroy' in options)
|
||||
{
|
||||
// remove slimscroll elements
|
||||
bar.remove();
|
||||
rail.remove();
|
||||
me.unwrap();
|
||||
return;
|
||||
}
|
||||
|
||||
// scroll content by the given offset
|
||||
scrollContent(offset, false, true);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// optionally set height to the parent's height
|
||||
o.height = (o.height == 'auto') ? me.parent().height() : o.height;
|
||||
|
||||
// wrap content
|
||||
var wrapper = $(divS)
|
||||
.addClass(o.wrapperClass)
|
||||
.css({
|
||||
position: 'relative',
|
||||
overflow: 'hidden',
|
||||
width: o.width,
|
||||
height: o.height
|
||||
});
|
||||
|
||||
// update style for the div
|
||||
me.css({
|
||||
overflow: 'hidden',
|
||||
width: o.width,
|
||||
height: o.height
|
||||
});
|
||||
|
||||
// create scrollbar rail
|
||||
var rail = $(divS)
|
||||
.addClass(o.railClass)
|
||||
.css({
|
||||
width: o.size,
|
||||
height: '100%',
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
display: (o.alwaysVisible && o.railVisible) ? 'block' : 'none',
|
||||
'border-radius': o.railBorderRadius,
|
||||
background: o.railColor,
|
||||
opacity: o.railOpacity,
|
||||
zIndex: 90
|
||||
});
|
||||
|
||||
// create scrollbar
|
||||
var bar = $(divS)
|
||||
.addClass(o.barClass)
|
||||
.css({
|
||||
background: o.color,
|
||||
width: o.size,
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
opacity: o.opacity,
|
||||
display: o.alwaysVisible ? 'block' : 'none',
|
||||
'border-radius' : o.borderRadius,
|
||||
BorderRadius: o.borderRadius,
|
||||
MozBorderRadius: o.borderRadius,
|
||||
WebkitBorderRadius: o.borderRadius,
|
||||
zIndex: 99
|
||||
});
|
||||
|
||||
// set position
|
||||
var posCss = (o.position == 'right') ? { right: o.distance } : { left: o.distance };
|
||||
rail.css(posCss);
|
||||
bar.css(posCss);
|
||||
|
||||
// wrap it
|
||||
me.wrap(wrapper);
|
||||
|
||||
// append to parent div
|
||||
me.parent().append(bar);
|
||||
me.parent().append(rail);
|
||||
|
||||
// make it draggable and no longer dependent on the jqueryUI
|
||||
if (o.railDraggable){
|
||||
bar.bind("mousedown", function(e) {
|
||||
var $doc = $(document);
|
||||
isDragg = true;
|
||||
t = parseFloat(bar.css('top'));
|
||||
pageY = e.pageY;
|
||||
|
||||
$doc.bind("mousemove.slimscroll", function(e){
|
||||
currTop = t + e.pageY - pageY;
|
||||
bar.css('top', currTop);
|
||||
scrollContent(0, bar.position().top, false);// scroll content
|
||||
});
|
||||
|
||||
$doc.bind("mouseup.slimscroll", function(e) {
|
||||
isDragg = false;hideBar();
|
||||
$doc.unbind('.slimscroll');
|
||||
});
|
||||
return false;
|
||||
}).bind("selectstart.slimscroll", function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
// on rail over
|
||||
rail.hover(function(){
|
||||
showBar();
|
||||
}, function(){
|
||||
hideBar();
|
||||
});
|
||||
|
||||
// on bar over
|
||||
bar.hover(function(){
|
||||
isOverBar = true;
|
||||
}, function(){
|
||||
isOverBar = false;
|
||||
});
|
||||
|
||||
// show on parent mouseover
|
||||
me.hover(function(){
|
||||
isOverPanel = true;
|
||||
showBar();
|
||||
hideBar();
|
||||
}, function(){
|
||||
isOverPanel = false;
|
||||
hideBar();
|
||||
});
|
||||
|
||||
// support for mobile
|
||||
me.bind('touchstart', function(e,b){
|
||||
if (e.originalEvent.touches.length)
|
||||
{
|
||||
// record where touch started
|
||||
touchDif = e.originalEvent.touches[0].pageY;
|
||||
}
|
||||
});
|
||||
|
||||
me.bind('touchmove', function(e){
|
||||
// prevent scrolling the page if necessary
|
||||
if(!releaseScroll)
|
||||
{
|
||||
e.originalEvent.preventDefault();
|
||||
}
|
||||
if (e.originalEvent.touches.length)
|
||||
{
|
||||
// see how far user swiped
|
||||
var diff = (touchDif - e.originalEvent.touches[0].pageY) / o.touchScrollStep;
|
||||
// scroll content
|
||||
scrollContent(diff, true);
|
||||
touchDif = e.originalEvent.touches[0].pageY;
|
||||
}
|
||||
});
|
||||
|
||||
// set up initial height
|
||||
getBarHeight();
|
||||
|
||||
// check start position
|
||||
if (o.start === 'bottom')
|
||||
{
|
||||
// scroll content to bottom
|
||||
bar.css({ top: me.outerHeight() - bar.outerHeight() });
|
||||
scrollContent(0, true);
|
||||
}
|
||||
else if (o.start !== 'top')
|
||||
{
|
||||
// assume jQuery selector
|
||||
scrollContent($(o.start).position().top, null, true);
|
||||
|
||||
// make sure bar stays hidden
|
||||
if (!o.alwaysVisible) { bar.hide(); }
|
||||
}
|
||||
|
||||
// attach scroll events
|
||||
attachWheel();
|
||||
|
||||
function _onWheel(e)
|
||||
{
|
||||
// use mouse wheel only when mouse is over
|
||||
if (!isOverPanel) { return; }
|
||||
|
||||
var e = e || window.event;
|
||||
|
||||
var delta = 0;
|
||||
if (e.wheelDelta) { delta = -e.wheelDelta/120; }
|
||||
if (e.detail) { delta = e.detail / 3; }
|
||||
|
||||
var target = e.target || e.srcTarget || e.srcElement;
|
||||
if ($(target).closest('.' + o.wrapperClass).is(me.parent())) {
|
||||
// scroll content
|
||||
scrollContent(delta, true);
|
||||
}
|
||||
|
||||
// stop window scroll
|
||||
if (e.preventDefault && !releaseScroll) { e.preventDefault(); }
|
||||
if (!releaseScroll) { e.returnValue = false; }
|
||||
}
|
||||
|
||||
function scrollContent(y, isWheel, isJump)
|
||||
{
|
||||
releaseScroll = false;
|
||||
var delta = y;
|
||||
var maxTop = me.outerHeight() - bar.outerHeight();
|
||||
|
||||
if (isWheel)
|
||||
{
|
||||
// move bar with mouse wheel
|
||||
delta = parseInt(bar.css('top')) + y * parseInt(o.wheelStep) / 100 * bar.outerHeight();
|
||||
|
||||
// move bar, make sure it doesn't go out
|
||||
delta = Math.min(Math.max(delta, 0), maxTop);
|
||||
|
||||
// if scrolling down, make sure a fractional change to the
|
||||
// scroll position isn't rounded away when the scrollbar's CSS is set
|
||||
// this flooring of delta would happened automatically when
|
||||
// bar.css is set below, but we floor here for clarity
|
||||
delta = (y > 0) ? Math.ceil(delta) : Math.floor(delta);
|
||||
|
||||
// scroll the scrollbar
|
||||
bar.css({ top: delta + 'px' });
|
||||
}
|
||||
|
||||
// calculate actual scroll amount
|
||||
percentScroll = parseInt(bar.css('top')) / (me.outerHeight() - bar.outerHeight());
|
||||
delta = percentScroll * (me[0].scrollHeight - me.outerHeight());
|
||||
|
||||
if (isJump)
|
||||
{
|
||||
delta = y;
|
||||
var offsetTop = delta / me[0].scrollHeight * me.outerHeight();
|
||||
offsetTop = Math.min(Math.max(offsetTop, 0), maxTop);
|
||||
bar.css({ top: offsetTop + 'px' });
|
||||
}
|
||||
|
||||
// scroll content
|
||||
me.scrollTop(delta);
|
||||
|
||||
// fire scrolling event
|
||||
me.trigger('slimscrolling', ~~delta);
|
||||
|
||||
// ensure bar is visible
|
||||
showBar();
|
||||
|
||||
// trigger hide when scroll is stopped
|
||||
hideBar();
|
||||
}
|
||||
|
||||
function attachWheel()
|
||||
{
|
||||
if (window.addEventListener)
|
||||
{
|
||||
this.addEventListener('DOMMouseScroll', _onWheel, false );
|
||||
this.addEventListener('mousewheel', _onWheel, false );
|
||||
this.addEventListener('MozMousePixelScroll', _onWheel, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
document.attachEvent("onmousewheel", _onWheel)
|
||||
}
|
||||
}
|
||||
|
||||
function getBarHeight()
|
||||
{
|
||||
// calculate scrollbar height and make sure it is not too small
|
||||
barHeight = Math.max((me.outerHeight() / me[0].scrollHeight) * me.outerHeight(), minBarHeight);
|
||||
bar.css({ height: barHeight + 'px' });
|
||||
|
||||
// hide scrollbar if content is not long enough
|
||||
var display = barHeight == me.outerHeight() ? 'none' : 'block';
|
||||
bar.css({ display: display });
|
||||
}
|
||||
|
||||
function showBar()
|
||||
{
|
||||
// recalculate bar height
|
||||
getBarHeight();
|
||||
clearTimeout(queueHide);
|
||||
|
||||
// when bar reached top or bottom
|
||||
if (percentScroll == ~~percentScroll)
|
||||
{
|
||||
//release wheel
|
||||
releaseScroll = o.allowPageScroll;
|
||||
|
||||
// publish approporiate event
|
||||
if (lastScroll != percentScroll)
|
||||
{
|
||||
var msg = (~~percentScroll == 0) ? 'top' : 'bottom';
|
||||
me.trigger('slimscroll', msg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
releaseScroll = false;
|
||||
}
|
||||
lastScroll = percentScroll;
|
||||
|
||||
// show only when required
|
||||
if(barHeight >= me.outerHeight()) {
|
||||
//allow window scroll
|
||||
releaseScroll = true;
|
||||
return;
|
||||
}
|
||||
bar.stop(true,true).fadeIn('fast');
|
||||
if (o.railVisible) { rail.stop(true,true).fadeIn('fast'); }
|
||||
}
|
||||
|
||||
function hideBar()
|
||||
{
|
||||
// only hide when options allow it
|
||||
if (!o.alwaysVisible)
|
||||
{
|
||||
queueHide = setTimeout(function(){
|
||||
if (!(o.disableFadeOut && isOverPanel) && !isOverBar && !isDragg)
|
||||
{
|
||||
bar.fadeOut('slow');
|
||||
rail.fadeOut('slow');
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// maintain chainability
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
jQuery.fn.extend({
|
||||
slimscroll: jQuery.fn.slimScroll
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,6 @@
|
||||
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
|
||||
|
||||
*/
|
||||
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(eLine truncated
|
||||
}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])whilLine truncated
|
||||
u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(iLine truncated
|
||||
@@ -0,0 +1,6 @@
|
||||
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
|
||||
|
||||
*/
|
||||
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(eLine truncated
|
||||
}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])whilLine truncated
|
||||
u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(iLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
if(typeof JSON!=="object"){JSON={}}(function(){var rx_one=/^[\],:{}\s]*$/;var rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g;var rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;var rx_four=/(?:^|:|,)(?:\s*\[)+/g;var rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;var rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(n){return n<10?"0"+n:n}function this_value(){return this.valueOf()}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};Boolean.prototype.toJSON=this_value;Number.prototype.toJSON=this_value;String.prototype.toJSON=this_value}var gap;var indent;var meta;var rep;function quote(string){rx_escapable.lastIndex=0;return rx_escapable.test(string)?'"'+string.replace(rx_escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i;var k;var v;var length;var mind=gap;var partial;var value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k;var v;var value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);rx_dangerous.lastIndex=0;if(rx_dangerous.test(text)){text=text.replace(rx_dangerous,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,""))){j=eval("("+text+")");return(typeof reviver==="function")?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
define(function(require, exports, module) {
|
||||
var yyapi = require("../../lib/pkroom/yyapi");
|
||||
|
||||
var queue = [];
|
||||
var face = {
|
||||
saveHistory : function(item,type){
|
||||
while(queue.length>=5){
|
||||
queue.shift();
|
||||
}
|
||||
item.type = type;
|
||||
var sid = yyapi.getChannelInfo().longId;
|
||||
item.channelId = sid;
|
||||
queue.push(item);
|
||||
var cookietime = new Date();
|
||||
cookietime.setTime(cookietime.getTime() + 1 * 60 * 1000);
|
||||
$.cookie("chatPub_history",JSON.stringify(queue),{expires :cookietime});
|
||||
},
|
||||
readHistory : function(type){
|
||||
var sid = yyapi.getChannelInfo().longId;
|
||||
var str = $.cookie("chatPub_history");
|
||||
var arr = [];
|
||||
if(str == undefined)
|
||||
return arr;
|
||||
var jsonData = JSON.parse(str);
|
||||
for(var i = 0; i < jsonData.length; i++)
|
||||
{
|
||||
var item = jsonData[i];
|
||||
if((type == undefined || item.type == type) && item.channelId == sid)
|
||||
{
|
||||
item.isHistory = true;
|
||||
arr.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
};
|
||||
module.exports = face;
|
||||
})
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,37 @@
|
||||
define(function(require, exports, module) {
|
||||
function setCookie(name,value,sec)
|
||||
{
|
||||
var exp = new Date();
|
||||
exp.setTime(exp.getTime() + sec * 1000);
|
||||
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
|
||||
}
|
||||
|
||||
//读取cookies
|
||||
function getCookie(name)
|
||||
{
|
||||
var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
|
||||
|
||||
if(arr=document.cookie.match(reg))
|
||||
|
||||
return unescape(arr[2]);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
//删除cookies
|
||||
function delCookie(name)
|
||||
{
|
||||
var exp = new Date();
|
||||
exp.setTime(exp.getTime() - 1);
|
||||
var cval=getCookie(name);
|
||||
if(cval!=null)
|
||||
document.cookie= name + "="+cval+";expires="+exp.toGMTString();
|
||||
}
|
||||
|
||||
var face = {
|
||||
setCookie : setCookie,
|
||||
getCookie : getCookie,
|
||||
delCookie : delCookie
|
||||
}
|
||||
module.exports = face;
|
||||
})
|
||||
@@ -0,0 +1,83 @@
|
||||
define(function(require, exports, module) {
|
||||
var logger = require("./logger");
|
||||
|
||||
|
||||
var indexId = 0;
|
||||
|
||||
var getNextId = function(){
|
||||
return indexId ++;
|
||||
}
|
||||
|
||||
var eventClass = function(){
|
||||
var eventArray = [];
|
||||
this.addEvent = function(name,fn){
|
||||
// logger.debug(['event util addEvent',name,fn]);
|
||||
var evt = {
|
||||
name:name,
|
||||
fn:fn
|
||||
};
|
||||
eventArray.push(evt);
|
||||
}
|
||||
this.removeEvent = function(name,fn){
|
||||
// logger.debug(['event util removeEvent',name,fn]);
|
||||
var newArr = [];
|
||||
for(var i in eventArray){
|
||||
var e = eventArray[i];
|
||||
if(e.name == name && e.fn == fn){
|
||||
// logger.debug("event util removeEvent found:"+name);
|
||||
}else{
|
||||
newArr.push(e);
|
||||
}
|
||||
}
|
||||
eventArray = newArr;
|
||||
}
|
||||
this.trigerEvent = function(name,data){
|
||||
// logger.debug(['event util trigerEvent',name,data]);
|
||||
for(var i in eventArray){
|
||||
var e = eventArray[i];
|
||||
if(e && e.name == name){
|
||||
// logger.debug(["event util trigerEvent found:",name,data]);
|
||||
e.fn.apply(window,[data]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.getEvents = function(){
|
||||
return eventArray;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
var eventInstances = {};
|
||||
|
||||
/**
|
||||
* 创建一个时间处理器实例,传一个名字,如果name为空则实例一个,如果不为空则返回已有的实例或者新建一个
|
||||
* @prama 处理器名字,
|
||||
* @return 事件处理实例
|
||||
*/
|
||||
var careteEventInstance = function(name){
|
||||
if(!name){
|
||||
|
||||
return new eventClass();
|
||||
}
|
||||
|
||||
if(name in eventInstances){
|
||||
|
||||
return eventInstances[name];
|
||||
}
|
||||
var instance = new eventClass();
|
||||
eventInstances[name] = instance;
|
||||
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
module.exports = {
|
||||
getInstance:careteEventInstance
|
||||
};
|
||||
|
||||
window.eventUtil = module.exports;
|
||||
|
||||
});
|
||||
@@ -0,0 +1,72 @@
|
||||
define(function(require, exports, module) {
|
||||
|
||||
var logger = function(lv,args){};
|
||||
|
||||
logger.prototype={
|
||||
log:function(){},
|
||||
debug:function(){},
|
||||
info:function(){},
|
||||
warn:function(){},
|
||||
error:function(){}
|
||||
};
|
||||
|
||||
var enable = false;
|
||||
window.enableLog=function(stat){
|
||||
enable = !!stat;
|
||||
}
|
||||
|
||||
|
||||
if(location.href.indexOf("debug")!=-1 || (document.referrer||"").indexOf("debug")!=-1 ){
|
||||
enable = true;
|
||||
}
|
||||
|
||||
|
||||
var loggerName = ["log", "info", "debug", "warn","error"];
|
||||
|
||||
|
||||
|
||||
var exp ;
|
||||
var console = window.console;
|
||||
|
||||
if(console && enable){
|
||||
exp = console;
|
||||
}else{
|
||||
exp = new logger();
|
||||
}
|
||||
|
||||
for (var i in loggerName) {
|
||||
var n = loggerName[i];
|
||||
if(!exp[n]){
|
||||
exp[n]=logger.prototype[n];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化数字,显示未两位数,小于10前面加0
|
||||
*/
|
||||
var fillLen = function(n){
|
||||
if(n<10){
|
||||
n = "0"+n;
|
||||
}
|
||||
return String(n);
|
||||
}
|
||||
var fillLen3 = function(n){
|
||||
if(n <10){
|
||||
n = "00"+n;
|
||||
}else if(n < 100){
|
||||
n = "0"+n;
|
||||
}
|
||||
return String(n);
|
||||
}
|
||||
|
||||
exp.time = function(){
|
||||
var d = new Date();
|
||||
var r = d.getFullYear()+"-"+ fillLen(1+d.getMonth())+"-"+fillLen(d.getDate());
|
||||
r+=" "+fillLen(d.getHours())+":"+fillLen(d.getMinutes())+":"+fillLen(d.getSeconds())+"."+fillLen3(d.getMilliseconds());
|
||||
return r;
|
||||
|
||||
}
|
||||
|
||||
module.exports = exp;
|
||||
|
||||
});
|
||||
@@ -0,0 +1,221 @@
|
||||
define(function(require, exports, module) {
|
||||
|
||||
jQuery = $;
|
||||
|
||||
/**
|
||||
* jQuery MD5 hash algorithm function
|
||||
*
|
||||
* <code>
|
||||
* Calculate the md5 hash of a String
|
||||
* String $.md5 ( String str )
|
||||
* </code>
|
||||
*
|
||||
* Calculates the MD5 hash of str using the 禄 RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash.
|
||||
* MD5 (Message-Digest algorithm 5) is a widely-used cryptographic hash function with a 128-bit hash value. MD5 has been employed in a wide variety of security applications, and is also commonly used to check the integrity of data. The generated hash is also non-reversable. Data cannot be retrieved from the message digest, the digest uniquely identifies the data.
|
||||
* MD5 was developed by Professor Ronald L. Rivest in 1994. Its 128 bit (16 byte) message digest makes it a faster implementation than SHA-1.
|
||||
* This script is used to process a variable length message into a fixed-length output of 128 bits using the MD5 algorithm. It is fully compatible with UTF-8 encoding. It is very useful when u want to transfer encrypted passwords over the internet. If you plan using UTF-8 encoding in your project don't forget to set the page encoding to UTF-8 (Content-Type meta tag).
|
||||
* This function orginally get from the WebToolkit and rewrite for using as the jQuery plugin.
|
||||
*
|
||||
* Example
|
||||
* Code
|
||||
* <code>
|
||||
* $.md5("I'm Persian.");
|
||||
* </code>
|
||||
* Result
|
||||
* <code>
|
||||
* "b8c901d0f02223f9761016cfff9d68df"
|
||||
* </code>
|
||||
*
|
||||
* @alias Muhammad Hussein Fattahizadeh < muhammad [AT] semnanweb [DOT] com >
|
||||
* @link http://www.semnanweb.com/jquery-plugin/md5.html
|
||||
* @see http://www.webtoolkit.info/
|
||||
* @license http://www.gnu.org/licenses/gpl.html [GNU General Public License]
|
||||
* @param {jQuery} {md5:function(string))
|
||||
* @return string
|
||||
*/
|
||||
(function($){
|
||||
var rotateLeft = function(lValue, iShiftBits) {
|
||||
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
|
||||
}
|
||||
var addUnsigned = function(lX, lY) {
|
||||
var lX4, lY4, lX8, lY8, lResult;
|
||||
lX8 = (lX & 0x80000000);
|
||||
lY8 = (lY & 0x80000000);
|
||||
lX4 = (lX & 0x40000000);
|
||||
lY4 = (lY & 0x40000000);
|
||||
lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
|
||||
if (lX4 & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
|
||||
if (lX4 | lY4) {
|
||||
if (lResult & 0x40000000) return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
|
||||
else return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
|
||||
} else {
|
||||
return (lResult ^ lX8 ^ lY8);
|
||||
}
|
||||
}
|
||||
var F = function(x, y, z) {
|
||||
return (x & y) | ((~ x) & z);
|
||||
}
|
||||
var G = function(x, y, z) {
|
||||
return (x & z) | (y & (~ z));
|
||||
}
|
||||
var H = function(x, y, z) {
|
||||
return (x ^ y ^ z);
|
||||
}
|
||||
var I = function(x, y, z) {
|
||||
return (y ^ (x | (~ z)));
|
||||
}
|
||||
var FF = function(a, b, c, d, x, s, ac) {
|
||||
a = addUnsigned(a, addUnsigned(addUnsigned(F(b, c, d), x), ac));
|
||||
return addUnsigned(rotateLeft(a, s), b);
|
||||
};
|
||||
var GG = function(a, b, c, d, x, s, ac) {
|
||||
a = addUnsigned(a, addUnsigned(addUnsigned(G(b, c, d), x), ac));
|
||||
return addUnsigned(rotateLeft(a, s), b);
|
||||
};
|
||||
var HH = function(a, b, c, d, x, s, ac) {
|
||||
a = addUnsigned(a, addUnsigned(addUnsigned(H(b, c, d), x), ac));
|
||||
return addUnsigned(rotateLeft(a, s), b);
|
||||
};
|
||||
var II = function(a, b, c, d, x, s, ac) {
|
||||
a = addUnsigned(a, addUnsigned(addUnsigned(I(b, c, d), x), ac));
|
||||
return addUnsigned(rotateLeft(a, s), b);
|
||||
};
|
||||
var convertToWordArray = function(string) {
|
||||
var lWordCount;
|
||||
var lMessageLength = string.length;
|
||||
var lNumberOfWordsTempOne = lMessageLength + 8;
|
||||
var lNumberOfWordsTempTwo = (lNumberOfWordsTempOne - (lNumberOfWordsTempOne % 64)) / 64;
|
||||
var lNumberOfWords = (lNumberOfWordsTempTwo + 1) * 16;
|
||||
var lWordArray = Array(lNumberOfWords - 1);
|
||||
var lBytePosition = 0;
|
||||
var lByteCount = 0;
|
||||
while (lByteCount < lMessageLength) {
|
||||
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
||||
lBytePosition = (lByteCount % 4) * 8;
|
||||
lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
|
||||
lByteCount++;
|
||||
}
|
||||
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
||||
lBytePosition = (lByteCount % 4) * 8;
|
||||
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
|
||||
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
|
||||
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
|
||||
return lWordArray;
|
||||
};
|
||||
var wordToHex = function(lValue) {
|
||||
var WordToHexValue = "", WordToHexValueTemp = "", lByte, lCount;
|
||||
for (lCount = 0; lCount <= 3; lCount++) {
|
||||
lByte = (lValue >>> (lCount * 8)) & 255;
|
||||
WordToHexValueTemp = "0" + lByte.toString(16);
|
||||
WordToHexValue = WordToHexValue + WordToHexValueTemp.substr(WordToHexValueTemp.length - 2, 2);
|
||||
}
|
||||
return WordToHexValue;
|
||||
};
|
||||
var uTF8Encode = function(string) {
|
||||
string = string.replace(/\x0d\x0a/g, "\x0a");
|
||||
var output = "";
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
var c = string.charCodeAt(n);
|
||||
if (c < 128) {
|
||||
output += String.fromCharCode(c);
|
||||
} else if ((c > 127) && (c < 2048)) {
|
||||
output += String.fromCharCode((c >> 6) | 192);
|
||||
output += String.fromCharCode((c & 63) | 128);
|
||||
} else {
|
||||
output += String.fromCharCode((c >> 12) | 224);
|
||||
output += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
output += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
}
|
||||
return output;
|
||||
};
|
||||
$.extend({
|
||||
md5: function(string) {
|
||||
var x = Array();
|
||||
var k, AA, BB, CC, DD, a, b, c, d;
|
||||
var S11=7, S12=12, S13=17, S14=22;
|
||||
var S21=5, S22=9 , S23=14, S24=20;
|
||||
var S31=4, S32=11, S33=16, S34=23;
|
||||
var S41=6, S42=10, S43=15, S44=21;
|
||||
string = uTF8Encode(string);
|
||||
x = convertToWordArray(string);
|
||||
a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
|
||||
for (k = 0; k < x.length; k += 16) {
|
||||
AA = a; BB = b; CC = c; DD = d;
|
||||
a = FF(a, b, c, d, x[k+0], S11, 0xD76AA478);
|
||||
d = FF(d, a, b, c, x[k+1], S12, 0xE8C7B756);
|
||||
c = FF(c, d, a, b, x[k+2], S13, 0x242070DB);
|
||||
b = FF(b, c, d, a, x[k+3], S14, 0xC1BDCEEE);
|
||||
a = FF(a, b, c, d, x[k+4], S11, 0xF57C0FAF);
|
||||
d = FF(d, a, b, c, x[k+5], S12, 0x4787C62A);
|
||||
c = FF(c, d, a, b, x[k+6], S13, 0xA8304613);
|
||||
b = FF(b, c, d, a, x[k+7], S14, 0xFD469501);
|
||||
a = FF(a, b, c, d, x[k+8], S11, 0x698098D8);
|
||||
d = FF(d, a, b, c, x[k+9], S12, 0x8B44F7AF);
|
||||
c = FF(c, d, a, b, x[k+10], S13, 0xFFFF5BB1);
|
||||
b = FF(b, c, d, a, x[k+11], S14, 0x895CD7BE);
|
||||
a = FF(a, b, c, d, x[k+12], S11, 0x6B901122);
|
||||
d = FF(d, a, b, c, x[k+13], S12, 0xFD987193);
|
||||
c = FF(c, d, a, b, x[k+14], S13, 0xA679438E);
|
||||
b = FF(b, c, d, a, x[k+15], S14, 0x49B40821);
|
||||
a = GG(a, b, c, d, x[k+1], S21, 0xF61E2562);
|
||||
d = GG(d, a, b, c, x[k+6], S22, 0xC040B340);
|
||||
c = GG(c, d, a, b, x[k+11], S23, 0x265E5A51);
|
||||
b = GG(b, c, d, a, x[k+0], S24, 0xE9B6C7AA);
|
||||
a = GG(a, b, c, d, x[k+5], S21, 0xD62F105D);
|
||||
d = GG(d, a, b, c, x[k+10], S22, 0x2441453);
|
||||
c = GG(c, d, a, b, x[k+15], S23, 0xD8A1E681);
|
||||
b = GG(b, c, d, a, x[k+4], S24, 0xE7D3FBC8);
|
||||
a = GG(a, b, c, d, x[k+9], S21, 0x21E1CDE6);
|
||||
d = GG(d, a, b, c, x[k+14], S22, 0xC33707D6);
|
||||
c = GG(c, d, a, b, x[k+3], S23, 0xF4D50D87);
|
||||
b = GG(b, c, d, a, x[k+8], S24, 0x455A14ED);
|
||||
a = GG(a, b, c, d, x[k+13], S21, 0xA9E3E905);
|
||||
d = GG(d, a, b, c, x[k+2], S22, 0xFCEFA3F8);
|
||||
c = GG(c, d, a, b, x[k+7], S23, 0x676F02D9);
|
||||
b = GG(b, c, d, a, x[k+12], S24, 0x8D2A4C8A);
|
||||
a = HH(a, b, c, d, x[k+5], S31, 0xFFFA3942);
|
||||
d = HH(d, a, b, c, x[k+8], S32, 0x8771F681);
|
||||
c = HH(c, d, a, b, x[k+11], S33, 0x6D9D6122);
|
||||
b = HH(b, c, d, a, x[k+14], S34, 0xFDE5380C);
|
||||
a = HH(a, b, c, d, x[k+1], S31, 0xA4BEEA44);
|
||||
d = HH(d, a, b, c, x[k+4], S32, 0x4BDECFA9);
|
||||
c = HH(c, d, a, b, x[k+7], S33, 0xF6BB4B60);
|
||||
b = HH(b, c, d, a, x[k+10], S34, 0xBEBFBC70);
|
||||
a = HH(a, b, c, d, x[k+13], S31, 0x289B7EC6);
|
||||
d = HH(d, a, b, c, x[k+0], S32, 0xEAA127FA);
|
||||
c = HH(c, d, a, b, x[k+3], S33, 0xD4EF3085);
|
||||
b = HH(b, c, d, a, x[k+6], S34, 0x4881D05);
|
||||
a = HH(a, b, c, d, x[k+9], S31, 0xD9D4D039);
|
||||
d = HH(d, a, b, c, x[k+12], S32, 0xE6DB99E5);
|
||||
c = HH(c, d, a, b, x[k+15], S33, 0x1FA27CF8);
|
||||
b = HH(b, c, d, a, x[k+2], S34, 0xC4AC5665);
|
||||
a = II(a, b, c, d, x[k+0], S41, 0xF4292244);
|
||||
d = II(d, a, b, c, x[k+7], S42, 0x432AFF97);
|
||||
c = II(c, d, a, b, x[k+14], S43, 0xAB9423A7);
|
||||
b = II(b, c, d, a, x[k+5], S44, 0xFC93A039);
|
||||
a = II(a, b, c, d, x[k+12], S41, 0x655B59C3);
|
||||
d = II(d, a, b, c, x[k+3], S42, 0x8F0CCC92);
|
||||
c = II(c, d, a, b, x[k+10], S43, 0xFFEFF47D);
|
||||
b = II(b, c, d, a, x[k+1], S44, 0x85845DD1);
|
||||
a = II(a, b, c, d, x[k+8], S41, 0x6FA87E4F);
|
||||
d = II(d, a, b, c, x[k+15], S42, 0xFE2CE6E0);
|
||||
c = II(c, d, a, b, x[k+6], S43, 0xA3014314);
|
||||
b = II(b, c, d, a, x[k+13], S44, 0x4E0811A1);
|
||||
a = II(a, b, c, d, x[k+4], S41, 0xF7537E82);
|
||||
d = II(d, a, b, c, x[k+11], S42, 0xBD3AF235);
|
||||
c = II(c, d, a, b, x[k+2], S43, 0x2AD7D2BB);
|
||||
b = II(b, c, d, a, x[k+9], S44, 0xEB86D391);
|
||||
a = addUnsigned(a, AA);
|
||||
b = addUnsigned(b, BB);
|
||||
c = addUnsigned(c, CC);
|
||||
d = addUnsigned(d, DD);
|
||||
}
|
||||
var tempValue = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
|
||||
return tempValue.toLowerCase();
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
|
||||
})
|
||||
@@ -0,0 +1,118 @@
|
||||
define(function(require, exports, module){
|
||||
|
||||
var yyapi = require("../../lib/pkroom/yyapi");
|
||||
var util = require("../../lib/pkroom/util");
|
||||
var expfn = {
|
||||
filterAirTicket : function(msg){
|
||||
//yy://pd-[sid=2710&subid=999315&type=wonder_channel]
|
||||
//yy://pd-[sid=2710&subid=999315&type=wonder_channel]
|
||||
var firstIndex = msg.indexOf("yy://pd-");
|
||||
var t = this ;
|
||||
if(firstIndex >= 0){
|
||||
msg = msg.replace(new RegExp("yy://pd-\\[sid=(\\d+)&(amp;)?subid=(\\d+)(&(amp;)?type=wonder_channel)?\\]","gm"),
|
||||
'<span class="air-ticket-pd" ><a href="javascript:#;" onclick="window.$gotoChannel(this)" data-sid="$1", data-subid="$3">$1</a></span>' );
|
||||
}
|
||||
return msg;
|
||||
},
|
||||
filterAirTicket2 : function(msg){
|
||||
//yy://qun-[gaid=14113059&action=add]
|
||||
var firstIndex = msg.indexOf("yy://qun-");
|
||||
if(firstIndex >= 0){
|
||||
msg = msg.replace(new RegExp("yy://qun-\\[gaid=(\\d+)(&(amp;)?action=add)?\\]","gm"),
|
||||
'<span class="group-ticket-pd" ><a href=\"yy://qun-[gaid=$1&action=add]\" target="_blank">Y群$1</a></span>' );
|
||||
//'<a href=\"yy://qun-[gaid=$1&action=add]\" target="_blank"><font color="#ff0000">[加Y群($1)]</font></a>' );
|
||||
}
|
||||
return msg;
|
||||
|
||||
},
|
||||
filterCustomImage : function(msg){
|
||||
//[Image]4a28fd248c0037aeb15a6dd5a37de713[/Image]
|
||||
var exp = new RegExp("\\[Image\\](.+)\\[/Image\\]","gm");
|
||||
var imgHolder = '<img data-key="$1" class="pub-custom-img" src="http://vipweb.bs2cdn.yy.com/vipinter_0f0e1b0411b94bf9bdfb41fae0906edb.gif"/>';
|
||||
msg = msg.replace(exp,imgHolder);
|
||||
return msg;
|
||||
},
|
||||
filterSysMsg : function(msg){
|
||||
msg = msg.replace(/\[\[U\]/gm,"") ;
|
||||
msg = msg.replace(/\[\/U\]\]/gm, "") ;
|
||||
msg = this.filterAirTicket(msg);
|
||||
msg = this.filterAirTicket2(msg);
|
||||
//msg = util.html_encode(msg);
|
||||
return msg;
|
||||
},
|
||||
fileterWeiDeng : function(msg,weidengs){
|
||||
if(msg && weidengs)
|
||||
{
|
||||
for(var i = 0; i < weidengs.length; i++)
|
||||
{
|
||||
var weidengObj = weidengs[i];
|
||||
if(weidengObj)
|
||||
{
|
||||
if(weidengObj.type == 0)
|
||||
msg = msg + '<span class="pub-weideng-img vip-jinzuan '+ weidengObj.name +'"></span>';
|
||||
else if(weidengObj.type == 1)
|
||||
msg = msg + '<span class="pub-weideng-img pk-jinzuan '+ weidengObj.name +'"></span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
},
|
||||
fileterLianghao : function(lianhao){
|
||||
var msg = "";
|
||||
if(lianhao && lianhao!="" && lianhao!=0)
|
||||
{
|
||||
msg = '<img class="lianghao-img" src="http://dl.vip.yy.com/icons/minicard_vip_prettynum_'+lianhao+'.png"/>';
|
||||
}
|
||||
return msg;
|
||||
},
|
||||
fileterIdentity : function(identitys){
|
||||
var msg = "";
|
||||
if(identitys )
|
||||
{
|
||||
for(var i = 0; i < identitys.length; i++)
|
||||
{
|
||||
msg += '<img class="identity-img" title="'+identitys[i].desc +'" alt="'+identitys[i].desc +'" src="'+identitys[i].url+'"/>';
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
},
|
||||
fileterYYLevel: function(yylevel){
|
||||
var msg = "";
|
||||
if(yylevel < 256)
|
||||
return msg;
|
||||
if(yylevel >=1 && yylevel<=3 )
|
||||
{
|
||||
msg += '<span class="jifen-img jifen-1"></span>';
|
||||
}
|
||||
else if(yylevel >=4 && yylevel<=15 )
|
||||
{
|
||||
msg += '<span class="jifen-img jifen-2"></span>';
|
||||
}
|
||||
else if(yylevel >=16 && yylevel<=63 )
|
||||
{
|
||||
msg += '<span class="jifen-img jifen-3"></span>';
|
||||
}
|
||||
else if(yylevel >=64 && yylevel<=255 )
|
||||
{
|
||||
msg += '<span class="jifen-img jifen-4"></span>';
|
||||
}
|
||||
else if(yylevel >=256 && yylevel<=1023 )
|
||||
{
|
||||
msg += '<span class="jifen-img jifen-5"></span>';
|
||||
}
|
||||
else if(yylevel >=1024 )
|
||||
{
|
||||
msg += '<span class="jifen-img jifen-6"></span>';
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
||||
}
|
||||
window.$gotoChannel = function(e){
|
||||
var sid = e.getAttribute("data-sid");
|
||||
var subid = e.getAttribute("data-subid");
|
||||
yyapi.gotoChannel(parseInt(sid),parseInt(subid));
|
||||
}
|
||||
module.exports= expfn;
|
||||
|
||||
})
|
||||
@@ -0,0 +1,240 @@
|
||||
define(function(require, exports, module) {
|
||||
var login = require('../../common/login');
|
||||
var util = require("./util"),
|
||||
eventUtil = require("./eventUtil");
|
||||
|
||||
var exp={
|
||||
|
||||
showLoginBox:function(){
|
||||
|
||||
// var url = location.protocol + '//' + location.host +'/index/wakeudblogin';
|
||||
|
||||
// eventUtil.getInstance("user").trigerEvent("showLoginBox",{url:url});
|
||||
|
||||
// UDB.sdk.PCWeb.popupOpenLgn(url, 'loginCallback','');
|
||||
// if(location.pathname=="/spy"){
|
||||
//this.showMultiLoginBox();
|
||||
// }else{
|
||||
// this.showYYLoginBox();
|
||||
// }
|
||||
showUdbLogin();
|
||||
//this.showMultiLoginBox();
|
||||
},
|
||||
showYYLoginBox:function(){
|
||||
showUdbLogin();
|
||||
},
|
||||
/*
|
||||
* 显示集成第三方登录按钮的登陆框
|
||||
*/
|
||||
showMultiLoginBox:function(){
|
||||
//remove old elemets
|
||||
var _this = this;
|
||||
var openBox;
|
||||
var cleanup = function(){
|
||||
$('.multi-login-box-mask,.multi-login-box').remove();
|
||||
}
|
||||
|
||||
var openThirdBox = function(url){
|
||||
var openOpts = 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no,target=_blank';
|
||||
openBox = window.open(url,'qq',openOpts);
|
||||
}
|
||||
|
||||
window.closeBox = function(refresh){
|
||||
if(openBox){
|
||||
openBox.close();
|
||||
}
|
||||
if(refresh){
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
window.showLoginPopTip = function(code){
|
||||
|
||||
cleanup();
|
||||
if(code == "-10003"){//第三方登录新用户
|
||||
createTipBox();
|
||||
closeBox(false);
|
||||
} else if(code =="-10004"){
|
||||
createBindedBox();
|
||||
closeBox(false);
|
||||
}else{
|
||||
closeBox(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
var showBox = function(type){
|
||||
var callback = encodeURIComponent(location.protocol + '//' + location.host +'/assets/static/login_success.html');
|
||||
var uri = 'http://uaas.yy.com/open/yyauth/1j4y1211/${type}/${appid}?callback=${callback}';
|
||||
var opts = {
|
||||
callback:callback
|
||||
};
|
||||
switch(type){
|
||||
case "yy":
|
||||
_this.showYYLoginBox();
|
||||
cleanup();
|
||||
return false;
|
||||
break;
|
||||
case "qq":
|
||||
opts['type'] = 2;
|
||||
opts['appid'] = 101154992;
|
||||
break;
|
||||
case "sina":
|
||||
opts['type'] = 1;
|
||||
opts['appid'] = 2822259651;
|
||||
break;
|
||||
case "baidu":
|
||||
opts['type'] = 4;
|
||||
opts['appid'] = 'ArCbjaE1dh0V2rj7GN8P2qal';
|
||||
break;
|
||||
}
|
||||
var fmturi = util.format(uri,opts);
|
||||
openThirdBox(fmturi);
|
||||
}
|
||||
|
||||
var createLoginBox = function(){
|
||||
var mask ='<div class="multi-login-box-mask"></div>';
|
||||
var box = '<div class="multi-login-box">'
|
||||
+'<h2>帐号登录</h2>'
|
||||
+'<div class="multi-login-cont">'
|
||||
+' <a href="/" data-type="yy" class="login-yy"></a>'
|
||||
+' <a href="/" data-type="qq" class="login-qq"></a>'
|
||||
+' <a href="/" data-type="sina" class="login-sina"></a>'
|
||||
+' <a href="/" data-type="baidu" class="login-baidu"></a>'
|
||||
+' <div class="login-vline"></div>'
|
||||
+'</div>'
|
||||
+'<div class="multi-login-tip">注:首次使用第三方登录的用户,该功能无法使用。</div>'
|
||||
+'<a href="#" class="multi-login-box-close" title="关闭"> </a>'
|
||||
+'</div>';
|
||||
var domMask = $(mask);
|
||||
var domBox = $(box);
|
||||
domBox.on("click",".multi-login-cont a",function(){
|
||||
var type = $(this).attr("data-type");
|
||||
showBox(type);
|
||||
return false;
|
||||
})
|
||||
domBox.on("click",".multi-login-box-close",function(){
|
||||
cleanup();
|
||||
return false;
|
||||
})
|
||||
|
||||
$('body').append(domMask).append(domBox);
|
||||
|
||||
}
|
||||
var createTipBox = function(){
|
||||
var mask ='<div class="multi-login-box-mask"></div>';
|
||||
var box = '<div class="multi-login-box">'
|
||||
+'<h2>帐号登录</h2>'
|
||||
+'<div class="multi-login-cont multi-login-etip-cont">'
|
||||
+'<div class="multi-login-error-tip"><p>抱歉,自2015年3月20日起,</p><p>第三方登录功能已经停用,请使用YY账号登录。</p></div>'
|
||||
+'</div>'
|
||||
+'<div class="multi-login-foot">'
|
||||
+'<div class="multi-login-cancel-btn"><a href="#">取消</a></div>'
|
||||
+'<div class="multi-login-yylogin-btn"><a href="#">YY账户登录</a></div>'
|
||||
+'</div>'
|
||||
+'<a href="#" class="multi-login-box-close" title="关闭"> </a>'
|
||||
+'</div>';
|
||||
var domMask = $(mask);
|
||||
var domBox = $(box);
|
||||
domBox.on("click",".multi-login-cancel-btn a",function(){
|
||||
cleanup();
|
||||
createLoginBox();
|
||||
return false;
|
||||
})
|
||||
domBox.on("click",".multi-login-yylogin-btn a",function(){
|
||||
cleanup();
|
||||
showBox("yy");
|
||||
return false;
|
||||
})
|
||||
domBox.on("click",".multi-login-box-close",function(){
|
||||
cleanup();
|
||||
return false;
|
||||
})
|
||||
|
||||
$('body').append(domMask).append(domBox);
|
||||
|
||||
}
|
||||
|
||||
var createBindedBox = function(){
|
||||
var thirdyy = $.cookie("third_yy_no");
|
||||
var mask ='<div class="multi-login-box-mask"></div>';
|
||||
var box = '<div class="multi-login-box">'
|
||||
+'<h2>帐号登录</h2>'
|
||||
+'<div class="multi-login-cont multi-login-etip-cont">'
|
||||
+'<div class="multi-login-error-tip"><p>抱歉,第三方功能已经停止使用,请使用已绑定的<br/>YY账户:<span class="binded-yy">'
|
||||
+ thirdyy
|
||||
+'</span> <a href="#" class="copy-yynum">复制</a></p></div>'
|
||||
+'</div>'
|
||||
+'<div class="multi-login-foot">'
|
||||
+'<div class="multi-login-cancel-btn"><a href="#">取消</a></div>'
|
||||
+'<div class="multi-login-yylogin-btn"><a href="#">YY账户登录</a></div>'
|
||||
+'</div>'
|
||||
+'<a href="#" class="multi-login-box-close" title="关闭"> </a>'
|
||||
+'</div>';
|
||||
var domMask = $(mask);
|
||||
var domBox = $(box);
|
||||
domBox.on("click",".multi-login-cancel-btn a",function(){
|
||||
cleanup();
|
||||
createLoginBox();
|
||||
return false;
|
||||
})
|
||||
domBox.on("click",".multi-login-yylogin-btn a",function(){
|
||||
cleanup();
|
||||
showBox("yy");
|
||||
return false;
|
||||
})
|
||||
domBox.on("click",".multi-login-box-close",function(){
|
||||
cleanup();
|
||||
return false;
|
||||
})
|
||||
domBox.on("click",".copy-yynum",function(){
|
||||
alert("您的浏览器不支持手动复制功能,请手动复制!");
|
||||
return false;
|
||||
})
|
||||
|
||||
$('body').append(domMask).append(domBox);
|
||||
|
||||
}
|
||||
|
||||
|
||||
cleanup();
|
||||
createLoginBox();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
logout:function() {
|
||||
var getDelCookieURL = location.protocol + '//' + location.host +'/index/logout';
|
||||
var done = function(data){
|
||||
if ("1" == data.success) {
|
||||
UDB.sdk.PCWeb
|
||||
.deleteCrossmainCookieWithCallBack(
|
||||
data.delCookieURL,
|
||||
function() {
|
||||
//退出成功后调用触发退出事件
|
||||
eventUtil.getInstance("user").trigerEvent("logout");
|
||||
location.reload()
|
||||
});
|
||||
} else {
|
||||
alert(data.errMsg);
|
||||
}
|
||||
}
|
||||
$.post(
|
||||
getDelCookieURL,
|
||||
function(data) {
|
||||
done(data);
|
||||
}, "json");
|
||||
},
|
||||
getMyUid:function(){
|
||||
return $.cookie("yyuid") || 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
module.exports = exp;
|
||||
window.user= exp;
|
||||
|
||||
});
|
||||
@@ -0,0 +1,265 @@
|
||||
define(function (require, exports, module) {
|
||||
|
||||
//判断当前日期是否大于某个日期
|
||||
// yyyy-MM-dd HH:mm:ss
|
||||
var greaterThanTime = function (time) {
|
||||
var now = new Date();
|
||||
var end = parseDate(time);
|
||||
var ret = false;
|
||||
if (now.getTime() > end.getTime()) {
|
||||
ret = true;
|
||||
}
|
||||
// logger.debug([formatTime(now),">", formatTime(end),ret]);
|
||||
return ret;
|
||||
|
||||
}
|
||||
//跟greaterThanTime恰好相反
|
||||
var lessThanTime = function (t) {
|
||||
return !greaterThanTime(t);
|
||||
}
|
||||
//yyyy-MM-dd HH:mm:ss --> Date objet
|
||||
var parseDate = function (time) {
|
||||
|
||||
var t = String(time);
|
||||
var year = parseInt(t.substring(0, 4)),
|
||||
month = parseInt(t.substring(5, 7)),
|
||||
day = parseInt(t.substring(8, 10)),
|
||||
hour = parseInt(t.substring(11, 13)),
|
||||
min = parseInt(t.substring(14, 16)),
|
||||
sec = parseInt(t.substring(17, 19));
|
||||
|
||||
// logger.debug([year,month,day,hour,min,sec])
|
||||
|
||||
var end = new Date();
|
||||
end.setFullYear(year);
|
||||
end.setMonth(month - 1, day);
|
||||
end.setHours(hour);
|
||||
end.setMinutes(min);
|
||||
end.setSeconds(sec);
|
||||
end.setMilliseconds(0);
|
||||
|
||||
return end;
|
||||
}
|
||||
|
||||
var parseXML = function (data) {
|
||||
var xml, tmp;
|
||||
if (window.DOMParser) { // Standard
|
||||
tmp = new DOMParser();
|
||||
xml = tmp.parseFromString(data, "text/xml");
|
||||
} else { // IE
|
||||
xml = new ActiveXObject("Microsoft.XMLDOM");
|
||||
xml.async = "false";
|
||||
xml.loadXML(data);
|
||||
}
|
||||
tmp = xml.documentElement;
|
||||
if (!tmp || !tmp.nodeName || tmp.nodeName === "parsererror") {
|
||||
return null;
|
||||
}
|
||||
return xml;
|
||||
}
|
||||
|
||||
var xmlToJson = function (obj) {
|
||||
if (this == null) return null;
|
||||
var retObj = new Object;
|
||||
buildObjectNode(retObj,
|
||||
/*jQuery*/
|
||||
obj);
|
||||
return retObj;
|
||||
function buildObjectNode(cycleOBJ,
|
||||
/*Element*/
|
||||
elNode) {
|
||||
/*NamedNodeMap*/
|
||||
var nodeAttr = elNode.attributes;
|
||||
if (nodeAttr != null) {
|
||||
if (nodeAttr.length && cycleOBJ == null) cycleOBJ = new Object;
|
||||
for (var i = 0; i < nodeAttr.length; i++) {
|
||||
cycleOBJ[nodeAttr[i].name] = nodeAttr[i].value;
|
||||
}
|
||||
}
|
||||
var nodeText = "text";
|
||||
if (elNode.text == null) nodeText = "textContent";
|
||||
/*NodeList*/
|
||||
var nodeChilds = elNode.childNodes;
|
||||
if (nodeChilds != null) {
|
||||
if (nodeChilds.length && cycleOBJ == null) cycleOBJ = new Object;
|
||||
for (var i = 0; i < nodeChilds.length; i++) {
|
||||
if (nodeChilds[i].tagName != null) {
|
||||
if (nodeChilds[i].childNodes[0] != null && nodeChilds[i].childNodes.length <= 1 && (nodeChilds[i].childNodes[0].nodeType == 3 || nodeChilds[i].childNodes[0].nodeType == 4)) {
|
||||
if (cycleOBJ[nodeChilds[i].tagName] == null) {
|
||||
cycleOBJ[nodeChilds[i].tagName] = nodeChilds[i][nodeText];
|
||||
} else {
|
||||
if (typeof (cycleOBJ[nodeChilds[i].tagName]) == "object" && cycleOBJ[nodeChilds[i].tagName].length) {
|
||||
cycleOBJ[nodeChilds[i].tagName][cycleOBJ[nodeChilds[i].tagName].length] = nodeChilds[i][nodeText];
|
||||
} else {
|
||||
cycleOBJ[nodeChilds[i].tagName] = [cycleOBJ[nodeChilds[i].tagName]];
|
||||
cycleOBJ[nodeChilds[i].tagName][1] = nodeChilds[i][nodeText];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (nodeChilds[i].childNodes.length) {
|
||||
if (cycleOBJ[nodeChilds[i].tagName] == null) {
|
||||
cycleOBJ[nodeChilds[i].tagName] = new Object;
|
||||
buildObjectNode(cycleOBJ[nodeChilds[i].tagName], nodeChilds[i]);
|
||||
} else {
|
||||
if (cycleOBJ[nodeChilds[i].tagName].length) {
|
||||
cycleOBJ[nodeChilds[i].tagName][cycleOBJ[nodeChilds[i].tagName].length] = new Object;
|
||||
buildObjectNode(cycleOBJ[nodeChilds[i].tagName][cycleOBJ[nodeChilds[i].tagName].length - 1], nodeChilds[i]);
|
||||
} else {
|
||||
cycleOBJ[nodeChilds[i].tagName] = [cycleOBJ[nodeChilds[i].tagName]];
|
||||
cycleOBJ[nodeChilds[i].tagName][1] = new Object;
|
||||
buildObjectNode(cycleOBJ[nodeChilds[i].tagName][1], nodeChilds[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cycleOBJ[nodeChilds[i].tagName] = nodeChilds[i][nodeText];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var o = {
|
||||
xmlToJson:xmlToJson,
|
||||
parseXML: parseXML,
|
||||
parseDate: parseDate,
|
||||
lessThanTime: lessThanTime,
|
||||
greaterThanTime: greaterThanTime,
|
||||
/*
|
||||
* 获取 url 中指定变量的值
|
||||
* @param {[String]} key name [变量名]
|
||||
* @param {[String]} url [url地址]
|
||||
* */
|
||||
getUrlParam: function (name, url) {
|
||||
var re = new RegExp("[\\?&#]" + name + "=([^&#]+)", "gi");
|
||||
var ma = (url || location.href).match(re);
|
||||
var strArr;
|
||||
|
||||
if (ma && ma.length > 0) {
|
||||
strArr = (ma[ma.length - 1]).split("=");
|
||||
if (strArr && strArr.length > 1) {
|
||||
return strArr[1];
|
||||
}
|
||||
return ''
|
||||
}
|
||||
return '';
|
||||
},
|
||||
now: Date.now || function () { return new Date().getTime(); },
|
||||
debounce: function (func, wait, immediate) {
|
||||
var timeout, args, context, timestamp, result;
|
||||
|
||||
var later = function () {
|
||||
var last = o.now() - timestamp;
|
||||
if (last < wait) {
|
||||
timeout = setTimeout(later, wait - last);
|
||||
} else {
|
||||
timeout = null;
|
||||
if (!immediate) {
|
||||
result = func.apply(context, args);
|
||||
context = args = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
return function () {
|
||||
context = this;
|
||||
args = arguments;
|
||||
timestamp = o.now();
|
||||
var callNow = immediate && !timeout;
|
||||
if (!timeout) {
|
||||
timeout = setTimeout(later, wait);
|
||||
}
|
||||
if (callNow) {
|
||||
result = func.apply(context, args);
|
||||
context = args = null;
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
},
|
||||
imageLoad: function (element, options) {
|
||||
var imgs = (element instanceof $ ? element : $(element)).find('img');
|
||||
|
||||
imgs.length && imgs.on('load', function () {
|
||||
$.isFunction(options.done) && options.done(this)
|
||||
}).one('error', function () {
|
||||
$.isFunction(options.fail) && options.fail(this)
|
||||
})
|
||||
},
|
||||
format: function (text, obj) {
|
||||
var c = obj || {};
|
||||
var b = text;
|
||||
for (var a in c) {
|
||||
if (c.hasOwnProperty(a)) {
|
||||
b = b.replace(new RegExp("\\$\\{" + a + "\\}", "gm"), c[a]);
|
||||
}
|
||||
}
|
||||
return b;
|
||||
},
|
||||
htmlEscape: function (input) {
|
||||
if (typeof (input) !== "string")
|
||||
return input;
|
||||
var result = [];
|
||||
var length = input.length;
|
||||
for (var i = 0; i < length; i++) {
|
||||
var c = input.charAt(i).toString();
|
||||
if (c == '&') {
|
||||
result.push("&");
|
||||
} else if (c == '\"') {
|
||||
result.push(""");
|
||||
} else if (c == '<') {
|
||||
result.push("<");
|
||||
} else if (c == '>') {
|
||||
result.push(">");
|
||||
} else if (c == '\'') {
|
||||
result.push("'");
|
||||
} else if (c == '\\') {
|
||||
result.push("\");
|
||||
} else {
|
||||
result.push(c);
|
||||
}
|
||||
}
|
||||
return result.join("");
|
||||
},
|
||||
JSONString: (window.JSON && JSON.stringify) || function (vContent) {
|
||||
if (vContent instanceof Object) {
|
||||
var sOutput = "";
|
||||
if (vContent.constructor === Array) {
|
||||
for (var nId = 0; nId < vContent.length; sOutput += this.JSONString(vContent[nId]) + ",", nId++);
|
||||
return "[" + sOutput.substr(0, sOutput.length - 1) + "]";
|
||||
}
|
||||
if (vContent.toString !== Object.prototype.toString) {
|
||||
return "\"" + vContent.toString().replace(/"/g, "\\$&") + "\"";
|
||||
}
|
||||
for (var sProp in vContent) {
|
||||
sOutput += "\"" + sProp.replace(/"/g, "\\$&") + "\":" + this.JSONString(vContent[sProp]) + ",";
|
||||
}
|
||||
return "{" + sOutput.substr(0, sOutput.length - 1) + "}";
|
||||
}
|
||||
return typeof vContent === "string" ? "\"" + vContent.replace(/"/g, "\\$&") + "\"" : String(vContent);
|
||||
},
|
||||
trim : function(str){
|
||||
|
||||
str = str.replace(/\s+/g,"");
|
||||
return str;
|
||||
},
|
||||
removeHtmlTab :function(tab) {
|
||||
return tab;//删除所有HTML标签
|
||||
} ,
|
||||
html_encode:function(str)
|
||||
{
|
||||
var s = "";
|
||||
if (!str || str.length == 0) return "";
|
||||
s = str.replace(/&/g, ">");
|
||||
s = s.replace(/</g, "<");
|
||||
s = s.replace(/>/g, ">");
|
||||
s = s.replace(/ /g, " ");
|
||||
s = s.replace(/\'/g, "'");
|
||||
s = s.replace(/\"/g, """);
|
||||
s = s.replace(/\n/g, "<br>");
|
||||
return s;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = o;
|
||||
})
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,237 @@
|
||||
|
||||
|
||||
define(function (require, exports, module) {
|
||||
|
||||
var Base64Tool = require("../../extend/BASE64");
|
||||
|
||||
var callExternal = window.parent.callExternal || function () { return {} };
|
||||
var yy = window.parent.yy || {};
|
||||
|
||||
var YYUtils = {
|
||||
parseChannelInfo: function (result) {
|
||||
var channelInfo = {};
|
||||
channelInfo.ret = 0;
|
||||
channelInfo.longId = result.long_id;
|
||||
channelInfo.shortId = result.short_id;
|
||||
channelInfo.name = unescape(result.name);
|
||||
channelInfo.userCount = result.user_count;
|
||||
channelInfo.totalUserCount = result.total_user_count;
|
||||
channelInfo.channelType = result.channel_type;
|
||||
channelInfo.channelPoints = result.channel_points;
|
||||
return channelInfo;
|
||||
},
|
||||
parseUserInfo: function parseUserInfo(result) {
|
||||
var userInfo = {};
|
||||
userInfo.ret = 0;
|
||||
|
||||
if (typeof (result) == "string") {
|
||||
result = eval('(' + result + ')');
|
||||
}
|
||||
else if (result) {
|
||||
result.name = unescape(String(result.name))
|
||||
result.sign = unescape(String(result.sign))
|
||||
|
||||
}
|
||||
|
||||
userInfo.uid = result.uid;
|
||||
userInfo.nick = userInfo.name = unescape(result.name);
|
||||
userInfo.yyId = userInfo.imId = result.imid;
|
||||
userInfo.role = result.role;
|
||||
userInfo.points = result.points;
|
||||
userInfo.level = result.level;
|
||||
userInfo.gender = userInfo.sex = result.sex;
|
||||
userInfo.sign = unescape(result.sign);
|
||||
userInfo.vip = result.vip;
|
||||
userInfo.vipLevel = result.vip_level;
|
||||
userInfo.contribution = result.contribution;
|
||||
|
||||
return userInfo;
|
||||
},
|
||||
parseImUserInfo: function (result) {
|
||||
var userInfo = {};
|
||||
userInfo.ret = 0;
|
||||
|
||||
var retObj = callExternal("IIM_GetIMUserInfoEx", result.uid);
|
||||
userInfo.uid = parseInt(result.uid);
|
||||
userInfo.nick = userInfo.name = unescape(result.nick_name);
|
||||
userInfo.yyId = userInfo.imId = result.imid;
|
||||
|
||||
userInfo.role = 0;
|
||||
userInfo.points = 0;
|
||||
userInfo.level = 0;
|
||||
userInfo.gender = userInfo.sex = 0;
|
||||
userInfo.sign = "";
|
||||
userInfo.vip = 0;
|
||||
userInfo.vipLevel = 0;
|
||||
userInfo.contribution = 0;
|
||||
|
||||
userInfo.age = retObj.age;
|
||||
userInfo.area = retObj.area;
|
||||
userInfo.city = retObj.city;
|
||||
userInfo.province = retObj.province;
|
||||
userInfo.birthday = "";
|
||||
|
||||
return userInfo;
|
||||
}
|
||||
};
|
||||
var obj =
|
||||
{
|
||||
tempChannelInfo:null,
|
||||
tempSubChannelInfo:null,
|
||||
getChannelInfo: function () {
|
||||
if(this.tempChannelInfo)
|
||||
return this.tempChannelInfo;
|
||||
var result = callExternal("IChannel_GetCurrentChannelInfo");
|
||||
if (result.ret == 0) {
|
||||
this.tempChannelInfo = YYUtils.parseChannelInfo(result);
|
||||
return this.tempChannelInfo;
|
||||
}
|
||||
else {
|
||||
return result;
|
||||
}
|
||||
|
||||
},
|
||||
getSubChannelInfo: function () {
|
||||
if(this.tempSubChannelInfo)
|
||||
return this.tempChannelInfo;
|
||||
var result = callExternal("IChannel_GetCurrentSubChannelInfo");
|
||||
if (result.ret == 0) {
|
||||
this.tempSubChannelInfo = YYUtils.parseChannelInfo(result);
|
||||
return this.tempSubChannelInfo;
|
||||
}
|
||||
else {
|
||||
return result;
|
||||
}
|
||||
},
|
||||
myUserTemp: null,
|
||||
getMyUserInfo: function () {
|
||||
if (this.myUserTemp)
|
||||
return this.myUserTemp;
|
||||
var result = callExternal("IUser_GetCurrnetUserInfo");
|
||||
if (result.ret == 0) {
|
||||
this.myUserTemp = result = YYUtils.parseUserInfo(result);
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
return result;
|
||||
}
|
||||
},
|
||||
usersTemp: [],
|
||||
getUserInfo: function(uid) {
|
||||
if (this.usersTemp[uid])
|
||||
return this.usersTemp[uid];
|
||||
var result = callExternal("IUser_GetUserInfo",uid);
|
||||
if (result.ret == 0) {
|
||||
this.usersTemp[uid] = YYUtils.parseUserInfo(result);
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
return result;
|
||||
}
|
||||
},
|
||||
addChatPubMsgListener: function (fn) {
|
||||
if (yy.channel && yy.channel.chat)
|
||||
yy.channel.chat.addEventListener("YY_CHANNEL_CHAT1", fn);
|
||||
},
|
||||
addChatFromPubMsgListener: function (fn) {
|
||||
if (yy.channel && yy.channel.chat)
|
||||
yy.channel.chat.addEventListener("YY_CHANNEL_CHAT_FROM1", fn);
|
||||
},
|
||||
addRightMenuListener: function (fn) {
|
||||
if (yy.channel && yy.channel.userListPopMenu)
|
||||
yy.channel.userListPopMenu.addEventListener("YY_POP_MENU_CLICKED", fn);
|
||||
},
|
||||
addFontInfoListener: function (fn) {
|
||||
if (yy.channel)
|
||||
yy.channel.addEventListener("YY_CHANNEL_INPUT_FONT_INFO_CHANGED", fn);
|
||||
},
|
||||
getChannelDetail: function () {
|
||||
return this.getSubChannelInfo();
|
||||
},
|
||||
getFontInfo: function () {
|
||||
return callExternal("IChannelWindow_getCurrentFontInfo");
|
||||
},
|
||||
showSmilebox:function(x,y){
|
||||
var str = '{\"FontSetting\": 1, \"VipRightPart\": 1, \"VipFacePage\":1, \"GameSmiliesPage\":1, \"VipMallPage\":1, \"VipMallFaces\":1,\"xPos\":'+ x +',\"yPos\":' + y +'}';
|
||||
str = Base64Tool.encodeBase64(str);
|
||||
callExternal("IChannelWindow_showChannelSmileWindowWithControl", str);
|
||||
},
|
||||
addSmileboxListener: function (fn) {
|
||||
if (yy.channel && yy.channel)
|
||||
yy.channel.addEventListener("YY_CHANNEL_SMILE_SELECTED", fn);
|
||||
},
|
||||
addSysMessageListener: function (fn) {
|
||||
if (yy.channel && yy.channel.chat)
|
||||
yy.channel.chat.addEventListener("YY_CHANNEL_SYSTEM_MESSAGE", fn);
|
||||
},
|
||||
addSysMessageListener2: function (fn) {
|
||||
if (yy.channel && yy.channel.chat)
|
||||
yy.channel.chat.addEventListener("YY_CHANNEL_SYSTEM_MESSAGE_EX", fn);
|
||||
},
|
||||
addChannelStartPrivateChatListener: function (fn) {
|
||||
if (yy.channel && yy.channel)
|
||||
yy.channel.addEventListener("YY_CHANNEL_START_PRIVATE_CHAT", fn);
|
||||
},
|
||||
gotoChannel : function(sid,subsid){
|
||||
callExternal("IChannel_JoinChannel",0,sid,subsid,sid,"");
|
||||
},
|
||||
getImageInfo : function(imageKey){
|
||||
return callExternal("IChannelWindow_getImageInfo", imageKey)
|
||||
},
|
||||
getClipboardImage : function(){
|
||||
return callExternal("IChannelWindow_getClipboardImage")
|
||||
},
|
||||
openUrl:function(url){
|
||||
callExternal("ISecurityInternal_OpenUrl", url);
|
||||
},
|
||||
showUserMenu:function(uid,userName,userRole){
|
||||
var sid = this.getChannelInfo().longId;
|
||||
callExternal("IChannelWindow_showChannelUserMenu", uid, sid, userName, userRole);
|
||||
},
|
||||
send: function (cmd, msg) {
|
||||
var res;
|
||||
switch (cmd) {
|
||||
case "sendMessage":
|
||||
res = callExternal("IChannelChatInternal_Chat", msg);
|
||||
res.result = res.ret;
|
||||
break;
|
||||
case "sendPrivateMessage":
|
||||
res = callExternal("IChannelChatInternal_ChatTo", parseInt(msg.toUid),msg.msg);
|
||||
res.result = res.ret;
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
},
|
||||
resizeUI : function(){
|
||||
var newHeight = $(window).height();
|
||||
if (newHeight < 155)
|
||||
newHeight = 155;
|
||||
|
||||
$(".pkChat .chat-cont").css("height", newHeight + "px");
|
||||
var chatOprH = $(".chat-opr").height();
|
||||
$(".pkChat .private-chat").css("bottom",chatOprH + 2);
|
||||
return newHeight;
|
||||
},
|
||||
//关闭私聊,计算尺寸
|
||||
minChatBox:function(){
|
||||
var contHeight = this.resizeUI();
|
||||
var chatOprH = $(".chat-opr").height();
|
||||
$(".private-chat").css("height","0px");
|
||||
$(".chat-list").css("height", contHeight- 5 - chatOprH + "px");
|
||||
$(".chat-text .slimScrollDiv").css("height", contHeight- 5 - chatOprH + "px");
|
||||
|
||||
},
|
||||
//打开私聊,计算尺寸
|
||||
maxChatBox:function(){
|
||||
var contHeight = this.resizeUI();
|
||||
var chatOprH = $(".chat-opr").height();
|
||||
$(".private-chat").css("height","160px");
|
||||
var privateHeight = $(".private-chat").height();
|
||||
$(".chat-list").css("height", contHeight- privateHeight - chatOprH + "px");
|
||||
$(".chat-text .slimScrollDiv").css("height", contHeight- privateHeight - chatOprH + "px");
|
||||
},
|
||||
isReady: true
|
||||
|
||||
};
|
||||
module.exports = obj;
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
/*! Sea.js 3.0.0 | seajs.org/LICENSE.md */
|
||||
!function(a,b){function c(a){return function(b){return{}.toString.call(b)=="[object "+a+"]"}}function d(){return A++}function e(a){return a.match(D)[0]}function f(a){for(a=a.replace(E,"/"),a=a.replace(G,"$1/");a.match(F);)a=a.replace(F,"/");return a}function g(a){var b=a.length-1,c=a.charCodeAt(b);return 35===c?a.substring(0,b):".js"===a.substring(b-2)||a.indexOf("?")>0||47===c?a:a+".js"}function h(a){var b=v.alias;return b&&x(b[a])?b[a]:a}function i(a){var b=v.paths,c;return b&&(c=a.match(H))&&x(b[c[1]])&&(a=b[c[1]]+c[2]),a}function j(a){var b=v.vars;return b&&a.indexOf("{")>-1&&(a=a.replace(I,function(a,c){return x(b[c])?b[c]:a})),a}function k(a){var b=v.map,c=a;if(b)for(var d=0,e=b.length;e>d;d++){var f=b[d];if(c=z(f)?f(a)||a:a.replace(f[0],f[1]),c!==a)break}return c}function l(a,b){var c,d=a.charCodeAt(0);if(J.test(a))c=a;else if(46===d)c=(b?e(b):v.cwd)+a;else if(47===d){var g=v.cwd.match(K);c=g?g[0]+a.substring(1):a}else c=v.base+a;return 0===c.indexOf("//")&&(c=location.protocol+c),f(c)}function m(a,b){if(!a)return"";a=h(a),a=i(a),a=h(a),a=j(a),a=h(a),a=g(a),a=h(a);var c=l(a,b);return c=h(c),c=k(c)}function n(a){return a.hasAttribute?a.src:a.getAttribute("src",4)}function o(a,b,c){var d;try{importScripts(a)}catch(e){d=e}b(d)}function p(a,b,c){var d=Y.createElement("script");if(c){var e=z(c)?c(a):c;e&&(d.charset=e)}q(d,b,a),d.async=!0,d.src=a,bb=d,ab?_.insertBefore(d,ab):_.appendChild(d),bb=null}function q(a,b,c){function d(c){a.onload=a.onerror=a.onreadystatechange=null,v.debug||_.removeChild(a),a=null,b(c)}var e="onload"in a;e?(a.onload=d,a.onerror=function(){C("error",{uri:c,node:a}),d(!0)}):a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&d()}}function r(){if(bb)return bb;if(cb&&"interactive"===cb.readyState)return cb;for(var a=_.getElementsByTagName("script"),b=a.length-1;b>=0;b--){var c=a[b];if("interactive"===c.readyState)return cb=c}}function s(a){function b(){l=a.charAt(k++)}function c(){return/\s/.test(l)}function d(){return'"'==l||"'"==l}function e(){var c=k,d=l,e=a.indexOf(d,c);if(-1==e)k=m;else if("\\"!=a.charAt(e-1))k=e+1;else for(;m>k;)if(b(),"\\"==l)k++;else if(l==d)break;o&&(r.push(a.slice(c,k-1)),o=0)}function f(){for(k--;m>k;)if(b(),"\\"==l)k++;else{if("/"==l)break;if("["==l)for(;m>k;)if(b(),"\\"==l)k++;else if("]"==l)break}}function g(){return/[a-z_$]/i.test(l)}function h(){var b=a.slice(k-1),c=/^[\w$]+/.exec(b)[0];p={"if":1,"for":1,"while":1,"with":1}[c],n={"break":1,"case":1,"continue":1,"debugger":1,"delete":1,"do":1,"else":1,"false":1,"if":1,"in":1,"instanceof":1,"return":1,"typeof":1,"void":1}[c],o=/^require\s*\(\s*(['"]).+?\1\s*\)/.test(b),o?(c=/^require\s*\(\s*['"]/.exec(b)[0],k+=c.length-2):k+=/^[\w$]+(?:\s*\.\s*[\w$]+)*/.exec(b)[0].length-1}function i(){return/\d/.test(l)||"."==l&&/\d/.test(a.charAt(k))}function j(){var b=a.slice(k-1),c;c="."==l?/^\.\d+(?:E[+-]?\d*)?\s*/i.exec(b)[0]:/^0x[\da-f]*/i.test(b)?/^0x[\da-f]*\s*/i.exec(b)[0]:/^\d+\.?\d*(?:E[+-]?\d*)?\s*/i.exec(b)[0],k+=c.length-1,n=0}if(-1==a.indexOf("require"))return[];for(var k=0,l,m=a.length,n=1,o=0,p=0,q=[],r=[];m>k;)b(),c()||(d()?(e(),n=1):"/"==l?(b(),"/"==l?(k=a.indexOf("\n",k),-1==k&&(k=a.length)):"*"==l?(k=a.indexOf("*/",k),-1==k?k=m:k+=2):n?(f(),n=0):(k--,n=1)):g()?h():i()?j():"("==l?(q.push(p),n=1):")"==l?n=q.pop():(n="]"!=l,o=0));return r}function t(a,b){this.uri=a,this.dependencies=b||[],this.deps={},this.status=0,this._entry=[]}if(!a.seajs){var u=a.seajs={version:"3.0.0"},v=u.data={},w=c("Object"),x=c("String"),y=Array.isArray||c("Array"),z=c("Function"),A=0,B=v.events={};u.on=function(a,b){var c=B[a]||(B[a]=[]);return c.push(b),u},u.off=function(a,b){if(!a&&!b)return B=v.events={},u;var c=B[a];if(c)if(b)for(var d=c.length-1;d>=0;d--)c[d]===b&&c.splice(d,1);else delete B[a];return u};var C=u.emit=function(a,b){var c=B[a];if(c){c=c.slice();for(var d=0,e=c.length;e>d;d++)c[d](b)}return u},D=/[^?#]*\//,E=/\/\.\//g,F=/\/[^/]+\/\.\.\//,G=/([^:/])\/+\//g,H=/^([^/:]+)(\/.+)$/,I=/{([^{]+)}/g,J=/^\/\/.|:\//,K=/^.*?\/\/.*?\//;u.resolve=m;var L="undefined"==typeof window&&"undefined"!=typeof importScripts&&z(importScripts),M=/^(about|blob):/,N,O,P=!location.href||M.test(location.href)?"":e(location.href);if(L){var Q;try{var R=Error();throw R}catch(S){Q=S.stack.split("\n")}Q.shift();for(var T,U=/.*?((?:http|https|file)(?::\/{2}[\w]+)(?:[\/|\.]?)(?:[^\s"]*)).*?/i,V=/(.*?):\d+:\d+\)?$/;Q.length>0;){var W=Q.shift();if(T=U.exec(W),null!=T)break}var X;if(null!=T)var X=V.exec(T[1])[1];O=X,N=e(X||P),""===P&&(P=N)}else{var Y=document,Z=Y.scripts,$=Y.getElementById("seajsnode")||Z[Z.length-1];O=n($),N=e(O||P)}if(L)u.request=o;else{var Y=document,_=Y.head||Y.getElementsByTagName("head")[0]||Y.documentElement,ab=_.getElementsByTagName("base")[0],bb;u.request=p}var cb,db=u.cache={},eb,fb={},gb={},hb={},ib=t.STATUS={FETCHING:1,SAVED:2,LOADING:3,LOADED:4,EXECUTING:5,EXECUTED:6,ERROR:7};t.prototype.resolve=function(){for(var a=this,b=a.dependencies,c=[],d=0,e=b.length;e>d;d++)c[d]=t.resolve(b[d],a.uri);retuLine truncated
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
define(function(require, exports, module) {
|
||||
var template;
|
||||
!function(e){"use strict";var n=function(e,r){return n["string"==typeof r?"compile":"render"].apply(n,arguments)};template=n;n.version="2.0.4",n.openTag="<%",n.closeTag="%>",n.isEscape=!0,n.isCompress=!1,n.parser=null,n.render=function(e,r){var t=n.get(e)||a({id:e,name:"Render Error",message:"No Template"});return t(r)},n.compile=function(e,t){function o(r){try{return new l(r,e)+""}catch(i){return s?a(i)():n.compile(e,t,!0)(r)}}var c=arguments,s=c[2],u="anonymous";"string"!=typeof t&&(s=c[1],t=c[0],e=u);try{var l=i(e,t,s)}catch(p){return p.id=e||t,p.name="Syntax Error",a(p)}return o.prototype=l.prototype,o.toString=function(){return l.toString()},e!==u&&(r[e]=o),o};var r=n.cache={},t=n.helpers=function(){var e=function(n,r){return"string"!=typeof n&&(r=typeof n,"number"===r?n+="":n="function"===r?e(n.call(n)):""),n},r={"<":"<",">":">",'"':""","'":"'","&":"&"},t=function(n){return e(n).replace(/&(?![\w#]+;)|[<>"']/g,function(e){return r[e]})},a=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},i=function(e,n){if(a(e))for(var r=0,t=e.length;t>r;r++)n.call(e,e[r],r,e);else for(r in e)n.call(e,e[r],r)};return{$include:n.render,$string:e,$escape:t,$each:i}}();n.helper=function(e,n){t[e]=n},n.onerror=function(n){var r="Template Error\n\n";for(var t in n)r+="<"+t+">\n"+n[t]+"\n\n";e.console&&console.error(r)},n.get=function(t){var a;if(r.hasOwnProperty(t))a=r[t];else if("document"in e){var i=document.getElementById(t);if(i){var o=i.value||i.innerHTML;a=n.compile(t,o.replace(/^\s*|\s*$/g,""))}}return a};var a=function(e){return n.onerror(e),function(){return"{Template Error}"}},i=function(){var e=t.$each,r="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,undefined",a=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,i=/[^\w$]+/g,o=new RegExp(["\\b"+r.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),c=/^\d[^,]*|,\d[^,]*/g,s=/^,+|,+$/g,u=function(e){return e.replace(a,"").replace(i,",").replace(o,"").replace(c,"").replace(s,"").split(/^$|,+/)};return function(r,a,i){function o(e){return m+=e.split(/\n/).length-1,n.isCompress&&(e=e.replace(/[\n\r\t\s]+/g," ").replace(/<!--.*?-->/g,"")),e&&(e=x[1]+p(e)+x[2]+"\n"),e}function c(e){var r=m;if($?e=$(e):i&&(e=e.replace(/\n/g,function(){return m++,"$line="+m+";"})),0===e.indexOf("=")){var a=!/^=[=#]/.test(e);if(e=e.replace(/^=[=#]?|[\s;]*$/g,""),a&&n.isEscape){var o=e.replace(/\s*\([^\)]+\)/,"");t.hasOwnProperty(o)||/^(include|print)$/.test(o)||(e="$escape("+e+")")}else e="$string("+e+")";e=x[1]+e+x[2]}return i&&(e="$line="+r+";"+e),s(e),e+"\n"}function s(n){n=u(n),e(n,function(e){e&&!v.hasOwnProperty(e)&&(l(e),v[e]=!0)})}function l(e){var n;"print"===e?n=k:"include"===e?(y.$include=t.$include,n=E):(n="$data."+e,t.hasOwnProperty(e)&&(y[e]=t[e],n=0===e.indexOf("$")?"$helpers."+e:n+"===undefined?$helpers."+e+":"+n)),w+=e+"="+n+","}function p(e){return"'"+e.replace(/('|\\)/g,"\\$1").replace(/\r/g,"\\r").replace(/\n/g,"\\n")+"'"}var f=n.openTag,d=n.closeTag,$=n.parser,g=a,h="",m=1,v={$data:1,$id:1,$helpers:1,$out:1,$line:1},y={},w="var $helpers=this,"+(i?"$line=0,":""),b="".trim,x=b?["$out='';","$out+=",";","$out"]:["$out=[];","$out.push(",");","$out.join('')"],T=b?"$out+=$text;return $text;":"$out.push($text);",k="function($text){"+T+"}",E="function(id,data){data=data||$data;var $text=$helpers.$include(id,data,$id);"+T+"}";e(g.split(f),function(e){e=e.split(d);var n=e[0],r=e[1];1===e.length?h+=o(n):(h+=c(n),r&&(h+=o(r)))}),g=h,i&&(g="try{"+g+"}catch(e){"+"throw {"+"id:$id,"+"name:'Render Error',"+"message:e.message,"+"line:$line,"+"source:"+p(a)+".split(/\\n/)[$line-1].replace(/^[\\s\\t]+/,'')"+"};"+"}"),g=w+x[0]+g+"return new String("+x[3]+");";try{var j=new Function("$data","$id",g);return j.prototype=y,j}catch(O){throw O.temp="function anonymous($data,$id) {"+g+"}",O}}}();"function"==typeof define?define(function(){return n}):"undefined"!=typeof exports&&(module.exports=n),e.template=n}(this),function(e){e.openTag="{{",e.closeTag="}}",e.parser=function(n){n=n.replace(/^\s/,"");var r=n.split(" "),t=r.shift(),a=r.join(" ");switch(t){case"if":n="if("+a+"){";break;case"else":r="if"===r.shift()?" if("+r.join(" ")+")":"",n="}else"+r+"{";break;case"/if":n="}";break;case"each":var i=r[0]||"$data",o=r[1]||"as",c=r[2]||"$value",s=r[3]||"$index",u=c+","+s;"as"!==o&&(i="[]"),n="$each("+i+",function("+u+"){";break;case"/each":n="});";break;case"echo":n="print("+a+");";break;case"include":n="include("+r.join(",")+");";break;default:e.helpers.hasOwnProperty(t)?n="=#"+t+"("+r.join(",")+");":(n=n.replace(/[\s;]*$/,""),n="="Line truncated
|
||||
template.openTag = "{";
|
||||
template.closeTag = "}";
|
||||
module.exports = template;
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
define(function(require, exports, module) {
|
||||
var template;
|
||||
!function(e){"use strict";var n=function(e,r){return n["string"==typeof r?"compile":"render"].apply(n,arguments)};template=n;n.version="2.0.4",n.openTag="<%",n.closeTag="%>",n.isEscape=!0,n.isCompress=!1,n.parser=null,n.render=function(e,r){var t=n.get(e)||a({id:e,name:"Render Error",message:"No Template"});return t(r)},n.compile=function(e,t){function o(r){try{return new l(r,e)+""}catch(i){return s?a(i)():n.compile(e,t,!0)(r)}}var c=arguments,s=c[2],u="anonymous";"string"!=typeof t&&(s=c[1],t=c[0],e=u);try{var l=i(e,t,s)}catch(p){return p.id=e||t,p.name="Syntax Error",a(p)}return o.prototype=l.prototype,o.toString=function(){return l.toString()},e!==u&&(r[e]=o),o};var r=n.cache={},t=n.helpers=function(){var e=function(n,r){return"string"!=typeof n&&(r=typeof n,"number"===r?n+="":n="function"===r?e(n.call(n)):""),n},r={"<":"<",">":">",'"':""","'":"'","&":"&"},t=function(n){return e(n).replace(/&(?![\w#]+;)|[<>"']/g,function(e){return r[e]})},a=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},i=function(e,n){if(a(e))for(var r=0,t=e.length;t>r;r++)n.call(e,e[r],r,e);else for(r in e)n.call(e,e[r],r)};return{$include:n.render,$string:e,$escape:t,$each:i}}();n.helper=function(e,n){t[e]=n},n.onerror=function(n){var r="Template Error\n\n";for(var t in n)r+="<"+t+">\n"+n[t]+"\n\n";e.console&&console.error(r)},n.get=function(t){var a;if(r.hasOwnProperty(t))a=r[t];else if("document"in e){var i=document.getElementById(t);if(i){var o=i.value||i.innerHTML;a=n.compile(t,o.replace(/^\s*|\s*$/g,""))}}return a};var a=function(e){return n.onerror(e),function(){return"{Template Error}"}},i=function(){var e=t.$each,r="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,undefined",a=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,i=/[^\w$]+/g,o=new RegExp(["\\b"+r.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),c=/^\d[^,]*|,\d[^,]*/g,s=/^,+|,+$/g,u=function(e){return e.replace(a,"").replace(i,",").replace(o,"").replace(c,"").replace(s,"").split(/^$|,+/)};return function(r,a,i){function o(e){return m+=e.split(/\n/).length-1,n.isCompress&&(e=e.replace(/[\n\r\t\s]+/g," ").replace(/<!--.*?-->/g,"")),e&&(e=x[1]+p(e)+x[2]+"\n"),e}function c(e){var r=m;if($?e=$(e):i&&(e=e.replace(/\n/g,function(){return m++,"$line="+m+";"})),0===e.indexOf("=")){var a=!/^=[=#]/.test(e);if(e=e.replace(/^=[=#]?|[\s;]*$/g,""),a&&n.isEscape){var o=e.replace(/\s*\([^\)]+\)/,"");t.hasOwnProperty(o)||/^(include|print)$/.test(o)||(e="$escape("+e+")")}else e="$string("+e+")";e=x[1]+e+x[2]}return i&&(e="$line="+r+";"+e),s(e),e+"\n"}function s(n){n=u(n),e(n,function(e){e&&!v.hasOwnProperty(e)&&(l(e),v[e]=!0)})}function l(e){var n;"print"===e?n=k:"include"===e?(y.$include=t.$include,n=E):(n="$data."+e,t.hasOwnProperty(e)&&(y[e]=t[e],n=0===e.indexOf("$")?"$helpers."+e:n+"===undefined?$helpers."+e+":"+n)),w+=e+"="+n+","}function p(e){return"'"+e.replace(/('|\\)/g,"\\$1").replace(/\r/g,"\\r").replace(/\n/g,"\\n")+"'"}var f=n.openTag,d=n.closeTag,$=n.parser,g=a,h="",m=1,v={$data:1,$id:1,$helpers:1,$out:1,$line:1},y={},w="var $helpers=this,"+(i?"$line=0,":""),b="".trim,x=b?["$out='';","$out+=",";","$out"]:["$out=[];","$out.push(",");","$out.join('')"],T=b?"$out+=$text;return $text;":"$out.push($text);",k="function($text){"+T+"}",E="function(id,data){data=data||$data;var $text=$helpers.$include(id,data,$id);"+T+"}";e(g.split(f),function(e){e=e.split(d);var n=e[0],r=e[1];1===e.length?h+=o(n):(h+=c(n),r&&(h+=o(r)))}),g=h,i&&(g="try{"+g+"}catch(e){"+"throw {"+"id:$id,"+"name:'Render Error',"+"message:e.message,"+"line:$line,"+"source:"+p(a)+".split(/\\n/)[$line-1].replace(/^[\\s\\t]+/,'')"+"};"+"}"),g=w+x[0]+g+"return new String("+x[3]+");";try{var j=new Function("$data","$id",g);return j.prototype=y,j}catch(O){throw O.temp="function anonymous($data,$id) {"+g+"}",O}}}();"function"==typeof define?define(function(){return n}):"undefined"!=typeof exports&&(module.exports=n),e.template=n}(this),function(e){e.openTag="{{",e.closeTag="}}",e.parser=function(n){n=n.replace(/^\s/,"");var r=n.split(" "),t=r.shift(),a=r.join(" ");switch(t){case"if":n="if("+a+"){";break;case"else":r="if"===r.shift()?" if("+r.join(" ")+")":"",n="}else"+r+"{";break;case"/if":n="}";break;case"each":var i=r[0]||"$data",o=r[1]||"as",c=r[2]||"$value",s=r[3]||"$index",u=c+","+s;"as"!==o&&(i="[]"),n="$each("+i+",function("+u+"){";break;case"/each":n="});";break;case"echo":n="print("+a+");";break;case"include":n="include("+r.join(",")+");";break;default:e.helpers.hasOwnProperty(t)?n="=#"+t+"("+r.join(",")+");":(n=n.replace(/[\s;]*$/,""),n="="Line truncated
|
||||
template.openTag = "{";
|
||||
template.closeTag = "}";
|
||||
module.exports = template;
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
!function($){return $?($.Unslider=function(t,n){var e=this;return e._="unslider",e.defaults={autoplay:!1,delay:3e3,speed:750,easing:"swing",keys:{prev:37,next:39},nav:!0,arrows:{prev:'<a class="'+e._+'-arrow prev">Prev</a>',next:'<a class="'+e._+'-arrow next">Next</a>'},animation:"horizontal",selectors:{container:"ul:first",slides:"li"},animateHeight:!1,activeClass:e._+"-active",swipe:!0,swipeThreshold:.2},e.$context=t,e.options={},e.$parent=null,e.$container=null,e.$slides=null,e.$nav=null,e.$arrows=[],e.total=0,e.current=0,e.prefix=e._+"-",e.eventSuffix="."+e.prefix+~~(2e3*Math.random()),e.interval=null,e.init=function(t){return e.options=$.extend({},e.defaults,t),e.$container=e.$context.find(e.options.selectors.container).addClass(e.prefix+"wrap"),e.$slides=e.$container.children(e.options.selectors.slides),e.setup(),$.each(["nav","arrows","keys","infinite"],function(t,n){e.options[n]&&e["init"+$._ucfirst(n)]()}),jQuery.event.special.swipe&&e.options.swipe&&e.initSwipe(),e.options.autoplay&&e.start(),e.calculateSlides(),e.$context.trigger(e._+".ready"),e.animate(e.options.index||e.current,"init")},e.setup=function(){e.$context.addClass(e.prefix+e.options.animation).wrap('<div class="'+e._+'" />'),e.$parent=e.$context.parent("."+e._);var t=e.$context.css("position");"static"===t&&e.$context.css("position","relative"),e.$context.css("overflow","hidden")},e.calculateSlides=function(){if(e.total=e.$slides.length,"fade"!==e.options.animation){var t="width";"vertical"===e.options.animation&&(t="height"),e.$container.css(t,100*e.total+"%").addClass(e.prefix+"carousel"),e.$slides.css(t,100/e.total+"%")}},e.start=function(){return e.interval=setTimeout(function(){e.next()},e.options.delay),e},e.stop=function(){return clearTimeout(e.interval),e},e.initNav=function(){var t=$('<nav class="'+e.prefix+'nav"><ol /></nav>');e.$slides.each(function(n){var i=this.getAttribute("data-nav")||n+1;$.isFunction(e.options.nav)&&(i=e.options.nav.call(e.$slides.eq(n),n,i)),t.children("ol").append('<li data-slide="'+n+'">'+i+"</li>")}),e.$nav=t.insertAfter(e.$context),e.$nav.find("li").on("click"+e.eventSuffix,function(){var t=$(this).addClass(e.options.activeClass);t.siblings().removeClass(e.options.activeClass),e.animate(t.attr("data-slide"))})},e.initArrows=function(){e.options.arrows===!0&&(e.options.arrows=e.defaults.arrows),$.each(e.options.arrows,function(t,n){e.$arrows.push($(n).insertAfter(e.$context).on("click"+e.eventSuffix,e[t]))})},e.initKeys=function(){e.options.keys===!0&&(e.options.keys=e.defaults.keys),$(document).on("keyup"+e.eventSuffix,function(t){$.each(e.options.keys,function(n,i){t.which===i&&$.isFunction(e[n])&&e[n].call(e)})})},e.initSwipe=function(){var t=e.$slides.width();"fade"!==e.options.animation&&e.$container.on({movestart:function(t){return t.distX>t.distY&&t.distX<-t.distY||t.distX<t.distY&&t.distX>-t.distY?!!t.preventDefault():void e.$container.css("position","relative")},move:function(n){e.$container.css("left",-(100*e.current)+100*n.distX/t+"%")},moveend:function(n){Math.abs(n.distX)/t>e.options.swipeThreshold?e[n.distX<0?"next":"prev"]():e.$container.animate({left:-(100*e.current)+"%"},e.options.speed/2)}})},e.initInfinite=function(){var t=["first","last"];$.each(t,function(n,i){e.$slides.push.apply(e.$slides,e.$slides.filter(':not(".'+e._+'-clone")')[i]().clone().addClass(e._+"-clone")["insert"+(0===n?"After":"Before")](e.$slides[t[~~!n]]()))})},e.destroyArrows=function(){$.each(e.$arrows,function(t,n){n.remove()})},e.destroySwipe=function(){e.$container.off("movestart move moveend")},e.destroyKeys=function(){$(document).off("keyup"+e.eventSuffix)},e.setIndex=function(t){return 0>t&&(t=e.total-1),e.current=Math.min(Math.max(0,t),e.total-1),e.options.nav&&e.$nav.find('[data-slide="'+e.current+'"]')._active(e.options.activeClass),e.$slides.eq(e.current)._active(e.options.activeClass),e},e.animate=function(t,n){if("first"===t&&(t=0),"last"===t&&(t=e.total),isNaN(t))return e;e.options.autoplay&&e.stop().start(),e.setIndex(t),e.$context.trigger(e._+".change",[t,e.$slides.eq(t)]);var i="animate"+$._ucfirst(e.options.animation);return $.isFunction(e[i])&&e[i](e.current,n),e},e.next=function(){var t=e.current+1;return t>=e.total&&(t=0),e.animate(t,"next")},e.prev=function(){return e.animate(e.current-1,"prev")},e.animateHorizontal=function(t){var n="left";return"rtl"===e.$context.attr("dir")&&(n="right"),e.options.infinite&&e.$container.css("margin-"+n,"-100%"),e.slide(n,t)},e.animateVertical=function(t){return e.options.animateHeight=!0,e.options.infinite&&e.$container.css("margin-top",-e.$slides.outerHeight()),e.slide("top",t)},e.slide=function(t,n){if(e.options.animateHeight&&e._move(e.$context,{height:e.$slides.eq(n).outerHeight()},!1),e.options.infinite){var i;n===e.total-1&&(i=e.total-3,n=-1),n===e.total-2&&(i=0,n=e.total-2),"number"==typeof i&&(e.setIndex(i),e.$context.on(e._+".moved",function(){e.current===i&&e.$container.css(t,-(100*i)+"%").off(e._+".moved")}))}var o={};return o[t]=-(100*n)+"Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function($){return $?($.Unslider=function(t,n){var e=this;return e._="unslider",e.defaults={autoplay:!1,delay:3e3,speed:750,easing:"swing",keys:{prev:37,next:39},nav:!0,arrows:{prev:'<a class="'+e._+'-arrow prev">Prev</a>',next:'<a class="'+e._+'-arrow next">Next</a>'},animation:"horizontal",selectors:{container:"ul:first",slides:"li"},animateHeight:!1,activeClass:e._+"-active",swipe:!0,swipeThreshold:.2},e.$context=t,e.options={},e.$parent=null,e.$container=null,e.$slides=null,e.$nav=null,e.$arrows=[],e.total=0,e.current=0,e.prefix=e._+"-",e.eventSuffix="."+e.prefix+~~(2e3*Math.random()),e.interval=null,e.init=function(t){return e.options=$.extend({},e.defaults,t),e.$container=e.$context.find(e.options.selectors.container).addClass(e.prefix+"wrap"),e.$slides=e.$container.children(e.options.selectors.slides),e.setup(),$.each(["nav","arrows","keys","infinite"],function(t,n){e.options[n]&&e["init"+$._ucfirst(n)]()}),jQuery.event.special.swipe&&e.options.swipe&&e.initSwipe(),e.options.autoplay&&e.start(),e.calculateSlides(),e.$context.trigger(e._+".ready"),e.animate(e.options.index||e.current,"init")},e.setup=function(){e.$context.addClass(e.prefix+e.options.animation).wrap('<div class="'+e._+'" />'),e.$parent=e.$context.parent("."+e._);var t=e.$context.css("position");"static"===t&&e.$context.css("position","relative"),e.$context.css("overflow","hidden")},e.calculateSlides=function(){if(e.total=e.$slides.length,"fade"!==e.options.animation){var t="width";"vertical"===e.options.animation&&(t="height"),e.$container.css(t,100*e.total+"%").addClass(e.prefix+"carousel"),e.$slides.css(t,100/e.total+"%")}},e.start=function(){return e.interval=setTimeout(function(){e.next()},e.options.delay),e},e.stop=function(){return clearTimeout(e.interval),e},e.initNav=function(){var t=$('<nav class="'+e.prefix+'nav"><ol /></nav>');e.$slides.each(function(n){var i=this.getAttribute("data-nav")||n+1;$.isFunction(e.options.nav)&&(i=e.options.nav.call(e.$slides.eq(n),n,i)),t.children("ol").append('<li data-slide="'+n+'">'+i+"</li>")}),e.$nav=t.insertAfter(e.$context),e.$nav.find("li").on("click"+e.eventSuffix,function(){var t=$(this).addClass(e.options.activeClass);t.siblings().removeClass(e.options.activeClass),e.animate(t.attr("data-slide"))})},e.initArrows=function(){e.options.arrows===!0&&(e.options.arrows=e.defaults.arrows),$.each(e.options.arrows,function(t,n){e.$arrows.push($(n).insertAfter(e.$context).on("click"+e.eventSuffix,e[t]))})},e.initKeys=function(){e.options.keys===!0&&(e.options.keys=e.defaults.keys),$(document).on("keyup"+e.eventSuffix,function(t){$.each(e.options.keys,function(n,i){t.which===i&&$.isFunction(e[n])&&e[n].call(e)})})},e.initSwipe=function(){var t=e.$slides.width();"fade"!==e.options.animation&&e.$container.on({movestart:function(t){return t.distX>t.distY&&t.distX<-t.distY||t.distX<t.distY&&t.distX>-t.distY?!!t.preventDefault():void e.$container.css("position","relative")},move:function(n){e.$container.css("left",-(100*e.current)+100*n.distX/t+"%")},moveend:function(n){Math.abs(n.distX)/t>e.options.swipeThreshold?e[n.distX<0?"next":"prev"]():e.$container.animate({left:-(100*e.current)+"%"},e.options.speed/2)}})},e.initInfinite=function(){var t=["first","last"];$.each(t,function(n,i){e.$slides.push.apply(e.$slides,e.$slides.filter(':not(".'+e._+'-clone")')[i]().clone().addClass(e._+"-clone")["insert"+(0===n?"After":"Before")](e.$slides[t[~~!n]]()))})},e.destroyArrows=function(){$.each(e.$arrows,function(t,n){n.remove()})},e.destroySwipe=function(){e.$container.off("movestart move moveend")},e.destroyKeys=function(){$(document).off("keyup"+e.eventSuffix)},e.setIndex=function(t){return 0>t&&(t=e.total-1),e.current=Math.min(Math.max(0,t),e.total-1),e.options.nav&&e.$nav.find('[data-slide="'+e.current+'"]')._active(e.options.activeClass),e.$slides.eq(e.current)._active(e.options.activeClass),e},e.animate=function(t,n){if("first"===t&&(t=0),"last"===t&&(t=e.total),isNaN(t))return e;e.options.autoplay&&e.stop().start(),e.setIndex(t),e.$context.trigger(e._+".change",[t,e.$slides.eq(t)]);var i="animate"+$._ucfirst(e.options.animation);return $.isFunction(e[i])&&e[i](e.current,n),e},e.next=function(){var t=e.current+1;return t>=e.total&&(t=0),e.animate(t,"next")},e.prev=function(){return e.animate(e.current-1,"prev")},e.animateHorizontal=function(t){var n="left";return"rtl"===e.$context.attr("dir")&&(n="right"),e.options.infinite&&e.$container.css("margin-"+n,"-100%"),e.slide(n,t)},e.animateVertical=function(t){return e.options.animateHeight=!0,e.options.infinite&&e.$container.css("margin-top",-e.$slides.outerHeight()),e.slide("top",t)},e.slide=function(t,n){if(e.options.animateHeight&&e._move(e.$context,{height:e.$slides.eq(n).outerHeight()},!1),e.options.infinite){var i;n===e.total-1&&(i=e.total-3,n=-1),n===e.total-2&&(i=0,n=e.total-2),"number"==typeof i&&(e.setIndex(i),e.$context.on(e._+".moved",function(){e.current===i&&e.$container.css(t,-(100*i)+"%").off(e._+".moved")}))}var o={};return o[t]=-(100*n)+"Line truncated
|
||||
Reference in new issue
Block a user