/* ! * * VERSION: 0.2.9 * DATE: 6/30/2016, 4:33:02 PM * UPDATES AND DOCS AT: http://www.fliphtml5.com * * @license Copyright (c) 2012-2016 FlipHTML5 Software Co., Ltd. All rights reserved. * @author: Terence Z., Q.Y.B., support@fliphtml5.com. * */ !function(a,b,c){function d(a,b,c){Object.defineProperty(a,b,c)}function e(a,b){var c={};if("string"==typeof a&&(a=a.split(" ")),null==b&&(b=!0),"function"==typeof b)for(var d=-1,e=a.length;++d1&&g!==h&&(d=rb(a,b,d,g,h)),2===f){if(1===c)return d+e;if(2===c)return d-e}if(4===f){if(1===c)return[d[0]+e[0],d[1]+e[1],d[2]+e[2],d[3]+e[3]];if(2===c)return[d[0]-e[0],d[1]-e[1],d[2]-e[2],d[3]-e[3]]}return e}function q(a,b,c,d){var e=null;if(2===d)0===a?e=c-b:1===a?(e=c,c=b+e):2===a&&(e=-c,c=b+e);else if(4===d)0===a?e=[c[0]-b[0],c[1]-b[1],c[2]-b[2],c[3]-b[3]]:1===a?(e=c,c=[e[0]+b[0],e[1]+b[1],e[2]+b[2],e[3]+b[3]]):2===a&&(e=c,c=[(e[0]*=-1)+b[0],(e[1]*=-1)+b[1],(e[2]*=-1)+b[2],(e[3]*=-1)+b[3]]);else if(5===d){for(var f=[],g=-1,h=c.length;++g0?this.t:this.f;return b}function w(a){var b=this.f,c=this.b;return"rgba("+Math.max(0,Math.min(255,~~(b[0]+a*c[0])))+","+Math.max(0,Math.min(255,~~(b[1]+a*c[1])))+","+Math.max(0,Math.min(255,~~(b[2]+a*c[2])))+","+Math.max(0,Math.min(1,b[3]+a*c[3]))+")"}function x(a){for(var b=[],c=this.b,d=-1,e=c.length;++d0;){var q=k[l];if(q)for(var r=q.length;r-- >0;){var s=q[r];p.appendChild(s.div),d=o?Rc.getAnimation(s.div,a,n,h):O(s,a,n,h,c),i.add(d,m*l)}}var t=Ad("div");t.className="leo-animation-container leo-animation-unnecessary",Ye(t,{left:e.offsetLeft,top:e.offsetTop,width:ld(e),height:od(e),transform:Ye(e,"transform"),zIndex:Ye(e,"zIndex"),overflow:h.overflow||"visible"}),c||fb(e),t.appendChild(p),e.parentNode&&e.parentNode.insertBefore(t,e),d=Xc.create(t,f),d.apply({display:{to:"",constant:1,freeze:!1}}),i.add(d,0),fb(t),i.addEventListener("destroy",function(){t.parentNode&&t.parentNode.removeChild(t)},null)},null),i}}function O(a,b,c,d,e){function f(){j.removeEventListener("init",f,null),j.apply(h)}var g=e?"to":"from",h={};h.display={to:e?"none":""},e&&(h.display.constant=2);var i=b;"function"==typeof b&&(i=b(a,c));var j;if("string"==typeof i)j=Rc.getAnimation(a.div,i,c,d);else if(i instanceof Xc||i instanceof Rc||i instanceof Tc)j=i;else{for(var k in i){var l=i[k],m=h[k]={};if("object"==typeof l)for(var n in l)m[n]=l[n];else m[g]=l,m.freeze=!e}j=Xc.create(a.div,c,d),j.addEventListener("init",f,null)}return j}function P(a,b,c,d,e){var f,g;"string"==typeof c?(f=c+"In"+(d?"From"+d:""),g=c+"Out"+(d?"To"+d:"")):(f=c(!1),g=c(!0)),Rc.registerAnimationFactory(a+"In"+(b?"From"+b:""),N(f,!1,e)),Rc.registerAnimationFactory(a+"Out"+(b?"To"+b:""),N(g,!0,e))}function Q(a,b,c){k(["In","Out"],function(d){var e="Out"===d;Rc.registerAnimationFactory(a+d+(b||""),function(a,b,f){var g=a;a=g instanceof Ie?g.dom:g;var h,i=a.querySelectorAll("img,canvas")[0];if(!i||!(h=R(a,e)))return Rc.getAnimation(g,"Fade"+d,b,f);var j,k=Tc.create(f);return k.addEventListener("init",function(){j=Xc.create(g,b);var d={};g instanceof Ie?d.visible={to:!e,constant:e?2:0}:d.display={to:e?"none":"",constant:e?2:0},j.apply(d),k.add(j),j=Xc.create(h,b),j.apply({display:{to:"",freeze:!1}}),k.add(j);var l=a.childNodes;l.length&&Dc(l).forEach(function(c){if(!ui(c).hasClass("leo-animation-container")){var d;"#text"===c.nodeName.toLowerCase()&&""!==c.wholeText.replace(/\s+/g,"")&&(d=Ad("div"),Ye(d,"display","inline-block"),a.insertBefore(d,c),d.appendChild(c),c=d);var e=Xc.create(c,b);e.apply({opacity:{to:0,freeze:!1,constant:1}}),k.add(e)}});var m=a.nodeName.toLowerCase();"img"===m||"canvas"===m?(Ye(h,{transform:Ye(a,"transform"),left:a.offsetLeft,top:a.offsetTop}),a.parentNode.appendChild(h)):a.appendChild(h),j=c(i,h,b,e,f.params),k.add(j),k.addEventListener("destroy",function(){h.parentNode&&h.parentNode.removeChild(h)},null)},null),k})})}function R(a,b){var c=Ad("canvas"),d=c.getContext("2d");if(d){var e=jd(a),f=md(a);return c.className="leo-animation-canvas",c.width=e,c.height=f,Ye(c,{width:e,height:f,zIndex:Ye(a,"zIndex")}),c}return null}function S(a,b){a=a||{};var c=Object.keys(a);return function(d,e,f){var g=d instanceof Ie,h=b?"to":"from",i={opacity:b?{to:0,freeze:!1}:{from:0}};return g?(i.visible={to:!b},b&&(i.visible.constant=2)):(i.display={to:b?"none":""},b&&(i.display.constant=2)),T(Xc.create(d,e,f),function(){for(var e=-1,f=c.length;++e#blur\');filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius=\'10\')progid:DXImageTransform.Microsoft.BasicImage(opacity=1);}':".leo-"+e+"{-webkit-filter:grayscale(100%);-moz-filter:grayscale(100%);-ms-filter:grayscale(100%);-o-filter:grayscale(100%);filter:grayscale(100%);filter:url(\"data:image/svg+xml;utf8,#grayscale\");filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);}",c.styleSheet?c.styleSheet.cssText=d:c.appendChild(b.createTextNode(d)),b.getElementsByTagName("head")[0].appendChild(c)),P(a,null,function(a){return function(b,c){var d=b.div,f=ui(d).select(".leo-"+e)[0],g=d.childNodes[0];f||(f=g.cloneNode(!0),ui(f).addClass("leo-"+e),d.insertBefore(f,g));var h,i=Tc.create();h=Xc.create(d,c);var j={};return j.display={to:a?"none":""},a&&(j.display.constant=2),h.apply(j),i.add(h),h=Xc.create(g,c/2),h.apply({opacity:a?{to:0}:{from:0}}),i.add(h,a?0:c/2),a||(h=Xc.create(g,c/2),h.apply({opacity:{to:0,constant:1,freeze:!1}}),i.add(h)),h=Xc.create(f,c/2),h.apply({opacity:a?{to:0}:{from:0}}),i.add(h,a?c/2:0),i}},null,{sequence:"together",row:1,col:1})}function W(a,b,c){"undefined"==typeof b&&(b={});var d=ld(a),e=od(a),f=b.row||5,g=b.col||5;f<0&&(f=5),g<0&&(g=5);var h=Math.floor(d/g),i=g-d%g,j=Math.floor(e/f),k=f-e%f,l=Ad("div");l.className="leo-animation-block",Ye(l,{display:c?"block":"none",width:h,height:j});var m=a.cloneNode(!0);ui(m).addClass("leo-animation-clone").select("iframe,video,audio,canvas,.leo-animation-unnecessary").remove(),Ye(m,{width:kd(a),height:nd(a)}),l.appendChild(m);var n,o,p,q,r=0,s=h,t=j,u=Bd.getSequenceTable(b.sequence,f,g,b.originX&&"right"===b.originX.toLowerCase(),b.originY&&"bottom"===b.originY.toLowerCase(),b.log),v=new Array(u.pop());do{q=0,j=t,Ye(l,"height",t),r===i&&(h+=1,Ye(l,"width",h));do l.id="_"+r+"_"+q+"_",n=r*s+Math.max(r-i,0),o=q*t+Math.max(q-k,0),q===k&&(j+=1,Ye(l,"height",j)),Ye(l,{left:n,top:o}),Ye(l.childNodes[0],{left:-n,top:-o}),p=u[q*g+r],v[p]||(v[p]=[]),v[p].push({ClientRect:{width:h,height:j,left:n,top:o},div:l,index:{i:r,j:q}});while((l=l.cloneNode(!0))&&++q0&&(i=i.concat(m),delete i[0].advancedEvents)}for(var n=null,o=0,p=-1,q=i.length;++po&&(h["node.addClass"]="leo-action-trigger hi-action"):h.events=null}}function Fa(a,b){if(a&&(a.animation||a.name)){var c=cc(a);a.animation&&(c.name=a.animation,delete c.animation),null!=a.start&&(c.delay=(c.delay||0)+a.start,delete c.start),c.repeat&&c.repeat!==-1&&--c.repeat;var d=c.name.toLowerCase();if("sound"===b&&("fadein"===d?c.name="SoundFadeIn":"fadeout"===d&&(c.name="SoundFadeOut")),ye[d])ye[d](c,b);else if(+c.userDefined&&"sprite"===b){var e=c.params;c.params={action:c.name,sound:e.sound,text:e.text},delete e.sound,delete e.text,c.params.motion=Ma(pb({scaleX:1,scaleY:1},e),b),c.name="SpriteMotion"}return c}return null}function Ga(a,b,c){if(b&&b.length){var d,e=Fa,f=[],g=0,h=!1;a.animations=null;for(var i=-1,j=b.length;++i=g&&!a.leave&&(d.repeat=-1),a.enter||a.manual||(a.defaultProps.visible=!0),f.length&&(a.animations=f.sort(function(a,b){return a.delay-b.delay}))}else a.manual||(a.defaultProps.visible=!0)}function Ha(a){var b=a.template.type.toLowerCase(),c={type:b,reset:!0,name:a.template.name,manual:!a.template.visible,defaultProps:Ma(a.style,b,cc(ze)),events:null,hint:a.template.hint};Ae.components[c.name]=c,Ga(c,a.animations,b);var d=He.getClass(b),e=d&&d.textType;return e&&(c.textContent=a.template.content),De[b]&&De[b](c,a),e&&c.textContent&&(c.textContent=c.defaultProps.textContent=Na(c.textContent,e)),a.action&&Ca(c.name,a),a.elements&&a.elements.length>0&&(c.children=Ja(a.elements)),c}function Ia(a){if(a)for(var b=-1,c=a.length;++b=0)&&g.indexOf(";")<0&&(g=Ee.parseToString(g)),e[f])e[f](g,b,c,d);else{var h=d.get(b,f);h&&"!"!==h&&(c[h]=g)}}return c}function Na(a,b){if(a){if(1===b)return Wb(a).replace(/\/\^r\$\//g,"
");var c=Hh(a,!0);return Oa(c)}return""}function Oa(a){if(1!==a.nodeType&&11!==a.nodeType)return a.textContent||"";for(var b="",c=a.childNodes,d=Pa,e=-1,f=c.length;++e':"
"}var g,h=a.nodeName.toLocaleLowerCase(),i=a.parentNode,j="",k="span";switch(h){case"textformat":return Oa(a);case"p":if(!a.textContent&&a.getAttribute)return f();(g=a.getAttribute("align"))&&(j="text-align:"+g.toLowerCase()+";"),i&&"textformat"===i.nodeName.toLowerCase()&&((g=i.getAttribute("leftmargin"))&&(j+="padding-left:"+g+"px;"),(g=i.getAttribute("leading"))&&a.setAttribute("leading",g)),k="p";break;case"font":(g=a.getAttribute("face"))&&(j+="font-family:"+g+";"),(g=a.getAttribute("size"))&&(j+="font-size:"+g+"px;"),j+="line-height:"+b(a,!1)+"px;",(g=a.getAttribute("color"))&&(j+="color:"+g+";"),(g=a.getAttribute("letterspacing"))&&(j+="letter-spacing:"+g+"px;");break;case"i":j="font-style:italic;";break;case"b":j="line-height:"+b(a,!0)+"px;",k="b";break;default:k=h}return"<"+k+(j?' style="'+j+'"':"")+">"+Oa(a)+""}function Qa(a,b,c){return a=a<0?a+1:a>1?a-1:a,~~(255*(6*a<1?b+(c-b)*a*6:a<.5?c:3*a<2?b+(c-b)*(2/3-a)*6:b)+.5)}function Ra(a,b){Ta(a,b)}function Sa(a,b){if(b){var c;for(var d in b)c=b[d],c&&(a["_"+d]=c)}}function Ta(a,b){for(var c in b)b.hasOwnProperty(c)&&(a["_"+c]=b[c],Ua(a,c))}function Ua(a,b){var c="_"+b;d(a,b,{get:function(){return this[c]},set:function(a){var d=this[c];if(a!==d){this[c]=a;var e="_on"+ic(b)+"Change";this[e]&&this[e](),this.notifyPropertyChange(b,d)}}})}function Va(a){return a.textContent="",a}function Wa(a,b){var c=a[0]||1,d=a[1]||0,e=a[2]||0,f=a[3]||1,g=[c,d],h=[e,f];b._tx=a[4]||0,b._ty=a[5]||0;var i=b._scaleX=Math.sqrt(g[0]*g[0]+g[1]*g[1]);g[0]/=i,g[1]/=i;var j=g[0]*h[0]+g[1]*h[1];h[0]-=j*g[0],h[1]-=j*g[1],i=b._scaleY=Math.sqrt(h[0]*h[0]+h[1]*h[1]),h[0]/=i,h[1]/=i,b._skewX=j/i;var k=c*f-d*e;k<0&&(c"),c.close(),d=hb(a,c),ib()),Jh[a]=d),d}function kb(a,b){if(a){var c="SPAN",d="";1===a.nodeType&&(c=a.tagName,d=mb(a));var e=nb(a);if(e){var f=Hh(d+e+"",!0).firstChild;return{el:f,chars:Dc(lb(f,b))}}}return null}function lb(a,c){var d=a.style.position;a.style.position="relative",ui(a).addClass("leo-temp-show");var e=Dc(a.querySelectorAll(".leo-char"));if(!c)return a.style.position=d,ui(a).removeClass("leo-temp-show"),e;b.body.appendChild(a);var f=[];return e.forEach(function(a){var b=Ih(a);b.lineHeight=md(a)+"px",b.position="absolute",f.push(b)}),f.forEach(function(a,b){var c=e[b];Ye(c,a)}),b.body.removeChild(a),a.style.position=d,ui(a).removeClass("leo-temp-show"),e}function mb(a){for(var b="<"+a.tagName,c=a.attributes,d=-1,e=c.length;++d"}function nb(a){var b=a.nodeType,c="";if(3===b)for(var d=a.textContent,e=Mh,f=-1,g=d.length;++f"+Xb(h)+""}else if(1===b)for(var i=a.childNodes,f=-1,g=i.length;++f";continue}var m=mb(j),n=nb(j);c+=m+n+""}}else c+=nb(j)}return c}function ob(a,b){var c,d=Nh(a,null);return d&&(c=d[b],null!=c&&""!==c||(c=a.style[b]||"")),c}function pb(){var a=arguments[0],b=!1,c=0,d=arguments.length;for("boolean"==typeof a&&(b=a,a=arguments[1],c=1),1===d&&(a=this,c--),a=a||{};++c=0;){for(f=0,g=4;--g>e;)f+=a[4*e+g]*d[g];d[e]=(c[e]-f)/a[4*e+e]}return d}function wb(a){for(var b=[],c=-1;++c<4;)b[c]=0;var d=[],e=d.push;for(c=-1;++c<4;)b[c]=1,e.apply(d,vb(ub(a),b)),b[c]=0;return d}function xb(a,b){return[a[0]*b[0]+a[1]*b[4]+a[2]*b[8]+a[3]*b[12],a[0]*b[1]+a[1]*b[5]+a[2]*b[9]+a[3]*b[13],a[0]*b[2]+a[1]*b[6]+a[2]*b[10]+a[3]*b[14],a[0]*b[3]+a[1]*b[7]+a[2]*b[11]+a[3]*b[15]]; }function yb(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2])}function zb(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]}function Ab(a,b){a[0]/=b,a[1]/=b,a[2]/=b}function Bb(a,b,c,d){return[c*a[0]+d*b[0],c*a[1]+d*b[1],c*a[2]+d*b[2]]}function Cb(a,b){return[a[1]*b[2]-b[1]*a[2],a[2]*b[0]-b[2]*a[0],a[0]*b[1]-b[0]*a[1]]}function Db(a,b){var c,d=zd(a),e=!!d.space;return c=null==b?e?function(){this.removeAttributeNS(d.space,d.local)}:function(){this.removeAttribute(a)}:"function"==typeof b?e?function(a){var c=b.call(this,a);null==c?this.removeAttributeNS(d.space,d.local):this.setAttributeNS(d.space,d.local,c)}:function(c){var d=b.call(this,c);null==d?this.removeAttribute(a):this.setAttribute(a,d)}:e?function(){this.setAttributeNS(d.space,d.local,b)}:function(){this.setAttribute(a,b)}}function Eb(a,b){var c=(""+a).split(/\s+/).map(Fb),d=c.length;return"function"==typeof b?function(a){var e=b.call(this,a);for(a=-1;++a=0?c.className=f.replace(b," ").trim():f.indexOf(b)<0&&(c.className=(f+a).trim())}}}function Gb(a){return"function"==typeof a?a:function(){return Ad(a,this.namespaceURI)}}function Hb(a,b){return"function"==typeof b?function(c){this[a]=b.call(this,c)}:function(){this[a]=b}}function Ib(a,b){var c,d=!!Qh[a],e=Rh[a];return e&&e.set?c=e.set:(a=uf(a),c=function(b,c){null==c?b.style[a]="":We(b,a,c)}),null==b?function(){c(this,null)}:"function"==typeof b?function(a){var e=b.call(this,a)+"";isFinite(+e)&&!d&&(e+="px"),c(this,e)}:(isFinite(+b)&&!d&&(b+="px"),function(){c(this,b)})}function Jb(a){Gc.log.apply(Gc,a)}function Kb(a){Gc.warn.apply(Gc,a)}function Lb(a){Gc.error.apply(Gc,a)}function Mb(a){return function(b){return b[0]="["+(new Date).toLocaleString()+"]"+b[0],a(b)}}function Nb(a,b){return function(c){return c[0]="["+b+"]"+c[0],a(c)}}function Ob(a){return function(b,c,d){return b?d.unshift(b+": "+(c||"")):d.unshift(c),a(d)}}function Pb(a){return function(b,c){for(var d=[],e=0;e=0&&b(e,f)<0;)a[g+1]=a[g],f=a[g-1];a[g+1]=e}}function Zb(a,b){return a-b}function $b(a){return a.replace(/\s+/g,"").replace(/[A-Z]/g,function(a,b){return 0!==b?" "+a.toLowerCase():a}).replace(/^[a-z]/,function(a){return a.toUpperCase()})}function _b(a,b,c){return ac&&(a=c),a}function ac(a,b,c){arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0));for(var d=[],e=1;c*e%1;)e*=10;var f,g=-1;if(a*=e,b*=e,c*=e,c<0)for(;(f=a+c*++g)>b;)d.push(f/e);else for(;(f=a+c*++g)-1e-7&&a<1e-7?0:a}function cc(a,b){var c=Array.isArray(a)?[]:{};for(var d in a)a.hasOwnProperty(d)&&(c[d]=b?cc(a[d],!0):a[d]);return c}function dc(a){for(var b in a)return!1;return!0}function ec(a){var b=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),c=a.match(b);return{scheme:c[2],authority:c[4],path:c[5],query:c[7],fragment:c[9]}}function fc(a,b,c){for(var d="",e=[],f=0,g=-1,h=a.length;++g1)for(;e;)this._watch(a[--e],b,c,d);else this._watch(a[0],b,c,d)},b.prototype._watch=function(a,b,c,d){"undefined"==typeof d&&(d=0),this.addEventListener(a+"Change",b,c,d)},b.prototype.unwatch=function(a,b,c){a=Qi(a).split(/\s+/);var d=a.length;if(d>1)for(;d;)this._unwatch(a[--d],b,c);else this._unwatch(a[0],b,c)},b.prototype._unwatch=function(a,b,c){a+="Change",b?this.removeEventListener(a,b,c):this.removeAllEventListeners(a)},b}(nc),qc=b.documentElement,rc="webkit o O ms moz Moz".split(" "),sc="-webkit- -o- -ms- -moz-".split(" "),tc=a.setTimeout,uc=a.clearTimeout,vc=a.setInterval,wc=a.clearInterval,xc="function"==typeof a.setImmediate&&"function"==typeof a.clearImmediate,yc=function(b,c){var d;return d=xc?a.setImmediate(function(){b.call(c)}):tc(function(){b.call(c)},0)},zc=function(b){xc?a.clearImmediate(b):uc(b)},Ac="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Bc=b.getElementById("bookContainer")||b,Cc=Array.prototype.slice,Dc=(Object.prototype.toString,Object.prototype.hasOwnProperty,function(a){return Cc.call(a)}),Ec=function(){},Fc=function(a){return a},Gc=a.console||{log:function(){},warn:function(){},error:function(){throw new Error}},Hc="__leo_expando__",Ic="__leo_guid__",Jc=0,Kc=Math.PI,Lc=Kc/2,Mc=2*Kc,Nc=Kc/180,Oc=180/Kc,Pc=1e-7,Qc={factory:{},eases:{linear:Fc,swing:function(a){return.5-.5*Math.cos(a*Kc)},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return-a*(a-2)},easeInOutQuad:function(a){return(a*=2)<1?a*a/2:-(--a*(a-2)-1)/2},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return(a-=1)*a*a+1},easeInOutCubic:function(a){return(a*=2)<1?a*a*a/2:((a-=2)*a*a+2)/2},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return 1-(a-=1)*a*a*a},easeInOutQuart:function(a){return(a*=2)<1?a*a*a*a/2:1-(a-=2)*a*a*a/2},easeInQuint:function(a){return a*a*a*a*a},easeOutQuint:function(a){return(a-=1)*a*a*a*a+1},easeInOutQuint:function(a){return(a*=2)<1?a*a*a*a*a/2:((a-=2)*a*a*a*a+2)/2},easeInSine:function(a){return~~(1e5*(1-Math.cos(a*Lc))+.5)/1e5},easeOutSine:function(a){return Math.sin(a*Lc)},easeInOutSine:function(a){return-(Math.cos(Kc*a)-1)/2},easeInExpo:function(a){return a?Math.pow(2,10*(a-1)):0},easeOutExpo:function(a){return 1===a?1:-Math.pow(2,-10*a)+1},easeInOutExpo:function(a){return a?1===a?1:(a*=2)<1?Math.pow(2,10*(a-1))/2:1-Math.pow(2,-10*--a)/2:0},easeInCirc:function(a){return 1-Math.sqrt(1-a*a)},easeOutCirc:function(a){return Math.sqrt(1-(a-=1)*a)},easeInOutCirc:function(a){return(a*=2)<1?-(Math.sqrt(1-a*a)-1)/2:(Math.sqrt(1-(a-=2)*a)+1)/2}},get:function(a){if("@"===a.charAt(0)&&(a=a.substr(1),/^(.*)\((.*)\)$/.test(a))){a=RegExp.$1;var b=RegExp.$2.split(/\s*,\s*/).map(parseFloat);return Qc.factory[a].apply(null,b)}return Qc.eases[a]}},Rc=function(a){function b(c){a.call(this),this.__leo_guid__=f(),this.startTime=0,this._duration=1e3,this._currentTime=0,this._totalDurationDirty=!1,this._totalDuration=1e3,this._currentTotalTime=0,this._delay=0,this._timeScale=1,this._repeat=0,this._repeatDelay=0,this._isEnd=!1,this._yoyo=!1,this._reverse=!1,this._timeline=null,this._target=null,this._paused=!1,this._initialized=!1,this._ratio=0,this._cycle=0,this._rawTotalTime=0,this._arrival=0,this._prevTime=0,this._forced=!1,c&&b.addTargetAnimation(c,this),this._target=c,this.setEasing("easeInOutQuad")}return oc(b,a),d(b.prototype,"duration",{get:function(){return this._duration},set:function(a){if(this._duration!==a){var b=this._duration;this._duration=a,this._setTotalDurationDirty(),this.notifyPropertyChange("duration",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"currentTime",{get:function(){return this._currentTime},set:function(a){this._currentTime===a&&this.duration||(this.currentTotalTime=a+this._cycle*(this.duration+this._repeatDelay))},enumerable:!0,configurable:!0}),d(b.prototype,"totalDuration",{get:function(){if(this._totalDurationDirty){this._totalDurationDirty=!1;var a=this._totalDuration,b=this._totalDuration=this.duration;b!==1/0&&(this._totalDuration=b+this._repeat*(b+this._repeatDelay)),this._rawTotalTime>=a&&(this._totalDuration>a&&(this._isEnd=!1),this._rawTotalTime=Math.min(this._rawTotalTime,this._totalDuration,a))}return this._totalDuration},enumerable:!0,configurable:!0}),b.prototype._setTotalDurationDirty=function(){this._totalDurationDirty||(this._totalDurationDirty=!0,this._timeline&&this._timeline._setChildDirty(this,this.startTime,!1))},d(b.prototype,"currentTotalTime",{get:function(){return this._currentTotalTime},set:function(a){if(this._currentTotalTime!==a||!this.duration){this._isEnd=!1;var b=this.startTime;this.update(this._reverse?this.totalDuration-a:a,!0),this._timeline&&(this.startTime=this._timeline._currentTime-(this._rawTotalTime?this._rawTotalTime/this._timeScale:0),this._timeline._setChildDirty(this,this.startTime,this.startTime!==b))}},enumerable:!0,configurable:!0}),d(b.prototype,"delay",{get:function(){return this._delay},set:function(a){if(this._delay!==a){var b=this._delay;if(this._delay=a,this._timeline){var c=this._timeline._currentTime,d=this.startTime;this.startTime+=a-b,dc&&this.update(0),this._timeline._setChildDirty(this,this.startTime,!0)}this.notifyPropertyChange("delay",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"timeScale",{get:function(){return this._timeScale},set:function(a){if(this._timeScale!==a){var b=this._timeScale;this._timeScale=a,this._timeline&&this._timeline._setChildDirty(this,this.startTime,!1),this.notifyPropertyChange("timeScale",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"repeat",{get:function(){return this._repeat},set:function(a){if(a===-1&&(a=this._foreverRepeat),this._repeat!==a){var b=this._repeat;this._repeat=a,this._setTotalDurationDirty(),this.notifyPropertyChange("repeat",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"_foreverRepeat",{get:function(){var a=this.duration+this._repeatDelay;return a?(6048e5-this._duration)/a:1e6},enumerable:!0,configurable:!0}),d(b.prototype,"repeatDelay",{get:function(){return this._repeatDelay},set:function(a){if(this._repeatDelay!==a){var b=this._repeatDelay;this._repeatDelay=a,this._setTotalDurationDirty(),this.notifyPropertyChange("repeatDelay",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"easing",{get:function(){return this._easing},set:function(a){if(this._easing!==a){var b=this._easing;this._easing=a,this.notifyPropertyChange("easing",b)}},enumerable:!0,configurable:!0}),b.prototype.setEasing=function(a){var b=typeof a;"string"===b?this.easing=Qc.get(a):"function"===b&&(this.easing=a)},d(b.prototype,"isEnd",{get:function(){return this._totalDurationDirty&&this.totalDuration,this._isEnd},enumerable:!0,configurable:!0}),d(b.prototype,"yoyo",{get:function(){return this._yoyo},set:function(a){this._yoyo!==a&&(this._yoyo=a,this.notifyPropertyChange("yoyo",!a))},enumerable:!0,configurable:!0}),d(b.prototype,"reverse",{get:function(){return this._reverse},set:function(a){if(this._reverse!==a){if(this._reverse=a,this.isEnd&&(this._isEnd=!1),this._timeline){var b=this._rawTotalTime,c=this._timeline.currentTime,d=this.totalDuration,e=d-b;c=f-1e-5&&(a=f),this._rawTotalTime=a,this._reverse&&(a=f-a);var i=!1,j=a,k=a;if(0!==this._repeat){var l=g+this._repeatDelay;this._cycle=l?~~(k/l):0,0!==this._cycle&&this._cycle===k/l&&--this._cycle,j=k-this._cycle*l,i=this._yoyo&&0!==(1&this._cycle),i&&(j=g-j),k===f&&(this._cycle=this._repeat),j>g?j=g:j<0&&(j=0)}return this._ratio=g?j/g:i?0:1,this._easing&&(this._ratio=this._easing(this._ratio)),(0===g&&(h<0||0===f)||!this._initialized)&&(b=!0),c!==j||b||e!==this._cycle?(this._prevTime=c,this._initialized||this.init(),this._currentTime=j,this._currentTotalTime=k,this._forced=!!b,this.render(this._currentTime,c)?void this.destroy():(this._forced=!1,(d!==this._currentTotalTime||b)&&this.dispatchSimpleEvent("update"),e!==this._cycle&&0!==this._repeat&&this.dispatchSimpleEvent("repeat",e),this._isEnd=!1,void(this._rawTotalTime>=this.totalDuration&&(this._isEnd=!0,this._rawTotalTime>=this.totalDuration&&(this._rawTotalTime=this._totalDuration),this.dispatchSimpleEvent("end"),this.end(),this.totalDuration)))):void(d!==k&&(this._currentTime=j,this._currentTotalTime=k,this.dispatchSimpleEvent("update")))},b.prototype.end=function(){},b.prototype.render=function(a,b){return!1},b.config=function(a,c,d){if(null!=c&&(a.duration=+c||0),d){var e=b.KEYWORDS;d.delay&&(a._delay=d.delay);for(var f in d)f in e&&(a[f]=d[f]);d.hasOwnProperty("autoDestroy")&&a.addEventListener("end",a.destroy,a,-(1/0)),d.hasOwnProperty("easing")&&a.setEasing(d.easing)}return a},b.prototype.notifyPropertyChange=function(a,b){if(this.hasEventListener(a+="Change")){var c=Zh.getInstance(a,b);c._setCurrentTarget(c._target=this),this._notifyListener(c),Zh.recycle(c)}},b.registerAnimationFactory=function(a,c){b._animationFactories[a.toLowerCase()]=c},b.getAnimation=function(a,c,d,e){return b._animationFactories[c.toLowerCase()](a,d,e)},b.animate=function(a,c,d,e,f){var g=b._animationFactories[c.toLowerCase()](a,d,e);return g.addEventListener("end",g.destroy,g,-(1/0)),f||(f=Wc.getInstance()),f.add(g),g},b.registerTransitionFactory=function(a,c){b._transitionFactories[a.toLowerCase()]=c},b.getTransition=function(a,c,d,e,f){return b._transitionFactories[d.toLowerCase()](a,c,e,f)},b.transition=function(a,c,d,e,f,g){var h=b._transitionFactories[d.toLowerCase()](a,c,e,f);return h.addEventListener("end",h.destroy,h,-(1/0)),g||(g=Wc.getInstance()),g.add(h),h},b.anyTransition=function(a,c,d,e){var f=Tc.create(e),g=c.target;return g instanceof Ie?g.visible=!1:Ve(g,"display","none"),f.add(b.getAnimation(a.target,a.animation,d,a.options)),f.add(b.getAnimation(g,c.animation,d,a.options)),f},b.addTargetAnimation=function(a,c){if(a){a.__leo_guid__=a.__leo_guid__||f();var d=b._cache[a.__leo_guid__];d||(d=b._cache[a.__leo_guid__]=[]),d.push(c)}},b.removeTargetAnimation=function(a,c){if(a){var d=b._cache[a.__leo_guid__];if(d){var e=d.indexOf(c);e>=0&&d.splice(e,1),d.length||delete b._cache[a.__leo_guid__]}}},b.destroyAnimationsOfTarget=function(a){if(a){var c=b._cache[a.__leo_guid__];delete b._cache[a.__leo_guid__],c&&c.forEach(function(a){a.destroy()})}},b.KEYWORDS=e(["delay","timeScale","reverse","repeat","repeatDelay","yoyo"]),b._animationFactories={},b._transitionFactories={},b._cache={},b}(pc),Sc=function(a){function b(b,c){a.call(this,b),this.data=null,c=this.config=c||{},this.onInit=c.onInit,this.onRender=c.onRender,this.onDestroy=c.onDestroy,this.onEnd=c.onEnd,this.data=c.data}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.onInit&&this.onInit()},b.prototype.end=function(){a.prototype.end.call(this),this.onEnd&&this.onEnd()},b.prototype.render=function(a,b){return this.onRender&&this.onRender(this._ratio,a,b),!1},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.onDestroy&&this.onDestroy(),this.onInit=this.onDestroy=this.onRender=this.config=this.data=null},b.create=function(a,c,d,e){return Rc.config(new b(a,d),c,e)},b}(Rc),Tc=(function(a){function b(b,c,d){a.call(this,null),this.targetOut=b,this.targetIn=c,d=this.config=d||{},this.onInit=d.onInit,this.onRender=d.onRender,this.onDestroy=d.onDestroy}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.onInit&&this.onInit()},b.prototype.render=function(){return this.onRender(this._ratio),!1},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.onDestroy&&this.onDestroy(),this.targetOut=this.targetIn=this.onInit=this.onDestroy=this.onRender=this.config=null},b.create=function(a,c,d,e,f){return b.config(new b(a,c,e),d,f)},b}(Rc),function(a){function b(){a.call(this,null),this._animations=[],this.tweenOverwritten=-1,this._durationDirty=!1,this._duration=0,this._hasSetDuration=!1,this._dirtyStart=0,this._childrenDirty=!1,this._reorder=!1,this._forwardOrder=!0,this._firing=!1,this._labels=null,this.easing=null}return oc(b,a),d(b.prototype,"animations",{get:function(){return this._reorder&&(this._reorder=!1,Yb(this._animations,this._forwardOrder?i:j)),this._animations},enumerable:!0,configurable:!0}),d(b.prototype,"duration",{get:function(){if(this._durationDirty){if(this._durationDirty=!1,this._hasSetDuration)return this._duration;var a=this._animations,b=0;if(a)for(var c=-1,d=a.length;++cb&&(b=g)}}this._setDuration(b,!0)}return this._duration},set:function(a){this._setDuration(a,0===a)},enumerable:!0,configurable:!0}),b.prototype._setDuration=function(a,b){if((b&&!this._hasSetDuration||!b)&&(this._hasSetDuration=this._hasSetDuration||!b,this._duration!==a)){var c=this._duration;this._duration=a,this._setTotalDurationDirty(),this.dispatchSimpleEvent("durationChange",c)}},b.prototype._setChildDirty=function(a,b,c){this._childrenDirty?this._dirtyStart>b&&(this._dirtyStart=b):this._dirtyStart=b,c&&(this._reorder=c),this._childrenDirty=!0,this._setDurationDirty()},b.prototype._setDurationDirty=function(){this._durationDirty||(this._durationDirty=!0,this._setTotalDurationDirty())},b.prototype.stopAnimationsAt=function(a,c){var d="number"!=typeof a?this._parseTime(a):a,e=this.at(d);c=!!c;for(var f=-1,g=e.length;++f=0&&this._removeAtIndex(b),a._timeline=null}},b.prototype._removeAtIndex=function(a){var b=this._animations[a];this._firing?this._animations[a]=null:this._animations.splice(a,1),b._timeline=null,b.totalDuration>=b._timeScale*(this.duration-b.startTime)&&this._setDurationDirty()},b.prototype.at=function(a,b){var c="number"!=typeof a?this._parseTime(a):a,d=[];return this._iterate(this._forwardOrder,function(a){return a.startTime<=c?(a.startTime+a.totalDuration>=c&&(!b||a.target===b)&&d.push(a),0):1}),d},b.prototype._iterate=function(a,b){var c=this.animations;if(a)for(var d=-1,e=c.length;++d=0;){var f=c[d];if(f&&1===b.call(this,f,d))return}},b.prototype.render=function(a,b){var c=a,d=b,e=c>=d;this._forwardOrder!==e&&(this._forwardOrder=e,this._reorder=!0);var f=this._childrenDirty,g=this._dirtyStart;if(f&&(this._childrenDirty=!1,this._dirtyStart=0,e?g=(d-m)*o&&l.update((a-m)*o)}}else{if(!i.length)break;i.splice(j--,1),--k}}return this._firing=!1,!1},d(b.prototype,"labels",{get:function(){return this._labels?this._labels:this._labels={}},enumerable:!0,configurable:!0}),b.prototype.addLabel=function(a,b){this.labels[a]="number"!=typeof b?this._parseTime(b):b},b.prototype.removeLabel=function(a){this.hasLabel(a)&&this.labels[a]},b.prototype.hasLabel=function(a){return null!=this._labels&&this._labels.hasOwnProperty(a)},b.prototype.getLabelValue=function(a){return this._labels&&this._labels[a]},b.prototype.destroy=function(){this._animations&&(a.prototype.destroy.call(this),this._iterate(this._forwardOrder,function(a,b){return this._removeAtIndex(b),a.destroy(),2}),this._animations=null)},b.prototype._parseTime=function(a){var b="__labels__",c=this._currentTime,d=this.labels;Vc.lastIndex=0,Uc.test(a)&&(d.end=this.duration);var e=Function(b,"return "+a.replace(/^([+\-*\\])=/g,function(a,b){return c+b}).replace(Vc,function(a,d){var e=b+'["'+d+'"]';return"("+e+"!=null?"+e+":("+e+"="+c+"))"})+";");return e(d)},b.create=function(a){return Rc.config(new b,null,a)},b.ARRIVAL_COUNTER=0,b}(Rc)),Uc=/(?:^|\b)end(?:\b|$)/,Vc=/(?:^|\b)([a-zA-Z_$][\w$_]*)\b/g,Wc=function(a){function b(){a.call(this),this._ticker=Zg.getInstance(),this._inTicker=!1,this._justAdded=!1,this._hungFrame=0}return oc(b,a),b.prototype.resume=function(){return!this._inTicker&&this._animations.length&&this._addToTicker(),a.prototype.resume.call(this)},b.prototype.pause=function(){return this._inTicker&&this._removeFromTicker(),a.prototype.pause.call(this)},d(b.prototype,"available",{get:function(){return!this._paused},enumerable:!0,configurable:!0}),b.prototype._addToTicker=function(){this._ticker.add(this),this._inTicker=!0,this._justAdded=this._justAdded||this._hungFrame!==this._ticker.frames},b.prototype._removeFromTicker=function(){this._ticker.remove(this),this._inTicker=!1,this._hungFrame=this._ticker.frames},b.prototype.add=function(b){return a.prototype.add.call(this,b),this._inTicker||this._paused||!this._animations.length||this._addToTicker(),this},b.prototype._removeAtIndex=function(a){var b=this._animations[a];this._firing?this._animations[a]=null:(this._animations.splice(a,1),!this._animations.length&&this._inTicker&&this._removeFromTicker()),b._timeline=null},b.prototype._detach=function(a){this._animations[a];this._animations.splice(a,1),!this._animations.length&&this._inTicker&&this._removeFromTicker()},b.prototype._setChildDirty=function(a,b,c){a.isEnd||(this._animations.indexOf(a)<0&&(this._animations.push(a),this._inTicker||this._paused||this._addToTicker()),c&&(this._reorder=c))},b.prototype.update=function(a){if(!this._paused){this._justAdded&&(this._justAdded=!1,this.startTime=this._ticker.currentTime);var b=this.animations,c=this.startTime;this.startTime=a,a=this._currentTime=this._currentTotalTime+=a-c,this._firing=!0;for(var d=-1,e=b.length;++d=0&&e.splice(f,1),e.length||delete b._tweens[d]}},b._getTweens=function(a){var c;if(a&&(c=a[Ic]))return b._tweens[c]},b.stopTweensOf=function(a,c){var d=b._getTweens(a);if(d){d=d.concat();for(var e=-1,f=d.length;++e>2,i=a._timeline===Wc.getInstance();g&=3;for(var j=d.length;--j>=0;){var k=d[j],l=g,m=h;if(k!==a&&k.overwrittenEnabled){var n,o=e,p=!1;if(k._timeline===a._timeline){if(o=a.startTime,n=k.startTime,!(l=k._timeline.tweenOverwritten))continue;l===-1?l=g:(m=(12&l)>>2,l&=3),p=!i}else n=k.globalStartTime;if(2===l||k._initialized&&k.available&&(p&&n>=o||!p&&n<=o)&&n+k.totalDuration/k._timeScale<=f)for(var q=-1,r=c.length;++q=0&&(d=ld(a),e=od(a));for(var f=(""+b).match(/[-\d\.]+[%a-z]+/g),g=new Array(4),h=-1;++h<4;){var i=f[h];"%"===i[i.length-1]?g[h]=h%2?d?parseFloat(i)*d/100:0:e?parseFloat(i)*e/100:0:g[h]=parseFloat(i)+"px"}return o(a,g,c,3)},getInterpolater:function(a,b){var c=r(a,b);return function(a){var b=c.call(this,a,!0);return"rect("+b.join(" ")+")"}}}},4:{}};k({boxShadow:{containsColor:!0,constList:["@","inset"],_default:"0 0 0 0 black @"},textShadow:{containsColor:!0,_default:"0 0 0 black"},backgroundPosition:{_default:"0 0"}},function(a,b){return l(b,a._default,a.containsColor,a.constList)}),Zc[4].shadow=Zc[4].dropShadow=Zc[3].textShadow,function(){function a(a){return function(b){for(var c=[],d=-1,e=a.length;++d=0?a.substr(0,c):"";return c>=0&&"dom"===d?void(b.sign=ed[1].sign(a.substr(c+1),b)):($g.KEYWORDS[a]&&(a="transform."+a),b.type=1,void(b.sign=I(a,b.type)))},parse:function(a,b){var c=b.name,d=c.indexOf("."),e=d>=0?c.substr(0,d):"";if(d>=0){if("dom"===e){b.name=c.substr(d+1);var f=cd;cd=H;var g=ed[1].parse(a._dom,b);return cd=f,g}a=a[e],c=c.substr(d+1)}else $g.KEYWORDS[c]&&(a=a._transform,d=0,b.round=!1);var g=m(a,c,b,E,4);return g&&(g.r=d>=0?fd[e]?fd[e]:function(b,c,d){a[d]=c}:B),g}},{conform:function(a){return 1===a.nodeType||9===a.nodeType},beginRender:function(a){a[_g]&&(a[_g].deferred=!0)},endRender:function(a){a[_g]&&(a[_g].deferred=!1)},sign:function(a,b){b.sign=I(a,b.type=b.type||3)},parse:function(a,b){var c,d=b.name;if(1===b.type)c=A(a,b);else if(2===b.type){var e=zd(b.name);c=m(a,e.local,b,e.space?function(a,b){return a.getAttributeNS(e.space,e.local)}:F,2),c&&(c.r=e.space?function(a,b){a.setAttributeNS(e.space,e.local,b)}:C)}else{var d=b.name;"zIndex"===d?b.round=!0:$g.KEYWORDS[d]&&(b.round=!1),c=m(a,d,b,G,3),c&&(c.n=$g.KEYWORDS[d]?d:uf(d),c.r=D)}return c&&cd&&cd(c,b.type),c}},{conform:function(a){return!0},beginRender:Ec,endRender:Ec,sign:function(a,b){I(a,b.type=1)},parse:A}],fd={transform:function(a,b,c){a._transform[c]=b},filter:function(a,b,c){a._filter[c]=b},font:function(a,b,c){a._font[c]=b},dom1:function(a,b,c){a._dom[c]=b},dom0:function(a,b,c){We(a._dom,c,b)}},gd=0,hd={};Rc.registerAnimationFactory("Flicker",function(a,b,c){"undefined"==typeof c&&(c={});var d=pb({},c,{yoyo:!0,repeat:2*(c.repeat||0)+1}),e=Xc.create(a,b/2,d);return e.overwritten=9,e.freeze=!1,e.apply({opacity:{to:c.alpha||0,freeze:!1}}),e}),Rc.registerAnimationFactory("Glowing",function(a,b,c){"undefined"==typeof c&&(c={});var d=Ad("canvas"),e=d.getContext("2d");if(e){var f,g,h,i,j,k=a.dom||a,l=k.getElementsByTagName("img")[0]||k;if(h=l.parentNode){var f=jd(l),g=md(l);d.className="leo-animation-canvas",d.width=f,d.height=g,Ye(d,{width:f,height:g,left:parseFloat(Xe(l,"left"))+a.x,top:parseFloat(Xe(l,"top"))+a.y,zIndex:Xe(l,"zIndex")}),i=d.cloneNode(!0).getContext("2d"),j=d.cloneNode(!0).getContext("2d");var m=l.nextSibling;m?h.insertBefore(d,m):h.appendChild(d);var n=c.params||{},o=Math.round(f*(n.strength||.35)),p=i.createLinearGradient(0,0,o,0),q=n.color||"#fff";p.addColorStop(0,Ee.transparentize(q,0)),p.addColorStop(.1,Ee.transparentize(q,.07)),p.addColorStop(.5,Ee.transparentize(q,.7)),p.addColorStop(.9,Ee.transparentize(q,.07)),p.addColorStop(1,Ee.transparentize(q,0)),i.save(),i.fillStyle=p,i.rotate(15*Math.PI/180),i.translate(Math.atan(15*Math.PI/180)*g,0),i.fillRect(0,-o,o,g+2*o),i.restore();try{j.drawImage(l,0,0,f,g)}catch(r){j.rect(0,0,f,g),j.fill()}var s=Sc.create(null,b,{onDestroy:function(){h.removeChild(d)},onRender:function(a){e.clearRect(0,0,f,g),e.globalCompositeOperation="source-over",e.drawImage(i.canvas,-f+2*f*a,0),e.globalCompositeOperation="destination-in",e.drawImage(j.canvas,0,0)}},c);return s}}}),Rc.registerAnimationFactory("Jump",function(a,b,c){"undefined"==typeof c&&(c={});var d=Tc.create(c);d.tweenOverwritten=0;var e=c.range||10,f=Xc.create(a,.4*b,{easing:"linear"});return f.overwritten=9,f.freeze=!1,f.apply({ty:{to:"-="+e}}),d.add(f),f=Xc.create(a,.2*b,{easing:"linear"}),f.overwritten=9,f.freeze=!1,f.apply({ty:{to:"+="+e}}),d.append(f),f=Xc.create(a,.2*b,{yoyo:!0,repeat:1,easeing:"linear"}),f.overwritten=9,f.freeze=!1,f.apply({ty:{to:"-="+.4*e}}),d.append(f),d}),Rc.registerAnimationFactory("Motion",function(a,b,c){"undefined"==typeof c&&(c={});var d=Xc.create(a,b,c),e={},f=c.params;for(var g in c.params)f.hasOwnProperty(g)&&(e[g]=f[g]);return e.spriteScaleX&&(e.spriteScaleX={constant:1,to:e.spriteScaleX}),e.spriteScaleY&&(e.spriteScaleY={constant:1,to:e.spriteScaleY}),d.apply(e),d}),Rc.registerAnimationFactory("Rotate",function(a,b,c){var d=Xc.create(a,b,c);return d.overwritten=9,d.freeze=!1,d.apply({rotation:{to:"+=360",freeze:!1}}),d}),Rc.registerAnimationFactory("Shake",function(a,b,c){"undefined"==typeof c&&(c={});var d=Tc.create(c);d.tweenOverwritten=0;for(var e=c.range||10,f={yoyo:!0,repeat:1,easing:"linear"},g=0;g<4;g++){var h=Xc.create(a,b/8,f);h.overwritten=9,h.freeze=!1,h.apply({rotation:{to:(g%2===0?"+":"-")+"="+(g<2?.4*e:e)}}),d.append(h)}return d}),Rc.registerAnimationFactory("Shine",function(a,b,c){"undefined"==typeof c&&(c={}),a=a instanceof Ie?a.dom:a;var d=pb({},c,{yoyo:!0,repeat:2*(c.repeat||0)+1,offsetX:0,offsetY:0,blur:20,strength:10,color:"#000"}),e=d.offsetX+"px "+d.offsetY+"px "+d.blur+"px "+d.strength+"px "+Ee.parseToString(d.color),f=Ye(a,"boxShadow");f="none"===f?"0 0 0 0 rgba(255,255,255,0)":f,Ye(a,"boxShadow",f);var g=Xc.create(a,b/2,d);g.overwritten=9,g.freeze=!1;var h={boxShadow:{to:e,freeze:!1}};return g.apply(h),g}),Rc.registerAnimationFactory("ShineInside",function(a,b,c){"undefined"==typeof c&&(c={}),a=a instanceof Ie?a.dom:a;var d=ui(a).select("#shineInsideDiv"+a.id)[0];d?Xc.stopTweensOf(d):(d=Ad("div"),d.id="shineInsideDiv"+a.id),Ye(d,{position:"absolute",width:"100%",height:"100%",left:0,top:0,boxShadow:"inset 0 0 0 "+Ee.parseToString(c.color||"#fff")}),a.appendChild(d);var e=pb({},c,{yoyo:!0,repeat:2*(c.repeat||0)+1,easing:"linear"}),f=Xc.create(d,b/2,e);return f.freeze=!1,f.apply({boxShadow:{to:"inset "+(e.offsetX||0)+"px "+(e.offsetY||0)+"px "+(e.blur||20)+"px "+(e.strength||10)+"px "+(e.color||"#fff")}}),f.addEventListener("destroy",function(){d&&d.parentNode&&(d.parentNode.removeChild(d),d=null)},null),f}),Rc.registerAnimationFactory("ShowStage",function(a,b,c){"undefined"==typeof c&&(c={});var d=Tc.create(c),e=Xc.create(a,b),f=a.actualWidth/2,g=a.actualHeight/2,h=a.getMaxRadius(f,g,a.actualWidth,a.actualHeight);e.apply({spotX:f-h,spotY:g-h,spotWidth:2*h,spotHeight:2*h}),d.add(e,0);var i=Rc.getAnimation(a,"FadeOut",b);return d.add(i,0),d.duration=b,d}),Rc.registerAnimationFactory("SpotLight(Move to)",function(a,b,c){"undefined"==typeof c&&(c={});var d=Xc.create(a,b,c);return d.setEasing("easeOutQuad"),d.apply(c.params),d.addEventListener("init",function e(){d.removeEventListener("init",e,null),a.visible||d.apply({visible:!0,opacity:{from:0,to:a.opacity}})},null),d});var id=this;Rc.registerAnimationFactory("SpriteMotion",function(a,b,c){"undefined"==typeof c&&(c={});var d=c.params,e=Tc.create(c);e.duration=b;var f=0;if(d.motion&&(e.add(Rc.getAnimation(a,"Motion",b,{easing:c.easing,params:d.motion,overwritten:c.overwritten}),0),++f),d.action&&a.sprite.containsAction(d.action)){var g=a.sprite.getNumFramesOfAction(d.action);if(g){var h=a.actionConfigs&&a.actionConfigs[d.action],i=h&&h.frameRate||8,j=h&&h.repeat||0,k=Xc.create(a,1e3*g/i,{easing:Jd(g+1,g/(g+1)),repeat:j,overwritten:c.overwritten});e.add(k,0),k.freeze=!1,k.apply({currentActionName:{immediate:!1,from:d.action,to:d.action},currentActionIndex:{immediate:!1,from:0,floor:!0,to:g,freeze:!!d.freeze}}),a.node.select(".showed-text").remove();var l=d.text;if(l&&l.content){var m=a.node.el("div").addClass("leo-comp--sprite-text"),n=a.width,o=a.height,p=400,q=174,r=(l.position,[45,60]),s=m.el("div").addClass("inside"),t=l.bgImage;s.el("div").addClass("masking").addClass(t.substring(1+t.lastIndexOf("_"),t.lastIndexOf(".")));if(l.bgImage.indexOf("circle")>=0?(p=300,q=200,r=[60,50],s.addClass("circle")):l.bgImage.indexOf("cloud")>=0?(p=273,q=283,r=[38,40,150,40],s.addClass("cloud")):s.addClass("rect"),"large"===l.size.toLowerCase()){var u=1.5;p*=u,q*=u,r=r.map(function(a){return a*u})}s.style("borderWidth",r.join("px ")+"px");var v,w,x="50% 100%";l.bgImage.indexOf("left")>=0?(v=-p+.18*n,w=-q+.2*o,x="100% 100%"):l.bgImage.indexOf("right")>=0?(v=n-.18*n,w=-q+.2*o,x="0 100%"):(v=(n-p)/2,w=-q-20);var y,z;a.watch("width",y=function(){var b=a.width;v=l.bgImage.indexOf("left")>=0?-p+.18*b:l.bgImage.indexOf("right")>=0?b-.18*b:(b-p)/2,m.style("left",v)},id),a.watch("height",z=function(){var b=a.height;w=l.bgImage.indexOf("left")>=0?-q+.2*b:l.bgImage.indexOf("right")>=0?-q+.2*b:-q-20,m.style("top",w)},id),m.style({left:v,top:w,backgroundImage:"url("+l.bgImage+")",width:p,height:q,transformOrigin:x}),e.addEventListener("init",function(){a.node.select(".showed-text").remove(),m.style("transform","scale(1)").addClass("showed-text")},null),e.addEventListener("destroy",function(){a.unwatch("width",z,null),a.unwatch("height",y,null),fb(m[0])},null);var A,B,C=1500,D=vi("div").addClass("content").html(Na(l.content,0)),E=e.duration;if(E<=C)s.append(D),A=500,B=Math.max(E-500,0);else{var F=kb(D[0]),G=F.chars;s.append(F.el);var H=Math.min((E-C)/G.length,150);A=1e3+E-C,B=500,G.forEach(function(a,b){var c=Xc.create(a,0,{delay:H*b+500});fb(a),c.addEventListener("init",function(){eb(a)},null),e.add(c)})}e.add(Rc.getAnimation(m[0],"FadeOut",B),A)}var I=d.sound,t=I.src;I&&t&&(e.addEventListener("init",function(){a.getAudio(t).play()},null),e.addEventListener("destroy",function(){a.getAudio(t).pause()},null)),++f}}return f?e:null});var jd,kd,ld,md,nd,od,pd={position:"absolute",visibility:"hidden",display:"block"},qd=/^(?:none|table(?!-c[ea]).+)/;"Width,Height".replace(/\w+/g,function(a){var b=J(a),c=a.toLowerCase(),d="scroll"+a,e="offset"+a,f="client"+a,g=function(a,g){if(arguments.length<2){if(a.setTimeout)return a.innerWidth;if(9===a.nodeType){var h=a.documentElement;return Math.max(a.body[d],h[d],a.body[e],h[e],h[f])}return b(a)}Ve(a,c,g)};"Width"===a?(jd=g,kd=function(a){return b(a,1)},ld=function(a,c){return b(a,c?3:2)}):(md=g,nd=function(a){return b(a,1)},od=function(a,c){return b(a,c?3:2)}),g=null}),k(["ver","hor"],function(a){var b="hor"===a?"tx":"ty",c={yoyo:!0,repeat:1,easing:"linear"};Rc.registerAnimationFactory("Swing("+a+")",function(d,e,f){var g=Tc.create(f);g.tweenOverwritten=0;for(var h=f.range||d["hor"===a?"_actualWidth":"_actualHeight"],i=0;i<2;i++){var j=Xc.create(d,e/4,c);j.overwritten=9,j.freeze=!1;var k={};k[b]={to:(i<1?"+":"-")+"="+h,freeze:!1},j.apply(k),g.append(j)}return g})}),Rc.registerAnimationFactory("TextScroll",function(a,b,c){"undefined"==typeof c&&(c={});var d,e,f=a instanceof Ie,g=f?a.dom:a;Ye(g,"overflow","hidden"),e=a.height,d=md(g.querySelector(".leo-comp--txt__content")),c.easing="linear",c.repeat=c.repeat||0;var h=g.querySelector(".leo-comp--txt__content");Ye(h,"ty",e);var i=Xc.create(h,b/2,c);i.freeze=!1,i.apply({ty:{to:-d,freeze:!1}});var j=Tc.create();return j.add(i),j.addEventListener("destroy",function(){return Ye(h,"ty","0")},id),j}),Rc.registerAnimationFactory("TextShine",function(a,b,c){"undefined"==typeof c&&(c={}),a=a instanceof Ie?a.dom:a;for(var d=(c.offsetX||0)+"px "+(c.offsetY||0)+"px "+(c.blur||20)+"px "+Ee.parseToString(c.color||"#fff"),e=d,f=c.strength||10,g=0;g.5?1:-1)*(360*Cd())},rotationX:function(){return(Cd()>.5?1:-1)*(180*Cd())},rotationY:function(){return(Cd()>.5?1:-1)*(180*Cd())},opacity:0,tz:function(){return 1e3*Cd()+360}},{scaleX:1,scaleY:1,rotation:0,rotationX:0,rotationY:0,opacity:1,tz:0}],{random:!0}),L("Fade",[{opacity:0},{opacity:1}]),L("Fall",[{rotation:function(){return Fd()*(360*Cd()+180)},opacity:function(){return Cd()},ty:function(){return Cd()*-200-100},scaleX:function(){return Cd()},scaleY:function(){return Cd()}},{rotation:0,opacity:1,ty:0,scaleX:1,scaleY:1}],{random:!0}),L("Float",[{scaleX:2,scaleY:2,rotationX:180,opacity:0},{scaleX:1,scaleY:1,rotationX:0,opacity:1}],{transformOrigin:"50% 50% 20px"}),L("Fly",[{rotation:function(){return Fd()*(180*Cd()+180)},opacity:function(){return Cd()},scaleX:function(){return Cd()},scaleY:function(){return Cd()}},{rotation:0,opacity:1,scaleX:1,scaleY:1}],{transformOrigin:function(){return(Cd()>.5?-1:1)*Dd(1e3*Cd())+"% 50%"},random:!0}),["Top","Right","Bottom","Left"].forEach(function(a,b){var c=0,d=0,e=0===b||3===b?-120:120;1===b||3===b?c=e:d=e,L(a,[{tx:c,ty:d},{tx:0,ty:0}])}),L("RotateBottom",[{scaleY:0,scaleX:0,rotationX:-180,opacity:0,ty:-80},{scaleX:1,scaleY:1,rotationX:0,opacity:1,ty:0}],{transformOrigin:"0% 50% -50px",easing:"easeOutBack"}),L("RotateTop",[{scaleY:0,scaleX:0,rotationX:180,opacity:0,ty:80},{scaleX:1,scaleY:1,rotationX:0,opacity:1,ty:0}],{easing:"easeOutBack",transformOrigin:"0 50% -50px"}),L("RScale",[{scaleX:5,scaleY:5},{scaleY:.1,scaleX:.1},{scaleX:3,scaleY:3},{scaleX:1,scaleY:1}],c,[1/6,.5,1/3]),L("Scale",[{scaleX:5,scaleY:5},{scaleX:1,scaleY:1}],{interval:.6},[1/6,.5,1/3]),L("Zoom",[{scaleX:0,scaleY:0},{scaleX:1,scaleY:1}],c,[1/6,.5,1/3]),L("Uneven",[{opacity:0,tz:function(){return 500*Cd()*Fd()-100}},{opacity:1,tz:0}],{random:!0,easing:"easeOutCire"}),Rc.registerAnimationFactory("SliceIn",function(a,b,c){return Rc.getAnimation(a,"SliceInFromLeft",b,c)}),Rc.registerAnimationFactory("SliceOut",function(a,b,c){return Rc.getAnimation(a,"SliceOutToLeft",b,c)}),Rc.registerAnimationFactory("SmoothIn",function(a,b,c){return Rc.getAnimation(a,"SmoothInFromLeft",b,c)}),Rc.registerAnimationFactory("SmoothOut",function(a,b,c){return Rc.getAnimation(a,"SmoothOutToLeft",b,c)}),Rc.registerAnimationFactory("BlindInVer",function(a,b,c){return Rc.getAnimation(a,"BlindInFromLeft",b,c)}),Rc.registerAnimationFactory("BlindInHor",function(a,b,c){return Rc.getAnimation(a,"BlindInFromTop",b,c)}),Rc.registerAnimationFactory("BlindOutVer",function(a,b,c){return Rc.getAnimation(a,"BlindOutToLeft",b,c)}),Rc.registerAnimationFactory("BlindOutHor",function(a,b,c){return Rc.getAnimation(a,"BlindOutToTop",b,c)}),Rc.registerAnimationFactory("SoundFadeOut",function(a,b,c){return Rc.getAnimation(a,"Hide",b,c)}),Rc.registerAnimationFactory("SoundFadeIn",function(a,b,c){return Rc.getAnimation(a,"Show",b,c)}),M(function(a){P("Blind",a,"Extend",a,function(b){return"Top"===a||"Bottom"===a?{row:-1,col:1,originY:b?"Top"===a?"Bottom":"Top":a}:{row:1,col:-1,originX:b?"Left"===a?"Right":"Left":a}})}),M(function(a){P("BlindFade",a,"Fade",null,function(){return"Top"===a||"Bottom"===a?{row:-1,col:1,originY:a}:{row:1,col:-1,originX:a}})}),P("BlockFade",null,"Fade"),P("BlockZoom",null,"Zoom"),P("Shuffle",null,function(a){return function(a){var b=a.ClientRect;a.div;return{opacity:0,tx:(Math.random()>.5?1:-1)*Math.random()*b.width*5,ty:(Math.random()>.5?1:-1)*Math.random()*b.height*5}}},null,{sequence:"together"}),M(function(a){P("Slice",a,"Move",a,function(){return"Top"===a||"Bottom"===a?{row:1,col:-1,overflow:"hidden"}:{row:-1,col:1,overflow:"hidden"}})}),k(["In","Out"],function(a){var b="Out"===a?"MoveOutTo":"MoveInFrom";k(["Hor","Ver"],function(c){if("Hor"===c)var d="j",e=-1,f="Left",g="Right";else var d="i",e=1,f="Top",g="Bottom";Rc.registerAnimationFactory("Slice"+a+c+"Cross",N(function(a){return b+(a.index[d]%2===0?f:g)},"Out"===a,function(){return{row:1*e,col:e*-1,overflow:"hidden"}}))})}),M(function(a){P("Smooth",a,"Extend",a,function(){return"Top"===a||"Bottom"===a?{row:1,col:-1}:{row:-1,col:1}})}),k(["In","Out"],function(a){var b="Out"===a?"ExtendOutTo":"ExtendInFrom";k(["Hor","Ver"],function(c){if("Hor"===c)var d="j",e=-1,f="Left",g="Right";else var d="i",e=1,f="Top",g="Bottom";Rc.registerAnimationFactory("Smooth"+a+c+"Cross",N(function(a){return b+(a.index[d]%2===0?f:g)},"Out"===a,function(){return{row:1*e,col:e*-1}}))})}),M(function(a){P("Stack",a,"Move",a,function(b){return"Top"===a||"Bottom"===a?{row:-1,col:1,originY:b?"Top"===a?"Bottom":"Top":a}:{row:1,col:-1,originX:b?"Left"===a?"Right":"Left":a}})}),k(["In","Out"],function(a){var b="Out"===a?"MoveOutTo":"MoveInFrom";k(["Hor","Ver"],function(c){if("Hor"===c)var d="i",e=1,f="Left",g="Right";else var d="j",e=-1,f="Top",g="Bottom";Rc.registerAnimationFactory("Stack"+a+c+"Cross",N(function(a){return b+(a.index[d]%2===0?f:g)},"Out"===a,function(){return{row:1*e,col:e*-1}}))})}),Q("Circle",null,function(a,b,c,d,e){"undefined"==typeof e&&(e={});var f,g=b.getContext("2d"),h=b.cloneNode(!1),i=h.getContext("2d"),j=jd(a),k=md(a),l=j/2,m=k/2,n=Math.ceil(Math.sqrt(j*j+k*k)),o=e.num||10,p=Math.floor(n/o),q=0,r=.5,s=(1-r)/(o-1),t=n%o,u=2*Math.PI,v=Sc.create(a,c,e);return v.onRender=function(b){b=d?1-b:b;var c=0;for(g.clearRect(0,0,j,k);c=f?b>n?1:(b-f)/r:0,i.clearRect(0,0,j,k),i.save(),i.globalAlpha=q,i.beginPath(),i.arc(l,m,(p*(c+1)+Math.max(0,c-t+1))/2,0,u,!1),i.closePath(),i.clip(),i.drawImage(a,0,0,j,k),g.drawImage(i.canvas,0,0),i.restore(),c++},v}),Q("Scan",null,function(a,b,c,d,e){"undefined"==typeof e&&(e={});var f,g,h=b.getContext("2d"),i=b.cloneNode(!1),j=i.getContext("2d"),k=jd(a),l=md(a),m=k/2,n=l/2,o=Math.ceil(Math.sqrt(k*k+l*l)),p=e.num||10,q=0,r=.5,s=(1-r)/(p-1),t=2*Math.PI/p,u=Sc.create(a,c);return u.onRender=function(b){b=d?1-b:b;var c=0;for(h.clearRect(0,0,k,l);c=f?b>g?1:(b-f)/r:0,j.clearRect(0,0,k,l),j.save(),j.beginPath(),j.moveTo(m,n),j.arc(m,n,o/2,c*t,(c+q)*t,!1),j.lineTo(m,n),j.closePath(),j.clip(),j.drawImage(a,0,0,k,l),h.drawImage(j.canvas,0,0),j.restore(),c++},u}),k(["Ver","Hor"],function(a){Q("Shine",a,function(b,c,d,e,f){"undefined"==typeof f&&(f={});var g=c.getContext("2d"),h=c.cloneNode(!1),i=h.getContext("2d");i.lineWidth=1;for(var j,k=f.shape||a,l=f.num||20,m=0,n=100,o=Math.floor,p=Math.random,q=[],r=jd(b),s=md(b),t="Ver"===k?s:r,u=0;um&&(m=j),jx&&(i.fillStyle="rgba("+z+","+C((a-x)/y)+")",i.fillRect(0,0,r,s));var c,d,f,h,j,m=0;for(u=0;u=d&&(m=(a-d)/(1-d),f=o(c.r*m),h=c.x-f,j=f<<1,i.fillStyle="rgba("+z+","+m/2+")",i.strokeStyle="rgba("+z+","+m+")","Ver"===k?(i.fillRect(0,h,r,j),i.beginPath(),i.moveTo(0,h+.5),i.lineTo(r,h+.5),i.moveTo(0,h+j+.5),i.lineTo(r,h+j+.5),i.stroke(),i.closePath()):(i.fillRect(h,0,j,s),i.beginPath(),i.moveTo(h+.5,0),i.lineTo(h+.5,s),i.moveTo(h+j+.5,0),i.lineTo(h+j+.5,s),i.stroke(),i.closePath()));m=0,A>0&&(g.globalCompositeOperation="lighter",a>=B&&(m=C((a-B)/(1-B))),g.globalAlpha=A*(1-m),g.drawImage(i.canvas,0,0)),i.globalCompositeOperation="source-atop",i.drawImage(b,0,0,r,s),g.globalCompositeOperation="lighter",g.globalAlpha=1,g.drawImage(i.canvas,0,0)},w})}),Rc.registerAnimationFactory("Hide",function(a,b,c){var d=Xc.create(a,.001,c);return a instanceof Ie?d.to("visible",!1):d.to("display","none"),d}),Rc.registerAnimationFactory("Show",function(a,b,c){var d=Xc.create(a,.001,c);return a instanceof Ie?d.to("visible",!0):d.to("display",""),d});var rd=[function(a,b,c){return X(a,c,b)+X(a,"width",b)},function(a,b,c){return X(a,c,b)-X(a,"width",b)},function(a,b,c){return X(a,c,b)+X(a,"height",b)},function(a,b,c){return X(a,c,b)-X(a,"height",b)}];M(function(a,b){var c={rotation:("Right"===a||"Bottom"===a?"+":"-")+"=90"};c[b<2?"tx":"ty"]=rd[b],U("Roll",a,c)}),M(function(a,b){U("Extend",a,{clip:{value:"rect("+("Bottom"===a?"100%":"0px,")+("Left"===a?"0px":"100%,")+("Top"===a?"0px":"100%,")+("Right"===a?"100%":"0px")+")",freeze:!1}})}),U("Extend","Middle",{clip:{value:"rect(50%,50%,50%,50%)",freeze:!1}}),U("Extend","Hor",{clip:{value:"rect(0px,50%,100%,50%)",freeze:!1}}),U("Extend","Ver",{clip:{value:"rect(50%,100%,50%,0px)",freeze:!1}}),U("Fade");var sd=[function(a,b,c){return X(a,c,b)+X(a,"width",b)},function(a,b,c){return X(a,c,b)-X(a,"width",b)},function(a,b,c){return X(a,c,b)+X(a,"height",b)},function(a,b,c){return X(a,c,b)-X(a,"height",b)}],td=function(a,b,c){return 2*X(a,c,b)};M(function(a,b){var c={};c[b<2?"scaleX":"scaleY"]=td,c[b<2?"originX":"originY"]={to:b%2,constant:1,freeze:!1},c[b<2?"tx":"ty"]=sd[b],U("Flex",a,c),c=null}),M(function(a,b){var c={};c[b<2?"tx":"ty"]=sd[b],U("Move",a,c)});var ud=function(a,b){var c=Math.min(X(a,"width",b),X(a,"height",b));return(Math.random()>.5?1:-1)*Math.random()*c},vd=function(){return(Math.random()>.5?"-=":"+=")+360*Math.random()};["RandomRotate","RandomZoom"].forEach(function(a,b){U(a,null,{scaleX:b?0:td,scaleY:b?0:td,rotation:vd,tx:ud,ty:ud})}),U("Scale",null,{scaleX:td,scaleY:td}),["Right","Left"].forEach(function(a,b){U("Skew",a,{originY:{to:.8,constant:1,freeze:!1},scaleY:0,tx:sd[b],skewX:75*(b?1:-1)})});var wd=[function(a,b,c){return X(a,c,b)+90},function(a,b,c){return X(a,c,b)-90}];M(function(a,b){var c={};c[b<2?"originX":"originY"]={to:1-b%2,constant:1,freeze:!1},c[b<2?"rotationY":"rotationX"]=wd[b>0&&b<3?0:1],U("Swing",a,c)}),U("Zoom",null,{scaleX:0,scaleY:0});var xd={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},yd={},zd=function(a){var b=a.indexOf(":"),c=a;b>=0&&(c=a.substr(0,b),a=a.substr(b+1));var d=yd;return d.space=xd[c],d.local=a,d},Ad=function(a,c){var d=zd(a);a=d.local,d.space&&(c=d.space);var e=c?b.createElementNS(c,a):b.createElement(a);return"svg"===a&&(e.setAttribute("xmlns",d.space),e.setAttribute("xmlns:xlink",xd.xlink),e.setAttribute("version","1.1")),e};V("Blur"),V("Gray");var Bd=function(){function a(){}return a.square=function(a,b,c,d,e){for(var f,g=Math.min(a,b,d-a-1,c-b-1),h=0,i=(2*c+2*d-4)*g;h3?a+b:e>2?d-a-1+b:e>1?c-b-1+a:c-b-1+d-a-1},rowcross:function(a,b,c,d){return b%2===0?b*d+a:b*d+(d-a-1)},colcross:function(a,b,c,d){return a%2===0?a*c+b:a*c+(c-b-1)},squarein:function(){return a.square.apply(null,arguments)},squareout:function(){for(var b=[],c=0;c(d+c)/2+(d+c)%2-1?d+c-a-b-2:a+b},middletoedgediagonal:function(a,b,c,d){return Math.floor(Math.abs((d-1+c+(d+c)%2-1)/2-a-b))},rowseparate:function(a,b,c,d){var e=Math.min(c,2);return b%2===0?a%2===0?a*e:(d-a-1)*e+1:a%2===1?a*e:(d-a)*e-1},colseparate:function(a,b,c,d){var e=Math.min(d,2);return a%2===0?b%2===0?b*e:(c-b-1)*e+1:b%2===1?b*e:(c-b)*e-1},diagonalseparate:function(a,b,c,d){var e=(c+d)%2;return a%2===0?b%2===0?a+b:c-b+d-a-3+1+e:b%2===1?a+b:c-b+d-a-3+1+e}},a.sequenceArray=Object.keys(a.sequenceMap),a}(),Cd=function(a){return"undefined"==typeof a&&(a=1),Math.random()*a},Dd=Math.floor,Ed=(Math.floor,Math.round),Fd=(Math.sqrt,Math.sin,Math.cos,Math.tan,Math.atan,function(){return Math.random()>.5?-1:1}),Gd=(Math.PI,Math.abs,Math.min,"color"),Hd="textShadow",Id=function(a,b){return"undefined"==typeof b&&(b=0),Ee.transparentize(Ye(a,"color"),b)};Qc.factory.back=function(a){return a||(a=1.70158),function(b){return 1===b?1:b*b*((a+1)*b-a)}},Qc.eases.easeInBack=Qc.factory.back(),Qc.eases.easeOutBack=g(Qc.eases.easeInBack),Qc.eases.easeInOutBack=h(Qc.eases.easeInBack),Qc.eases.easeInBounce=function(a){return a=1-a,1-(a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375)},Qc.eases.easeOutBounce=g(Qc.eases.easeInBounce),Qc.eases.easeInOutBounce=h(Qc.eases.easeInBounce),Qc.factory.elastic=function(a,b){var c;return arguments.length<2&&(b=.45),arguments.length?c=b/Mc*Math.asin(1/a):(a=1,c=b/4),function(d){return d=1-d,d?1===d?0:-a*Math.pow(2,-10*d)*Math.sin((d-c)*Mc/b):1}},Qc.eases.easeInElastic=Qc.factory.elastic(),Qc.eases.easeOutElastic=g(Qc.eases.easeInElastic),Qc.eases.easeInOutElastic=h(Qc.eases.easeInElastic);var Jd=Qc.factory.steps=function(a,b){null==b&&(b=1);var c=a+"x"+b,d=Jd.cache;if(d[c])return d[c];var e=1/a,f=function(a){return 1===a?b:~~(a/e)*e};return d.length>=10&&(delete d[d[d.length-1]],d.pop()),d[c]=f,d.unshift(c),f};Jd.cache=[],k(Rc._animationFactories,function(a,b){ if(/(.*?)In(.*)$/i.test(b)){var c=RegExp.$1,d=RegExp.$2,e=c+"out",f=/From(.*)$/i.exec(d);if(f){var g=f[1],h="Left"===g?"Right":"Right"===g?"Left":"Top"===g?"Bottom":"Top";e+="To"+h,c+=g+h}else e+=d,c+=d;Rc._animationFactories[e]&&Y(c,b,e)}}),Rc.registerTransitionFactory("None",function(a,b,c,d){b instanceof Ie?b.visible=!1:Ve(b,"display","none");var e=Tc.create();return e.add(Rc.getAnimation(b,"Show",c)),e.add(Rc.getAnimation(a,"Hide",c)),e});var Kd={initialize:function(a,b){Kd._iterate(a,function(a){var c,d,e=Md.get(a,"animationOption");e&&(c=e.animations,d=e.enter,c&&k(c,function(c,e){var f=Rc.animate(a,c.name,c.duration,c,b);f.addEventListener("destroy",function(){a.dispatchSimpleEvent((c.name===d.name?"enter":"leave")+"Complete")},this)}))})},stop:function(a){var b=this;Kd._iterate(a,function(a){b.stopComponent(a)})},stopComponent:function(a){var b=Md.get(a,"timeline");b&&(b.destroy(),Md.set(a,"timeline",null)),b=Md.get(a,"showHideAnimation"),b&&(b.stop(!0,!0),Md.set(a,"showHideAnimation",null))},show:function(a){Kd.showHide(a,!0)},hide:function(a){Kd.showHide(a,!1)},run:function(a,b){var c=Md.get(a,"timeline");c||(c=Tc.create(),Wc.getInstance().add(c),c.addEventListener("end",function(){c.destroy(),Md.set(a,"timeline",null)},null,1/0),Md.set(a,"timeline",c));var d=Md.get(a,"animation");return d&&d.destroy(),d=Rc.animate(a,b.name,b.duration,b),Md.set(a,"animation",d),d.addEventListener("end",function(){this.destroy(),Md.set(a,"animation",null)},d),c.add(d),d},tween:function(a,b,c){var d=Md.get(a,"timeline");d||(d=Tc.create(),Wc.getInstance().add(d),d.addEventListener("end",function(){d.destroy(),Md.set(a,"timeline",null)},null,1/0),Md.set(a,"timeline",d)),d.add(Xc.motion(a,c.duration,b,c))},showHide:function(a,b,c,d){var e=b?"showing":"hiding",f=Md.get(a,e),g=Md.get(a,"showHideAnimation");if(f)g&&d&&d!==g.timeline&&d.add(g);else{g&&(g.stop(!0,!0),Md.set(a,"showHideAnimation",null));var h=a instanceof jf,i=h?!a.audio.paused:a.visible;if(b&&!i||!b&&i){var j=Md.get(a,"animationOption"),k=j?j[b?"enter":"leave"]:null;if(k||b||(k={name:h?"SoundFadeOut":"FadeOut"}),k){!h&&"Show"!==k.name&&"Hide"!==k.name;var g=Rc.animate(a,k.name,null==c?k.duration:c,k,d);g.addEventListener("end",function(){Md.set(a,"showHideAnimation",null),Md.set(a,e,!1)},null,1/0),Md.set(a,"showHideAnimation",g),Md.set(a,e,!0)}else h?b?(a.audio.volume=1,a.audio.replay()):a.audio.pause():a.visible=b}}},leave:function(a){var b=Tc.create();a=a.concat();for(var c=-1,d=a.length;++c=this._sceneData.length)){var b=this._current;a!==b&&(this._current=a,this._preloaded?this._load(a):a>=0&&this._preloadList&&this._preloadList.indexOf(a)<0&&this._preloadList.push(a),Zh.dispatchPropertyChangeEvent(this,"current",b))}},enumerable:!0,configurable:!0}),b.prototype.prev=function(a){"undefined"==typeof a&&(a=1);var b=this.numScenes;return this.current=((this._current-a)%b+b)%b,this},b.prototype.next=function(a){"undefined"==typeof a&&(a=1);var b=this.numScenes;return this.current=((this._current+a)%b+b)%b,this},d(b.prototype,"numScenes",{get:function(){return this._sceneData.length},enumerable:!0,configurable:!0}),b.prototype.start=function(){return this._initialized||(this._current<0&&(this._current=0),this.init()),this},b.prototype.resume=function(){return this.paused&&(this.paused=!1,this._timeline&&this._timeline.resume(),this.dispatchSimpleEvent("resume")),this},b.prototype.pause=function(){return this.paused||(this.paused=!0,this._timeline&&this._timeline.pause(),this.dispatchSimpleEvent("pause")),this},b.prototype.destroy=function(){if(!this._destroyed){if(this._destroyed=!0,this.dispatchSimpleEvent("destroy"),this._initialized){for(var b=this.plugins,c=-1,d=b.length;++c=0&&e.push(d[b]),++b>=d.length)return void a.dispatchSimpleEvent("preloadEnd");var c=d[b];if(c<0||c>=f.length)i();else{var j=a.getScene(c);g.load(a._readLoadableList(j),i,h,j[Ic])}};this.dispatchSimpleEvent("preloadStart",d),i()},b.prototype._load=function(a){var b=this;if(a>=0){var c=this.getScene(a);this.dispatchSimpleEvent("loadStart",a),_h.getInstance().load(this._readLoadableList(c),function(c){c.sceneIndex=a,b.dispatchSimpleEvent("loadEnd",c)},function(c){c.sceneIndex=a,b.dispatchSimpleEvent("loadProgress",c)},c[Ic])}else this.dispatchSimpleEvent("loadEnd",{sceneIndex:-1})},b.prototype._readLoadableList=function(a){for(var b=[],c=a.children.concat();c.length;){var d=c.pop();if(d.loadable&&d.readyState<2&&b.push({target:d,data:Md.get(d,"data")}),d instanceof Le)for(var e=d.children,f=-1,g=e.length;++f=0&&c===b._current&&g===e&&f.reset&&(Kd.initialize(g,b._createTimeline()),b._timerManager.timeline=b._timeline,Nd.initialize(g,b._timerManager))};this._stage.addEventListener("transitionEnd",h,null)}},b}(pc);lc.apps={};var Md={_cache:{},data:function(a){return Md._cache[a[Ic]]||(Md._cache[a[Ic]]={})},set:function(a,b,c){var d=Md.data(a);return d[b]=c,c},get:function(a,b){var d=Md._cache[a[Ic]];return d?d[b]:c},contains:function(a,b){var c=Md._cache[a[Ic]];return null!=c&&c.hasOwnProperty(b)},hasData:function(a){return null!=Md._cache[a[Ic]]},remove:function(a,b){var c,d=Md;if(this.contains(a,b)){var e=d._cache[a[Ic]];c=e[b],delete e[b],dc(e)&&delete d._cache[a[Ic]]}return c},clear:function(a){var b,c=Md,d=a[Ic];return c._cache.hasOwnProperty(d)&&(b=c._cache[d],delete c._cache[d]),b}},Nd={initialize:function(a,b){for(var c=[a],d=b.timeline.duration;c.length;){var e=c.shift(),f=Md.get(e,"timers");if(f)for(var g=-1,h=f.length;++gb.timeline.duration&&(b.timeline.duration=d),c=null}},Od=function(a){function b(){a.call(this),this._timeline=null,this._timers=[]}return oc(b,a),d(b.prototype,"timeline",{get:function(){return this._timeline},set:function(a){this._timeline!==a&&(this.removeTimelineListener(),this._timeline=a,this.addTimelineListener())},enumerable:!0,configurable:!0}),b.prototype.update=function(a){for(var b=this._timeline,c=this._timers,d=b.currentTime,e=-1,f=c.length;++e=g.time))break;g.callback(a)}e>0&&c.splice(0,e),c.length||this.removeTimelineListener()},b.prototype.add=function(a){for(var b=a.time,c=this._timers,d=c.length;--d>=0&&c[d].time>b;);c.splice(d+1,0,a)},b.prototype.addTimelineListener=function(){this._timeline&&this._timeline.addEventListener("update",this.update,this)},b.prototype.removeTimelineListener=function(){this._timeline&&this._timeline.removeEventListener("update",this.update,this)},b.prototype.clear=function(){this._timers.length=0,this.removeTimelineListener()},b.prototype.destroy=function(){this.clear(),this._timers=null},b}(nc),Pd={construct:function(a,b){a.transitionConfig=b.transition,b.defaultProps.visible=!1,null==b.reset&&(b.reset=!0),Pd._setProperties(a,b),Pd._setAnimations(a,b),Pd._setEvents(a,b),Pd._construct(b.children,a)},_construct:function(a,b){for(var c=-1,d=a.length;++cp||s>q)&&(r/s>p/q?(r=p,s=r*k/j):(s=q,r=s*j/k),r0&&(d=0),ei-j&&(e=i-j),d.scrollTo(e/(i-j)*(c-a))},fh(b,"mousemove",d.doc_move_y),d.unbind_up_y(),d.doc_up_y=function(a){a.preventDefault(),d.unbind_move_y()},fh(b,"mouseup",d.doc_up_y)},fh(h,"mousedown",this.bar_mousedown),this.scrollTo(-Ye(this.content,"ty"))},e.prototype.mousewheel=function(a,b){var c=this,d=this.container;this.onwheel=function(d){d.preventDefault();var e=c._scrollTop+50*(d.wheelDeltaY<0?1:-1);e<0&&(e=0),e>b-a&&(e=b-a),c.scrollTo(e)},fh(d,"mousewheel",this.onwheel)},e}(pc),_d=function(a,b){var c,d,e,g,h,i,j,k,l,m=150,n=100,o=300,p=b||function(a){};fh(a,"tapstart",k=function(a){a.preventDefault();var b;b=a.originalEvent.changedTouches?a.originalEvent.changedTouches[0]:a.originalEvent,c="none",d=b.pageX,e=b.pageY,j=(new Date).getTime()}),fh(a,"tapmove",_d.move),fh(a,"tapend",l=function(a){a.preventDefault();var b;b=a.originalEvent.changedTouches?a.originalEvent.changedTouches[0]:a.originalEvent,g=b.pageX-d,h=b.pageY-e,i=(new Date).getTime()-j,i<=o&&(Math.abs(g)>=m&&Math.abs(h)<=n?c=g<0?"left":"right":Math.abs(h)>=m&&Math.abs(g)<=n&&(c=h<0?"up":"down")),p(c)});var q=a.id;q||(q=a.id=f());var r=ae[q];r||(r={start:[],end:[]}),r.start.push(k),r.end.push(l)};_d.move=function(a){a.preventDefault()};var ae={},be=function(){function d(){this.width=700,this.height=350,this.resizeOption={minW:700,minH:350},this.imageWidth=25,this.imageHeight=25,this.hided=!0,this.originWidth=332,this.originHeight=340,this.container=this.createNode()}return d.prototype.createNode=function(){var a=this,b="msg-",c=vi("div").attr("id","leo-lightbox--msg"),d=this.lc=c.el("div").attr("id",b+"left").addClass(b+"part"),e=this.rc=c.el("div").attr("id",b+"right").addClass(b+"part"),f=this.tw=e.el("div").attr("id",b+"content"),g=(this.title=f.el("div").attr("id",b+"title"),this.bc=f.el("div").attr("id",b+"body-container")),h=(this.body=g.el("div").attr("id",b+"body").addClass("leo-scroll-content"),this.gallery=d.el("div").attr("id",b+"gallery")),i=(this.gi=h.el("img"),this.tc=d.el("div").attr("id",b+"thumbnail")),j=(this.thumbnail=i.el("div").addClass(b+"thumbnail-wrap"),this.origin=e.el("div").attr("id",b+"origin")),k=(this.oi=j.el("img"),this.mark=h.el("div").attr("id",b+"mark")),l=(this.mi=k.el("img"),this.mc=k.el("div"),this.gc=h.el("div").attr("id",b+"gallery-cover"),this.prevButton=vi("div").addClass("msg-prev msg-button"));l.bind("tap",function(){a.prev()}).el("div"),d.insert(l,i);var m=this.nextButton=d.el("div").addClass("msg-next msg-button");return m.bind("tap",function(){a.next()}).el("div"),c},d.prototype.lighten=function(a,b){var c=Ee.parse(a);return"rgba("+(c[0]+b)+","+(c[1]+b)+","+(c[2]+b)+","+c[3]+")"},d.prototype.config=function(d){function e(a){return function(b){b.preventDefault(),a()}}var f,g,h,i,j=this,k=d.params,l=12,m=44,n=0,o=this.origin,p=(this.mark,this.gc),q=270,r=___lightbox,s=k.animations,t="out"===s[0].showType.toLowerCase;this.index=c,this.inEffect=s[t?1:0].animation,this.outEffect=s[t?0:1].animation;var u=this.container,v=k.style;u.style({backgroundColor:v.backgroundColor,opacity:v.opacity,backgroundImage:Ub(v.gradient.angle+"deg",[v.gradient.from,v.gradient.to])});var w=this.body,x=k.body;w.style({fontFamily:x.fontFamily,color:x.color}),w.html(x.content);var y=this.title,z=k.title;y.style({color:z.color,fontFamily:z.fontFamily}),y.text(z.content);var v={opacity:0,display:"block"};r.node.style(v),r.stage.style(v),u.style(v),0===u.parent().length&&b.body.appendChild(u[0]);var A=k.more,B=this.tw,C="msg-",D=this.lighten;if(B.select("#"+C+"learn-more").remove(),"true"===A.type){var E=A.backgroundColor,F=A.color,G=B.el("div").attr("id",C+"learn-more").style({fontFamily:A.fontFamily,borderColor:D(E,-20),borderTopColor:D(E,-40)}).text(A.content),H={backgroundColor:D(E,25),color:D(F,-50),backgroundImage:Ub("10deg",[D(E,80),E])};G.style(H),G.bind({tapstart:e(function(){G.style({backgroundColor:D(E,25)})}),tap:e(function(){var b=A.link;""!==b.trim()&&(b.indexOf("://")<0&&(b="http://"+k.more.link),a.open(b))}),tapend:e(function(){G.style(H)}),mouseout:e(function(){G.style(H)}),mouseover:e(function(){ G.style({color:F,backgroundColor:E,backgroundImage:Ub("10deg",[D(E,50),D(E,-20)])})})})}var I=this.tc,J=this.gi,K=this.gallery,L=this.srcs=k.image.content.split(";"),M=L.length;J[0].style.width="",J[0].style.height="",fb(this.prevButton[0]),fb(this.nextButton[0]),B[0].style.textAlign="",eb(this.lc[0]);var N=this.rc[0].style;if(N.left="",N.width="",N.height="",N.marginLeft="",w[0].style.width="","true"===A.type&&(G[0].style.marginLeft=""),1===M)if(""===L[0])B.style("text-align","center"),fb(this.lc[0]),this.rc.style({width:636,height:350,margin:"0px 32px"}),jd(w[0],632),"true"===A.type&&G.style("margin","20px auto");else{fb(I[0]),md(K[0],318),fb(this.prevButton[0]),fb(this.nextButton[0]),K.addClass("leo-loading");var O=new Image;O.onload=O.onerror=function(){O.onload=O.onerror=null,K.removeClass("leo-loading");var a=jd(J[0]),b=md(J[0]),c=jd(K[0]),d=md(K[0]);J.style({left:Y((c-a)/2),top:Math.floor((d-b)/2),opacity:1}),p.style({width:a,height:b,left:Y((c-a)/2),top:Math.floor((d-b)/2)})},O.src=J[0].src=L[0]}else{eb(I[0]),md(K[0],250),md(J[0],250);var P=this.thumbnail;P.text("");var Q=function(a){return function(b){b.preventDefault(),j.skipTo(a)}},R=function(a){return function(){var b=this;b.onload=b.onerror=null;var c,d;b.width>b.height?(d=40,c=Y(b.width/b.height*d)):(c=40,d=Y(b.height/b.width*c));var e=Y((40-c)/2),f=Y((40-d)/2);Ye(b,{width:c,height:d,marginLeft:e,marginTop:f}),a.append(b)}},S=vi("div"),T=this.liArray=[],U=vi("img");for(f=0;g=L[f];f++)g&&(S=S.clone(),S.bind("tap",Q(f)),U=U.clone(),U.bind("load",R(S)),U.bind("error",R(S)),U.attr("src",L[f]),P.append(S),T.push(S));for(this.nowIndex=[],jd(P[0],M*(m+l)),M*(m+l)-l-2>q?(I.style("cursor","all-scroll"),I[0].style.marginLeft="",P[0].style.marginLeft="",eb(this.prevButton[0]),eb(this.nextButton[0]),h=Math.floor((q+l)/(m+l)),I.bind("mousedown",function(a){a.preventDefault(),P.style("transition","none");var c,d=a.pageX;parseFloat(P.style("marginLeft"));n=0,j.doc_mousemove&&ih(b,"mousemove",j.doc_mousemove),j.doc_mousemove=function(a){a.preventDefault();var b=event.x,e=parseFloat(P.style("marginLeft"));for(i=n=e+b-d,n>2&&(b>d&&(n=e+.5),i=2),nM-h&&(c=M-h),c<0&&(c=0),j.nowIndex=[],f=0;f2&&P.style("marginLeft","2px"),nE?(n=G,h.style("marginLeft",(C-E)/2)):h.style("marginLeft",""),D>F?(o=H,h.style("marginTop",(D-F)/2)):h.style("marginTop",""),t=z+G-n-2,u=A+H-o-2,r=y+n/2,s=x+o/2,p=B(a.pageX-r),q=B(a.pageY-s),pt&&(p=t),qu&&(q=u),j.width=n+"px",j.height=o+"px",j.left=p+"px",j.top=q+"px",k.left=B(z-p)+"px",k.top=B(A-q)+"px",l.left=B((z-p)*I)+"px",l.top=B((A-q)*J)+"px",c.doc_mousemove&&ih(b,"mousemove",c.doc_mousemove),c.doc_mousemove=function(a){a.preventDefault();var d=a.target;p=B(a.pageX-r),q=B(a.pageY-s),pt&&(p=t),qu&&(q=u),p!==v&&(j.left=p+"px",k.left=B(z-p)+"px",l.left=B((z-p)*I)+"px",v=p),q!==w&&(j.top=q+"px",k.top=B(A-q)+"px",l.top=B((A-q)*J)+"px",w=q),d!==c.mc[0]&&d!==c.gc[0]&&(c.doc_mousemove&&ih(b,"mousemove",c.doc_mousemove),fb(f[0]),fb(e[0]),i.style("opacity",0))},fh(b,"mousemove",c.doc_mousemove)},m.src=d[0].src,eb(f[0]),eb(e[0]),i.style("opacity",.5)},d.prototype.hide=function(){this.gi[0].src="",this.doc_mousemove&&ih(b,"mousemove",this.doc_mousemove)},d.prototype.skipTo=function(a){var b,d,e,f=this,g=this.srcs,h=Math.ceil,i=this.liArray,j=this.gi,k=this.thumbnail,l=this.srcs.length,m=this.gallery,n=270,o=this.gc,p=44,q=12;this.mark;if(a!==c&&!isNaN(a)&&(a<0&&(a=0),a>l-1&&(a=l-1),a!==this.index)){if(e=this.gi=j.clone(),e.style({width:"auto",height:"auto",display:"none"}),e[0].src=g[a],m.prepend(e),Ye(i[this.index||0][0],"outline",""),i[a].style("outline","2px solid #317ee7"),this.nowIndex.indexOf(a)<0&&(a>this.index?(d=a===l-1?n-(a+1)*(p+q)+13:n-(a+1)*(p+q)-13,this.nowIndex.splice(0,1),this.nowIndex.push(a)):(d=0===a?2:-a*(p+q)+26,this.nowIndex.pop(),this.nowIndex.splice(0,0,a)),k.style("margin-left",d)),j[0].src){var r=Rc.animate(j[0],"FadeOut",500);r.addEventListener("end",function(){j.remove()},this)}else j.remove();clearTimeout(this.glt),this.glt=setTimeout(function(){m.addClass("leo-loading")},200),b=this.image=new Image,b.onload=b.onerror=function(){b.onload=b.onerror=null,clearTimeout(f.glt);var a=jd(e[0]),c=md(e[0]);m.removeClass("leo-loading"),eb(j[0]),e.style({width:a,height:c,left:h((jd(m[0])-a)/2),top:Math.floor((md(m[0])-c)/2)}),o.style({width:a,height:c,left:h((jd(m[0])-a)/2),top:Math.floor((md(m[0])-c)/2)}),e.style({opacity:1}),f.showAnimate&&f.showAnimate.destroy(),f.showAnimate=Rc.animate(e[0],"FadeIn",500)},b.src=g[a],this.index=a}},d.prototype.next=function(){this.skipTo(this.index+1)},d.prototype.prev=function(){this.skipTo(this.index-1)},d}();Rd["message-box"]=function(a){var b=a.params,c=b.title,d=b.body;a.hint="Show more details",c.content=c.content.replace(/\/\^r\$\//g,"
"),d.content=d.content.replace(/\/\^r\$\//g,"
");var e=b.style;e.backgroundColor=Ee.parseToString(e.backgroundColor);var f=e.gradient,g=Ee.parse(f.from);g[3]=parseFloat(e.opacity),g=Ee.parseToString(g);var h=Ee.parse(f.to);h[3]=parseFloat(e.opacity),h=Ee.parseToString(h),e.gradient={angle:f.angle,from:g,to:h};var c=b.title;c.color=Ee.parseToString(c.color);var d=b.body;d.color=Ee.parseToString(d.color);var i=b.more;return i.color=Ee.parseToString(i.color),i.backgroundColor=Ee.parseToString(i.backgroundColor),wf?ka:ja};var ce,de,ee=function(){function d(){this.width=700,this.height=350,this.resizeOption={minW:700,minH:350},this.imageWidth=25,this.imageHeight=25,this.hided=!0,this.originWidth=332,this.originHeight=340,this.container=this.createNode()}return d.prototype.createNode=function(){var b=this,c="paypal-",d=vi("div").attr("id","leo-lightbox--paypal"),e=this.lc=d.el("div").addClass(c+"part "+c+"left"),f=this.rc=d.el("div").addClass(c+"part "+c+"right"),g=this.gallery=e.el("div").addClass(c+"gallery"),h=(this.gi=g.el("img"),this.tc=e.el("div").addClass(c+"thumbnail")),i=(this.thumbnail=h.el("div"),this.origin=f.el("div").addClass(c+"origin")),j=(this.oi=i.el("img"),this.gc=g.el("div").addClass(c+"gallery-cover"),this.mark=g.el("div").addClass(c+"mark")),k=(this.mi=j.el("img"),this.mc=j.el("div"),this.tw=f.el("div").addClass(c+"content")),l=(this.productName=k.el("span").addClass(c+"title"),k.el("p").addClass(c+"price-wrap").text("Pirce: "));this.productPrice=l.el("span");k.el("p").addClass(c+"in-stock").text("In stock.");var m=this.bc=k.el("div").addClass(c+"body-container");this.body=m.el("div").addClass(c+"body").addClass("leo-scroll-content"),k.el("label").text("Quantity:").attr("for",c+"quantity"),this.input=k.el("input").attr({type:"text",value:1,id:c+"quantity"}),this.span=k.el("span").attr("class",c+"msg").text("Not enough in stock.");k.el("br");var n=(this.shippingCost=k.el("span").addClass(c+"shipping-cost"),this.button=k.el("div").addClass(c+"buy"),k.el("div").addClass(c+"share")),o=["Facebook","Twitter","Google","More","Contact seller"],p=["https://www.facebook.com/sharer/sharer.php?u=","https://www.twitter.com/share?url=","https://plus.google.com/share?url=","http://www.addthis.com/bookmark.php?v=15&winname=addthis&s=more&url="];["fb","tw","gg","other","email"].forEach(function(d,e){var f=n.el("div").addClass(c+d).attr({title:o[e],"data-index":e}).bind("tap",function(){"4"!==this.getAttribute("data-index")&&a.open(p[this.getAttribute("data-index")]+a.location.href)});4===e&&(b.mail=f)});var q=this.prevButton=vi("div").addClass("paypal-prev paypal-button");q.style("marginLeft","-2px"),q.bind("tap",function(){b.prev()}).el("div"),e.insert(q,h);var r=this.nextButton=e.el("div").addClass("paypal-next paypal-button");return r.style("marginLeft","2px"),r.bind("tap",function(){b.next()}).el("div"),d},d.prototype.lighten=function(a,b){var c=Ee.parse(a);return"rgba("+(c[0]+b)+","+(c[1]+b)+","+(c[2]+b)+","+c[0]+")"},d.prototype.config=function(d){var e=this,f=d.params;this.mail.unbindAll("tap").bind("tap",function(){a.open("mailto:"+f.clientEmail+"?subject="+f.productName,"emailWindow")});var g;"$"===f.currency?g="USD":"£"===f.currency?g="GBP":"€"===f.currency?g="EUR":"CHF"===f.currency&&(g="CHF"),this.productName.text(f.productName),this.productPrice.text(f.currency+f.price),this.shippingCost.html("Shipping cost "+("included"===f.shippingCost.toLowerCase()?"included.":"not included.")+"
Delivery time: "+f.deliveryTime+(parseFloat(f.deliveryTime)<=1?" day":" days")+".
");var h=this.input,i=this.span;h.unbindAll("keyup"),h.bind("keyup",function(){var a=+this.value;a||0===a?a>parseInt(f.quantity,10)?(h.style("border-color","red"),i.text("Not enough in stock."),eb(i[0])):(fb(i[0]),h.style("border-color","rgb(177,177,177)")):(h.style("border-color","red"),i.text("Not a number."),eb(i[0]))}),this.button.unbindAll("tap").bind("tap",function(){var b=+h.val();(b||0===b)&&b<=parseInt(f.quantity,10)&&a.open("http://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business="+f.clientEmail+"&item_name="+f.productName+"&amount="+f.price+"¤cy_code="+g+"&quantity="+b+"¬ify_url="+a.location.href)});var j,k,l,m,n=12,o=44,p=0,q=(this.origin,this.mark,this.gc),r=270;this.index=c;var s=this.container;this.body.html(f.productDescription);var t=___lightbox,u={opacity:0,display:"block"};t.node.style(u),t.stage.style(u),s.style(u),0===s.parent().length&&b.body.appendChild(s[0]);var v=(f.more,this.tw);this.lighten;v.style({marginTop:(350-md(v[0]))/2+5});var w,x=this.tc,y=this.thumbnail,z=this.gi,A=this.gallery,B=this.srcs=f.imageURL.split(";"),C=B.length,D=Math.ceil;if(fb(this.prevButton[0]),fb(this.nextButton[0]),z[0].style.width="",z[0].style.height="",1===C||0===C)w=new Image,fb(x[0]),md(A[0],318),z.style("maxHeight",318),A.prepend(z),A.addClass("leo-loading"),w.onload=w.onerror=function(){w.onload=w.onerror=null;var a=jd(z[0]),b=md(z[0]);A.removeClass("leo-loading"),z.style({left:D((jd(A[0])-a)/2),top:Math.floor((md(A[0])-b)/2),display:"block"}),q.style({width:a,height:b,left:D((jd(A[0])-a)/2),top:Math.floor((md(A[0])-b)/2)})},w.src=z[0].src=B[0];else{md(A[0],""),z.style("maxHeight",250),eb(A[0]),eb(x[0]);var E,F,G=function(a){return function(b){b.preventDefault(),e.skipTo(a)}},H=[],I=this.liArray=[];for(y.text(""),j=0;k=B[j];j++)k&&""!==k&&(E=Ad("div"),E.className="paypal-thumbnail-li",F=Ad("img"),F.className="paypal-thumbnail-img",F.style.opacity="0",F.src=k,E.appendChild(F),y.append(E),H.push(F),I.push(E),fh(E,"tap",G(j)));for(this.nowIndex=[],jd(y[0],C*(o+n)),C*(o+n)-n-2>r?(x.style("cursor","all-scroll"),x[0].style.marginLeft="",y[0].style.marginLeft="",eb(this.prevButton[0]),eb(this.nextButton[0]),l=Math.floor((r+n)/(o+n)),x.bind("tapstart",function(a){a.preventDefault(),y.style("transition","none");var c,d=a.pageX;parseFloat(y.style("marginLeft"));p=0,e.doc_mousemove&&ih(b,"tapmove",e.doc_mousemove),e.doc_mousemove=function(a){a.preventDefault();var b=event.x,f=parseFloat(y.style("marginLeft"));for(m=p=f+b-d,p>2&&(b>d&&(p=f+.5),m=2),pC-l&&(c=C-l),c<0&&(c=0),e.nowIndex=[],j=0;j2&&y.style("marginLeft","2px"),pc.height?Ye(a,{maxWidth:"auto",maxHeight:"40px"}):Ye(a,{maxWidth:"40px",maxHeight:"auto"}),Ye(a,{left:D((40-jd(a))/2),top:D((40-md(a))/2)})},c.src=a.src})}this.bc;this.scroll&&this.scroll.destroy(),this.scroll=new $d(this.bc[0],{y:{container:"paypal-scroll-bar"}}),u={display:"none",opacity:""},s.style(u),t.node.style(u),t.stage.style(u);var J="touchstart"in b,K=function(a){a.preventDefault(),e.hided&&(e.hided=!1,e.hd(a)),J&&(e.doc_mouseup&&ih(b,"touchend",e.doc_mouseup),e.doc_mouseup=function(){e.doc_mousemove&&ih(b,"mousemove",e.doc_mousemove),e.hided||(e.hided=!0,eb(e.origin[0]),eb(e.mark[0]),e.gc.style("opacity",.5))},fh(b,"touchend",e.doc_mouseup)),e.doc_mousemove&&ih(b,"mousemove",e.doc_mousemove),e.doc_mousemove=function(a){a.target!==e.gc[0]&&a.target!==e.mc[0]||e.hd(a)},fh(b,"mousemove",e.doc_mousemove)};return this.gc.unbindAll("mouseover").unbindAll("touchstart"),this.gc.bind("mouseover",K),J&&this.gc.bind("touchstart",K),this},d.prototype.hd=function(a){var c=this,d=this.gi,e=this.mark,f=this.origin,g=this.mi,h=this.oi,i=this.gc,j=e[0].style,k=g[0].style,l=h[0].style;f.addClass("leo-loading"),g[0].src=d[0].src,h[0].src=d[0].src;var m=new Image;m.onload=m.onerror=function(){m.onload=m.onerror=null,f.removeClass("leo-loading");var n,o,p,q,r,s,t,u,v,w,x=vh(c.gallery[0]).top,y=vh(c.gallery[0]).left,z=parseFloat(c.gi.style("left")),A=parseFloat(c.gi.style("top")),B=Math.floor,C=c.originWidth,D=c.originHeight,E=m.width||25,F=m.height||25,G=jd(d[0]),H=md(d[0]),I=E/G,J=F/H;jd(h[0],E),md(h[0],F),jd(g[0],G),md(g[0],H),jd(d[0],G),md(d[0],H),n=B(C/E*G),o=B(D/F*H),C>E?(n=G,h.style("left",(C-E)/2)):h.style("left",""),D>F?(o=H,h.style("top",(D-F)/2)):h.style("top",""),t=z+G-n-2,u=A+H-o-2,r=y+n/2,s=x+o/2,p=B(a.pageX-r),q=B(a.pageY-s),pt&&(p=t),qu&&(q=u),j.width=n+"px",j.height=o+"px",j.left=p+"px",j.top=q+"px",k.left=B(z-p)+"px",k.top=B(A-q)+"px",l.left=B((z-p)*I)+"px",l.top=B((A-q)*J)+"px",c.doc_mousemove&&ih(b,"mousemove",c.doc_mousemove),c.doc_mousemove=function(a){a.preventDefault();var d=a.target;p=B(a.pageX-r),q=B(a.pageY-s),pt&&(p=t),qu&&(q=u),p!==v&&(j.left=p+"px",k.left=B(z-p)+"px",l.left=B((z-p)*I)+"px",v=p),q!==w&&(j.top=q+"px",k.top=B(A-q)+"px",l.top=B((A-q)*J)+"px",w=q),d!==c.mc[0]&&d!==c.mi[0]&&d!==c.gc[0]&&(c.doc_mousemove&&ih(b,"mousemove",c.doc_mousemove),fb(f[0]),fb(e[0]),i.style("opacity",0))},fh(b,"mousemove",c.doc_mousemove)},m.src=d[0].src,eb(f[0]),eb(e[0]),i.style("opacity",.5)},d.prototype.hide=function(){this.doc_mousemove&&ih(b,"mousemove",this.doc_mousemove)},d.prototype.skipTo=function(a){var b,d,e,f=this,g=this.srcs,h=Math.ceil,i=this.liArray,j=this.gi,k=this.thumbnail,l=this.srcs.length,m=this.gallery,n=270,o=this.gc,p=44,q=12;this.mark;if(a!==c&&!isNaN(a)&&(a<0&&(a=0),a>l-1&&(a=l-1),a!==this.index)){if(e=this.gi=j.clone(),e.style({width:"auto",height:"auto",display:"none"}),e[0].src=g[a],m.prepend(e),Ye(i[this.index||0],"outline",""),Ye(i[a],"outline","2px solid #317ee7"),this.nowIndex.indexOf(a)<0&&(a>this.index?(d=a===l-1?n-(a+1)*(p+q)+13:n-(a+1)*(p+q)-13,this.nowIndex.splice(0,1),this.nowIndex.push(a)):(d=0===a?2:-a*(p+q)+26,this.nowIndex.pop(),this.nowIndex.splice(0,0,a)),k.style("margin-left",d)),j[0].src){var r=Rc.animate(j[0],"FadeOut",500);r.addEventListener("end",function(){j.remove()},this)}else j.remove();clearTimeout(this.glt),this.glt=setTimeout(function(){m.addClass("leo-loading")},200),b=this.image=new Image,b.onload=b.onerror=function(){b.onload=b.onerror=null,clearTimeout(f.glt);var a=jd(e[0]),c=md(e[0]);m.removeClass("leo-loading"),eb(j[0]),e.style({width:a,height:c,left:h((jd(m[0])-a)/2),top:Math.floor((md(m[0])-c)/2)}),o.style({width:a,height:c,left:h((jd(m[0])-a)/2),top:Math.floor((md(m[0])-c)/2)}),e.style({opacity:1}),f.showAnimate&&f.showAnimate.destroy(),f.showAnimate=Rc.animate(e[0],"FadeIn",500)},b.src=g[a],this.index=a}},d.prototype.next=function(){this.skipTo(this.index+1)},d.prototype.prev=function(){this.skipTo(this.index-1)},d}();Rd["paypal-box"]=function(a){return a.hint="PayPal payment",a.params.productDescription=a.params.productDescription.replace(/\/\^r\$\//g,"
"),wf?ma:la};var fe,ge,he=function(c){function e(){var d=this;c.call(this),this.hided=!0,this.animations=[];var f=Ad("div");f.className="leo-phone-msg-box-bg",f.innerHTML=e.html,this.lightbox=f;var g=this.node=f.childNodes[0],h=this.slideContainer=g.querySelector(".leo-phone-msg-box--slide"),i=this.slide=new Sg;i.addEventListener("skip",function(a){this.node.querySelector(".slide--index span").innerHTML=a.data.index},this),i.borderWidth=0,i.taponly=!0,i.dom.style.display="block",fh(g.querySelector(".menu--return-btn"),"tap",function(){d.hide()}),fh(f,"tap",function(){d.hide()}),fh(g.querySelector(".menu--more-btn"),"tap",function(){d.link&&a.open(d.link)}),fh(a,"resize",function(){d.hided||d.resize()});var j=this.audio=new hi;fh(g.querySelector(".slide--replay"),"tap",function(){d.audio.replay()});var k=g.querySelectorAll(".slide--btn")[1];fh(k,"tap",function(){d.audio.playPause()}),j.addEventListener("play",function(){ui(k).removeClass("slide--muted").addClass("slide--unmuted")},this),j.addEventListener("pause",function(){ui(k).removeClass("slide--unmuted").addClass("slide--muted")},this),h.appendChild(i.dom),b.body.appendChild(f),b.body.appendChild(g)}return oc(e,c),e.prototype.config=function(a,b){var c=a.params;this.urls=c.image.content,this.title=c.title,this.body=c.body,this.button=c.more,this.background=c.style;var d=this.node;""===a.audio.url?(this.hasAudio=!1,d.querySelector(".slide--replay").style.display="none",d.querySelectorAll(".slide--btn")[1].style.display="none"):(this.hasAudio=!0,this.audio.src=a.audio.url,this.audio.volume=a.audio.volume,this.audio.load(),d.querySelector(".slide--replay").style.display="block",d.querySelectorAll(".slide--btn")[1].style.display="block");var e=c.animations,f="out"===e[0].showType.toLowerCase;this.inAnimation=e[f?1:0].animation,this.outAnimation=e[f?0:1].animation},e.prototype.resize=function(){var a=this.lightbox.offsetWidth,b=this.lightbox.offsetHeight,c=a-50;c=c>280?280:c;var d=b-40;d=d>500?500:d,Ye(this.node,{width:c,height:d});var e=this.slideContainer,f=c-20,g=f;Ye(e,{width:f,height:g}),this.slide.width=f,this.slide.height=g,this.node.querySelector(".leo-phone-msg-box--scroll").style.height=d-40+"px"},e.prototype.show=function(){this.hided=!1,this.destroyAnimations(),this.animations.push(Rc.animate(this.lightbox,"FadeIn",300,{easing:"linear"})),this.animations.push(Rc.animate(this.node,this.inAnimation,300,{easing:"easeOutBack"})),this.lightbox.style.display="block",this.resize(),this.hasAudio&&this.audio.replay()},e.prototype.hide=function(){this.destroyAnimations(),this.animations.push(Rc.animate(this.lightbox,"FadeOut",300,{easing:"linear"})),this.animations.push(Rc.animate(this.node,this.outAnimation,300,{easing:"easeOutQuad"})),this.hided=!0,this.audio.pause()},e.prototype.destroyAnimations=function(){var a,b=0,c=this.animations;for(c.length;b
CloseMore
1/6


',e}(nc),ie=function(b){function c(){var c=this;b.call(this);var d="paypal-",e=this.node.querySelector(".leo-phone-msg-box--content"),f=ui(e).html(""),g=(this.productName=f.el("span").addClass(d+"title"),f.el("p").addClass(d+"price-wrap").text("Pirce:"));this.productPrice=g.el("span");f.el("p").addClass(d+"in-stock").text("In stock.");var h=(this.productDescription=f.el("div").addClass(d+"body"),f.el("label").text("Quantity:").attr("for",d+"quantity"),this.input=f.el("input").attr({type:"text",value:1,id:d+"quantity"}).bind("keyup",function(){var a=+h.val();a||0===a?a>parseInt(c.params.quantity,10)?(h.style("border-color","red"),i.text("Not enough in stock."),eb(i[0])):(fb(i[0]),h.style("border-color","rgb(177,177,177)")):(h.style("border-color","red"),i.text("Not a number."),eb(i[0]))})),i=this.span=f.el("span").attr("class",d+"msg").text("Not enough in stock.");f.el("br");var j=(this.shippingCost=f.el("span").addClass(d+"shipping-cost"),f.el("div").addClass(d+"share")),k=["Facebook","Twitter","Google","More","Contact seller"],l=["https://www.facebook.com/sharer/sharer.php?u=","https://www.twitter.com/share?url=","https://plus.google.com/share?url=","http://www.addthis.com/bookmark.php?v=15&winname=addthis&s=more&url="];["fb","tw","gg","other","email"].forEach(function(b,e){var f=j.el("div").addClass(d+b).attr({title:k[e],"data-index":e});4===e?f.bind("tap",function(){a.open("mailto:"+c.params.clientEmail+"?subject="+c.params.productName,"emailWindow")}):f.bind("tap",function(){a.open(l[this.getAttribute("data-index")]+a.location.href)})})}return oc(c,b),c.prototype.config=function(a){var b=this.params=a.params;this.urls=b.imageURL,this.button={content:"Buy",fontFamily:"",link:""},this.background={gradient:{angle:0,from:"#fff",to:"#fff"}},this.productPrice.text(b.currency+b.price),this.productName.html(b.productName),this.productDescription.html(b.productDescription),this.shippingCost.html("Shipping cost "+("included"===b.shippingCost.toLowerCase()?"included.":"not included.")+"
Delivery time: "+b.deliveryTime+(parseFloat(b.deliveryTime)<=1?" day":" days")+".
");var c=this.node;""===a.audio.url?(this.hasAudio=!1,c.querySelector(".slide--replay").style.display="none",c.querySelectorAll(".slide--btn")[1].style.display="none"):(this.hasAudio=!0,this.audio.src=a.audio.url,this.audio.volume=a.audio.volume,this.audio.load(),c.querySelector(".slide--replay").style.display="block",c.querySelectorAll(".slide--btn")[1].style.display="block"),this.inAnimation="MoveInFromRight",this.outAnimation="ExtendOutToLeft"},d(c.prototype,"link",{get:function(){var b,c=this.params,d=+this.input.val();return"$"===c.currency?b="USD":"£"===c.currency?b="GBP":"€"===c.currency?b="EUR":"CHF"===c.currency&&(b="CHF"),"http://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business="+c.clientEmail+"&item_name="+c.productName+"&amount="+c.price+"¤cy_code="+b+"&quantity="+d+"¬ify_url="+a.location.href},enumerable:!0,configurable:!0}),c}(he),je=function(){function a(){this.width=308,this.height=120,this.resizeOption={minW:308,minH:120},this.audio=new hi,this.audio.addEventListener("ended",function(){this.audio.pause(),this.audio.currentTime=0},this),wf?(this.width=this.resizeOption.minW=98,this.height=this.resizeOption.minH=98,this.player=new Sd(this.audio)):(this.width=this.resizeOption.minW=308,this.height=this.resizeOption.minH=120,this.player=new Td(this.audio)),this.container=this.player.node}return a.prototype.config=function(a){var b=this.audio,c=a.audio;if(c){var d=c.volume;(d||0===d)&&(b.volume=d)}var e=a.content;return b.src=e,b.play(),this},a.prototype.hide=function(){this.audio.pause()},a}();Rd["audio-box"]=function(a){var b=a.params;return b&&1!=b.popUp?(a.hint="Play background music",na):(a.hint="Play music",oa)};var ke,le=function(){function a(){this.width=800,this.height=450,this.__leo_guid__=f(),this.container=this.createNode()}return a.prototype.createNode=function(){var a=vi("div");return a},a.prototype.config=function(a){var b=this;this.action=a;var c=a.content,d=a.params,e=d.autoplay||d.autoPlay,f=d.target.toLowerCase(),g=this.container,h=this.iframe,i="leo-lightbox--video leo-lightbox--";if("html5"===f){i+="html5video",h&&h.remove();var j=this.video=g.el("video").attr({controls:!0,preload:"metadata",name:"media"});j.bind("canplay",function(){b.onload(!0)}),j.bind("error",function(){b.onload(!1)});var k=j.attr("src");k!==c&&j.attr("src",c),e&&j[0].play()}else h?g.append(h):(h=g.el("iframe").attr({webkitallowfullscreen:!0,mozallowfullscreen:!0,oallowfullscreen:!0,allowfullscreen:!0,allowtransparency:!0,frameborder:"0"}),this.iframe=h),"youtube"===f&&(i+="youtube",c="https://www.youtube.com/embed/"+c+"?autoplay="+(e?1:0)+"&wmode=transparent"),"vimeo"===f&&(i+="vimeo",c="http://player.vimeo.com/video/"+c+"?autoplay="+(e?1:0)+"&wmode=transparent&portrait=0"),h.attr("src",c);return g[0].className=i,this},a.prototype.onload=function(a){var b=this.video[0],c=this.action.params,d=c.autoplay||c.autoPlay,e=c.customSize&&a;this.width=(e?c.customWidth:b.videoWidth)||800,this.height=(e?c.customHeight:b.videoHeight)||450,___lightbox.resize(!0,function(){d&&b.play()})},a.prototype.hide=function(){"html5"===this.action.params.target.toLowerCase()?this.video.remove():this.iframe.remove()},a}();Rd["video-box"]=function(a){return a.hint="Watch video",pa};var me,ne,oe,pe=function(){function a(){this.height=850,this.createNode()}return a.prototype.createNode=function(){var a=vi("div").addClass("leo-lightbox--website"),b=a.el("div").addClass("website--title"),c=(b.el("a").addClass("website--button").html("Open In New Window.").attr("target","_blank"),a.el("iframe").attr("frameborder",0));/^((?!chrome).)*safari/i.test(navigator.userAgent)&&c.style({webkitOverflowScrolling:"touch",overflow:"scroll"}),this.container=a,this.iframe=c},a.prototype.showLoading=function(){this.container.addClass("leo-loading")},a.prototype.hideLoading=function(){this.container.removeClass("leo-loading")},a.prototype.config=function(a){var b=this,c=a.content;this.url=c;var d=this.container;return d.select(".website--button").attr("href",c),d.select("iframe").attr("src",c),this.showLoading(),clearTimeout(this.loadingTimeoutID),this.loadingTimeoutID=setTimeout(function(){b.hideLoading(),b.iframe.style("opacity",1)},2e3),this},a.prototype.hide=function(){clearTimeout(this.loadingTimeoutID),this.container.select("iframe").attr("src",null).style("opacity",0)},a}(),qe=function(a){function b(){a.call(this),this.resizeOption={paddingLeft:0,paddingTop:0},this.inEffect="FadeIn",this.outEffect="FadeOut",this.duration=200;var b=new Qg;b.controls=!0,this.container=b.node.addClass("lg--normal-slide"),this.slide=b}return oc(b,a),b.prototype.config=function(a){var b=a.content;return this.slide.url=b,this},b.prototype.resize=function(a,b){this.slide.actualHeight=b,this.slide.actualWidth=a},b.prototype.destroy=function(){this.slide.destroy()},b}(nc),re=function(){function a(){var a=this;this.width=200,this.height=150,this.resizeOption={delh:60},this.__leo_guid__=f(),this.effectArray=["FadeIn"],this.index=-2,this.length=0,this.keyupHandler=function(b){b.altKey||b.ctrlKey||b.shiftKey||(b.preventDefault(),39==b.keyCode&&a.next(),37==b.keyCode&&a.prev())},this.container=this.createNode()}return a.prototype.createNode=function(){var a=this,b=vi("div").attr("id","leo-lightbox--gallery"),c=this.dataWrapper=b.el("div").attr("id","gallery-wrap");_d(c[0],function(b){"left"===b&&a.next(),"right"===b&&a.prev()}),c.bind("mousedown",function(a){a.preventDefault()}),this.imgWrapper=c.el("div").attr("id","img-wrap");var d=b.el("div").attr("id","control-bar");d.el("div").attr("id","to-first").addClass("controls").bind({tap:function(){0===a.index?a.shake():a.skipTo(0)}}),d.el("div").attr("id","to-last").addClass("controls").bind({tap:function(){a.index===a.length-1?a.shake():a.skipTo(a.length-1)}}),d.el("div").attr("id","to-next").addClass("controls").bind({tap:function(){a.next()}}),d.el("div").attr("id","to-prev").addClass("controls").bind({tap:function(){a.prev()}});var e=function(){f.unbindAll("keypress");var b=f.val();""===b?f.val(a.index+1+" / "+a.length):(b=parseInt(b,10)-1,a.skipTo(b))},f=this.input=d.el("input").attr("type","text").bind({tap:function(){f.bind("keypress",function(a){13===a.keyCode&&(e(),f[0].click())}),this.setSelectionRange(0,9999)},blur:e});return b},a.prototype.config=function(a){this.action=a;var c=a.content;return"string"==typeof c&&(c=c.split(";")),this.index=-2,this.imgWrapper.html(""),this.dataArray=c,this.length=c.length,this.skipTo(0),ih(b,"keyup",this.keyupHandler),fh(b,"keyup",this.keyupHandler),this},a.prototype.shake=function(){var a,b=this.container[0],c=(jd(b),new Tc),d=20;c.tweenOverwritten=0,a=Xc.create(b,50,{yoyo:!0,repeat:1}),a.overwritten=9,a.apply({left:{to:d}}),c.append(a),a=Xc.create(b,50,{yoyo:!0,repeat:1}),a.overwritten=9, a.apply({left:{to:-d}}),c.append(a),Wc.getInstance().add(c)},a.prototype.hide=function(){ih(b,"keyup",this.keyupHandler),this.width=300,this.height=200},a.prototype.skipTo=function(a){var b,c=this,d=new Image,e=this.dataArray,f=this.length,g=this.index,h=this.input,i=this.imgWrapper,j=___lightbox;if(this.image&&(this.image.onload=this.image.onerror=null),g!==a){if(a>=f||a<0||isNaN(a))return h.val(g+1+" / "+f),void this.shake();this.showLoading(),this.index=a,h.val(a+1+" / "+f),b=e[a],d.onload=d.onerror=function(){var a=c.width=d.width||25,b=c.height=d.height||25,e={width:"100%",height:"100%"};d.onload=d.onerror=null,a<200&&(c.width=200,e.width=a),b<200&&(c.height=200,e.height=b),c.hideLoading(),i.html(""),i.style(e),i.append(d),j.resize(!0,function(){c._animate&&c._animate.destroy(),c._animate=Rc.animate(i[0],c.effectArray[Math.floor(Math.random()*c.effectArray.length)],500)})},d.src=b,fb(i[0])}else h.val(a+1+" / "+f),this.shake();this.image=d},a.prototype.prev=function(){this.index-1<0?this.shake():this.skipTo(this.index-1)},a.prototype.next=function(){this.index+1>=this.length?this.shake():this.skipTo(this.index+1)},a.prototype.showLoading=function(){this.container.addClass("leo-loading")},a.prototype.hideLoading=function(){this.container.removeClass("leo-loading")},a}();Rd["slide-box"]=function(a){a.hint="Show image gallery";var b=sa;if(a.params){var c=a.params.slideType;c&&(c=c.toLowerCase()),"normal"===c?b=ta:"3dflow"===c&&(b=ra)}return b};var se,te,ue=function(a){function b(){a.call(this),this.resizeOption={paddingLeft:0,paddingTop:0},this.inEffect="FadeIn",this.outEffect="FadeOut",this.duration=200;var b=new Sg;b.controls=!0,b.autoplay=!1,b.position="fit",this.container=b.node.addClass("lg--normal-slide"),this.slide=b}return oc(b,a),b.prototype.config=function(a){var b=a.content;return this.slide.url=b,this},b.prototype.resize=function(a,b){this.slide.actualHeight=b,this.slide.actualWidth=a},b.prototype.destroy=function(){this.slide.destroy()},b}(nc);Rd.resetCamera=function(){return ua},Rd["show-dialog"]=function(a,b){return a.hint="Show dialog",a.params.direction=a.params.direction.toLowerCase(),va},Rd.playAction=function(a,b){var c=a.params&&a.params.params;if(c&&c.actionName&&"sprite"===b.type){c={animation:c.actionName,duration:a.params.duration,userDefined:1,overwritten:!0,params:{scaleX:c.scaleX||1,scaleY:c.scaleY||1,text:c.text,sound:c.sound}};var d=Fa(c,b.type);return function(a){Kd.run(this,d)}}};var ve={},we=e(["when","type","action","target","params"]),xe={click:"tap",doubleclick:"doubletap",mousedown:"tapstart",mouseup:"tapend"},ye={motion:function(a,b){a.name="Motion",a.params=Ma(a.params,b)},"spotlight(move to)":function(a,b){a.name="SpotLight(Move to)",a.params=Ma(a.params,b)}},ze={"transform.rotation":0,"transform.scaleX":1,"transform.scaleY":1,"transform.skewX":0,"transform.skewY":0,"transform.tx":0,"transform.ty":0};ve.camera=function(a,b,c){var d=Ae,e=d.option;e.action?Array.isArray(e.action)||(e.action=[e.action]):e.action=[];for(var f=e.action,g=a.animations||[],h=-1,i=g.length;++h=0&&f.push({when:"timer",time:m-n,target:l.name,action:"changeVisible",params:{visible:!1}})}}};var Ae=null,Be={font:function(a,b,c,d){for(var e in a){var f=d.get(b,e);if(f&&"!"!==f)if(c[f]=a[e],"color"===e)if("number"==typeof a[e]){var g=Ee.parse(a[e]);g[3]=1,c[f]=Ee.parseToString(g)}else c[f]=Ee.parseToString(a[e]);else"backgroundColor"===e&&(c[f]=Ee.parseToString(a[e]))}},shadow:function(a,b,c,d){var e=d.get(b,"shadow");!e||"!"===e||0===a.blur&&0===a.offsetX&&0===a.offsetY||(c.shadow=Vb(a.offsetX,a.offsetY,a.blur,Ee.parseToString(a.color)))},gradualColors:function(a,b,c,d){var e=d.get(b,"gradient");if(e&&"!"!==e){for(var f=a.split(";"),g="",h=0,i=-1,j=f.length;++i=31?c=37:a>=24?c=29:a>=18?c=24:a>=16?c=20:a>=13&&(c=16),c}},De={image:function(a,b){a.src=a.defaultProps.src=b.template.content,a.defaultProps["filter.reset"]=c,a.reflection=b.template.reflection,a.fit=b.template.fit}};De["html5-video"]=De["vimeo-video"]=function(a,b){a.src=a.defaultProps.src=b.template.content,a.autoplay=!!b.template.autoPlay},De.sound=function(a,b){a.src=a.defaultProps.src=b.template.content,a.volume=a.defaultProps.volume=b.template.volume,a.autoplay=a.defaultProps.volume=null==b.template.autoPlay||!!b.template.autoPlay,a.loop=a.defaultProps.loop=!!b.template.loop},De["youtube-video"]=function(a,b){var c=b.template,d=c.videoType||"id",e=c.videoStart||"0";if("id"===d.toLowerCase()){a.autoplay=!!c.autoPlay,a.loop=!!c.loop;var f,g=e.split(":"),h=0;(f=parseInt(g[0]))&&(h=3600*f),(f=parseInt(g[1]))&&(h+=60*f),(f=parseInt(g[2]))&&(h+=f),a.startTime=h,a.src=a.defaultProps.src=c.content}else a.type="htmlembedbox",a.embedCode=a.defaultProps.embedCode=b.template.codeContent},De.line=De.arrowline=De.dottedline=function(a,b){b.template.content.split(";").forEach(function(b,c){a[(c%2?"y":"x")+(c<2?"1":"2")]=+b})},De.roundedrectangulardialogbox=De.rectangulardialogbox=De.ovaldialogbox=De.clouddialogbox=function(a,b){var c=b.template.params.split(";");a.handlerX=+c[2],a.handlerY=+c[3]},De.bubbledialogbox=function(a,b){a.located=b.template.located},De.paypaldiscount=function(a,b){a.textContent=a.defaultProps.src=b.style.font.paypalPrice},De.paypalprice=function(a,b){a.textContent=b.template.content,a.price=b.style.font.paypalPrice},De.paypalproductbox=function(a,b){a.urls=a.defaultProps.urls=b.template.content},De.paypalstar=function(a,b){a.rate=b.template.content,a.src=b.style.backgroundImage},De.embedweb=function(a,b){a.url=a.defaultProps.url=b.template.content,a.controls=b.template.controls},De.sprite=function(a,b){var c=b.sprite;a.srcset=[c.url],a.initialActionName=c.initialAnimationName;for(var d=a.frames=[],e=c.row,f=c.column,g=c.cellWidth,h=c.cellHeight,i=-1;++i3?e[3]:1;return g||h||i?(g&&g3?e[3]:1];return d?f:a.stringify(f)},a.transparentize=function(b,c){var d=Array.isArray(b),e=d?b:a.parse(b),f=e.concat();return f[3]=_b(c,0,1),d?f:a.stringify(f)},a.toHSLA=function(b){var c=Array.isArray(b),d=a.toHSLAArray(b);return c?d:a.stringifyHSLA(d)},a.toHSLAArray=function(b){var c,d,e=a.parse(b),f=e[0],g=e[1],h=e[2],i=Math.min(f/=255,g/=255,h/=255),j=Math.max(f,g,h),k=j-i,l=(j+i)/2;k?(d=l<.5?k/(j+i):k/(2-j-i),c=60*(f===j?(g-h)/k+(g0&&l<1?0:c);var m=e.concat();return m[0]=c,m[1]=100*d,m[2]=100*l,m},a.stringifyHSLA=function(a){var b="("+a[0]+","+a[1]+"%,"+a[2]+"%";return(a.length>3&&a[3]<1?"hsla"+b+","+a[3]:"hsl"+b)+")"},a.stringify=function(a){return a.length>3&&a[3]<1?"rgba("+a+")":"rgb("+a[0]+","+a[1]+","+a[2]+")"},a.format=function(a){for(var b=new Array(4),c=-1;++c<3;)b[c]=Math.max(0,Math.min(255,~~a[c]));var d=a.length>3?+a[3]:1;return d||0===d||(d=1),b[3]=Math.min(0,Math.max(1,d)),b},a.parse=function(b){if(null==b)return b;if(Array.isArray(b))return b;var c=+b;if(!isNaN(c))return[c>>16,c>>8&&255,c>>16&255,0];b=b.trim().toLowerCase(),","===b.charAt(b.length-1)&&(b=b.substr(0,b.length-1));var d;if(d=a.table[b])return[d[0],d[1],d[2],d.length>3?d[3]:1];"0x"===b.substr(0,2)&&(b="#"+b.substr(3));var e,f,g,h;if("#"===b[0]){var i=b.lastIndexOf(",");return i>=0?(h=+b.substr(i+1),b=b.substr(0,i)):h=1,4===b.length?(e=parseInt(b[1]+b[1],16),f=parseInt(b[2]+b[2],16),g=parseInt(b[3]+b[3],16)):(e=parseInt(b.substr(1,2),16),f=parseInt(b.substr(3,2),16),g=parseInt(b.substr(5,2),16)),0===h||h||(h=1),[e,f,g,h]}if("hsl"===b.substr(0,3)){var j=b.match(Fe),k=+j[0]%360/360,l=+j[1]/100,m=+j[2]/100,h=+j[3],n=m<=.5?m*(l+1):m+l-m*l,o=2*m-n;return j.length>3&&(h=+j[3]),[Qa(k+1/3,o,n),Qa(k,o,n),Qa(k-1/3,o,n),h]}var j=b.match(Fe);return j?[+j[0],+j[1],+j[2],j.length>3?+j[3]:1]:null},a.parseToString=function(b){return a.stringify(a.parse(b))},a.isTransparent=function(b){var c=a.parse(b);return 0===c[3]},a.table={silver:[192,192,192],black:[0,0,0],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],yellow:[255,255,0],orange:[255,165,0],grey:[128,128,128],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],transparent:[0,0,0,0]},a}(),Fe=/([\d\-\.e]+)/gi,Ge={_tables:{},register:function(a,b,c,d){Ge._tables[a]={d:c,p:d,pr:b}},get:function(a,b){for(var c,d=Ge._tables;;){var e=d[a];if(e||(e=d[a="default"]),c=e.d&&e.d[b]||e.p&&e.p(b,e.d),c||"default"===a)break;a=e.pr||"default"}return c}},He={_classes:{},register:function(a,b,c){b.componentType=a,He._classes[a]=b,c&&!Ge._tables[a]&&Ge.register(a,c)},getClass:function(a){return He._classes[a]},create:function(a,b,c){try{var d=new He._classes[a];if(d.name=b,c)for(var b in c)d.setProperty(b,c[b]);return d}catch(e){return null}}},Ie=function(a){function b(){a.call(this),this.__leo_guid__=f(),this.DOMEventsEnabled=!0,this._parent=null,this._stage=null,this._visible=!0,this._backface=!0,this._x=0,this._displayX=0,this._y=0,this._displayY=0,this._zIndex=null,this._anchorX=0,this._anchorY=0,this._opacity=1,this._shadow="none",this._hasWidthSet=!1,this._computedWidth=0,this._actualWidth=0,this._hasHeightSet=!1,this._computedHeight=0,this._actualHeight=0,this.init()}return oc(b,a),b.prototype.init=function(){this._node=this.createNode(),this._dom=this._node.attr("data-guid",this.guid).addClass("leo-comp").style("display","none")[0],this.name=this.componentType+"_"+this.guid,this._transform=this.initTransform(),this._resizeMode=0},b.prototype.initTransform=function(){return new $g(this._dom,this)},d(b.prototype,"name",{get:function(){return this._name},set:function(a){var b=this._name;this._name=a,this._dom.setAttribute("id",a),this._stage&&this._stage.context.components.updateName(this,b)},enumerable:!0,configurable:!0}),d(b.prototype,"dom",{get:function(){return this._dom},enumerable:!0,configurable:!0}),d(b.prototype,"node",{get:function(){return this._node},enumerable:!0,configurable:!0}),b.prototype.createNode=function(){return vi("div")},b.prototype.destroyNode=function(a){null!=a&&a.remove()},d(b.prototype,"guid",{get:function(){return this.__leo_guid__},enumerable:!0,configurable:!0}),d(b.prototype,"componentType",{get:function(){return this.constructor.componentType},enumerable:!0,configurable:!0}),d(b.prototype,"loadable",{get:function(){return!1},enumerable:!0,configurable:!0}),d(b.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),b.prototype._setParent=function(a){this._parent=a},d(b.prototype,"stage",{get:function(){return this._stage},enumerable:!0,configurable:!0}),d(b.prototype,"visible",{get:function(){return this._visible},set:function(a){this._visible!==a&&(this._visible=a,a?eb(this._dom):fb(this._dom),this.notifyPropertyChange("visible",!a))},enumerable:!0,configurable:!0}),d(b.prototype,"backface",{get:function(){return this._backface},set:function(a){this._backface!==a&&(this._backface=a,Ve(this._dom,"backfaceVisibility",a?"":"hidden"),this.notifyPropertyChange("backface",!a))},enumerable:!0,configurable:!0}),d(b.prototype,"transform",{get:function(){return this._transform},enumerable:!0,configurable:!0}),d(b.prototype,"x",{get:function(){return this._x},set:function(a){var b=this._x;b!==a&&(this._x=a,this.displayX=this._displayX+a-b,this._onXChange(b),this.notifyPropertyChange("x",b))},enumerable:!0,configurable:!0}),b.prototype._onXChange=function(a){},d(b.prototype,"displayX",{get:function(){return this._displayX},set:function(a){this._displayX!==a&&(this._displayX=a,this._transform.update())},enumerable:!0,configurable:!0}),d(b.prototype,"y",{get:function(){return this._y},set:function(a){var b=this._y;b!==a&&(this._y=a,this.displayY=this._displayY+a-b,this._onYChange(b),this.notifyPropertyChange("y",b))},enumerable:!0,configurable:!0}),b.prototype._onYChange=function(a){},d(b.prototype,"displayY",{get:function(){return this._displayY},set:function(a){this._displayY!==a&&(this._displayY=a,this._transform.update())},enumerable:!0,configurable:!0}),d(b.prototype,"zIndex",{get:function(){return this._zIndex},set:function(a){a=~~a;var b=this._zIndex;b!==a&&(this._zIndex=a,this._dom.style.zIndex=a+"",this.notifyPropertyChange("zIndex",b))},enumerable:!0,configurable:!0}),d(b.prototype,"anchorX",{get:function(){return this._anchorX},set:function(a){var b=this._anchorX;b!==a&&(this._anchorX=a,this._transform.update(),this.notifyPropertyChange("anchorX",b))},enumerable:!0,configurable:!0}),d(b.prototype,"anchorY",{get:function(){return this._anchorY},set:function(a){var b=this._anchorY;b!==a&&(this._anchorY=a,this._transform.update(),this.notifyPropertyChange("anchorY",b))},enumerable:!0,configurable:!0}),d(b.prototype,"opacity",{get:function(){return this._opacity},set:function(a){a>1?a=1:a<0&&(a=0);var b=this._opacity;b!==a&&(this._opacity=a,this._dom.style.opacity=a+"")},enumerable:!0,configurable:!0}),d(b.prototype,"shadow",{get:function(){return this._shadow},set:function(a){var b=this._shadow;a!==b&&Ve(this._dom,"boxShadow",this._shadow=a)},enumerable:!0,configurable:!0}),d(b.prototype,"resizeMode",{get:function(){return this._resizeMode},set:function(a){this._setResizeMode(a)},enumerable:!0,configurable:!0}),b.prototype._setResizeMode=function(a){if(a=(2+a%2)%2,this._resizeMode!==a&&(this._resizeMode=a,!a)){var b=!1;this._hasWidthSet&&this._actualWidth!==this._computedWidth&&(this.actualWidth=this._computedWidth,b=!0),this._hasHeightSet&&this._actualHeight!==this._computedHeight&&(this.actualHeight=this._computedHeight,b=!0),b&&this._transform.update()}},d(b.prototype,"width",{get:function(){return this._resizeMode?this._computedWidth:this._actualWidth},set:function(a){!this._hasWidthSet&&a&&(this._hasWidthSet=!0,this.actualWidth=a);var b=this._computedWidth;a!==b&&(this._computedWidth=a,this._resizeMode?this._transform.update():this.actualWidth=a,this.notifyPropertyChange("width",b))},enumerable:!0,configurable:!0}),d(b.prototype,"actualWidth",{get:function(){return this._actualWidth},set:function(a){var b=this._actualWidth;if(a!==b){var c=1;this._resizeMode&&b&&(c=this._computedWidth/b),this._dom.style.width=~~(.5+a)+"px",this._onActualWidthChange(this._actualWidth=a),this.notifyPropertyChange("actualWidth",a),this._resizeMode?this.width=a*c:(a!==this._computedWidth&&(c=this._computedWidth,this._computedWidth=a),this._anchorX&&this._transform.update(),a!==c&&this.notifyPropertyChange("width",c))}},enumerable:!0,configurable:!0}),b.prototype._onActualWidthChange=function(a){},d(b.prototype,"height",{get:function(){return this._resizeMode?this._computedHeight:this._actualHeight},set:function(a){!this._hasHeightSet&&a&&(this._hasHeightSet=!0,this.actualHeight=a);var b=this._computedHeight;a!==b&&(this._computedHeight=a,this._resizeMode?this._transform.update():this.actualHeight=a,this.notifyPropertyChange("height",b))},enumerable:!0,configurable:!0}),d(b.prototype,"actualHeight",{get:function(){return this._actualHeight},set:function(a){var b=this._actualHeight;if(a!==b){var c=1;this._resizeMode&&b&&(c=this._computedHeight/b),this._dom.style.height=~~(.5+a)+"px",this._onActualHeightChange(this._actualHeight=a),this.notifyPropertyChange("actualHeight",a),this._resizeMode?this.height=a*c:(a!==this._computedHeight&&(c=this._computedHeight,this._computedHeight=a),this._anchorY&&this._transform.update(),a!==c&&this.notifyPropertyChange("height",c))}},enumerable:!0,configurable:!0}),d(b.prototype,"hint",{set:function(a){this._node.attr("title",a)},enumerable:!0,configurable:!0}),b.prototype._onActualHeightChange=function(a){},b.prototype.getBoundingRect=function(a){a||(a=new ci(0,0,0,0));var b=this.width,c=this.height;return a.set(-this.anchorX*b,-this.anchorY*c,b,c),a},b.prototype.getMeasuredBound=function(a){return this.getBoundingRect(a)},b.prototype.getTransformMatrix=function(a){a||(a=new bi(1,0,0,1,0,0)),a.identity();var b=this._transform;return a.appendTransform(b._tx,b._ty,b._sx*b._scaleX,b._sy*b._scaleY,b._rotation,b._skewX,b._skewY,this.width*(this._transform._originX-this._anchorX),this.height*(this._transform._originY-this._anchorY))},b.prototype.getTransformBound=function(a,c,d){c=d?this.getMeasuredBound(c):this.getBoundingRect(c),a||(a=this.getTransformMatrix(bi.identity));var e=b._point;e||(e=b._point={x:0,y:0}),e.x=c.left,e.y=c.top,a.transformPoint(e);var f=e.x,g=f,h=e.y,i=h;return e.x=c.right,e.y=c.top,a.transformPoint(e),e.xg&&(g=e.x),e.yi&&(i=e.y),e.x=c.right,e.y=c.bottom,a.transformPoint(e),e.xg&&(g=e.x),e.yi&&(i=e.y),e.x=c.left,e.y=c.bottom,a.transformPoint(e),e.xg&&(g=e.x),e.yi&&(i=e.y),c.set(f,h,g-f,i-h)},b.prototype.onTransformUpdate=function(){this._transform._x=bc(this._displayX+this._computedWidth*(this._transform._originX-this._anchorX)-this._actualWidth*this._transform._originX),this._transform._y=bc(this._displayY+this._computedHeight*(this._transform._originY-this._anchorY)-this._actualHeight*this._transform._originY);var a=0;this._actualWidth&&(a=bc(this._computedWidth/this._actualWidth),0===a||a||(a=1),this._transform._sx=a),this._actualHeight&&(a=bc(this._computedHeight/this._actualHeight),0===a||a||(a=1),this._transform._sy=a)},b.prototype.setProperty=function(a,b){if(arguments.length<2)for(var c in a)this.setProperty(c,a[c]);else{var d=this;if(a.indexOf(".")>=0){for(var e=a.split("."),f=null,g=-1,h=e.length-1;++g=0){for(var c=a.split("."),d=-1,e=c.length-1;++d=0&&a<=2&&this._state!==a&&this._updateColor(this._state=a)},enumerable:!0,configurable:!0}),b.prototype._updateColor=function(a){var b=this._button[0],c=Ee.toHSLAArray(this._bgColor);a&&(c[2]=Math.max(0,c[2]-10)),b.style.backgroundColor=Ee.stringifyHSLA(c),c=Ee.toHSLAArray(this._borderColor),a&&(c[2]=Math.max(0,c[2]-10)),b.style.borderColor=Ee.stringifyHSLA(c)},d(b.prototype,"bgColor",{get:function(){return this._bgColor},set:function(a){if(this._bgColor!==a){var b=this._bgColor;this._button[0].style.backgroundColor=this._bgColor=a,this.notifyPropertyChange("bgColor",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"bgSrc",{get:function(){return this._bgSrc},set:function(a){var b=this;if((!a||"none"===a||a.indexOf(".")<0&&"data/image"!==a.substr(0,10))&&(a=""),this._bgSrc!==a){var c=this._bgSrc;a?(this._bgImage||(this._bgImage=new Image),this._bgImage.onload=this._bgImage.onerror=function(){b._bgImage.onload=b._bgImage.onerror=null,b._button[0].style.backgroundImage=a.indexOf(".")>=0?"url("+a+")":a,b._node.addClass("leo-comp--btn__has-bg"),b.dispatchSimpleEvent("bgLoad")},this._bgImage.src=this._bgSrc=a):(this._bgImage&&(this._bgImage.onload=this._bgImage.onerror=null,this._bgImage.src=Ac),this._button[0].style.backgroundImage="none",this._bgSrc=a,this._node.removeClass("leo-comp--btn__has-bg"),this.dispatchSimpleEvent("bgLoad")),this.notifyPropertyChange("bgSrc",c)}},enumerable:!0,configurable:!0}),d(b.prototype,"borderWidth",{get:function(){return this._borderWidth},set:function(a){if(this._borderWidth!==a){var b=this._borderWidth;this._button[0].style.borderWidth=(this._borderWidth=a)+"px",this.notifyPropertyChange("borderWidth",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"borderRadius",{get:function(){return this._borderRadius},set:function(a){if(this._borderRadius!==a){var b=this._borderRadius;this._borderRadius=a;var c=uf("borderRadius"),d=a+"px";We(this._button[0],c,d),We(this._dom,c,d),this.notifyPropertyChange("borderRadius",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"borderColor",{get:function(){return this._borderColor},set:function(a){if(this._borderColor!==a){var b=this._borderColor;this._button[0].style.borderColor=this._borderColor=a,this.notifyPropertyChange("borderColor",b)}},enumerable:!0,configurable:!0}),b.prototype._onActualWidthChange=function(){this._button[0].style.width=this.actualWidth+"px"},b.prototype._onActualHeightChange=function(){this._button[0].style.height=this.actualHeight+"px"},b.prototype._destroyBgImg=function(){this._bgImage&&(this._bgImage.onload=this._bgImage.onerror=null,this._bgImage.src=Ac,this._bgImage=null)},b.prototype._bindEvents=function(){var a=this;this.addEventListener("mouseenter",function(){a.state=1},null),this.addEventListener("mouseleave",function(){a.state=0},null);var b=0;this.addEventListener("tapstart",function(){b=a._state,a.state=2},null),this.addEventListener("tapend",function(){2===a._state&&(a.state=2===b?0:b,b=0)},null),this.watch("visible",function(){a.state=0},null)},b.prototype.destroy=function(){this._destroyBgImg(),this._textFormat.destroy(),this._textFormat=null,this._button=null,a.prototype.destroy.call(this)},b.textType=1,b}(Ie);Ge.register("button",null,{backgroundColor:"bgColor",backgroundImage:"bgSrc",borderRadius:"borderRadius",borderWidth:"borderWidth",borderColor:"borderColor"},function(a){return Ai.compatProperty(a)}),He.register("button",Ke);var Le=function(a){function b(){a.call(this),this._overflowMode="auto",this._children=[]}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._node.addClass("leo-comp--container"),this._initViewport()},d(b.prototype,"isSymbol",{get:function(){return this._isSymbol},enumerable:!0,configurable:!0}),b.prototype._asSymbol=function(){this._isSymbol=!0,this._resizeMode=1},d(b.prototype,"overflowMode",{get:function(){return this._overflowMode},set:function(a){var b=this._overflowMode;b!==a&&(this._overflowMode=a,this._dom.style.overflow=a,this.notifyPropertyChange("overflowMode",b))},enumerable:!0,configurable:!0}),d(b.prototype,"resizeMode",{get:function(){return this._resizeMode},set:function(a){this._isSymbol||Ii.fatal("leo_DOMComponentContainer.resizeMode","only symbol can switch the resizeMode"),this._setResizeMode(a)},enumerable:!0,configurable:!0}),d(b.prototype,"viewport",{get:function(){return this._viewport},enumerable:!0,configurable:!0}),b.prototype._initViewport=function(){ this._viewport=new gf(this,0,0,0,0)},b.prototype._onActualWidthChange=function(a){this._viewport._rect.width=a},b.prototype._onActualHeightChange=function(a){this._viewport._rect.height=a},b.prototype.getMeasuredBound=function(a){return a||(a=new ci(0,0,0,0)),a=gf.getContentBound(this._children,a,!1),a.left-=this._viewport.left+this.anchorX*this.width,a.top-=this._viewport.top+this.anchorY*this.height,a},b.prototype.autofit=function(){var a=this._viewport,b=gf.getContentBound(this._children,ci.identity,!1),c=b.left-a.left,d=b.top-a.top,e=(b.right-a.left,b.bottom-a.top,a.width),f=a.height;a.set(b.left,b.top,b.width,b.height);var g=this._transform.deferred;this._transform.deferred=!1,b.width&&(this.anchorX=(this.anchorX*e-c)/b.width),b.height&&(this.anchorY=(this.anchorY*f-d)/b.height),this._transform.deferred=g},b.prototype._updateChildrenDisplayPosition=function(){for(var a=this._children,b=this._viewport.left,c=this._viewport.top,d=-1,e=a.length;++dthis._children.length)&&Ii.fatal("leo_DOMComponentContainer._doAddChild()","index %s is out of range [0, %s]",c,this._children.length);var e=a.parent;return e===this?(this.setChildIndex(a,c),c):(e&&e.remove(a),this._children.splice(c,0,a),a._setParent(this),a.zIndex=b.DEFAULT_ZINDEX+this._children.length,a.backface=this.backface,this._insertDOM(a._dom,c+1===this._children.length?null:this._children[c]._dom),this._updateDisplayPositionOf(a),this.dispatchSimpleEvent(Wh.CHILD_ADDED,c),this._stage&&!d&&(a.enter(this._stage),a.dispatchSimpleEvent(Wh.ENTER_STAGE)),c)},b.prototype._insertDOM=function(a,b){b?this._dom.insertBefore(a,b):this._dom.appendChild(a)},b.prototype._updateDisplayPositionOf=function(a){a.displayX=a.x-this._viewport.left,a.displayY=a.y-this._viewport.top},b.prototype.setChildIndex=function(a,c){var d=this._children,e=b.DEFAULT_ZINDEX,f=d.indexOf(a);if(f<0&&Ii.fatal("leo_DOMComponentContainer._doSetChildIndex()","child is not in current container"),f!==c)if(d.splice(f,1),c<0||d.length<=c)d.push(a),a.zIndex=e+d.length;else{this._children.splice(c,0,a),a.zIndex=e+c+1;for(var g=d.length;++c=0?(this._doRemoveChild(b),b):void Ii.fatal("leo_DOMComponentContainer.remove()","child is not in the children list")},b.prototype.removeAt=function(a){return a>=0&&a=0;)this._doRemoveChild(b,!0)},b.prototype._doRemoveChild=function(a,c,d){var e=this._children,f=e[a],g=b.DEFAULT_ZINDEX;if(this.dispatchSimpleEvent(Wh.CHILD_REMOVED,a),f._stage&&!d&&(f.leave(),f.dispatchSimpleEvent(Wh.LEAVE_STAGE)),f._setParent(null),this._removeDOM(f._dom),e.splice(a--,1),!c)for(var h=e.length;++a=0&&a=0&&a=0;)b[c].destroy();a.prototype.destroy.call(this)},b.group=function(a,c,d){for(var e=d?b.createSymbol():new b,f=-1,g=a.length;++f",i="";return h=h+b.innerHTML+i,b.innerHTML="",b=null,h},d(e.prototype,"embedCode",{get:function(){return this._embedCode},set:function(a){this._embedCode!==a&&(this._embedCode=a,this.visible&&this.insertIFrame())},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){b.prototype.destroy.call(this),ih(a,"message",this.messageListener),this.iFrame=null},e}(Ie);He.register("htmlembedbox",Oe),Ge.register("htmlembedbox",null);var Pe=function(b){function c(){b.call(this),this.fsed=!1}return oc(c,b),c.prototype.createNode=function(){var a=this,b=vi("div").addClass("leo-comp--embed-web"),c=this.container=b.el("div").addClass("embed-web--container");c.bind("touchstar",function(b){var c=parseInt(a.toolbar.style("bottom"));c?a.hideToolbar():a.showToolbar()});this.iframe=c.el("iframe").addClass("embed-web--iframe").attr({frameborder:0});return/^((?!chrome).)*safari/i.test(navigator.userAgent)&&c.style({webkitOverflowScrolling:"touch",overflow:"scroll"}),b},c.prototype.createControls=function(){var a=this,b=this.container,c=b.el("div").addClass("embed-web--toolbar-cover");c.bind("mouseover",function(){clearTimeout(d),a.showToolbar()});var d;c.bind("mouseout",function(){d=setTimeout(function(){a.hideToolbar()},1e3)});var e=this.toolbar=c.el("div").addClass("embed-web--toolbar"),f=e.el("div").addClass("toolbar--fs").attr("title","Open in new window.");f.bind("tap",function(){a.openInNewWindow()})},c.prototype.openInNewWindow=function(){a.open(this._src,"_blank","")},c.prototype.showToolbar=function(){clearTimeout(this.enterTimeout),this.toolbar&&this.toolbar.style({bottom:0})},c.prototype.hideToolbar=function(){clearTimeout(this.enterTimeout),this.toolbar&&this.toolbar.style({bottom:-50})},c.prototype.enter=function(a){var c=this;b.prototype.enter.call(this,a),this.enterTimeout=setTimeout(function(){c.hideToolbar()},3e3)},c.prototype.destroy=function(){b.prototype.destroy.call(this),this.container=null,this.iframe=null},d(c.prototype,"controls",{set:function(a){this._controls!==a&&(this._controls=a,a&&this.createControls())},enumerable:!0,configurable:!0}),d(c.prototype,"url",{set:function(a){this._url!==a&&(this._url=a,a.indexOf("://")<0&&(a="http://"+a),this.iframe.attr("src",a),this._src=a)},enumerable:!0,configurable:!0}),c}(Ie);He.register("embedweb",Pe);var Qe=function(){function a(){}return a._hasEventListened=function(b,c){return!(!a._eventTable[b.guid]||!a._eventTable[b.guid].events[c])},a._addDelegateListener=function(b,c,d){var e=a._eventTable[b.guid];e||(e=a._eventTable[b.guid]={target:b,events:{}}),e.events[c]=!0,fh(b.dom,c,d?a.onProxy:a.onDelegate)},a.removeDelegateListeners=function(b,c){var d=a._eventTable[b.guid];if(d){var e=ih,f=c?a.onProxy:a.onDelegate,g=b.dom,h=d.events;for(var i in h)e(g,i,f);d.target=null,d.events=null,delete a._eventTable[b.guid]}},a.flushDelegates=function(b){var c=a._cache[b.guid],d=b.stage,e=a._hasEventListened,f=a._addDelegateListener;if(c&&d){for(var g=(d.dom,-1),h=c.length;++gl?1-(b-l)/(1-l):1),c.stroke(),c.closePath()}},{repeat:1/0,easing:"easeInSine",repeatDelay:this.repeatDelay});return Wc.getInstance().add(b),b.stop(),b}},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.animation&&this.animation.destroy(),this.canvas=null,this.unwatch("visible",this.playPauseAnimation,this)},b.prototype._onActualWidthChange=function(){this.canvas.width=this.actualWidth},b.prototype._onActualHeightChange=function(){this.canvas.height=this.actualHeight},d(b.prototype,"color",{set:function(a){a=Ee.parseToString(a),a&&this._color!==a&&(this._color=a)},enumerable:!0,configurable:!0}),b}(Ie);Ge.register("hotspot",null,{hotSpotColor:"color"}),He.register("hotspot",Re);var Se=function(a){function b(){a.call(this),this._readyState=0,this._filter=null,this._borderWidth=0}return oc(b,a),b.prototype.createNode=function(){var a=vi("div").addClass("leo-comp--img");return a},b.prototype.showLoading=function(){this.node.addClass("leo-loading")},b.prototype.hideLoading=function(){this.node.removeClass("leo-loading")},b.prototype.fadeIn=function(a){a.node.style.opacity=1},b.prototype.fadeOut=function(a){a.node.style.opacity=0},b.prototype.load=function(){this.readyState=1,this.src=this._src},b.prototype.newImage=function(){var a=this,b=new Image,c={};c.left=c.top=-this.borderWidth+"px",this.readyState>1&&(c.transition="opacity .3s"),Ye(b,c),this.node.prepend(b);var d={onload:null,state:0,node:b};return b.onload=function(){a.onload(d,2)},b.onerror=function(){a.onload(d,4)},d},b.prototype.onload=function(a,b){var c=a.node;a.state=b,Ye(c,{width:"",height:""}),a.width=c.naturalWidth||c.width,a.height=c.naturalHeight||c.height,Ye(c,{width:this.actualWidth,height:this.actualHeight}),a.onload&&(a.onload.call(this,b),a.onload=null)},b.prototype._onActualHeightChange=function(){this.resize(),this.updateReflection("height",this._actualHeight)},b.prototype._onActualWidthChange=function(){this.resize(),this.updateReflection("width",this._actualWidth)},b.prototype._onXChange=function(){var a=this._reflection,b=this.x;if(a&&b){var c=a.canvas;Ye(c,"tx",this.x)}},b.prototype._onYChange=function(){var a=this._reflection,b=this.y;if(a&&b){var c=a.canvas;Ye(c,"ty",this.y)}},b.prototype.resize=function(){var a=this.image;a&&Ye(a.node,{width:this.actualWidth,height:this.actualHeight}),this.borderRadius=this.borderRadius},b.prototype.updateReflection=function(a,b){var c=this._reflection;c&&(c[a]=b)},b.prototype.appendCanvas=function(a){cb(Ye(a,{tx:this.x,ty:this.y,transformOrigin:"50% 100%",scaleY:-1,zIndex:this.zIndex}),this.dom)},b.prototype.enter=function(b){a.prototype.enter.call(this,b);var c=this._reflection;c&&this.appendCanvas(c.canvas)},b.prototype.destroy=function(){a.prototype.destroy.call(this),this._filter&&this._filter.destroy();var b=this.image;b&&1===b.state&&(b.node.src=Ac)},d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(b.prototype,"readyState",{get:function(){return this._readyState},set:function(a){this._readyState=a},enumerable:!0,configurable:!0}),d(b.prototype,"filter",{get:function(){return this._filter?this._filter:this._filter=new Oh(this.node[0],this)},enumerable:!0,configurable:!0}),d(b.prototype,"src",{get:function(){return this.__src},set:function(a){var b=this;if(a=a||Ac,a!==this.__src&&this.readyState>0){this.__src=a;var c=this.image,d=this.prevImage||this.newImage();c&&(c.onload=null,this.fadeOut(c)),this.showLoading();var e=function(a){b.hideLoading(),b.fadeIn(d),1===b.readyState&&(b.readyState=a,b.dispatchSimpleEvent("load"),Ye(d.node,"transition","opacity .3s")),b.updateReflection("image",d.node)};d.onload=e,d.src===a?d.state>1&&this.onload(d,d.state):(d.state=1,d.node.src=d.src=a),this.image=d,this.prevImage=c}this._src=a},enumerable:!0,configurable:!0}),d(b.prototype,"borderWidth",{get:function(){return this._borderWidth},set:function(a){if(this._borderWidth!==a){this._borderWidth=a,this.node.style("borderWidth",a);var b=this.image;b&&Ye(b.node,{left:-a,top:-a}),this.updateReflection("borderWidth",a)}},enumerable:!0,configurable:!0}),d(b.prototype,"borderColor",{get:function(){return this._borderColor},set:function(a){this._borderColor!==a&&(this._borderColor=a,this.node.style("borderColor",a),this.updateReflection("borderColor",a))},enumerable:!0,configurable:!0}),d(b.prototype,"borderRadius",{get:function(){return this._borderRadius},set:function(a){this._borderRadius=a,a/=2;var b,c=Math.max(this._actualWidth,this._actualHeight),d=Math.min(this._actualWidth,this._actualHeight),e=a/100*c;b=e>d/2?a+"%":e+"px",this.node.style("borderRadius",b),this.updateReflection("borderRadius",a)},enumerable:!0,configurable:!0}),d(b.prototype,"shadow",{get:function(){return this._shadow},set:function(a){this._shadow!==a&&(this._shadow=a,this.node.style("boxShadow",a))},enumerable:!0,configurable:!0}),d(b.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(a){a!==this._backgroundColor&&(this._backgroundColor=a,this.image&&(this.image.node.style.backgroundColor=a),this.updateReflection("backgroundColor",a))},enumerable:!0,configurable:!0}),d(b.prototype,"reflection",{get:function(){return this._reflection},set:function(a){if(a&&!this._reflection){var b=new qi({src:this._src,width:this._actualWidth,height:this._actualHeight,borderWidth:this._borderWidth,borderColor:this._borderColor,borderRadius:this._borderRadius,backgroundColor:this._backgroundColor,depth:a.depth,offset:a.offset,opacity:a.opacity,originX:a.originX,originY:a.originY});this.appendCanvas(b.canvas),this._onXChange(),this._onYChange(),this.stage&&this.visible&&b.render(),this.watch("visible",function(){this._stage&&this._visible&&this._reflection&&this._reflection.render()},this),this._reflection=b}else this._reflection&&(this._reflection.destroy(),this._reflection=null)},enumerable:!0,configurable:!0}),b}(Ie);Ge.register("image",null,{borderWidth:"borderWidth",borderColor:"borderColor",borderRadius:"borderRadius",frameColor:"backgroundColor"},function(a){return Oh.KEYWORDS[a]?"filter."+a:null}),He.register("image",Se);var Te=function(a){function b(){a.call(this),this.readyState=0,this.node.addClass("leo-reflection"),this.img=new Se,eb(this.img.dom),this.node.append(this.img.node),this.watch("reflection src borderWidth actualWidth actualHeight borderRadius borderColor backgroundColor",this.updateImage,this),this.img.addEventListener("load",this.onload,this)}return oc(b,a),d(b.prototype,"image",{get:function(){return this.img.image},enumerable:!0,configurable:!0}),d(b.prototype,"prevImage",{get:function(){return this.img.prevImage()},enumerable:!0,configurable:!0}),b.prototype.updateImage=function(a){var b=a.type,c=b.substring(0,b.length-6);this.img[c]=this[c]},b.prototype.load=function(){this.readyState=1,this.img.load()},b.prototype.onload=function(){this.readyState=this.img.readyState,this.dispatchSimpleEvent("load")},d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),b.prototype.destroy=function(){this.img.destroy(),a.prototype.destroy.call(this)},b}(Ie);Ra(Te.prototype,{src:c,borderWidth:c,borderColor:c,borderRadius:c,backgroundColor:c,reflection:c}),He.register("image with reflectoin",Se);var Ue=function(a){function b(b){a.call(this),this.responder=b,this.rootContext=new ff(this),this._context=this.rootContext,this._prevScene=null,this._currentScene=null,this.fastTransition=!0,this.transitionConfig={enter:{name:"Show",duration:0,easing:"easeInQuad"},leave:{name:"Hide",duration:0,easing:"easeOutQuad"}},this.isInTransition=!1,this._transition=null}return oc(b,a),d(b.prototype,"context",{get:function(){return this._context},set:function(a){this._context!==a&&(null==a&&(a=this.rootContext),a!==this.rootContext&&(a.prevContext=this.rootContext),this._context=a)},enumerable:!0,configurable:!0}),b.prototype.addScene=function(a){return a.visible=!1,this._doAddChild(a,this._children.length,!0)},b.prototype.removeScene=function(a){var b=this;if(this._currentScene===a){this.currentScene=null;var c=function(){b.removeEventListener("transitionend",c,null),b.remove(a)};this.addEventListener("transitionend",c,null)}else this.remove(a)},d(b.prototype,"currentScene",{get:function(){return this._currentScene},set:function(a){if(this._currentScene!==a){var b=this._currentScene;this._setScene(a)&&this.notifyPropertyChange("currentScene",b)}},enumerable:!0,configurable:!0}),b.prototype._setScene=function(a){if(this.isInTransition){if(!this.fastTransition)return!1;this.stopTransition()}return a&&!this.contains(a)&&this.addScene(a),this._prevScene=this._currentScene,this._currentScene=a,this._startTransition(),!0},b.prototype._startTransition=function(){var a=this._currentScene,b=this._prevScene;if(a&&b){this.enterScene(a);var c=a.transitionConfig;this._transition=Rc.transition(b,a,c.name,c.duration,c)}else if(a||b){var d=a,c=this.transitionConfig.enter;b?(d=b,c=this.transitionConfig.leave):this.enterScene(a),this._transition=Rc.animate(d,c.name,c.duration,c)}this._transition&&(this.isInTransition=!0,this._transition.addEventListener("end",this.stopTransition,this),this.dispatchSimpleEvent("transitionStart"))},b.prototype.stopTransition=function(){null!=this._transition&&(this._transition.removeEventListener("end",this.stopTransition,this),this._transition.currentTotalTime=this._transition.totalDuration,this._transition=null,this.isInTransition=!1,this._prevScene&&(this.leaveScene(this._prevScene),this._prevScene=null),this.dispatchSimpleEvent("transitionEnd",this._currentScene))},b.prototype.enterScene=function(a){return this.contains(a)&&(this.context=a.context,a.enter(this),a.dispatchSimpleEvent(Wh.ENTER_STAGE)),this},b.prototype.leaveScene=function(a){if(this.contains(a)){var b=this.context;this.context=a.context,a.leave(),this.context=b,a.dispatchSimpleEvent(Wh.LEAVE_STAGE)}return this},b.prototype.init=function(){a.prototype.init.call(this),this._asSymbol(),this._node.addClass("leo-comp--stage"),b.stages[this.guid]=this},b.prototype.leave=function(){this.stopTransition(),this.context=null,a.prototype.leave.call(this)},b.prototype.destroy=function(){Qe.removeDelegateListeners(this),this.stopTransition(),a.prototype.destroy.call(this),this.context=null,this.rootContext.destroy(),this.rootContext=null,delete b.stages[this.guid]},b.stages={},b}(Le);He.register("stage",Ue);var Ve=function(a,b,c){var d=Rh[b];!c&&0!==c||!isFinite(c)||Qh[b]||(c+="px"),d&&d.set?d.set(a,c,b):a.style[uf(b)||b]=c+""},We=function(a,b,c){var d=Rh[b];d&&d.set?d.set(a,c,b):a.style[b]=c+""},Xe=function(a,b,c){var d,e=Rh[b];return b=uf(b)||b,d=e&&e.get?e.get(a,b):ob(a,b),c?parseFloat(d)||0:d},Ye=function(a,b,c){if(arguments.length<3){if("string"==typeof b)return Xe(a,b,!1);for(var d in b)Ve(a,d,b[d]);return a}return"boolean"==typeof c?Xe(a,b,c):(Ve(a,b,c),a)},Ze=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--link"),this._bindEvents(),this.addEventListener("enterComplete",function(){this.state=0},this)},b.prototype.enter=function(b){a.prototype.enter.call(this,b);var c="rgba(255, 255, 255, .5)";Ee.isTransparent(this.defaultColor)?Ee.isTransparent(this.hoverColor)?Ee.isTransparent(this.activeColor)||(c=this.activeColor):c=this.hoverColor:c=this.defaultColor,Ye(this.dom,"backgroundColor",c)},b.prototype.leave=function(){a.prototype.leave.call(this),this.state=0},d(b.prototype,"state",{get:function(){return this._state},set:function(a){if(this._state!==a){this._state=a;var b=this.defaultColor;1===a?b=this.hoverColor:2===a&&(b=this.activeColor),this._updateColor(b)}},enumerable:!0,configurable:!0}),b.prototype._updateColor=function(a){Ye(this.dom,"backgroundColor",a)},b.prototype._bindEvents=function(){this.addEventListener("mouseenter",function(){this.state=b.HOVER},this),this.addEventListener("mouseleave",function(){this.state=b.DEFAULT},this),this.addEventListener("tapstart",function(){this.state=b.ACTIVE},this),this.addEventListener("tapend",function(){this.state=b.HOVER},this)},b.DEFAULT=0,b.HOVER=1,b.ACTIVE=2,b}(Ie);Ge.register("link",null,{linkNormalColor:"defaultColor",linkOverColor:"hoverColor",linkDownColor:"activeColor",shadow:"!"}),He.register("link",Ze);var $e=function(a){function b(){a.call(this),this.readyState=0,this.loadonce=!1,this.node.addClass("leo-comp--movingbackground");var b=Ad("canvas");this.node.append(b),this.canvas=b,this.ctx=b.getContext("2d"),this.animation=this.globalAnimation(),this.watch("visible",this.playAnimation,this)}return oc(b,a),b.prototype.playAnimation=function(){var a=this.animation;this.dom.parentNode&&this.visible&&this.data?a.resume():a.pause()},b.prototype.globalAnimation=function(){var a=this,b=Sc.create(null,1e9,{onRender:function(b,c,d){var e=a.data,f=a.canvas,g=a.ctx,h=e.size,i=e.dx,j=e.dy,k=e.flag?j:i,l=(c-d)/1e3*a.speed;e.type?k-=l:k+=l,k%=h,k>0?k-=h:k<-h&&(k+=h),e.flag?j=e.dy=k:i=e.dx=k,g.clearRect(0,0,f.width,f.height),g.drawImage(a.icanvas,i,j)}},{easing:"linear",repeat:1/0});return Wc.getInstance().add(b.pause()),b},b.prototype.update=function(){var a=this.img;if(a){var b=this.actualWidth,c=this.actualHeight,d=a.width,e=a.height;if(d&&e&&c&&b){var f,g,h=this.direction,i=this.getLength,j="top"===h||"bottom"===h,k=this.canvas;k.width=b,k.height=c;var l=this.icanvas,m=this.ictx;l||(l=this.icanvas=k.cloneNode(!1),m=this.ictx=l.getContext("2d")),g=i(e,c),f=i(d,b),l.width=f,l.height=g;var n,o=Math.ceil(f/d),p=Math.ceil(g/e),q=0;for(m.clearRect(0,0,f,g);q=b?a+b:Math.ceil(b/a)*a+a},b.prototype._onDirectionChange=function(){this.update()},b.prototype._onSrcChange=function(){this.animation.pause(),this.readyState=0,this.loadonce&&this.load()},b.prototype.load=function(){var a=this;if(!(this.readyState>0)){this.readyState=1,this.loadonce=!0;var b=this.img;b?b.onload=b.onerror=null:b=this.img=new Image,b.onload=function(){b.onload=null,a._onload(2),a.update()},b.onerror=function(){b.onerror=null,a._onload(4)},b.src=this.src}},b.prototype._onload=function(a){this.readyState=a,this.dispatchSimpleEvent("load")},b.prototype._onActualWidthChange=function(){this.update()},b.prototype._onActualHeightChange=function(){this.update()},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.animation.destroy();var b=this.img;b.onload=b.onerror=null},d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),b}(Ie);Ra($e.prototype,{direction:"right",speed:20,src:null}),He.register("movingbackground",$e);var _e=function(a){function b(){a.apply(this,arguments),this.anchorX=.5,this.anchorY=.5,this.timer=0,this._backgroundImage="",this._direction=0,this._speed=0,this._mode="normal",this.moveMode=this.normal,this._spin=0,this._zoomSpeedX=0,this._zoomSpeedY=0,this._zoomWidth=0,this._zoomHeight=0}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.img=this.node.el("img").addClass("leo-comp--moving-object-img"),this.watch("visible",this.changeVisible,this)},b.prototype.leave=function(){a.prototype.leave.call(this),this.changeVisible()},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this.changeVisible()},b.prototype.changeVisible=function(){this.animation||(this.animation=this.createAnimation()),this.animation[this.visible&&this.stage?"resume":"pause"]()},b.prototype.createAnimation=function(){var a=this,b=Sc.create(null,1/0,{onRender:function(b,d,e){var f=(d-e)/1e3,g=a.timer+=f;if(a.img.style("rotation",g*a._spin%360),a._zoomSpeedX>0){var h=Math.abs(a._actualWidthCopy-a._zoomWidth),i=g*a._zoomSpeedX%(2*h);i>h&&(i=2*h-i),a.actualWidth=a._actualWidthCopy+i*(a._actualWidthCopy>=a._zoomWidth?-1:1)}if(a._zoomSpeedY>0){var j=Math.abs(a._actualHeightCopy-a._zoomHeight),k=g*a._zoomSpeedY%(2*j);k>j&&(k=2*j-k),a.actualHeight=a._actualHeightCopy+k*(a._actualHeightCopy>=a._zoomHeight?-1:1)}if(a._initX!==c&&a._initY!==c){var l=a.x+f*a._speed*Math.cos(a._direction/180*Math.PI),m=a.y-f*a._speed*Math.sin(a._direction/180*Math.PI);a.moveMode(parseFloat(l.toFixed(4)),parseFloat(m.toFixed(4)))}}},{easing:"linear"});return Wc.getInstance().add(b.pause()),b},b.prototype.collision=function(a,b){var c=this.getTransformBound(),d=this._direction,e=this.stage.actualWidth-c.width-c.left,f=-c.left,g=this.stage.actualHeight-c.height-c.top,h=-c.top;(a>e&&this.isQuadrant(d,1,4)||ag&&this.isQuadrant(d,3,4)||be&&this.isQuadrant(d,1,4)&&(a=e),ag&&this.isQuadrant(d,3,4)&&(b=g),be&&this.isQuadrant(d,1,4)||ag&&this.isQuadrant(d,3,4)||be&&this.isQuadrant(d,1,4)&&(a=e,b=-this.getY(a)),ag&&this.isQuadrant(d,3,4)&&(b=g,a=this.getX(-b)),bf&&(b=g,this.timer=0)}else{var h=0===e||180===e?-(1/0):this.getX(-this.stage.actualHeight+c.top),i=0===e||180===e?1/0:this.getX(c.height+c.top),j=[-c.width-c.left,h,i,this.stage.actualWidth-c.left];j.sort(function(a,b){return a-b}),j[2]+=d,j[1]-=d,a>j[2]&&(a=j[1],b=-this.getY(a)||b,this.timer=0),a=90*(b-1)&&a<90*b||a>=90*(c-1)&&a<90*c},b.prototype._onActualWidthChange=function(a){this._actualWidthCopy||(this._actualWidthCopy=a)},b.prototype._onActualHeightChange=function(a){this._actualHeightCopy||(this._actualHeightCopy=a)},d(b.prototype,"backgroundImage",{set:function(a){this._backgroundImage!==a&&(this._backgroundImage=a,this.node.select("img").attr("src",a))},enumerable:!0,configurable:!0}),d(b.prototype,"initX",{set:function(a){this._initX=this.x=a+this._actualWidth/2},enumerable:!0,configurable:!0}),d(b.prototype,"initY",{set:function(a){this._initY=this.y=a+this._actualHeight/2},enumerable:!0,configurable:!0}),d(b.prototype,"direction",{set:function(a){a<0&&(a=360*(-a%360+1)+a),this._direction=a%360},enumerable:!0,configurable:!0}),d(b.prototype,"speed",{set:function(a){this._speed=a},enumerable:!0,configurable:!0}),d(b.prototype,"mode",{set:function(a){this._mode!==a&&(this._mode=a,this.moveMode="collision"===a?this.collision:"alternate"===a?this.alternate:this.normal)},enumerable:!0,configurable:!0}),d(b.prototype,"spin",{set:function(a){this._spin=a},enumerable:!0,configurable:!0}),d(b.prototype,"zoomSpeedX",{set:function(a){this._zoomSpeedX=a},enumerable:!0,configurable:!0}),d(b.prototype,"zoomSpeedY",{set:function(a){this._zoomSpeedY=a},enumerable:!0,configurable:!0}),d(b.prototype,"zoomWidth",{set:function(a){this._zoomWidth=a},enumerable:!0,configurable:!0}),d(b.prototype,"zoomHeight",{set:function(a){this._zoomHeight=a},enumerable:!0,configurable:!0}),b.prototype.destroy=function(){a.prototype.destroy.call(this),this.animation&&(this.animation.destroy(),this.animation=null),this.unwatch("visible",this.changeVisible,this),this.img=null},b}(Ie);Ge.register("movingobject",null,{left:"initX",top:"initY"}),He.register("movingobject",_e);var af=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.watch("visible",this.showHideSWF,this),this.node.addClass("leo-comp-flash leo-animation-unnecessary")},b.prototype.showHideSWF=function(){this.swf&&(this.visible&&this.stage?this.swf.replay():this.swf.stop())},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.swf&&this.swf.destroy()},d(b.prototype,"src",{set:function(a){this._src!==a&&(this._src=a,this.swf?this.swf.src=a:this.swf=new zi(this.dom,{swf:a,width:this.actualWidth,height:this.actualHeight,play:!1,wmode:"transparent"}))},enumerable:!0,configurable:!0}),b.prototype._onActualWidthChange=function(){this.swf&&(this.swf.width=this.actualWidth)},b.prototype._onActualHeightChange=function(){this.swf&&(this.swf.height=this.actualHeight)},b}(Ie);He.register("flash",af);var bf=function(a){function b(){a.call(this),this.context=new Me(this),this.transitionConfig={name:"None",duration:500,easing:"easeInOutCubic"}}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._asSymbol(),this._node.addClass("leo-comp--scene"),this._node.bind("mousedown",function(a){var b=a.target.nodeName;"IMG"!==b&&"CANVAS"!==b||a.preventDefault()})},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.context.destroy(),this.context=null},b.prototype.enter=function(b){a.prototype.enter.call(this,b)},b.prototype.leave=function(){a.prototype.leave.call(this)},b}(Le);He.register("scene",bf);var cf=function(a){function b(){a.call(this),this._deferred=!1,this._dirty=!1,this._spotWidth=0,this._spotHeight=0,this._spotX=0,this._spotY=0}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--spotlight"),this._context=this.dom.getContext("2d"),this._transform.accelerate=!0,this.watch("visible",function(){this.visible&&this._dirty&&this.render()},this)},d(b.prototype,"deferredRender",{get:function(){return this._deferred},set:function(a){this._deferred=a,!a&&this._dirty&&this.visible&&this.render()},enumerable:!0,configurable:!0}),b.prototype._setDirty=function(){this._dirty||(this._dirty=!0,this.visible&&!this._deferred&&this.render())},b.prototype.createNode=function(){return vi("canvas")},b.prototype._onActualWidthChange=function(){var a=this.actualWidth;this.dom.width=a,this.dom.style.width=a+"px",this._setDirty()},b.prototype._onActualHeightChange=function(){var a=this.actualHeight;this.dom.height=a,this.dom.style.height=a+"px",this._setDirty()},d(b.prototype,"spotWidth",{get:function(){return this._spotWidth},set:function(a){this._spotWidth!==a&&(this._spotWidth=a,this._setDirty())},enumerable:!0,configurable:!0}),d(b.prototype,"spotHeight",{get:function(){return this._spotHeight},set:function(a){this._spotHeight!==a&&(this._spotHeight=a,this._setDirty())},enumerable:!0,configurable:!0}),d(b.prototype,"spotX",{get:function(){return this._spotX},set:function(a){this._spotX!==a&&(this._spotX=a,this._setDirty())},enumerable:!0,configurable:!0}),d(b.prototype,"spotY",{get:function(){return this._spotY},set:function(a){this._spotY!==a&&(this._spotY=a,this._setDirty())},enumerable:!0,configurable:!0}),b.prototype.enter=function(b){a.prototype.enter.call(this,b),b.watch("actualWidth",this._onStageWidthChange,this),b.watch("actualHeight",this._onStageHeightChange,this),this.actualWidth=b.actualWidth,this.actualHeight=b.actualHeight,this.zIndex=10*b.context.getVariable("maxZIndex"),this.render()},b.prototype.leave=function(){this.stage.unwatch("actualWidth",this._onStageWidthChange,this),this.stage.unwatch("actualHeight",this._onStageHeightChange,this),a.prototype.leave.call(this)},b.prototype.render=function(a){if(a||this.visible&&this._dirty){this._dirty=!1;var b=this.actualWidth,c=this.actualHeight,d=this.spotWidth,e=this.spotHeight,f=this._context,g=Math.max(d,e)/2,h=this.spotX+d/2,i=this.spotY+e/2,j=this.getMaxRadius(h,i,b,c);f.clearRect(0,0,b,c);var k=f.createRadialGradient(h,i,0,h,i,j),l=Math.min(g/j,1);k.addColorStop(0,"transparent"),k.addColorStop(l,"transparent"),k.addColorStop(Math.min(1,(g+20)/j),"#000"),f.fillStyle=k,f.fillRect(0,0,b,c)}},b.prototype._onStageWidthChange=function(a){this.actualWidth=a},b.prototype._onStageHeightChange=function(a){this.actualHeight=a},b.prototype.getMaxRadius=function(a,b,c,d){return Math.sqrt(Math.max(a*a+b*b,(a-c)*(a-c)+b*b,a*a+(b-d)*(b-d),(a-c)*(a-c)+(b-d)*(b-d)))},b}(Ie);Ge.register("stagelight",null,{width:"spotWidth",height:"spotHeight",left:"spotX",top:"spotY",rotate:"!",shadow:"!"}),He.register("stagelight",cf);var df=function(a){function b(){a.call(this),this.actionConfigs=null,this._filter=null,this._readyState=0,this.initialActionName=null}return oc(b,a),b.prototype.init=function(){var b=this;a.prototype.init.call(this),this.node.addClass("leo-comp--sprite"),this.resizeMode=1,this._sprite=new yi(this.dom),this._sprite.onload=function(){b._onload()},this._sprite.onSizeChange=function(a,c){b._onSpriteSizeChange(a,c)}},d(b.prototype,"sprite",{get:function(){return this._sprite},enumerable:!0,configurable:!0}),d(b.prototype,"filter",{get:function(){return this._filter?this._filter:this._filter=new Oh(this._sprite.element,this)},enumerable:!0,configurable:!0}),d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(b.prototype,"srcset",{get:function(){return this._sprite.srcset},set:function(a){this._sprite.srcset=a,this._readyState=this._sprite.loaded?this._readyState:1},enumerable:!0,configurable:!0}),d(b.prototype,"frames",{get:function(){return this._sprite.frames},set:function(a){this._sprite.frames=a},enumerable:!0,configurable:!0}),d(b.prototype,"actions",{get:function(){return this._sprite.actions},set:function(a){this._sprite.actions=a},enumerable:!0,configurable:!0}),d(b.prototype,"currentActionName",{get:function(){return this._sprite.currentActionName},set:function(a){this._sprite.currentActionName=a},enumerable:!0,configurable:!0}),d(b.prototype,"currentActionIndex",{get:function(){return this._sprite.currentActionIndex},set:function(a){this._sprite.currentActionIndex=a},enumerable:!0,configurable:!0}),b.prototype.load=function(a){this.srcset=a.srcset},d(b.prototype,"readyState",{get:function(){return this._readyState},enumerable:!0,configurable:!0}),b.prototype._onload=function(){this._readyState=this._sprite.loaded>0?2:4,this.dispatchSimpleEvent("load")},b.prototype._onSpriteSizeChange=function(a,b){this.actualWidth=a,this.actualHeight=b},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this._sprite.currentActionName=this.initialActionName,this._sprite.currentActionIndex=0},b.prototype.destroy=function(){this._filter&&(this._filter.destroy(),this._filter=null),this._sprite.destroy(),this._sprite=null,a.prototype.destroy.call(this)},b}(Ie),ef=function(a){function b(){a.call(this),this.spriteLoaded=!1,this._readyState=0,this.append(this.spriteComponent=new df),this.node.addClass("leo-comp--sprite-container"),this.spriteComponent.addEventListener("load",function(){this.spriteLoaded=!0,this.__onload()},this)}return oc(b,a),b.prototype._onActualWidthChange=function(){this.spriteComponent.width=this._actualWidth},b.prototype._onActualHeightChange=function(){this.spriteComponent.height=this._actualHeight},d(b.prototype,"filter",{get:function(){return this.spriteComponent.filter},enumerable:!0,configurable:!0}),d(b.prototype,"actionConfigs",{get:function(){return this.spriteComponent.actionConfigs},set:function(a){this.spriteComponent.actionConfigs=a},enumerable:!0,configurable:!0}),d(b.prototype,"sprite",{get:function(){return this.spriteComponent.sprite},enumerable:!0,configurable:!0}),d(b.prototype,"srcset",{get:function(){return this.spriteComponent.srcset},set:function(a){this.spriteComponent.srcset=a},enumerable:!0,configurable:!0}),d(b.prototype,"frames",{get:function(){return this.spriteComponent.frames},set:function(a){this.spriteComponent.frames=a},enumerable:!0,configurable:!0}),d(b.prototype,"initialActionName",{get:function(){return this.spriteComponent.initialActionName},set:function(a){this.spriteComponent.initialActionName=a},enumerable:!0,configurable:!0}),d(b.prototype,"actions",{get:function(){return this.spriteComponent.actions},set:function(a){this.spriteComponent.actions=a},enumerable:!0,configurable:!0}),d(b.prototype,"currentActionName",{get:function(){return this.spriteComponent.currentActionName},set:function(a){this.spriteComponent.currentActionName=a},enumerable:!0,configurable:!0}),d(b.prototype,"currentActionIndex",{get:function(){return this.spriteComponent.currentActionIndex},set:function(a){this.spriteComponent.currentActionIndex=a},enumerable:!0,configurable:!0}),b.prototype.load=function(a){this.spriteComponent.load(a)},d(b.prototype,"readyState",{get:function(){return this._readyState},enumerable:!0,configurable:!0}),d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),b.prototype.__onload=function(a){a&&(this.error=a),2!==this._readyState&&4!==this._readyState&&this.soundsLoaded&&this.spriteLoaded&&(this._readyState=this.error?2:4,this.dispatchSimpleEvent("load"))},d(b.prototype,"soundURLs",{set:function(a){this._urls=a,this.destroyAudioList();var b=a.length;if(this._readyState=1,this.soundsLoaded=!1,0===b)this.soundsLoaded=!0,this.__onload();else{this.soundsLoaded=!1;for(var c,d,e=0,f=0,g=this.audioList;eb&&(b=g)}return b+1},set:Ec})}return oc(b,a),b}(Me),gf=function(a){function b(b,c,d,e,f){a.call(this),this._rect=new ci(c,d,e,f),this._container=b}return oc(b,a),d(b.prototype,"rect",{get:function(){return this._rect.clone()},enumerable:!0,configurable:!0}),d(b.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),d(b.prototype,"left",{get:function(){return this._rect.x},set:function(a){this._rect.x!==a&&(this._rect.x=a,this._container._updateChildrenDisplayPosition())},enumerable:!0,configurable:!0}),d(b.prototype,"top",{get:function(){return this._rect.y},set:function(a){this._rect.y!==a&&(this._rect.y=a,this._container._updateChildrenDisplayPosition())},enumerable:!0,configurable:!0}),d(b.prototype,"width",{get:function(){return this._rect.width},set:function(a){this._rect.width!==a&&(this._rect.width=a,this._container.actualWidth=a)},enumerable:!0,configurable:!0}),d(b.prototype,"height",{get:function(){return this._rect.height},set:function(a){this._rect.height!==a&&(this._rect.height=a,this._container.actualHeight=a)},enumerable:!0,configurable:!0}),d(b.prototype,"right",{get:function(){return this._rect.right},set:function(a){this._rect.right!==a&&(this.width=a-this._rect.left)},enumerable:!0,configurable:!0}),d(b.prototype,"bottom",{get:function(){return this._rect.bottom},set:function(a){this._rect.bottom!==a&&(this.height=a-this._rect.top)},enumerable:!0,configurable:!0}),b.prototype.set=function(a,b,c,d){var e=!1;this._rect.x!==a&&(this._rect.x=a,e=!0),this._rect.y!==b&&(this._rect.y=b,e=!0),this.width=c,this.height=d,e&&this._container._updateChildrenDisplayPosition()},b.getContentBound=function(a,b,c){if(b||(b=new ci(0,0,0,0)),!a.length)return b.set(0,0,0,0);var d=ci.identity,e=a[0],f=e.getTransformBound(null,d,c);f.left+=e.x,f.top+=e.y;for(var g=f.left,h=f.top,i=f.right,j=f.bottom,k=0,l=a.length;++ki&&(i=m),m=f.bottom,m>j&&(j=m)}return b.set(g,h,i-g,j-h)},b}(nc),hf=function(a){function b(){a.call(this),this._srcChanged=!1,this._readyState=0,this._autoplay=!1}return oc(b,a),b.prototype.init=function(){var b=this;a.prototype.init.call(this),this.node.addClass("leo-comp--media"),this.watch("visible",this._pauseWhenHidden,this),this._media=this._createMedia(),this.media.onload=function(){b._onload()}},d(b.prototype,"media",{get:function(){return this._media},enumerable:!0,configurable:!0}),b.prototype._createMedia=function(){return null},b.prototype._destroyMedia=function(){try{this._media.destroy()}catch(a){}},d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(b.prototype,"src",{get:function(){return this._src},set:function(a){if(this._src!==a){var b=this._src;this._readyState=1,this.stage&&(this._srcChanged=!0),this._media.src=this._src=a,this.notifyPropertyChange("src",b)}},enumerable:!0,configurable:!0}),b.prototype.load=function(a){this.src=a.src},d(b.prototype,"readyState",{get:function(){return this._readyState},enumerable:!0,configurable:!0}),b.prototype._onload=function(){var a=this._media.loaded;this._readyState=a>0?2:4,(this._autoplay||this._srcChanged)&&this._stage&&this.visible?this._media.resume():this._media.pause(),this.dispatchSimpleEvent("load")},d(b.prototype,"autoplay",{get:function(){return this._autoplay},set:function(a){this._autoplay!==a&&(this._autoplay=a,this.unwatch("visible",this._playWhenVisible,this),a&&(this.watch("visible",this._playWhenVisible,this),this._stage&&this._media.resume()))},enumerable:!0,configurable:!0}),b.prototype._playWhenVisible=function(){this._visible&&this._stage&&this._media.resume()},b.prototype._pauseWhenHidden=function(){this._visible||this._media.pause()},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this._srcChanged=!1,this._autoplay&&this._visible?(this._media.resume(),this._media.currentTime>=this._media.duration-.001&&(this._media.currentTime=0)):this._media.pause()},b.prototype.leave=function(){this._media&&this._media.pause(),a.prototype.leave.call(this)},b.prototype.destroy=function(){this._destroyMedia(),this._media=null,a.prototype.destroy.call(this)},b}(Ie),jf=function(a){function b(){a.call(this),this._readyState=0,this.onceloaded=!1,this.destroyed=!1}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.audio=new hi,this.node.addClass("leo-comp--BGM"),this.visible=!1},d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(b.prototype,"loop",{set:function(a){this._loop!==a&&(this._loop=a,this.audio.loop=a)},enumerable:!0,configurable:!0}),d(b.prototype,"src",{set:function(a){this._src!==a&&(this._src=a,this.audio.src=a,this._readyState=0,this.onceloaded&&this.load())},enumerable:!0,configurable:!0}),b.prototype.load=function(){0===this._readyState&&(this._readyState=1,this.audio.addEventListener("canplaythrough",this._onload,this),this.audio.addEventListener("error",this._onload,this),this.audio.load())},d(b.prototype,"readyState",{get:function(){return this._readyState},enumerable:!0,configurable:!0}),b.prototype._onload=function(){this.destroyed||(this.audio.removeEventListener("canplaythrough",this._onload,this),this.audio.removeEventListener("error",this._onload,this),this._readyState=this.audio.readyState||2,this.onceloaded?this.stage&&this.audio.play():(this.onceloaded=!0,this.dispatchSimpleEvent("load")))},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this.stage&&4===this.readyState&&this.audio.replay()},b.prototype.leave=function(){a.prototype.leave.call(this),this.audio.pause()},b.prototype.destroy=function(){this.destroyed=!0,a.prototype.destroy.call(this),this.audio.destroy()},b}(Ie);He.register("sound",jf);var kf=function(a){function e(){a.call(this),this._readyState=0,this.onceloaded=!1,this.onceload=!1}return oc(e,a),e.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--audio-player"),this.audio=new hi,this.container=this.node.el("div")},e.prototype.parseHandler=function(a){var c=this;return function(d){var e=d.button;if(!b.implementation.hasFeature("MouseEvents","2.0"))switch(event.button){case 0:case 1:case 3:case 5:case 7:e=0;break;case 2:case 6:e=2;break;case 4:e=1}!e&&c.audio.duration&&a(d)}},e.prototype.formatTime=function(a){a=Math.round(a);var b=Math.floor(a/60),c=a%60;return(b<10?"0":"")+b+":"+(c<10?"0":"")+c},e.prototype.elTime=function(){this.time=this.container.el("div").addClass("time").text("00:00")[0]},e.prototype.updateTime=function(a){var b,d=this.progressBar,e=a.target,f=a.originalEvent,g=f.offsetX,h=g===c?f.layerX:g;if(e===d)b=h;else{if(!d.contains(e))return;b=e.offsetLeft+h}this.audio.currentTime=b/jd(d)*this.audio.duration},e.prototype.unbindDocMove=function(){this.docMove&&(ih(b,"mousemove",this.docMove),this.docMove=null)},e.prototype.unbindDocUp=function(){this.docUp&&(ih(b,"mousemove",this.docUp),this.docUp=null)},e.prototype.updateVolume=function(a){var b,d=this.volumeBar,e=a.target,f=a.originalEvent,g=f.offsetX,h=g===c?f.layerX:g;if(e===d)b=h;else{if(!d.contains(e))return;b=e.offsetLeft+h}var i=b/jd(d);(i>1||i!==i)&&(i=1),i<0&&(i=0),this.audio.volume=i},e.prototype.elVolumeBar=function(){var a=this,d=this.container,e=d.el("div").addClass("volumebar bar");this.volumeBar=e[0];var f=e.el("div").addClass("fg").style("width","100%"),g=e.el("div").addClass("cursor");this.audio.addEventListener("volumechange",function(){var a=this.audio.muted?0:this.audio.volume;f.style("width",100*a+"%"),g.style("left",a*(100*(1-Xe(g[0],"width",!0)/Xe(e[0],"width",!0))+2)-1+"%")},this),e.bind("mousedown",function(c){a.unbindDocMove(),a.updateVolume(c),fh(b,"mousemove",a.docMove=function(b){a.updateVolume(b)}),a.unbindDocUp(),mh(b,"mouseup",a.docUp=function(b){a.updateVolume(b),a.unbindDocMove()})});var h=this.parseHandler(function(a){var b=e[0];if(a.target===b||b.contains(a.target)){var d=a.originalEvent.offsetX;b.title=Math.round((d===c?a.originalEvent.layerX:d)/b.offsetWidth*100)+""}});e.bind("mouseover",h),e.bind("mousemove",h)},e.prototype.elProgressBar=function(){var a=this,d=this.container,e=d.el("div").addClass("progressbar bar"),f=e.el("div").addClass("bg"),g=e.el("div").addClass("fg"),h=e.el("div").addClass("cursor");this.progressBar=e[0];this.audio;this.audio.addEventListener("progress",function(){f.style("width",this.audio.buffered.end(0)/this.audio.duration*100+"%")},this),this.audio.addEventListener("timeupdate",function(){var a=this.audio.currentTime,b=a/this.audio.duration;g.style("width",100*b+"%"),h.style("left",b*(100*(1-Xe(h[0],"width",!0)/Xe(e[0],"width",!0))+2)-1+"%"),this.time.innerHTML=this.formatTime(a)},this),e.bind("mousedown",this.parseHandler(function(c){a.unbindDocMove(),a.updateTime(c),fh(b,"mousemove",a.docMove=a.parseHandler(function(b){a.updateTime(b)})),a.unbindDocUp(),mh(b,"mouseup",a.docUp=a.parseHandler(function(b){a.updateTime(b),a.unbindDocMove()}))}));var i=this.parseHandler(function(b){var d=e[0];if(b.target===d||d.contains(b.target)){var f=b.originalEvent.offsetX;d.title=a.formatTime((f===c?b.originalEvent.layerX:f)/d.offsetWidth*a.audio.duration)}});e.bind("mouseover",i),e.bind("mousemove",i)},e.prototype.elPlayPauseButton=function(){var a=this.container,b=a.el("div").addClass("playButton");b.el("div");var c=this.audio,d=this.playPauseButton=b[0];fh(d,"tap",function(){c.playPause()}),c.addEventListener("play",function(){d.className="pauseButton"},this),c.addEventListener("pause",function(){d.className="playButton"},this)},e.prototype.elVolumeIcon=function(){var a=this.container,b=this.audio,c=a.el("div").addClass("volumeIcon"),d=c.el("div").addClass("volume66");d.el("div"),d.el("div"),d.el("div"),d.el("div"),this.volumeIcon=c[0],c.bind("mousedown",function(){b.muted=!b.muted}),b.addEventListener("volumechange",function(){var a,c=b.volume;b.muted||0===c?a="volumeMute":c>=.66?a="volume66":c>=.33?a="volume33":c>0&&(a="volume"),d[0].className=a},this)},d(e.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(e.prototype,"readyState",{get:function(){return this._readyState},set:function(a){if(this._readyState!==a){this._readyState=a;var b=this.playPauseButton;if(b)switch(a){case 1:b.className="loadButton";default:b.className="playButton"}}},enumerable:!0,configurable:!0}),e.prototype.load=function(){1!==this.readyState&&(this.onceload||(this.onceload=!0),this.readyState=1,this.audio.addEventListener("canplay",this._onload,this),this.audio.addEventListener("error",this._onload,this),this.audio.load())},e.prototype._onload=function(){this.audio.removeEventListener("canplay",this._onload,this),this.audio.removeEventListener("error",this._onload,this),this.readyState=this.audio.readyState||2,this.onceloaded?this.stage&&this._autoplay&&4===this.readyState&&this.audio.play():(this.onceloaded=!0,this.elTime(),this.elProgressBar(),this.elPlayPauseButton(),this.elVolumeIcon(),this.elVolumeBar(),this.dispatchSimpleEvent("load"))},d(e.prototype,"autoPlay",{set:function(a){this._autoplay=a},enumerable:!0,configurable:!0}),d(e.prototype,"backgroundColor",{set:function(a){this.container.style("backgroundColor",a)},enumerable:!0,configurable:!0}),d(e.prototype,"src",{set:function(a){this._src!==a&&(this._src=a,this.audio.src=a,this.onceload&&this.load())},enumerable:!0,configurable:!0}),d(e.prototype,"volume",{set:function(a){this.audio.volume=a},enumerable:!0,configurable:!0}),e.prototype.enter=function(b){a.prototype.enter.call(this,b),this.stage&&this._autoplay&&4===this.readyState&&this.audio.play()},e.prototype.leave=function(){a.prototype.leave.call(this),this.audio.pause()},d(e.prototype,"playerType",{set:function(a){this._playerType=a,this.container.addClass(a),this.resize()},enumerable:!0,configurable:!0}),e.prototype.resize=function(){var a=this._playerType;if(a){var b,c=e.size[a].width,d=e.size[a].height,f=this.actualWidth,g=this.actualHeight;b=c/d>f/g?f/c:g/d,this.container.style({scaleX:b,scaleY:b})}},e.prototype._onActualWidthChange=function(){this.resize()},e.prototype._onActualHeightChange=function(){this.resize()},e.prototype.destroy=function(){a.prototype.destroy.call(this),this.audio.destroy(),this.audio=null,this.unbindDocMove(),this.unbindDocUp(),this.progressBar&&(ui(this.progressBar).unbindAll(),ui(this.volumeBar).unbindAll(),ui(this.volumeIcon).unbindAll(),jh(this.playPauseButton))},d(e.prototype,"shadow",{get:function(){return this._shadow},set:function(a){this._shadow!==a&&(this._shadow=a,this.container.style("boxShadow",a))},enumerable:!0,configurable:!0}),e.size={"default":{width:400,height:30},mini:{width:62,height:30},simple:{width:200,height:60},classical:{width:400,height:32}},e}(Ie);Ge.register("soundplayer",null,{backgroundColor:"backgroundColor",shadow:"shadow"}),He.register("soundplayer",kf);var lf=function(a){function b(){a.call(this),this.node.addClass("leo-comp--html5video")}return oc(b,a),b.prototype._createMedia=function(){return new ii(null,this._dom)},d(b.prototype,"controlable",{get:function(){return this._media.controlable},set:function(a){this._media.controlable=a},enumerable:!0,configurable:!0}),b}(hf);He.register("html5-video",lf);var mf=function(a){function b(){a.call(this),this.node.addClass("leo-comp--vimeo")}return oc(b,a),b.prototype._createMedia=function(){return new ji(null,this._dom)},b}(hf);He.register("vimeo-video",mf);var nf=function(a){function b(){a.call(this),this.node.addClass("leo-comp--youtube")}return oc(b,a),b.prototype._createMedia=function(){return new li(null,this._dom)},d(b.prototype,"startTime",{set:function(a){this._media.startTime=a},enumerable:!0,configurable:!0}),d(b.prototype,"loop",{get:function(){return this._media.loop},set:function(a){this._media.loop=a},enumerable:!0,configurable:!0}),b}(hf);He.register("youtube-video",nf);var of=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--paypalbuy")},b.prototype._onActualWidthChange=function(){a.prototype._onActualWidthChange.call(this),this._button.style({paddingLeft:.25*this.actualWidth})},b}(Ke);He.register("paypalbuy",of,"button");var pf=function(a){function b(){a.call(this),this._textContent="",this._bgSrc="",this.animation=null}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._textFormat=new Ai(this._node,this),this.watch("textFormat.size",function(){this.span.style({fontSize:this._textFormat.size/2+"px"})},this),this.watch("visible",function(){this._visible?this._resumeZoom():this._pauseZoom()},this),this.node.addClass("leo-comp--paypaldiscount")},d(b.prototype,"textFormat",{get:function(){return this._textFormat},enumerable:!0,configurable:!0}),b.prototype._onActualHeightChange=function(){this.div.style({lineHeight:this.actualHeight+"px"})},b.prototype.createNode=function(){var a=this,b=vi("div").bind("mouseover",function(){a.node.style({scaleX:1.05,scaleY:1.05})}).bind("mouseout",function(){a.node.style({scaleX:1,scaleY:1})});return this.img=b.el("img"),this.div=b.el("div"),this.span=this.div.el("span").html("OFF"),b},d(b.prototype,"textContent",{get:function(){return this._textContent},set:function(a){this.div.text(a+"%").append(this.span),this._textContent=a},enumerable:!0,configurable:!0}),d(b.prototype,"bgSrc",{get:function(){return this._bgSrc},set:function(a){this.img.attr("src",a)},enumerable:!0,configurable:!0}),b.prototype.leave=function(){a.prototype.leave.call(this),this.animation&&(this.animation.destroy(),this.animation=null)},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this.animation=this._createZoom(),this._resumeZoom()},b.prototype._createZoom=function(){var a=Rc.getAnimation(this.img[0],"Zoom",4e3,{repeat:1/0,scale:.05});return a.pause(),Wc.getInstance().add(a),a},b.prototype._resumeZoom=function(){this._stage&&this.animation&&this.visible&&this.animation.resume()},b.prototype._pauseZoom=function(){this.animation&&this.animation.pause()},b.prototype.destroy=function(){a.prototype.destroy.call(this),this._textFormat.destroy(),this._textFormat=null},b}(Ie);Ge.register("paypaldiscount",null,{backgroundImage:"bgSrc"},function(a){return Ai.compatProperty(a)}),He.register("paypaldiscount",pf);var qf=function(a){function b(){a.call(this),this._textContent=""}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._textFormat=new Ai(this.node,this),this.watch("textFormat.size",function(){this.content.style({fontSize:3*this._textFormat.size/10+"px"}),this.node.select("sup").style({fontSize:Math.floor(4*this._textFormat.size/7)+"px"})},this),this.watch("visible",function(){this.fixTextPosition()},this),this.node.addClass("leo-comp--paypalprice")},d(b.prototype,"textFormat",{get:function(){return this._textFormat},enumerable:!0,configurable:!0}),b.prototype.fixTextPosition=function(){this.visible&&this.actualWidth&&this.actualHeight&&this.div&&this.div.style({top:(this.actualHeight-md(this.div[0]))/2,left:(this.actualWidth-jd(this.div[0]))/2})},b.prototype._onActualHeightChange=function(){this.fixTextPosition()},b.prototype._onActualWidthChange=function(){this.fixTextPosition()},b.prototype.createNode=function(){var a=this,b=vi("div").bind("mouseover",function(){a.node.style({scaleX:1.1,scaleY:1.1})}).bind("mouseout",function(){a.node.style({scaleX:1,scaleY:1})});return this.img=b.el("img"),this.div=b.el("div"),this.content=this.div.el("p"),this.DOMPrice=this.div.el("p"),b},d(b.prototype,"textContent",{get:function(){return this._textContent},set:function(a){this.content.text(a),this._textContent=a},enumerable:!0,configurable:!0}),d(b.prototype,"price",{get:function(){return this.priceString||""},set:function(a){this.priceString=a;var b,c,d=parseFloat(a),e="";d&&(d=d.toString(),b=a.split(d)[1],c=d.split("."), e=c[0],c[1]&&(e+=""+c[1]+""),e+=b||""),this.DOMPrice.html(e)},enumerable:!0,configurable:!0}),d(b.prototype,"src",{get:function(){return this.img.attr("src")},set:function(a){this.img.attr("src",a)},enumerable:!0,configurable:!0}),b.prototype.destroy=function(){a.prototype.destroy.call(this),this._textFormat.destroy(),this._textFormat=null,this.img=null,this.div=null,this.DOMPrice=null},b}(Ie);Ge.register("paypalprice",null,{backgroundImage:"src"},function(a){return Ai.compatProperty(a)}),He.register("paypalprice",qf);var rf=function(a){function b(){a.call(this),this.hotSize=78,this.li=function(){var a=vi("div").addClass("ppproduct--li");a.el("img");return a}(),this.urlArray=[]}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--paypalproductbox")},b.prototype.liHeight=function(){return Math.round(.2*this.actualHeight)},b.prototype._onActualWidthChange=function(){var a=Math.min(this.hotSize,Math.min(this.actualWidth,this.actualHeight)/2);this.hot.style({width:a,height:a}),this.centerThumbnail()},b.prototype._onActualHeightChange=function(){var a=Math.min(this.hotSize,Math.min(this.actualWidth,this.actualHeight)/2);this.hot.style({width:a,height:a});var b=this.liHeight(),c=Math.round(.05*b);this.li.style({width:b,padding:c}),k(this.ul.select(".ppproduct--li"),function(a,d){Ye(a,{width:b,padding:c})}),this.centerThumbnail()},b.prototype.centerThumbnail=function(){var a=this.actualWidth,b=this.urlArray.length*(this.liHeight()+10)-10;this.ul.style("tx",b0&&e[0]===b[0])){this.slideContainer.addClass("leo-loading");var f=this.imgWrap.select(".active").removeClass("active"),g=this.imgWrap.el("img").bind("load",function(){c.call(d)}).bind("error",function(){c.call(d)}).attr("src",this.urlArray[a]).addClass("active");if(f[0]){var h=Rc.getTransition(f[0],g[0],Object.keys(Rc._transitionFactories)[Math.floor(Object.keys(Rc._transitionFactories).length*Math.random())],500);h.addEventListener("end",function(){f.remove(),h.destroy()},this),Wc.getInstance().add(h)}e.removeClass("active"),b.addClass("active");var i=this.width,j=10,k=this.liHeight()+j,l=0,m=i-this.urlArray.length*k+j,n=(-a+1)*k,o=i-(a+2)*k+j,p=parseInt(this.ul.style("tx"),10);n>l&&(n=l),oo&&(p=o),this.ul.style("tx",p)}},b.prototype.createNode=function(){var a=vi("div");return this.hot=a.el("img"),this.slideContainer=a.el("div").addClass("ppproduct--slide"),this.imgWrap=this.slideContainer.el("div"),this.thumbnailContainer=a.el("div").addClass("ppproduct--thumbnail"),this.ul=this.thumbnailContainer.el("div"),a},b}(Ie);Ge.register("paypalproductbox",null,{backgroundImage:"hotSrc",borderColor:"borderColor",frameWidth:"padding",frameColor:"paddingColor",shadow:"!"}),He.register("paypalproductbox",rf);var sf=function(a){function b(){a.call(this),this._readyState=0,this._rate=5}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.watch("visible",function(){this.visible?this._resumeAnimation():this._pauseAnimation()},this),this.node.addClass("leo-comp--paypalstar")},d(b.prototype,"maxrate",{get:function(){return 5},enumerable:!0,configurable:!0}),b.prototype._onActualWidthChange=function(){var a=this.actualWidth;this.canvas.width=a,this.canvas.style.width=a+"px",this.updateCanvas()},b.prototype._onActualHeightChange=function(){var a=this.actualHeight;this.canvas.height=a,this.canvas.style.height=a+"px",this.updateCanvas()},d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(b.prototype,"readyState",{get:function(){return this._readyState},enumerable:!0,configurable:!0}),b.prototype.updateStar=function(){var a,b=this.node.select("img"),c=this.maxrate,d=this.rate;if(this.star_url)for(;c--;){var a=b[c];c>=d?a.src=this.gray_star_url:a.src=this.star_url}},b.prototype.onload=function(a){this._readyState=2,this.dispatchSimpleEvent("load"),this.updateStar(),this.updateCanvas()},b.prototype.updateCanvas=function(){if(2===this.readyState){var a=this.canvas,b=a.cloneNode(!1).getContext("2d");if(b){for(var c=this.maxrate,d=a.width,e=a.height;c--;)b.drawImage(this.img,c*d/5,0,d/5,e);var f=Math.round(.5*d),g=a.cloneNode(!1).getContext("2d"),h=g.createLinearGradient(0,0,f,0);h.addColorStop(0,"rgba(255,255,255,0)"),h.addColorStop(.1,"rgba(255,255,255,.1)"),h.addColorStop(.5,"rgba(255,255,255,.7)"),h.addColorStop(.9,"rgba(255,255,255,.1)"),h.addColorStop(1,"rgba(255,255,255,0)"),g.save(),g.fillStyle=h,g.rotate(15*Math.PI/180),g.translate(Math.atan(15*Math.PI/180)*e,0),g.fillRect(0,-f,f,e+2*f),g.restore(),this.animation&&this.animation.destroy();var i=a.getContext("2d");this.animation=Sc.create(this,8e3,{onRender:function(a){i.clearRect(0,0,d,e),i.globalCompositeOperation="source-over",i.drawImage(g.canvas,(5*a-1)*d,0),i.globalCompositeOperation="destination-in",i.drawImage(b.canvas,0,0)}},{repeat:1/0,easing:"easeOutCubic"}),this.animation.pause(),Wc.getInstance().add(this.animation),this._resumeAnimation()}}},d(b.prototype,"src",{set:function(a){var b=a.split(";");this.star_url=b[0],this.gray_star_url=b[1]},enumerable:!0,configurable:!0}),b.prototype.load=function(){var a=this,b=new Image,c=new Image,d=!1,e=!1;this._readyState=1,b.onload=function(){b.onload=b.onerror=null,d=!0,d&&e&&a.onload(b)},c.onload=function(){c.onload=c.onerror=null,e=!0,d&&e&&a.onload(c)},b.onerror=c.onerror=function(){a._readyState=4,a.dispatchSimpleEvent("load")},b.src=this.star_url,c.src=this.gray_star_url,this.img=b},d(b.prototype,"rate",{get:function(){return this._rate},set:function(a){var b=this.maxrate;a=Math.min(a,b),a=Math.max(a,0),this._rate=a,this.updateStar()},enumerable:!0,configurable:!0}),b.prototype.createNode=function(){var b=a.prototype.createNode.call(this),c=vi("img"),d=this.maxrate,e=c[0],f=0;do b.append(e),e=e.cloneNode(!1);while(++f0||navigator.msMaxTouchPoints>0),zf=uf("transform"),Af=uf("transformOrigin"),Bf=!1,Cf=!1,Df=!1,Ef=!1,Ff=!1,Gf=!1,Hf=!1,If="";!function(){var a=Ad("div");Bf=function(){return a.style.cssText="float:left;",!!a.style.cssFloat}(),tf["float"]=Bf?"cssFloat":"styleFloat",Cf=function(){var b="transform:translate3d(1px,1px,1px);";return a.style.cssText=sc.join(b)+b+b,!!~(a.style[zf]+"").indexOf("3d")}(),Df=function(){var b="transform-style:preserve-3d;";return a.style.cssText=sc.join(b)+b+b,!!~(a.style[uf("transformStyle")]+"").indexOf("3d")}(),Ef=function(){return a.style.cssText="-webkit-filter:blur(10px);",!!~(a.style.getPropertyValue("-webkit-filter")+"").indexOf("blur")}(),Ff=function(){return a.style.cssText="filter:blur(10px);",!!~(a.style.getPropertyValue("filter")+"").indexOf("blur")}(),Gf=function(){a.style.cssText="background-image:linear-gradient(to bottom,#000,#fff);";var b=Hf=!!~(a.style.backgroundImage+"").indexOf("gradient");if(!b){var c="background-image:",d="linear-gradient(bottom,#000,#fff);",e=sc;if(a.style.cssText=c+e.join(d+c)+d+c+d,d=a.style.backgroundImage+"",Hf=!!~d.indexOf("gradient"))for(var f=-1,g=e.length;++f=0){If=e[f];break}}return b}(),a=null}();var Jf=function(a){function b(){var b=this;a.call(this),this._shadowConfig=null,this._gradient="",this._gradientEl=null,this._strokeWidth=1,this._strokeColor="rgba(0,0,0,0)",this._updateTimer=null,this.needUpdateViewBox=!0,this.watch("visible",function(){b.visible&&b.stage&&b.needUpdateViewBox&&b.updateViewBox()},null)}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--shape"),this._svg=this.node.el("svg").style("overflow","visible"),this._shape=this.createShape().appendTo(this._svg).attr({"stroke-linecap":"round","stroke-linejoin":"round"})},b.prototype.createShape=function(){return vi("svg:g")},b.prototype.destroyShape=function(){this._shape=null},b.prototype.destroy=function(){a.prototype.destroy.call(this),this._clearUpdateTimer()},d(b.prototype,"shadow",{get:function(){return this._shadow},set:function(a){var b=this._shadow;if(a!==b){var c=this._shadowConfig;if(this._shadow=a,"none"===a)this._svg.style("filter","none");else if(Ef)this._svg[0].style.webkitFilter="drop-shadow("+a+")";else if(Ff)this._svg[0].style.filter="drop-shadow("+a+")";else{c||(c=this._createShadowConfig()),"none"===b&&this._svg.style("filter","url(#"+c.id+")");var d=a.split(" ");c.offset.setAttribute("dx",parseInt(d[0],10)+""),c.offset.setAttribute("dy",parseInt(d[1],10)+""),c.blur.setAttribute("stdDeviation",parseInt(d[2],10)+""),c.color.setAttribute("flood-color",d[3])}this.updateViewBox(!0),this.notifyPropertyChange("shadow",b)}},enumerable:!0,configurable:!0}),b.prototype._createShadowConfig=function(){var a="shadow_"+this.guid+"_"+f(),b="result_"+this.guid+"_"+f(),c="blur_"+this.guid+"_"+f(),d="flood_"+this.guid+"_"+f(),e=this.node.select("defs");e[0]||this._updateGradient("rgba(0,0,0,0);rgba(0,0,0,0)");var g=this.node.select("defs").el("filter").attr("id",a),h=g.el("feGaussianBlur").attr("in","SourceAlpha").attr("result",c),i=g.el("feOffset").attr("result",b).attr("in",c),j=g.el("feFlood").attr("result",d);g.el("feComposite").attr({"in":d,in2:b,operator:"in"});var k=g.el("feMerge");return k.el("feMergeNode"),k.el("feMergeNode").attr("in","SourceGraphic"),{id:a,blur:h[0],offset:i[0],color:j[0]}},d(b.prototype,"gradient",{get:function(){return this._gradient},set:function(a){a!==this._gradient&&(this._gradient=a,this._updateGradient(a))},enumerable:!0,configurable:!0}),b.prototype._updateGradient=function(a){if(""===a||"none"===a)this._gradient="",this._shape.attr("fill","none");else{if(this._gradientEl)this._gradient||this._shape.attr("fill","url(#"+this._gradientEl.attr("id")+")");else{var b="gradient"+this.guid+"_"+f();this._gradientEl=this._svg.el("defs").el("linearGradient").attr({id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%"}),this._shape.attr("fill","url(#"+b+")")}var c=this._gradientEl,d=a.split(";");1===d.length&&(d=d.concat(d));for(var e=c.select("stop"),g=e.length,h=d.length,i=1/(h-1),j=0;j>2].attr({x:d[f],y:d[f+1],width:d[f+2],height:d[f+3]})},b}(Kf);He.register("flowchart",Tf,"advshape");var Uf=function(a){function b(){a.call(this),this._hasAngleSet=!1,this._angle=0}return oc(b,a),b.prototype.createShape=function(){return vi("svg:polygon")},d(b.prototype,"angle",{get:function(){return this._angle},set:function(a){this._hasAngleSet?this._angle!==a&&(this._angle=a,this.render()):(this._hasAngleSet=!0,this._angle=a,this.render())},enumerable:!0,configurable:!0}),b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight,c=this._hasAngleSet?b/2*Math.tan(this._angle*Nc):a/4;this._shape.attr("points",[0,b/2,c,0,a-c,0,a,b/2,a-c,b,c,b].join(","))},b}(Kf);He.register("hexagon",Uf,"advshape");var Vf=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.createShape=function(){return vi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight;this._shape.attr("points",[0,b,.75*a,b,a,0,.25*a,0].join(","))},b}(Kf);He.register("parallelogram",Vf,"advshape");var Wf=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.createShape=function(){return vi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight;this._shape.attr("points",[0,b/3,a/2,0,a,b/3,.8*a,b,.2*a,b].join(","))},b}(Kf);He.register("pentagon",Wf,"advshape");var Xf=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.createShape=function(){return vi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth/2,b=this.actualHeight/2;this._shape.attr("points",[0,b,a,2*b,2*a,b,a,0].join(","))},b}(Kf);He.register("prismatic",Xf,"advshape");var Yf=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.createShape=function(){return vi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight;this._shape.attr("points",[0,b,a,b,.75*a,0,.25*a,0].join(","))},b}(Kf);He.register("trapezoid",Yf,"advshape");var Zf=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.createShape=function(){return vi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight;this._shape.attr("points",[0,b,a,b,a/2,0].join(","))},b}(Kf);He.register("triangle",Zf,"advshape");var $f=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this)},b.prototype.createShape=function(){var b=a.prototype.createShape.call(this);b[0].style.setProperty("fill","none","important");for(var c=this._lines=[b.el("line"),b.el("line"),b.el("line"),b.el("line")],d={x1:0,y1:0,x2:0,stroke:"#808080","stroke-linecap":"square","stroke-width":2},e=-1,f=c.length;++e>2)+1].attr({x:i[j],y:i[j+1],width:i[j+2],height:i[j+3]})},b}(Kf);He.register("virtualend",_f,"advshape");var ag=function(a){function b(){a.call(this),this._actualHandlerX=0,this._actualHandlerY=0}return oc(b,a),d(b.prototype,"handlerX",{get:function(){return this._actualHandlerX+this.x},set:function(a){a-=this.x,this._actualHandlerX!==a&&(this._actualHandlerX=a,this.render())},enumerable:!0,configurable:!0}),d(b.prototype,"handlerY",{get:function(){return this._actualHandlerY+this.y},set:function(a){a-=this.y,this._actualHandlerY!==a&&(this._actualHandlerY=a,this.render())},enumerable:!0,configurable:!0}),b.prototype._onXChange=function(a){this._actualHandlerX+=a-this.x,this.render()},b.prototype._onYChange=function(a){this._actualHandlerY+=a-this.y,this.render()},b}(Kf),bg=function(a){function b(){a.call(this),this.quadValPercentage=.25}return oc(b,a),b.prototype.createShape=function(){return vi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight;if(a&&b){var c=[0,0,a,0,a,b,0,b],d=this._getArea(),e=this._getHandlerPoints(d);if(e)for(var f=(d+2)%4<<1,g=-1,h=e.length;++g=0&&c<=e&&d>=0&&d<=f)return null;var g=this.quadValPercentage;switch(a){case 0:var h=f*g;return d=f/2?[0,Math.min(d,f),c,d,0,Math.min(d-h,3*h)]:[0,Math.max(d+h,h),c,d,0,Math.max(d,0)];case 1:var h=e*g;return c>=e/2?[Math.min(c,e),f,c,d,Math.min(c-h,3*h),f]:[Math.max(c+h,h),f,c,d,Math.max(c,0),f];case 3:var h=e*g;return c=0&&c<=e&&d>=0&&d<=f)return null;var g,h=.12,i=162;switch(a){case 0:return g=Math.min(f,i)*h,[e,d-g/2,c,d,e,d+g/2];case 2:return g=Math.min(f,i)*h,[0,d+g/2,c,d,0,d-g/2];case 1:return g=Math.min(e,i)*h,[c+g/2,f,c,d,c-g/2,f];case 3: return g=Math.min(e,i)*h,[c-g/2,0,c,d,c+g/2,0]}},b.prototype._onBackgroundColorChange=function(){var a=this.backgroundColor;a&&!this.gradient&&this._shape.attr("fill",a)},b.prototype._onXChange=function(a){},b.prototype._onYChange=function(a){},b}(cg);Ra(dg.prototype,{located:"top",backgroundColor:""}),Ge.register("bubbledialogbox","advshape",{backgroundColor:"backgroundColor",borderRadius:"borderRadius"}),He.register("bubbledialogbox",dg);var eg=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.createShape=function(){var b=a.prototype.createShape.call(this);return this._cloud=b.el("path"),this._circles=[b.el("circle"),b.el("circle")],b},b.prototype._renderCircles=function(){var a=this._circles,b=this.actualWidth/2,c=this.actualHeight/2,d=Math.max(2*b,2*c)/25,e=this._actualHandlerX,f=this._actualHandlerY;a[1].attr({r:3*d/5,cx:e,cy:f});var g=tb(e-b,f-c,b,c);a[0].attr({r:d,cx:(g[0]+b+e)/2,cy:(g[1]+c+f)/2})},b.prototype.render=function(){var a=b.pathData,c=this.actualWidth/a.width,d=this.actualHeight/a.height;this._cloud.attr("d",c*d?gg.transformPath(a.path,c,d):""),this._renderCircles()},b.pathData={path:"M42.128,47.696c0,0-7.188,0.875-11.438-0.688c-2.563-0.941-4.188-3.563-4.188-3.563s-9.439,1.243-13.939,0.43S4.812,40.563,3,38.813s-2.948-4.77-2.999-8.244c-0.05-3.438,1.123-6.746,2.938-8.438c3.688-3.438,7.938-4.938,7.938-4.938s-0.53-1.672,0.467-3.674c0.908-1.826,1.902-3.023,5.347-4.514c4.188-1.813,7.563-0.5,9.188-0.125s4.188,2.438,4.188,2.438s5.5-11,21.437-11.313c15.938-0.313,21.348,11.016,21.811,11.877c1.314,2.438,1.375,5.688,1.375,5.688s7.5,2.75,9.564,7.188c2.063,4.438,1.188,7.872,0.438,9.938c-2.75,7.563-8.941,8.617-8.941,8.617s-1.061,2.884-5.936,5.071c-4.938,2.125-12.176,1.813-12.176,1.813s-1.643,6.071-7.764,5.974C43.752,56.074,42.128,47.696,42.128,47.696z",width:88,height:58},b}(ag);He.register("clouddialogbox",eg,"advshape");var fg=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.createShape=function(){return vi("svg:path")},b.prototype.render=function(){var a=this.actualWidth/2,b=this.actualHeight/2,c=this._actualHandlerX-a,d=this._actualHandlerY-b;if(c*c/(a*a)+d*d/(b*b)<1)return void this._shape.attr("d","M"+a+" 0 A"+a+" "+b+" 0 1 1 0 "+b+" A"+a+" "+b+" 0 0 1 "+a+" 0 Z");var e=Math.atan2(d,c)*Oc,f=Math.tan((e-15)*Nc),g=Math.tan((e+15)*Nc),h=a*b/Math.sqrt(b*b+f*f*a*a)||0,i=f*h,j=(h-c)*(h-c)+(i-d)*(i-d),k=(h+c)*(h+c)+(i+d)*(i+d);j>k&&(h*=-1,i*=-1);var l=a*b/Math.sqrt(b*b+g*g*a*a)||0,m=g*l,j=(l-c)*(l-c)+(m-d)*(m-d),k=(l+c)*(l+c)+(m+d)*(m+d);j>k&&(l*=-1,m*=-1),this._shape.attr("d",["M"+(h+a)+" "+(i+b),"A"+a+" "+b+" 0 1 0 "+(l+a)+" "+(m+b),"L"+(c+a)+" "+(d+b),"Z"].join(" "))},b}(ag);He.register("ovaldialogbox",fg,"advshape");var gg=function(a){function b(){a.call(this)}return oc(b,a),b.prototype.createShape=function(){var a=vi("svg:g");return this._createPaths(a),this._createFills(a),this._createStrokes(a),a},b.prototype._createPaths=function(a){this._pathEls=null;var b=this._paths;if(b){this._pathEls=[];for(var c=-1,d=b.length;++c4)&&(n*=(k+(k>4?1:0))%2?c:b):n*=k%2?c:b,++k,g+=n+o,l=f.lastIndex}g+=j.substr(l)}}return g+a.substr(h)},b}(Kf),hg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={fills:["M0,36.727L36.64,36.727L47.962,0 59.285,36.727L95.924,36.727L66.282,59.424L77.605,96.151L47.962,73.453L18.32,96.151L29.643,59.424L0,36.727z"],strokes:["M0,36.727L36.64,36.727L47.962,0L59.285,36.727L95.924,36.727L66.282,59.424L77.605,96.151L47.962,73.453L18.32,96.151L29.643,59.424L0,36.727z"],width:98,height:99},b}(gg);He.register("5pointstar",hg,"advshape");var ig=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={paths:["M0,60.095C0,26.905,26.842,0,59.953,0l0,0l0,0c33.11,0,59.952,26.905,59.952,60.095l0,0l0,0c0,33.189-26.842,60.095-59.952,60.095l0,0l0,0C26.842,120.189,0,93.284,0,60.095L0,60.095L0,60.095z M29.977,60.095c0,16.595,13.421,30.047,29.977,30.047l0,0l0,0c16.555,0,29.976-13.452,29.976-30.047S76.508,30.047,59.953,30.047l0,0l0,0C43.397,30.047,29.977,43.5,29.977,60.095L29.977,60.095z"],width:124,height:124},b}(gg);He.register("circle",ig,"advshape");var jg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={paths:["M19.758,54.438c-2.523-19.239,10.468-36.957,29.017-39.573c7.516-1.061,15.158,0.524,21.703,4.502l0,0c6.935-13.559,23.141-18.712,36.196-11.51c2.283,1.26,4.378,2.856,6.221,4.739l0,0c5.401-11.24,18.557-15.806,29.385-10.199c2.996,1.552,5.61,3.796,7.642,6.56v0c8.705-10.629,24.089-11.942,34.359-2.933c4.316,3.787,7.226,9.009,8.229,14.772l0,0c14.265,4.037,22.679,19.329,18.795,34.155c-0.326,1.247-0.736,2.468-1.226,3.655l0,0c11.439,15.449,8.639,37.591-6.255,49.456c-4.637,3.694-10.113,6.086-15.9,6.944l0,0c-0.129,16.62-13.232,29.985-29.268,29.852c-5.357-0.044-10.599-1.624-15.144-4.564l0,0c-5.424,18.633-24.343,29.165-42.256,23.523c-7.507-2.364-13.994-7.365-18.354-14.148l0,0c-18.341,11.477-42.147,5.304-53.173-13.788c-0.139-0.24-0.275-0.482-0.41-0.726l0,0c-12.003,1.457-22.876-7.428-24.285-19.846c-0.751-6.619,1.355-13.244,5.757-18.11l0,0C0.398,90.853-3.094,76.921,2.993,66.083c3.511-6.253,9.67-10.386,16.582-11.129L19.758,54.438z","M23.738,99.605c-4.437,0.36-8.874-0.703-12.714-3.049 M34.956,132.971c-1.785,0.736-3.655,1.228-5.563,1.459 M82.889,149.003c-1.342-2.088-2.466-4.319-3.352-6.656 M144.872,132.405c-0.198,2.477-0.646,4.925-1.339,7.304 M171.483,87.276c10.061,5.079,16.409,15.699,16.319,27.297 M209.975,58.203c-1.629,3.949-4.116,7.453-7.267,10.235 M192.539,20.223c0.277,1.595,0.406,3.214,0.384,4.834 M146.131,14.584c0.946-2.23,2.2-4.307,3.723-6.165 M111.313,17.522c0.386-1.843,0.992-3.629,1.803-5.317 M70.452,19.328c2.368,1.439,4.559,3.171,6.524,5.158 M20.897,59.867c-0.517-1.775-0.897-3.59-1.139-5.427"],width:226,height:174},b}(gg);He.register("cloud",jg,"advshape");var kg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={paths:["M0,38.611L158.163,38.611L158.163,154.445L0,154.445L0,38.611","M158.163,38.611L191.977,0L191.977,115.834L158.163,154.445L158.163,38.611","M0,38.611L33.814,0L191.977,0L158.163,38.611L0,38.611"],width:196,height:158},b}(gg);He.register("cube",kg,"advshape");var lg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={fills:["M0,86.019l15.19-16.471v7.611l0,0c22.612-3.768,39.878-15.563,44.415-30.344l0,0C65.859,67.2,46.376,87.19,15.19,92.386l0,0v7.613L0,86.019L0,86.019z","M60.76,54.429c0-21.65-27.204-39.203-60.761-39.203l0,0l0,0V0l0,0C33.556,0,60.76,17.552,60.76,39.203l0,0V54.429z"],strokes:["M60.76,54.429c0-21.65-27.204-39.203-60.761-39.203l0,0l0,0V0l0,0C33.556,0,60.76,17.552,60.76,39.203l0,0l0,0V54.429L60.76,54.429c0,17.877-18.742,33.488-45.57,37.959l0,0v7.613L0,86.019l15.19-16.471v7.611l0,0c22.612-3.768,39.878-15.563,44.415-30.344"],width:64,height:100},b}(gg);He.register("curvedleftarrow",lg,"advshape");var mg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={paths:["M0.012,39.205c0,17.875,18.744,33.488,45.571,37.957l0,0v-7.613l15.189,16.473l-15.189,13.98v-7.613l0,0C18.756,87.917,0.012,72.306,0.012,54.431V39.205z","M60.773,15.227c-29.009,0-53.971,13.23-59.604,31.589l0,0C-5.349,25.578,16.055,4.952,48.973,0.747C52.86,0.25,56.811,0,60.773,0V15.227L60.773,15.227z"],strokes:["M0.012,39.205c0,17.875,18.744,33.488,45.571,37.957l0,0v-7.613l15.189,16.473l-15.189,13.98v-7.613l0,0C18.756,87.917,0.012,72.306,0.012,54.431l0,0V39.205L0.012,39.205c0-21.651,27.204-39.203,60.761-39.203l0,0v15.227l0,0c-29.009,0-53.971,13.23-59.604,31.59"],width:64,height:100},b}(gg);He.register("curvedrightarrow",mg,"advshape");var ng=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={fills:["M0,10.512c0,5.806,21.546,10.512,48.125,10.512S96.25,16.318,96.25,10.512l0,0v63.072l0,0c0,5.805-21.546,10.512-48.125,10.512S0,79.39,0,73.584l0,0V10.512z","M0,10.512C0,4.707,21.546,0,48.125,0S96.25,4.707,96.25,10.512l0,0l0,0c0,5.806-21.546,10.512-48.125,10.512S0,16.318,0,10.512L0,10.512L0,10.512z"],strokes:["M96.25,10.512c0,5.806-21.546,10.512-48.125,10.512S0,16.318,0,10.512l0,0l0,0C0,4.707,21.546,0,48.125,0S96.25,4.707,96.25,10.512L96.25,10.512L96.25,10.512v63.072l0,0c0,5.805-21.546,10.512-48.125,10.512S0,79.39,0,73.584l0,0v0V10.512"],width:100,height:88},b}(gg);He.register("cylinder",ng,"advshape");var og=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={paths:["M0,71.112C0,31.838,31.987,0,71.444,0l0,0l0,0c39.457,0,71.443,31.838,71.443,71.112l0,0l0,0c0,39.274-31.986,71.112-71.443,71.112l0,0l0,0C31.987,142.224,0,110.386,0,71.112L0,71.112L0,71.112z M110.866,92.29c11.8-21.581,3.716-48.557-18.057-60.253c-13.295-7.142-29.326-7.161-42.638-0.05L110.866,92.29zM32.021,49.935c-11.8,21.581-3.715,48.556,18.057,60.252c13.295,7.142,29.326,7.16,42.638,0.05L32.021,49.935z"],width:145,height:144},b}(gg);He.register("doublecircle",og,"advshape");var pg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={fills:["M47.962,25.818L64.491,0L62.861,23.704L81.624,19.84L74.173,32.563L93.69,36.221L78.191,46.629L95.924,59.16L74.772,57.611L80.581,80.549L62.262,64.355L58.829,87.858L46.772,66.482L37.681,96.151L34.262,69.563L21.147,78.421L25.167,62.04L0.599,64.933L16.529,52.416L0,38.349L20.548,33.907L1.643,10.216L32.472,28.133L37.091,10.216L47.962,25.818z"],strokes:["M47.962,25.818L64.491,0L62.861,23.704L81.624,19.84L74.173,32.563L93.69,36.221L78.191,46.629L95.924,59.16L74.772,57.611L80.581,80.549L62.262,64.355L58.829,87.858L46.772,66.482L37.681,96.151L34.262,69.563L21.147,78.421L25.167,62.04L0.599,64.933L16.529,52.416L0,38.349L20.548,33.907L1.643,10.216L32.472,28.133L37.091,10.216L47.962,25.818z"],width:98,height:99},b}(gg);He.register("explosion1",pg,"advshape");var qg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={fills:["M50,23.645c20.683-58.048,101.344,0,0,74.634C-51.344,23.645,29.317-34.403,50,23.645L50,23.645z"],strokes:["M50,23.645c20.683-58.048,101.344,0,0,74.634C-51.344,23.645,29.317-34.403,50,23.645L50,23.645z"],width:104,height:102},b}(gg);He.register("heart",qg,"advshape");var rg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={fills:["M0,19.969L19.921,0L19.921,9.984L80.077,9.984L80.077,0L100,19.969L80.077,39.938L80.077,29.953L19.921,29.953L19.921,39.938L0,19.969z"],strokes:["M0,19.969L19.921,0L19.921,9.984L80.077,9.984L80.077,0L100,19.969L80.077,39.938L80.077,29.953L19.921,29.953L19.921,39.938L0,19.969z"],width:103,height:42},b}(gg);He.register("leftrightarrow",rg,"advshape");var sg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={fills:["M37.624,0L57.11,27.065L49.072,30.256L73.617,53.449L65.579,57.321L95.924,96.151L44.462,66.393L54.277,62.262L22.302,43.201L33.76,37.312L0,17.316L37.624,0z"],strokes:["M37.624,0L57.11,27.065L49.072,30.256L73.617,53.449L65.579,57.321L95.924,96.151L44.462,66.393L54.277,62.262L22.302,43.201L33.76,37.312L0,17.316L37.624,0z"],width:98,height:99},b}(gg);He.register("lightningbolt",sg,"advshape");var tg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={fills:["M21.79,6.582c0,3.634-2.438,6.582-5.447,6.582l0,0c-1.505,0-2.725-1.474-2.725-3.29c0-1.818,1.22-3.292,2.725-3.292l0,0H21.79z","M10.896,211.519c0,3.635-2.44,6.582-5.448,6.582S0,215.154,0,211.519c0-3.637,2.439-6.584,5.447-6.584l0,0l0,0c1.505,0,2.724,1.477,2.724,3.293c0,1.818-1.219,3.291-2.724,3.291l0,0H10.896z","M5.447,218.101c3.009,0,5.448-2.947,5.448-6.582l0,0H5.447l0,0c1.505,0,2.724-1.473,2.724-3.291c0-1.816-1.219-3.293-2.724-3.293l0,0l0,0h5.448V6.582l0,0C10.896,2.947,13.334,0,16.343,0l0,0l0,0h65.369l0,0c3.008,0,5.447,2.947,5.447,6.582c0,3.634-2.439,6.582-5.447,6.582l0,0l0,0h-5.447v198.355l0,0c0,3.635-2.44,6.582-5.448,6.582l0,0H5.447z M21.79,6.582c0,3.634-2.438,6.582-5.447,6.582l0,0c-1.505,0-2.725-1.474-2.725-3.29c0-1.818,1.22-3.292,2.725-3.292l0,0H21.79z"],strokes:["M10.896,204.935V6.582l0,0C10.896,2.947,13.334,0,16.343,0l0,0l0,0h65.369l0,0c3.008,0,5.447,2.947,5.447,6.582c0,3.634-2.439,6.582-5.447,6.582l0,0l0,0h-5.447v198.355l0,0c0,3.635-2.44,6.582-5.448,6.582l0,0l0,0H5.447l0,0c-3.008,0-5.447-2.947-5.447-6.582c0-3.637,2.439-6.584,5.447-6.584l0,0H10.896z M16.343,0c3.008,0,5.447,2.947,5.447,6.582c0,3.634-2.438,6.582-5.447,6.582l0,0l0,0c-1.505,0-2.725-1.474-2.725-3.29c0-1.818,1.22-3.292,2.725-3.292l0,0l0,0h5.447 M76.265,13.164H16.343 M5.447,204.935c1.505,0,2.724,1.477,2.724,3.293c0,1.818-1.219,3.291-2.724,3.291l0,0l0,0h5.448 M5.447,218.101c3.009,0,5.448-2.947,5.448-6.582l0,0v-6.584"],width:89,height:200},b}(gg);He.register("paper",tg,"advshape");var ug=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={paths:["M0,105.666L52.708,52.833L52.708,79.25L58.316,79.25L58.316,0L166.507,0L166.507,79.25L172.115,79.25L172.115,52.833L224.823,105.666L172.115,158.499L172.115,132.083L166.507,132.083L166.507,211.332L58.316,211.332L58.316,132.083L52.708,132.083L52.708,158.499L0,105.666"],width:227,height:213},b}(gg);He.register("polygon",ug,"advshape");var vg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={fills:["M0,50L22.447,27.5L22.447,38.75L38.658,38.75L38.658,22.5L27.435,22.5L49.882,0L72.329,22.5L61.105,22.5L61.105,38.75L77.317,38.75L77.317,27.5L99.765,50L77.317,72.5L77.317,61.25L61.105,61.25L61.105,77.5L72.329,77.5L49.882,100L27.435,77.5L38.658,77.5L38.658,61.25L22.447,61.25L22.447,72.5L0,50z"],strokes:["M0,50L22.447,27.5L22.447,38.75L38.658,38.75L38.658,22.5L27.435,22.5L49.882,0L72.329,22.5L61.105,22.5L61.105,38.75L77.317,38.75L77.317,27.5L99.765,50L77.317,72.5L77.317,61.25L61.105,61.25L61.105,77.5L72.329,77.5L49.882,100L27.435,77.5L38.658,77.5L38.658,61.25L22.447,61.25L22.447,72.5L0,50z"],width:102,height:102},b}(gg);He.register("quadarrow",vg,"advshape");var wg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={fills:["M0,40C0,17.909,17.866,0,39.905,0c22.04,0,39.905,17.909,39.905,40c0,22.092-17.865,40-39.905,40C17.866,80,0,62.092,0,40L0,40z","M22.964,28.037c0-2.301,1.86-4.167,4.156-4.167c2.295,0,4.157,1.865,4.157,4.167c0,2.302-1.861,4.167-4.157,4.167C24.825,32.204,22.964,30.338,22.964,28.037L22.964,28.037zM48.533,28.037c0-2.301,1.861-4.167,4.157-4.167c2.295,0,4.157,1.865,4.157,4.167c0,2.302-1.862,4.167-4.157,4.167C50.395,32.204,48.533,30.338,48.533,28.037L48.533,28.037z"],strokes:["M22.964,28.037c0-2.301,1.86-4.167,4.156-4.167c2.295,0,4.157,1.865,4.157,4.167c0,2.302-1.861,4.167-4.157,4.167C24.825,32.204,22.964,30.338,22.964,28.037L22.964,28.037z M48.533,28.037c0-2.301,1.861-4.167,4.157-4.167c2.295,0,4.157,1.865,4.157,4.167c0,2.302-1.862,4.167-4.157,4.167C50.395,32.204,48.533,30.338,48.533,28.037L48.533,28.037z","M18.276,57.443c14.419,9.928,28.822,9.928,43.208,0","M0,40C0,17.909,17.866,0,39.905,0c22.04,0,39.905,17.909,39.905,40c0,22.092-17.865,40-39.905,40C17.866,80,0,62.092,0,40L0,40z"],width:82,height:82},b}(gg);He.register("smileyface",wg,"advshape");var xg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={paths:["M0 0L100 0L100 80 Q75 80,50 92T0 93.3Z"],width:100,height:100},b}(gg);He.register("textflowchart",xg,"advshape");var yg=function(a){function b(){a.call(this)}return oc(b,a),b.pathData={fills:["M9.305,37.309c5.139,0,9.305-4.176,9.305-9.328l0,0c0-2.576-2.083-4.664-4.653-4.664c-2.569,0-4.652,2.088-4.652,4.664l0,0V37.309z","M245.494,18.655c5.139,0,9.305-4.176,9.305-9.328c0-5.151-4.166-9.327-9.305-9.327c-5.14,0-9.306,4.176-9.306,9.327l0,0l0,0c0,2.576,2.083,4.664,4.652,4.664c2.57,0,4.653-2.088,4.653-4.664V18.655z","M254.799,9.328c0,5.151-4.166,9.327-9.305,9.327l0,0l0,0V9.328l0,0c0,2.575-2.083,4.664-4.653,4.664c-2.569,0-4.652-2.088-4.652-4.664l0,0l0,0v9.327H9.305l0,0C4.166,18.655,0,22.831,0,27.982l0,0v111.926l0,0c0,5.151,4.166,9.327,9.305,9.327s9.305-4.176,9.305-9.327l0,0v-9.327h226.884l0,0c5.139,0,9.305-4.176,9.305-9.327V9.328z M9.305,37.309c5.139,0,9.305-4.176,9.305-9.328l0,0c0-2.576-2.083-4.664-4.653-4.664c-2.569,0-4.652,2.088-4.652,4.664l0,0V37.309z"],strokes:["M0,27.982c0-5.151,4.166-9.327,9.305-9.327l0,0l0,0h226.883V9.328l0,0c0-5.151,4.166-9.328,9.306-9.328c5.139,0,9.305,4.176,9.305,9.328l0,0l0,0v111.926l0,0c0,5.151-4.166,9.327-9.305,9.327l0,0l0,0H18.61v9.327l0,0c0,5.151-4.166,9.327-9.305,9.327S0,145.059,0,139.908l0,0V27.982z M236.188,18.655h9.306l0,0c5.139,0,9.305-4.176,9.305-9.328 M245.494,18.655V9.328l0,0c0,2.575-2.083,4.664-4.653,4.664c-2.569,0-4.652-2.088-4.652-4.664l0,0 M9.305,37.309v-9.327c0-2.576,2.083-4.664,4.652-4.664c2.57,0,4.653,2.088,4.653,4.664l0,0l0,0C18.61,33.133,14.444,37.309,9.305,37.309S0,33.133,0,27.982l0,0 M18.61,27.982v102.599"],width:257,height:151},b}(tg);He.register("tranpaper",yg,"advshape");var zg=function(a){function b(){a.call(this),this._backgroundColor="#000"}return oc(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("shortcut"),this.active(),this._shape.attr("fill","#fff")},b.prototype.active=function(){var a=this,b=this._backgroundColor;this.node.bind("tapstart",function(){b=a._backgroundColor,a.backgroundColor=Ee.brighter(a._backgroundColor,.3)}),this.node.bind("tapend",function(){a.backgroundColor=b}),this.node.bind("mouseleave",function(){a.backgroundColor=b})},d(b.prototype,"backgroundColor",{set:function(a){this.backgroundColor!==a&&(this._backgroundColor=a,this.node.style("backgroundColor",a))},enumerable:!0,configurable:!0}),d(b.prototype,"shadow",{set:function(a){a&&this._shadow!==a&&(this._shadow=a,this.node.style("boxShadow",a))},enumerable:!0,configurable:!0}),d(b.prototype,"textContent",{set:function(a){},enumerable:!0,configurable:!0}),d(b.prototype,"gradient",{set:function(a){},enumerable:!0,configurable:!0}),b}(gg);Ge.register("shortcut","advshape",{backgroundColor:"backgroundColor",shadow:"shadow"},null);var Ag=function(a){function b(){a.call(this),this.node.addClass("shortcut--download")}return oc(b,a),b.pathData={fills:["M35.81,35.949H14.197 c-0.661,0-1.197,0.539-1.197,1.195v1.598c0,0.66,0.541,1.195,1.197,1.195h21.605c0.661,0,1.197-0.539,1.197-1.195v-1.598 C37.013,36.479,36.471,35.949,35.81,35.949z","M24.167,33.805 c0.234,0.234,0.541,0.355,0.842,0.355c0.308,0,0.615-0.121,0.844-0.355l8.186-8.186c0.464-0.462,0.464-1.22,0-1.694l-1.134-1.136 c-0.463-0.462-1.221-0.462-1.695,0l-4.208,4.215V11.196c0-0.661-0.54-1.196-1.196-1.196h-1.597c-0.66,0-1.198,0.532-1.198,1.196 V27.01l-4.212-4.211c-0.463-0.463-1.225-0.463-1.695,0l-1.134,1.132c-0.464,0.464-0.464,1.226,0,1.694L24.167,33.805z"],width:50,height:50},b}(zg);He.register("shortcut-download",Ag,"shortcut");var Bg=function(a){function b(){a.call(this),this.node.addClass("shortcut--earth")}return oc(b,a),b.pathData={fills:["M37.998,24.867 c-0.005-0.381-0.023-0.758-0.059-1.13c-0.121-1.239-0.418-2.426-0.86-3.539c-0.033-0.083-0.063-0.167-0.099-0.249 c-0.592-1.396-1.422-2.669-2.439-3.768c-0.066-0.071-0.134-0.144-0.203-0.212c-0.191-0.199-0.389-0.395-0.593-0.581 C31.434,13.285,28.365,12,25,12c-3.393,0-6.484,1.308-8.801,3.443c-0.541,0.498-1.037,1.042-1.487,1.623 C13.014,19.263,12,22.014,12,25c0,7.168,5.832,13,13,13c5.042,0,9.42-2.888,11.575-7.094c0.461-0.899,0.819-1.858,1.062-2.863 c0.062-0.255,0.113-0.511,0.16-0.771C37.928,26.534,38,25.774,38,25C38.001,24.956,37.999,24.911,37.998,24.867z M35.551,19.671 l0.075-0.084c0.101,0.19,0.192,0.387,0.28,0.585l-0.123-0.006l-0.232,0.032V19.671L35.551,19.671z M33.672,17.402l0.002-0.58 c0.205,0.216,0.401,0.439,0.59,0.67l-0.234,0.35l-0.818-0.007l-0.051-0.172L33.672,17.402z M17.991,15.959v-0.021h0.26 l0.022-0.089h0.426v0.186l-0.123,0.164H17.99L17.991,15.959L17.991,15.959z M18.407,16.54c0,0,0.26-0.045,0.282-0.045 c0.023,0,0,0.261,0,0.261l-0.586,0.036l-0.112-0.134L18.407,16.54z M36.379,21.7h-0.952l-0.579-0.432l-0.609,0.06V21.7h-0.193 l-0.208-0.147l-1.056-0.27V20.6l-1.34,0.104l-0.414,0.223h-0.532l-0.261-0.026l-0.646,0.359v0.674l-1.318,0.952l0.109,0.405h0.268 l-0.07,0.388l-0.188,0.068l-0.012,1.013l1.141,1.299h0.496l0.03-0.08h0.892l0.258-0.238h0.506l0.277,0.278l0.754,0.078 l-0.101,1.003l0.836,1.478l-0.44,0.843l0.029,0.396l0.348,0.346v0.954l0.455,0.612v0.792h0.395 c-2.191,2.689-5.523,4.412-9.253,4.412c-6.578,0-11.93-5.354-11.93-11.932c0-1.655,0.34-3.232,0.952-4.669v-0.372l0.427-0.519 c0.148-0.279,0.307-0.553,0.476-0.818l0.02,0.218l-0.495,0.602c-0.154,0.289-0.297,0.586-0.427,0.891v0.68l0.495,0.237v0.943 l0.476,0.813l0.386,0.061l0.05-0.278l-0.456-0.704l-0.089-0.684h0.267l0.113,0.704l0.66,0.962l-0.17,0.31l0.419,0.643l1.041,0.258 v-0.169l0.416,0.06l-0.04,0.299l0.327,0.06l0.506,0.137l0.713,0.814l0.912,0.067l0.089,0.745l-0.624,0.437l-0.029,0.664 l-0.089,0.406l0.902,1.129l0.069,0.389c0,0,0.327,0.088,0.367,0.088s0.734,0.526,0.734,0.526v2.041l0.247,0.069l-0.168,0.941 l0.417,0.556l-0.077,0.936l0.55,0.967l0.707,0.617l0.71,0.013l0.069-0.228l-0.522-0.44l0.03-0.218l0.094-0.269l0.02-0.272 l-0.353-0.01l-0.179-0.225l0.293-0.282l0.04-0.212l-0.327-0.094l0.019-0.198l0.466-0.069l0.709-0.342l0.238-0.437l0.743-0.952 l-0.169-0.744l0.229-0.396l0.685,0.021l0.459-0.363l0.149-1.438l0.511-0.648l0.09-0.417l-0.467-0.147l-0.308-0.505l-1.051-0.011 l-0.833-0.317l-0.039-0.595l-0.278-0.485l-0.754-0.011l-0.435-0.685l-0.386-0.188l-0.02,0.209l-0.704,0.041l-0.258-0.358 l-0.734-0.148l-0.605,0.698l-0.952-0.161l-0.069-1.072l-0.695-0.118l0.279-0.526l-0.08-0.302l-0.913,0.61l-0.575-0.07 l-0.205-0.449l0.125-0.463l0.317-0.583l0.729-0.368l1.407-0.001l-0.003,0.431l0.506,0.233l-0.041-0.732l0.365-0.366l0.736-0.483 l0.05-0.341l0.734-0.764l0.78-0.433l-0.069-0.057l0.528-0.497l0.193,0.051l0.089,0.111l0.201-0.223l0.049-0.021l-0.22-0.03 l-0.223-0.073v-0.215l0.118-0.098h0.261l0.119,0.053l0.103,0.208l0.126-0.019v-0.02l0.036,0.013l0.366-0.057l0.052-0.179 l0.208,0.053v0.193l-0.193,0.133l0,0l0.028,0.213l0.663,0.204c0,0,0,0.003,0.002,0.008l0.152-0.013l0.01-0.287l-0.525-0.238 l-0.03-0.139L25.25,18.3l0.019-0.418l-0.455-0.276l-0.03-0.703l-0.625,0.307h-0.228l0.061-0.535l-0.851-0.2l-0.352,0.266v0.812 l-0.632,0.2l-0.254,0.528l-0.274,0.044v-0.676l-0.595-0.082l-0.297-0.194l-0.12-0.438l1.063-0.622l0.521-0.159l0.052,0.352 l0.29-0.016l0.022-0.176l0.303-0.043l0.006-0.063l-0.13-0.055l-0.03-0.186l0.373-0.031l0.225-0.233l0.012-0.018l0.002,0.001 l0.069-0.071l0.784-0.099l0.346,0.295l-0.909,0.482l1.156,0.273l0.149-0.388h0.506l0.178-0.337l-0.357-0.089v-0.428l-1.12-0.496 l-0.773,0.09l-0.437,0.229l0.03,0.555l-0.456-0.068l-0.07-0.309l0.437-0.396l-0.793-0.039l-0.228,0.067l-0.098,0.269l0.297,0.051 l-0.06,0.297l-0.505,0.03l-0.079,0.198l-0.733,0.019c0,0-0.021-0.415-0.05-0.415c-0.029,0,0.575-0.01,0.575-0.01l0.437-0.427 l-0.239-0.12l-0.317,0.308l-0.526-0.028l-0.317-0.437h-0.674l-0.703,0.525h0.645l0.059,0.188l-0.167,0.155l0.713,0.021 l0.109,0.258l-0.804-0.029l-0.039-0.198l-0.505-0.109l-0.268-0.147l-0.601,0.005c1.969-1.435,4.391-2.284,7.008-2.284 c3.018,0,5.773,1.129,7.876,2.981l-0.141,0.252l-0.55,0.216l-0.232,0.252l0.053,0.293l0.284,0.04l0.172,0.428l0.489-0.195 l0.081,0.571h-0.147l-0.402-0.061l-0.445,0.075l-0.432,0.608l-0.617,0.099l-0.09,0.526l0.261,0.063l-0.076,0.34l-0.612-0.123 l-0.562,0.123l-0.12,0.313l0.098,0.657l0.33,0.154l0.553-0.003l0.375-0.034l0.113-0.297l0.584-0.759l0.385,0.078l0.379-0.344 l0.07,0.27l0.932,0.628l-0.114,0.153l-0.419-0.022l0.161,0.229l0.258,0.057l0.303-0.126l-0.006-0.364l0.134-0.067l-0.107-0.113 l-0.622-0.349l-0.163-0.46h0.517l0.165,0.163l0.445,0.385l0.02,0.464l0.461,0.49l0.17-0.674l0.319-0.173l0.06,0.55l0.313,0.343 l0.623-0.012c0.12,0.311,0.229,0.624,0.323,0.946L36.379,21.7z M19.092,17.908l0.312-0.148l0.282,0.066l-0.097,0.379l-0.305,0.098 L19.092,17.908z M20.749,18.8v0.245h-0.713l-0.268-0.073l0.067-0.172l0.343-0.143h0.468V18.8H20.749z M21.077,19.142v0.238 l-0.178,0.114l-0.223,0.041c0,0,0-0.355,0-0.395L21.077,19.142L21.077,19.142z M20.875,19.045v-0.283l0.246,0.224L20.875,19.045z M20.987,19.617v0.231l-0.171,0.172h-0.378l0.059-0.26l0.179-0.017l0.037-0.091L20.987,19.617z M20.043,19.142h0.395l-0.505,0.707 l-0.209-0.111l0.045-0.298L20.043,19.142z M21.657,19.536v0.23h-0.379l-0.104-0.149v-0.214h0.03L21.657,19.536z M21.307,19.219 l0.108-0.113l0.182,0.113l-0.146,0.12L21.307,19.219z M36.573,22.303l0.036-0.044c0.017,0.066,0.033,0.135,0.048,0.202 L36.573,22.303z"],width:50,height:50},b}(zg);He.register("shortcut-earth",Bg,"shortcut");var Cg=function(a){function b(){a.call(this),this.node.addClass("shortcut--mail")}return oc(b,a),b.pathData={fills:["M25,27.984C25,27.984,10,16,11.353,16 c5.397,0,27.293,0,27.293,0L25,27.984z","M19.564,25.387L10,33.786 c0,0,0-12.598,0-16.797C10,16,19.564,25.387,19.564,25.387z","M20.803,26.477L25,30.161l4.195-3.685 c0,0,10.555,8.307,9.459,8.307c-6.828,0-27.31,0-27.31,0L20.803,26.477z","M30.436,25.388c0,0,7.29-6.174,9.564-8.399 c0.5-0.489,0,16.797,0,16.797L30.436,25.388z"],width:50,height:50},b}(zg);He.register("shortcut-mail",Cg,"shortcut");var Dg=function(a){function b(){a.call(this),this.node.addClass("shortcut--first")}return oc(b,a),b.pathData={fills:["M13.831,36.951l0.053-23.646 c0.002-0.713-0.561-1.297-1.27-1.301L11.387,12c-0.713-0.002-1.295,0.58-1.299,1.289L10,36.639 c-0.002,0.714,0.58,1.296,1.289,1.299l1.224,0.007C13.23,37.961,13.828,37.664,13.831,36.951z","M14.269,24.027 c-0.254,0.252-0.384,0.583-0.385,0.909c-0.002,0.331,0.126,0.665,0.378,0.914l8.812,8.882c0.5,0.503,1.318,0.507,1.833,0.006 l1.229-1.22c0.504-0.5,0.506-1.318,0.006-1.832l-4.536-4.564l17.084,0.063c0.715,0.003,1.295-0.58,1.301-1.289L40,24.171 c0.002-0.713-0.57-1.294-1.289-1.296L21.62,22.808l4.569-4.535c0.504-0.5,0.508-1.324,0.008-1.832l-1.221-1.229 c-0.498-0.504-1.324-0.508-1.833-0.008L14.269,24.027z"],width:50,height:50},b}(zg);He.register("shortcut-first",Dg,"shortcut");var Eg=function(a){function b(){a.call(this),this.node.addClass("shortcut--last")}return oc(b,a),b.pathData={fills:["M36.169,12.993l-0.053,23.647 c-0.003,0.713,0.562,1.297,1.271,1.301l1.227,0.004c0.713,0.002,1.295-0.579,1.299-1.288L40,13.306 c0.002-0.714-0.58-1.296-1.289-1.299L37.486,12C36.77,11.983,36.173,12.279,36.169,12.993z","M35.73,25.918 c0.254-0.253,0.385-0.584,0.386-0.91c0.002-0.33-0.126-0.664-0.378-0.912l-8.813-8.883c-0.5-0.502-1.317-0.506-1.833-0.006 l-1.229,1.221c-0.504,0.5-0.507,1.318-0.007,1.832l4.537,4.564L11.306,22.76c-0.713-0.003-1.295,0.579-1.299,1.289L10,25.771 c-0.002,0.714,0.571,1.296,1.289,1.298l17.091,0.065l-4.57,4.533c-0.503,0.5-0.507,1.324-0.007,1.832l1.22,1.229 c0.499,0.504,1.325,0.507,1.833,0.007L35.73,25.918z"],width:50,height:50},b}(zg);He.register("shortcut-last",Eg,"shortcut");var Fg=function(a){function b(){a.call(this),this.node.addClass("shortcut--arrow-left")}return oc(b,a),b.pathData={fills:["M12.385,24.195 c-0.254,0.252-0.384,0.583-0.385,0.909c-0.002,0.331,0.126,0.666,0.378,0.914l8.812,8.883c0.5,0.502,1.318,0.507,1.833,0.006 l1.229-1.221c0.504-0.5,0.506-1.317,0.006-1.832l-4.537-4.563l17.083,0.063c0.715,0.002,1.295-0.58,1.302-1.289l0.009-1.726 c0.002-0.713-0.57-1.294-1.289-1.296l-17.091-0.067l4.569-4.535c0.504-0.5,0.508-1.324,0.008-1.832l-1.221-1.229 c-0.498-0.504-1.324-0.508-1.833-0.008L12.385,24.195z"],width:50,height:50.3},b}(zg);He.register("shortcut-left-arrow",Fg,"shortcut");var Gg=function(a){function b(){a.call(this),this.node.addClass("shortcut--page")}return oc(b,a),b.pathData={fills:["M33.996,35.73 c0,0.277-0.223,0.492-0.498,0.492H16.484c-0.274,0-0.484-0.213-0.484-0.477V14.465C16,14,16.208,14,16.484,14h11.553v4.252 c0,0-0.211,1.694,0.953,1.588c0.697,0.011,5.002,0.106,5.002,0.106L34,35.732L33.996,35.73L33.996,35.73z","M30.436,14l3.555,3.651 c0,0-1.67-0.138-2.514-0.075c-1.139,0.075-1.041-0.774-1.041-1.102V14L30.436,14z"],width:50,height:50},b}(zg);He.register("shortcut-page",Gg,"shortcut");var Hg=function(a){function b(){a.call(this),this.node.addClass("shortcut--arrow-right")}return oc(b,a),b.pathData={fills:["M37.73,26.084 c0.254-0.253,0.385-0.584,0.386-0.91c0.002-0.33-0.126-0.664-0.378-0.912l-8.813-8.883c-0.5-0.502-1.317-0.506-1.833-0.006 l-1.229,1.221c-0.504,0.5-0.507,1.318-0.007,1.832l4.536,4.564l-17.086-0.064c-0.713-0.003-1.295,0.579-1.299,1.289L12,25.938 c-0.002,0.713,0.571,1.295,1.289,1.297L30.38,27.3l-4.569,4.533c-0.503,0.5-0.507,1.324-0.007,1.832l1.22,1.229 c0.498,0.504,1.324,0.506,1.832,0.006L37.73,26.084z"],width:50,height:50},b}(zg);He.register("shortcut-right-arrow",Hg,"shortcut");var Ig=function(a){function b(){a.call(this),this.node.addClass("shortcut--share")}return oc(b,a),b.pathData={fills:["M13.298,36.75l22.441,0.004 c1.25,0.027,1.744-0.33,1.727-1.646l0.002-9.047l-2.684,1.641l0.035,6.671l-10.041-0.009l-11.192,0.006L13.49,18.1l5.629-0.004 l3.422-2.348h-9.533c-2.029,0.127-2.005-0.275-1.996,2.291L11,34.482C11.096,36.217,11.096,36.801,13.298,36.75z","M39.001,18.99l-7.482-5.74l0.188,3.018 c-3.57,0.433-4.968,0.854-9.701,2.847c-3.83,1.656-6.713,4.644-6.473,7.448c0.249,2.889,10.128,7.313,10.131,7.801 c-1.69-1.986-6.93-5.275-6.452-7.002c0.941-3.404,7.204-5.079,13.5-4.889l-0.164,3.645L39.001,18.99z"],width:50,height:50},b}(zg);He.register("shortcut-share",Ig,"shortcut");var Jg=function(a){function b(b){a.call(this),this.slide=b;var c=this.slide.node.addClass("slide--controls"+(yf?" slide--touch-controls":"")),d=c.el("div").addClass("control control--prev hi-action").bind("tap",function(a){b.previous()}),e=c.el("div").addClass("control control--next hi-action").bind("tap",function(a){b.next()});this.prev=d,this.next=e,this.node=c,b.watch("width height",this.resize,this)}return oc(b,a),b.prototype.resize=function(){var a=Math.min(this.slide.actualWidth,this.slide.actualHeight),b=1;a>150&&(b+=(a-150)/1050),this.node.select(".control").style({scaleX:b,scaleY:b})},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.slide.node.removeClass("slide--controls"),this.node.remove()},b}(pc),Kg=function(a){function b(){a.call(this),this.readyState=0,this.firstTime=!0,this.paused=!0,this.loadonce=!1,this.imgInfoArray=[],this.node.addClass("leo-comp--slide"),this.watch("visible",function(){this.stage&&this.visible?(this.firstTime?(this.firstTime=!1,this.initSlide(),this.autoplay&&this.play()):this.playOrNot(),this.addEventListener("transitionEnd",this.transitionEndCallback,this)):(this.pauseTiming(),this.transitionEndCallback&&this.removeEventListener("transitionEnd",this.transitionEndCallback,this))},this)}return oc(b,a),b.prototype.transitionEndCallback=function(a){this.stopTiming(),this.page===a.data.page&&this.playOrNot()},b.prototype.playOrNot=function(){this.paused||this._play()},b.prototype._play=function(){this.page.hasClass("leo-loading")?this.addEventListener("pageloaded",this.playonload,this):this.timing(); },b.prototype.timing=function(){var a=this,b=this.timingAnimation;return b&&!b.isEnd?void b.resume():(b=Sc.create(null,this.interval,{onEnd:function(){a.next()}}),Wc.getInstance().add(b),void(this.timingAnimation=b))},b.prototype.pauseTiming=function(){this.timingAnimation&&this.timingAnimation.pause()},b.prototype.stopTiming=function(){this.timingAnimation&&(this.timingAnimation.destroy(),this.timingAnimation=null)},b.prototype.initSlide=function(){this.node.select(".slide--page").remove();var a=this.newPage(0);this.node.append(a),this.page=a,this.index=0},b.prototype.next=function(){var a=this.index+1;a>=this.length&&(a=0),this.skip(a,!1)},b.prototype.previous=function(){var a=this.index-1;a<0&&(a=this.length-1),this.skip(a,!0)},b.prototype.playpause=function(){this.paused?this.play():this.pause()},b.prototype.skip=function(a,b){if(a!==this.index){var c=this.page,d=this.newPage(a),e=this.transitionAnimation;e&&e.stop(!0,!0),e=this.transitionAnimation=this.transition(b,c,d),e.addEventListener("destroy",function(){c.remove(),this.transitionAnimation=null,this.dispatchSimpleEvent("transitionEnd",{page:d})},this),this.index=a,this.page=d,this.node.prepend(d),this.dispatchSimpleEvent("skip",{index:a})}},b.prototype.transition=function(a,b,c){return null},b.prototype.playonload=function(){this.removeEventListener("pageloaded",this.playonload,this),this._play()},b.prototype.play=function(){!this.paused&&this.length<1||(this.paused=!1,this._play(),this.dispatchSimpleEvent("play"))},b.prototype.pause=function(){this.paused||(this.paused=!0,this.pauseTiming(),this.dispatchSimpleEvent("pause"))},b.prototype.newPage=function(a){var b=this,d=vi("div").addClass("slide--page page-"+a),e=d.el("img").addClass("page--image"),f=e[0];return d.addClass("leo-loading"),f.onload=f.onerror=function(){f.onload=f.onerror=null,f.style.opacity="1",d.removeClass("leo-loading"),b.dispatchSimpleEvent("pageloaded",{index:a,page:d});var e=a+1;e1)){var b=0,c=[0,1];this.readyState=1;var d=function(){++b===c.length&&(a.readyState=4,a.loadonce=!0,a.dispatchSimpleEvent("load"))};k(c,function(a){this.loadImage(a,d)},this)}},b.prototype.loadImage=function(a,b){var c=new Image,d=this.imgInfoArray[a]={img:c,width:0,height:0,state:1};c.onload=function(){c.onload=null,d.width=c.width,d.height=c.height,d.state=4,b&&b()},c.onerror=function(){c.onerror=null,d.width=c.width,d.height=c.height,d.state=2,b&&b()},c.src=this.srcs[a]||Ac},b.prototype.destroy=function(){this._simpleControls&&this._simpleControls.destroy(),this.transitionAnimation&&this.transitionAnimation.destroy(),this.timingAnimation&&this.timingAnimation.destroy(),this.imgInfoArray=null,a.prototype.destroy.call(this)},d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(b.prototype,"srcs",{get:function(){return this._srcs},enumerable:!0,configurable:!0}),d(b.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),b}(Ie);Ra(Kg.prototype,{interval:2e3,duration:1e3,autoplay:!1,controls:!1,URLString:"",shadow:"",borderWidth:1,borderColor:"",backgroundColor:""}),Ge.register("slide",null,{borderColor:"borderColor",borderWidth:"borderWidth",backgroundColor:"backgroundColor",shadow:"shadow"}),He.register("slide",Kg);var Lg=function(a){function b(){a.call(this),this.node.addClass("fade-slide")}return oc(b,a),b.prototype._onBorderColorChange=function(){this.node.style("borderColor",this.borderColor)},b.prototype._onBorderWidthChange=function(){this.node.style("borderWidth",this.borderWidth)},b.prototype._onBackgroundColorChange=function(){this.node.style("backgroundColor",this.backgroundColor)},b.prototype._onShadowChange=function(){this.node.style("boxShadow",this.shadow)},b.prototype.transition=function(a,b,c){this._transition&&this._transition.stop(!0,!0);var d=Rc.transition(b[0],c[0],"Fade",this.duration||2e3);return this._transition=d,d},b}(Kg);Ge.register("fadeslide","slide"),He.register("fadeslide",Lg);var Mg=function(a){function b(){a.call(this),this.node.addClass("flip-slide"),this.duration=450}return oc(b,a),b.prototype.initSlide=function(){a.prototype.initSlide.call(this),this.transformStage=this.node.el("div").addClass("transform-stage"),this.transformStage.append(this.page)},b.prototype.newPage=function(b){return a.prototype.newPage.call(this,b).style({borderColor:this.borderColor,borderWidth:this.borderWidth,backgroundColor:this.backgroundColor,boxShadow:this.shadow})},b.prototype.skip=function(b,c){a.prototype.skip.call(this,b,c),this.transformStage.append(this.page)},b.prototype.transition=function(a,b,c){c.style("rotationY",a?180:-180);var d=this.flipAnimation,e=this.duration;return d&&d.stop(!0,!0),d=this.flipAnimation=Tc.create(),d.add(Xc.to(this.transformStage[0],e,{rotationY:a?180:-180})),d.add(Xc.to(this.transformStage[0],e/2,{tz:-350},{yoyo:!0,repeat:1})),d.addEventListener("end",function(){this.transformStage.style("rotationY",0),c.style("rotationY",0),d.destroy()},this),Wc.getInstance().add(d),d},b}(Kg);Ge.register("flipslide","slide"),He.register("flipslide",Mg);var Ng=function(a){function c(){a.call(this),this.node.addClass("swipe-slide"),this.swipeEnable()}return oc(c,a),c.prototype.newPage=function(b){return a.prototype.newPage.call(this,b).style({borderColor:this.borderColor,borderWidth:this.borderWidth,backgroundColor:this.backgroundColor,boxShadow:this.shadow})},c.prototype.transition=function(a,b,c){var d,e,f,g;a?(d=this.prevExit,e=this.prevExitOptions,f=this.prevEnter,g=this.prevEnterOptions):(d=this.nextExit,e=this.nextExitOptions,f=this.nextEnter,g=this.nextEnterOptions);var h=Rc.anyTransition({target:b[0],animation:d,options:e},{target:c[0],animation:f,options:g},this.duration);return h.addEventListener("end",function(){h.destroy()},this),Wc.getInstance().add(h),h},c.prototype.swipeEnable=function(){var a,c,d,e,f,g,h,i,j,k,l,m=this,n=!1;this.node.bind("tapstart",function(b){var o=ui(b.target);if(!o.hasClass("control")&&!n){m.stopTiming();var p=m.transitionAnimation;p&&(p.currentTime=p.totalDuration,p.destroy(),m.transitionAnimation=null),k=m.index-1,l=m.index+1,k<0&&(k=m.length-1),l>=m.length&&(l=0),a=m.newPage(k),c=m.newPage(l),h=m.page,m.node.append(c),m.node.append(a),n=!0,i=m.actualWidth,j=m.actualHeight,d=b.pageX,e=b.pageY,f=m.transition(!0,h,a),f.pause(),g=m.transition(!1,h,c),g.pause()}});var o;fh(b,"tapmove",this.swipeMove=function(a){if(n){o="vertical"===m.swipeDirection?(a.pageY-e)/j:(a.pageX-d)/i;var b=Math.min(Math.abs(o)*m.duration,m.duration-1);f.currentTime=o<=0?0:b,g.currentTime=o>=0?0:b}}),fh(b,"tapend",this.swipeEnd=function(b){if(n){n=!1;var d,e,i,j=50;o<0?(d=c,i=l,e=g,a.remove(),f.destroy()):o>0?(d=a,i=k,e=f,c.remove(),g.destroy()):(e=null,f.destroy(),g.destroy(),a.remove(),c.remove()),e&&(m.transitionAnimation=e,e.currentTime>j?(e.resume(),e.addEventListener("destroy",function(){h.remove(),this.dispatchSimpleEvent("transitionEnd",{page:d}),this.transitionAnimation=null,this.paused||this.timing()},m),m.index=i,m.page=d,m.dispatchSimpleEvent("skip",{index:i})):(e.playReverse(),e.addEventListener("destroy",function(){a.remove(),c.remove(),this.transitionAnimation=null,this.paused||this.timing()},m)))}})},c.prototype.swipeDisable=function(){this.swipeMove&&(fh(b,"tapend",this.swipeEnd),fh(b,"tapmove",this.swipeMove),this.swipeMove=null,this.swipeEnd=null)},c.prototype.destroy=function(){a.prototype.destroy.call(this),this.swipeDisable()},c}(Kg);Ta(Ng.prototype,{prevEnter:"MoveInFromLeft",prevEnterOptions:{},prevExit:"MoveOutToRight",prevExitOptions:{},nextEnter:"MoveInFromRight",nextEnterOptions:{},nextExit:"MoveOutToLeft",nextExitOptions:{},duration:500,swipeDirection:"horizontal"}),Ge.register("swipeslide",null),He.register("swipeslide",Ng);var Og=function(a){function b(){a.call(this),this.prevEnter="moveInFromleft",this.nextEnter="moveInFromright",this.prevExit="zoomOut",this.nextExit="zoomOut",this.watch("swipeDirection",function(){"vertical"===this.swipeDirection&&(this.prevEnter="moveInFromTop",this.nextEnter="moveInFrombottom",this.prevExit="zoomOut",this.nextExit="zoomOut")},this)}return oc(b,a),b}(Ng);Ge.register("dragslide",null),He.register("dragslide",Og);var Pg=function(a){function b(){a.call(this),this.node.addClass("zoom-slide"),this.watch("visible",function(){this.visible&&this.stage&&this.zoom()},this),this.addEventListener("play",this.resumeZoom,this),this.addEventListener("pause",this.pauseZoom,this),this.watch("URLString",this.stopZoom,this),this.addEventListener("skip",this.zoom,this)}return oc(b,a),b.prototype.resumeZoom=function(){this.zoomTween&&!this.zoomTween.isEnd&&this.zoomTween.resume()},b.prototype.pauseZoom=function(){this.zoomTween&&this.zoomTween.pause()},b.prototype.stopZoom=function(){this.zoomTween&&this.zoomTween.destroy(),this.removeEventListener("pageloaded",this.zoomonload,this)},b.prototype.zoomonload=function(){this.removeEventListener("pageloaded",this.zoomonload,this),this.zoom()},b.prototype.zoom=function(){var a=this.page,b=this.interval;if(a.hasClass("leo-loading"))this.addEventListener("pageloaded",this.zoomonload,this);else{var c=~~(2*Math.random()),d=1.1+this.speed/100,e=c?d:1,f=c?1:d,g=(~~(3*Math.random())+1)/4*100+"%",h=(~~(3*Math.random())+1)/4*100+"%";a.style({transformOrigin:g+" "+h,scaleX:e,scaleY:e}),this.zoomTween=Xc.to(a[0],b+2*this.duration,{scaleX:f,scaleY:f},{easing:"linear"}),this.paused&&this.zoomTween.pause()}},b.prototype.transition=function(a,b,c){var d=Rc.anyTransition({target:b[0],animation:"fadeout"},{target:c[0],animation:"fadein"},this.duration,{easing:"linear"});return d.addEventListener("end",function(){d.destroy()},this),Wc.getInstance().add(d),d},b.prototype._onBorderColorChange=function(){this.node.style("borderColor",this.borderColor)},b.prototype._onBorderWidthChange=function(){this.node.style("borderWidth",this.borderWidth)},b.prototype._onBackgroundColorChange=function(){this.node.style("backgroundColor",this.backgroundColor)},b.prototype._onShadowChange=function(){this.node.style("boxShadow",this.shadow)},b.prototype.destroy=function(){this.zoomTween&&this.zoomTween.destroy(),a.prototype.destroy.call(this)},b}(Kg);Ra(Pg.prototype,{speed:5}),Ge.register("zoomslide","slide"),He.register("zoomslide",Pg);var Qg=function(a){function b(){a.call(this),this.length=0,this.images=[],this.duration=500,this.timelength=1e3,this.flowopacity=.7,this.animation=this.initAnimation(),this.watch("visible",this._onAutoplayChange,this),this.swipeEnable()}return oc(b,a),b.prototype.createNode=function(){var a=vi("div").addClass("leo-slide--flow-3D"),b=a.el("div").addClass("flow-3D--image-container");return this.imageContainer=b[0],a},b.prototype._onBorderColorChange=function(){this.images&&k(this.images,function(a,b){a.borderColor=this.borderColor},this)},b.prototype._onBorderWidthChange=function(){this.images&&k(this.images,function(a,b){a.borderWidth=this.borderWidth},this)},b.prototype._onBackgroundColorChange=function(){this.images&&k(this.images,function(a,b){a.backgroundColor=this.backgroundColor},this)},b.prototype.swipeEnable=function(){var a,b,c=this;this.node.bind("tapstart",function(b){ui(b.target).hasClass("hi-action")||(c.skipAnimation.destroy(),c.paused||c._stop(),a=b.pageX)}),this.node.bind("tapmove",function(d){if(a){b=a-d.pageX,a=d.pageX;var e=c.animation.currentTime+8*b;e<0||e>c.timelength*(c.length-1)||(c.animation.currentTime=e)}}),this.node.bind("tapend",function(){a&&(c.skip(Math.round(c.animation.currentTime/1e3)),c.paused||(c.intervalIndex=c._play()),a=null)})},b.prototype._onActualWidthChange=function(){this.resize()},b.prototype._onActualHeightChange=function(){this.resize()},b.prototype.resize=function(){k(this.images,function(a){this.fit(a)},this),this.render(this.currentIndex*this.timelength)},b.prototype.fit=function(a){var b=.5*this.actualWidth,c=.8*this.actualHeight;if(b&&c){var d=a.image.width,e=a.image.height,f=d,g=e;d&&e?(d>b||e>c)&&(d/e>b/c?(f=b,g=e/d*b):(f=d/e*c,g=c)):(f=b,g=c),a.actualWidth=Math.round(f),a.actualHeight=Math.round(g)}},b.prototype._onUrlChange=function(){k(this.images,function(a){a.destroy()},this),this.images.length=0;var a=this.url.split(";"),b=this.length=a.length;this.animation.duration=b*this.timelength,k(a,function(a,b){var c=this,d=new Te,e=d.node;d.src=a,d.reflection=this.reflection,d.borderWidth=this.borderWidth,d.borderColor=this.borderColor,d.backgroundColor=this.backgroundColor,d.opacity=this.flowopacity,d.borderRadius=this.borderRadius,e.addClass("flow-3D--image"),e.bind("mouseover",function(){b!==c.currentIndex&&(d.opacity=1)}),e.bind("mouseout",function(){b!==c.currentIndex&&(d.opacity=c.flowopacity)}),e.bind("tap",function(){c.skip(b)}),eb(d.dom),d.load(),d.addEventListener("load",function(){this.fit(d)},this),this.imageContainer.appendChild(d.dom),this.images.push(d)},this),this.currentIndex=null,this.skip(0),this.render(0)},b.prototype._onControlsChange=function(){this.controls?this.slideControls||(this.slideControls=new Jg(this)):this.slideControls&&(this.slideControls.destroy(),this.slideControls=null)},b.prototype._onAutoplayChange=function(){this.visible?this.autoplay&&this.paused===c?this.play():this.paused===!1&&this._play():this._stop()},b.prototype.play=function(){(this.paused||this.paused===c)&&(this.paused=!1,this.intervalIndex=this._play())},b.prototype.pause=function(){this.paused||(this.paused=!0,this._stop())},b.prototype._play=function(){var a=this,b=tc(function(){a.next()},this.interval);return b},b.prototype._stop=function(){var a=this.intervalIndex;a&&uc(a)},b.prototype.skip=function(a){var b=this,c=this.length;a<0&&(a=c-1),a>=c&&(a=0),this.skipAnimation&&this.skipAnimation.destroy();var d=this.animation.currentTime,e=a*this.timelength;this.paused||this._stop();var f=Sc.create(this,this.duration,{onRender:function(a){b.animation.currentTime=d+(e-d)*a},onEnd:function(){b.paused===!1&&(b.intervalIndex=b._play())}},{easing:"easeOutQuart"});Wc.getInstance().add(f),this.skipAnimation=f,this.currentIndex=a},b.prototype.previous=function(){this.skip(this.currentIndex-1)},b.prototype.next=function(){this.skip(this.currentIndex+1)},b.prototype.initAnimation=function(){var a=this,b=Sc.create(this,0,{onRender:function(b,c){a.render(c)}},{easing:"linear",repeat:1/0});return b.pause(),Wc.getInstance().add(b),b},b.prototype.render=function(a){var b=this.timelength,c=Math.floor(a/b),d=a%b/b,e=this._actualWidth,f=this.formatTransfrom,g=.9*e,h=.3*e,i=-600,j=60;k(this.images,function(a,b){var e={};if(b===c)e.transform=f(-g*d,i*d,j*d),e.opacity=1-(1-this.flowopacity)*d;else if(b===c+1){var k=1-d;e.transform=f(g*k,i*k,-j*k),e.opacity=this.flowopacity+(1-this.flowopacity)*d}else b=this._urls.length&&(c=0,this.index=1);var d=this.__zIndex--,e=this.node.el("div").addClass("album--page leo-loading").style({boxShadow:this._shadow,borderWidth:this._borderWidth,borderColor:this._borderColor,transformOrigin:this._originX+"% "+this._originY+"%",zIndex:d,rotation:a?(Math.min(this._stack,this._urls.length)-1)*this._rotate:0}),f=e.el("img")[0];return f.onload=f.onerror=function(){f.onload=f.onerror=null,e.removeClass("leo-loading"),Ye(f,"opacity",1),f=null},f.src=this._urls[c],e.bind("tap",function(){var a=b.node.select(".album--page").indexOf(e[0]);b.skip(a||1)}),e[0]},b.prototype.unfold=function(a){this.folding=!0;for(var b,c,d=this.node.select(".album--page"),e=Tc.create(),f=0,g=d.length;fe&&(a=e);for(var f,g=this.node.select(".album--page"),h=[],i=0,d=b.length;i0&&parseInt(a,10)==a&&this._stack!=a&&(this._stack=a,this.updateAlbum())},enumerable:!0,configurable:!0}),b.prototype.updateStyle=function(){var a=this;this._visible&&this._stage&&(clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(function(){a.node.select("album--page").style({boxShadow:a._shadow,borderWidth:a._borderWidth,borderColor:a._borderColor,transformOrigin:a._originX+"% "+a._originY+"%"})},100))},d(b.prototype,"borderWidth",{set:function(a){parseInt(a,10)==a&&this._borderWidth!=a&&(this._borderWidth=a,this.updateStyle())},enumerable:!0,configurable:!0}),d(b.prototype,"borderColor",{set:function(a){a&&this._borderColor!=a&&(this._borderColor=a,this.updateStyle())},enumerable:!0,configurable:!0}),d(b.prototype,"shadow",{set:function(a){a&&this._shadow!=a&&(this._shadow=a,this.updateStyle())},enumerable:!0,configurable:!0}),d(b.prototype,"originX",{set:function(a){a&&this._originX!=a&&(this._originX=a,this.updateStyle())},enumerable:!0,configurable:!0}),d(b.prototype,"originY",{set:function(a){a&&this._originY!==a&&(this._originY=a,this.updateStyle())},enumerable:!0,configurable:!0}),d(b.prototype,"duration",{set:function(a){this._duration!==a&&(this._duration=a)},enumerable:!0,configurable:!0}),d(b.prototype,"interval",{set:function(a){this._interval!==a&&(this._interval=a)},enumerable:!0,configurable:!0}),d(b.prototype,"autoplay",{set:function(a){this._autoplay!==a&&(this._autoplay=a)},enumerable:!0,configurable:!0}),b}(Ie);Ge.register("album",null,{shadow:"shadow",transformOrigin:"origin",borderColor:"borderColor",borderWidth:"borderWidth"}),He.register("album",Rg);var Sg=function(a){function e(){a.call(this),this.urlArray=[],this._eventmap={start:"tapstart",move:"tapmove",end:"tapend"},this.mouseup=function(){},this.mousemove=function(){},this._playPause=!0,this._controls=!1,this._interval=2500,this._duration=250,this.watch("visible",function(){this.autoplayAnimation&&(this.stage&&this.visible?(this.autoplayAnimation.currentTime=0,this.autoplayAnimation.resume()):this.autoplayAnimation.pause())},this)}return oc(e,a),e.prototype._onActualWidthChange=function(){var a=this,b=this.actualWidth;this.ul.style("tx",-b);var c=this.ul.select(".slide-li").style("width",b);k(c,function(b){if(b=ui(b),!b.hasClass("leo-loading")){var c=b.select("img"),d=b.attr("data-index"),e=a.urlArray[d];a.fixImage(c[0],e.width,e.height)}}),this.addSlideEvents()},e.prototype._onActualHeightChange=function(){var a=this,b=this.ul.select(".slide-li");k(b,function(b){if(b=ui(b),!b.hasClass("leo-loading")){var c=b.select("img"),d=b.attr("data-index"),e=a.urlArray[d];a.fixImage(c[0],e.width,e.height)}})},d(e.prototype,"url",{set:function(a){var b=this;if(this._url!==a){this._url=a;var c=this.urlArray=[];k(a.split(";"),function(a,b){c.push({index:b,src:a,width:0,height:0})});var d=this.length=c.length,e=[c[d-1]].concat(c);e.push(c[0]);var f=this.ul;f.html("").style("tx",-this.actualWidth),k(e,function(a,c){var d=f.el("div").addClass("slide-li leo-loading").style("width",b.actualWidth),e=new Image;e.onload=e.onerror=function(){e.onload=e.onerror=null,d.removeClass("leo-loading").attr("data-index",a.index);var c=e.width,f=e.height;b.fixImage(e,c,f),d.append(e),a.width=c,a.height=f},e.src=a.src}),this.addSlideEvents()}},enumerable:!0,configurable:!0}),e.prototype.fixImage=function(a,b,c){var d=this._actualWidth,e=this._actualHeight,f={width:"auto",height:"auto"};"fit"===this._position?b>d||c>e?b/c>d/e?f.width=d:f.height=e:(f.width=b,f.height=c):(f.width="100%",f.height="100%"),Ye(a,f)},e.prototype.prevNext=function(a,b){var c,d,e=this,f=this.slideAnimation,g=this.urlArray.length,h=this.ul,i=parseInt(h.style("tx"),10),j=this.actualWidth;f&&(f.destroy(),this.slideAnimation=null),f=Sc.create(null,this._duration,{easing:"linear"}),"boolean"!=typeof a?(d=i%j,c=Math.abs(d)>j/2?Math.floor(i/j)*j:i-d):(d=Math.floor(i/j),c=b?(a?d:d+1)*j:(a?d-1:d+(i%j===0?1:2))*j),f.onRender=function(a){var b=i+(c-i)*a;b<=(g+1)*-j&&(b=-j),b>=0&&(b=-g*j),h.style("tx",b)},f.onEnd=function(){f.destroy(),e.slideAnimation=null};var k=this.autoplayAnimation;k&&!k.paused&&(k.pause(),f.addEventListener("destroy",function(){this.autoplayAnimation.currentTime=0,this.autoplayAnimation.resume()},this));var l=c;l<=(g+1)*-j&&(l=-j),l>=0&&(l=-g*j),this.dispatchSimpleEvent("skip",{index:-l/j}),Wc.getInstance().add(f),this.slideAnimation=f},e.prototype.createNode=function(){var a=vi("div").addClass("leo-comp--base-slide");return xf&&a.style("touchAction","none"),this.ul=a.el("div").addClass("slide-ul"),this.imgCover=a.el("div").addClass("drag-cover"),a},d(e.prototype,"tagName",{get:function(){return"dslide"},enumerable:!0,configurable:!0}),d(e.prototype,"taponly",{set:function(a){a?this._eventmap={start:"touchstart",move:"touchmove",end:"touchend"}:this._eventmap={start:"tapstart",move:"tapmove",end:"tapend"}},enumerable:!0,configurable:!0}),e.prototype.addSlideEvents=function(){function a(a){var b=a.pageX,c=h+b-g;c<=(f+1)*-e&&(c=-e),c>=0&&(c=-f*e),j.style("tx",c)}var d=this,e=this.actualWidth,f=this.urlArray.length;if(0!==e){var g,h,i,j=(this.imgCover,this.ul),k=ui(b);k.unbind(this._eventmap.end,this.mouseup),k.unbind(this._eventmap.move,this.mousemove),this.imgCover.unbindAll(),this.imgCover.bind(this._eventmap.start,function(b){b.preventDefault(),d.slideAnimation&&(d.slideAnimation.destroy(),d.slideAnimation=null),g=b.pageX,i=(new Date).getTime(),h=parseInt(j.style("tx"),10),k.bind(d._eventmap.move,a)});var l=function(b){if(k.unbind(d._eventmap.move,a),g!==c&&null!==g){var f=b.pageX;!f&&b.originalEvent.changedTouches&&(f=b.originalEvent.changedTouches[0].pageX);var h,j=f-g,l=.3*e,m=(new Date).getTime()-i;m<150&&Math.abs(j)>20&&(h=!(j>0)),j>l&&(h=!1),j<-l&&(h=!0),d.prevNext(h,!0),g=null}};k.bind(this._eventmap.end,l),this.mouseup=l,this.mousemove=a}},d(e.prototype,"autoplay",{get:function(){return this._autoplay},set:function(a){var b=this;if(this._autoplay!==a)if(this._autoplay=a,a){var c=Sc.create(null,this._interval);c.onEnd=function(){c.currentTime=0,b.prevNext(!0)},c.pause(),this.stage&&this.visible&&c.resume(),Wc.getInstance().add(c),this.autoplayAnimation=c,this.slideAnimation&&this.slideAnimation.removeAllEventListeners("end")}else this.autoplayAnimation&&(this.autoplayAnimation.destroy(),this.autoplayAnimation=null)},enumerable:!0,configurable:!0}),e.prototype.next=function(){this.prevNext(!0)},e.prototype.previous=function(){this.prevNext(!1)},e.prototype.playpause=function(){this.autoplay=!this._autoplay,this.dispatchSimpleEvent(this.autoplay?"play":"pause")},d(e.prototype,"controls",{set:function(a){this._controls!==a&&(this._controls=!!a,a?this._simpleControls||(this._simpleControls=new Jg(this)):this._simpleControls&&(this._simpleControls.destroy(),this._simpleControls=null))},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.imgCover.unbindAll(),ui(b).unbind(this._eventmap.end,this.mouseup),this._simpleControls&&this._simpleControls.destroy(),this.slideAnimation&&this.slideAnimation.destroy(),this.autoplayAnimation&&this.autoplayAnimation.destroy(),a.prototype.destroy.call(this)},d(e.prototype,"borderWidth",{set:function(a){this.node.style("borderWidth",a)},enumerable:!0,configurable:!0}),d(e.prototype,"borderColor",{set:function(a){this.node.style("borderColor",a)},enumerable:!0,configurable:!0}),d(e.prototype,"backgroundColor",{set:function(a){this.node.style("backgroundColor",a)},enumerable:!0,configurable:!0}),d(e.prototype,"boxShadow",{set:function(a){this.node.style("boxShadow",a)},enumerable:!0,configurable:!0}),d(e.prototype,"interval",{set:function(a){this._interval=a,this.autoplayAnimation&&(this.autoplayAnimation.duration=a)},enumerable:!0,configurable:!0}),d(e.prototype,"duration",{set:function(a){this._duration=a},enumerable:!0,configurable:!0}),d(e.prototype,"position",{get:function(){return this._position},set:function(a){this._position=a},enumerable:!0,configurable:!0}),e}(Ie);Ge.register("defaultslide",null,{borderColor:"borderColor",borderWidth:"borderWidth",backgroundColor:"backgroundColor",shadow:"boxShadow"}),He.register("defaultslide",Sg);var Tg=function(a){function b(){a.call(this),this.sumWidth=0,this.sumHeight=0,this.imgDataArray=[],this.changeDirectionTable={left:"right",right:"left",top:"bottom",bottom:"top"};this.node.addClass("leo-comp--moving-slide");this.swipeEnable()}return oc(b,a),b.prototype.swipeEnable=function(){var a,b,c,d,e=this,f=!1,g=null,h=this.animation;fh(this.dom,"tapstart",function(i){var j=ui(i.target);if(!j.hasClass("control")&&!f){f=!0;var k=e.data;d=k.flag?k.dy:k.dx,null===g&&(g=h.paused),h.pause(),a=e.direction,"left"===a||"right"===a?(c="tx",b=i.pageX):(c="ty",b=i.pageY)}}),fh(Bc,"tapmove",this.swipemove=function(c){if(f){var g=("left"===a||"right"===a?c.pageX:c.pageY)-b,h=e.data,i=e.canvas,j=e.ctx,k=h.size,l=h.dx,m=h.dy,n=d+g;n%=k,n>0?n-=k:n<-k&&(n+=k),h.flag?m=h.dy=n:l=h.dx=n,j.clearRect(0,0,i.width,i.height),j.drawImage(e.icanvas,l,m)}}),fh(Bc,"tapend",this.swipeend=function(){f&&(f=!1,e.data.start=d,e.update(),g||h.play(),g=null)})},b.prototype.unswipe=function(){this.swipemove&&(fh(Bc,"tapmove",this.swipemove),fh(Bc,"tapend",this.swipeend),this.swipemove=null,this.swipeend=null)},b.prototype.next=function(){},b.prototype.previous=function(){},b.prototype.bindEvent=function(a){var b,c,d=this,e=!1,f=null,g=this.animation;a.prev.bind("tapstart",function(){e||(e=!0,b=d.direction,"right"!==b&&"top"!==b||(d.direction="top"===b?"bottom":"left"),null===f&&(f=g.paused),g.resume(),c=d.speed,d.speed*=8)}),a.next.bind("tapstart",function(){e||(e=!0,b=d.direction,"left"!==b&&"bottom"!==b||(d.direction="left"===b?"right":"top"),null===f&&(f=g.paused),g.resume(),c=d.speed,d.speed*=8)});fh(Bc,"tapend",this.controlsDocEvent=function(){e&&(e=!1,f&&g.pause(),f=null,d.direction=b,d.speed=c)})},b.prototype.unbindEvent=function(){this.controlsDocEvent&&(ih(Bc,"tapend",this.controlsDocEvent),this.controlsDocEvent=null)},b.prototype.changeDirection=function(a){return this.changeDirectionTable[a]||"right"},b.prototype.update=function(){if(this.actualWidth&&this.actualHeight){var b=this.direction,c="left"===b||"right"===b;this.resizeCanvas(c),this.drawImagesToCanvas(c),a.prototype.update.call(this)}},b.prototype.resizeCanvas=function(a){var b,c,d,e=this.actualWidth,f=this.actualHeight,g=this.borderWidth,h=this.imgDataArray,i=h.length,j=0,k=0;if(a)for(;i--;)c=h[i],b=c.img,d=c.width=b.width/b.height*f||e,c.height=f,j+=d+g;else for(;i--;)c=h[i],b=c.img,c.width=e,d=c.height=b.height/b.width*e||f,k+=d+g;this.sumWidth=Math.round(j)||e,this.sumHeight=Math.round(k)||f},b.prototype.drawImagesToCanvas=function(a){var b=this.actualWidth,c=this.actualHeight,d=this.img;d||(d=this.img=Ad("canvas"));var e=d.getContext("2d"),f=0,g=0,h=this.borderWidth,i=this.borderColor,j=this.backgroundColor;e.clearRect(0,0,d.width,d.height),a?(d.width=this.sumWidth,d.height=c,k(this.imgDataArray,function(a){var b=a.width,d=a.img;j&&(e.fillStyle=j,e.fillRect(f,g,b,c)),d.width&&e.drawImage(d,f,g,b,c),f+=b,h&&(e.fillStyle=i,e.fillRect(f,g,h,c),f+=h)},this)):(d.width=b,d.height=this.sumHeight,k(this.imgDataArray,function(a){var c=a.height,d=a.img;j&&(e.fillStyle=j,e.fillRect(f,g,b,c)),d.height&&e.drawImage(d,f,g,b,c),g+=c,h&&(e.fillStyle=i,e.fillRect(f,g,b,h),g+=h)},this))},b.prototype.load=function(){var a=this;if(!(this.readyState>0)){this.readyState=1,this.loadonce=!0;for(var b=0,c=this.URLString.split(";"),d=c.length,e=function(){++b===d&&(a.readyState=2,a.update(),a.dispatchSimpleEvent("load"))},f=0;f=0&&(this._locked?b[c]=null:b.splice(c,1))},e.prototype.update=function(){if(!this.paused){++this.frames,this._asap=!1;var a=Date.now(),b=a-this._lastTickTime;this._lastTickTime=this._fixTickTime=a;var c=b>=this._interval?b-this._interval:0;this._nextTickTime=c>=this._interval?4:this._interval-c,this._justActived&&(b=0,this._justActived=!1),a=this.currentTime+=b,this._locked=!0;for(var d=this._children,e=-1,f=d.length;++e=this._interval?(this._asap=!0,this._rafId=yc(this._updateCallback)):(this._fixTime(),this._tick())}}},enumerable:!0,configurable:!0}),e.prototype._fixTime=function(){var a=Date.now(),b=a-this._fixTickTime;this._fixTickTime=a,a=this._interval;var c=b>=a?b-a:b;this._nextTickTime=c>=a?4:a-c},e.prototype._tick=function(){this.running&&(Xg&&this._interval===1e3/60?(this._usingRaf=!0,this._rafId=Xg(this._updateCallback)):(this._usingRaf=!1,this._rafId=tc(this._updateCallback,this._nextTickTime)))},e.getInstance=function(){if(!this.instance){var c=this.instance=new e,d=Ug("hidden",b),f=d?(/H/.test(d)?d.substr(0,d.indexOf("H")):"")+"visibilitychange":null;"onpageshow"in a&&"onpagehide"in a&&a.addEventListener("pageshow",function(){c.stop(),c.run()},!1),d&&f&&b.addEventListener(f,function(){b[d]||(c.stop(),c.run())},!1),c.run()}return this.instance},e.instance=null,e}(nc);lc.Ticker=Zg;var $g=function(a){function c(b,d){a.call(this),this.context=d,this._flags=0,this._accelerate=c.defaultAccelerate,this._deferred=!1,this._x=0,this._y=0,this._tx=0,this._ty=0,this._tz=0,this._sx=1,this._sy=1,this._scaleX=1,this._scaleY=1,this._scaleZ=1,this._rotation=0,this._rotationX=0,this._rotationY=0,this._skewX=0,this._skewY=0,this._p=0,this._originX=.5,this._originY=.5,this._originZ=0,this._dirty=!1,this._originDirty=!1,this._el=b,b[_g]=this}return oc(c,a),d(c.prototype,"el",{get:function(){return this._el},enumerable:!0,configurable:!0}),d(c.prototype,"accelerate",{get:function(){return this._accelerate},set:function(a){this._accelerate!==a&&(this._accelerate=a,this.update())},enumerable:!0,configurable:!0}),d(c.prototype,"deferred",{get:function(){return this._deferred},set:function(a){this._deferred!==a&&(this._deferred=a,a||(this._dirty&&this.update(),this._originDirty&&this.updateOrigin()))},enumerable:!0,configurable:!0}),d(c.prototype,"tx",{get:function(){return this._tx},set:function(a){var b=this._tx;b!==a&&(this._tx=a,this.update(),this.notifyPropertyChange("tx",b))},enumerable:!0,configurable:!0}),d(c.prototype,"ty",{get:function(){return this._ty},set:function(a){var b=this._ty;b!==a&&(this._ty=a,this.update(),this.notifyPropertyChange("ty",b))},enumerable:!0,configurable:!0}),d(c.prototype,"tz",{get:function(){return this._tz},set:function(a){var b=this._tz;b!==a&&(this._tz=a,a?this._flags|=16:this._flags&=-17,this.update(),this.notifyPropertyChange("tz",b))},enumerable:!0,configurable:!0}),d(c.prototype,"scaleX",{get:function(){return this._scaleX},set:function(a){var b=this._scaleX;b!==a&&(this._scaleX=a,this.update(),this.notifyPropertyChange("scaleX",b))},enumerable:!0,configurable:!0}),d(c.prototype,"scaleY",{get:function(){return this._scaleY},set:function(a){var b=this._scaleY;b!==a&&(this._scaleY=a,this.update(),this.notifyPropertyChange("scaleY",b))},enumerable:!0,configurable:!0}),d(c.prototype,"scaleZ",{get:function(){return this._scaleZ},set:function(a){var b=this._scaleZ;b!==a&&(this._scaleZ=a,1!==a?this._flags|=2:this._flags&=-3,this.update(),this.notifyPropertyChange("scaleZ",b))},enumerable:!0,configurable:!0}),d(c.prototype,"rotation",{get:function(){return this._rotation},set:function(a){var b=this._rotation;b!==a&&(this._rotation=a,this.update(),this.notifyPropertyChange("rotation",b))},enumerable:!0,configurable:!0}),d(c.prototype,"rotationX",{get:function(){return this._rotationX},set:function(a){var b=this._rotationX;b!==a&&(this._rotationX=a,1!==a?this._flags|=4:this._flags&=-5,this.update(),this.notifyPropertyChange("rotationX",b))},enumerable:!0,configurable:!0}),d(c.prototype,"rotationY",{get:function(){return this._rotationY},set:function(a){var b=this._rotationY;b!==a&&(this._rotationY=a,1!==a?this._flags|=8:this._flags&=-9,this.update(),this.notifyPropertyChange("rotationY",b))},enumerable:!0,configurable:!0}),d(c.prototype,"skewX",{get:function(){return this._skewX},set:function(a){var b=this._skewX;b!==a&&(this._skewX=a,this.update(),this.notifyPropertyChange("skewX",b))},enumerable:!0,configurable:!0}),d(c.prototype,"skewY",{get:function(){return this._skewY},set:function(a){var b=this._skewY;b!==a&&(this._skewY=a,this.update(),this.notifyPropertyChange("skewY",b))},enumerable:!0,configurable:!0}),d(c.prototype,"p",{get:function(){return this._p},set:function(a){var b=this._p;b!==a&&(this._p=a,a?this._flags|=1:this._flags&=-2,this.update(),this.notifyPropertyChange("p",b))},enumerable:!0,configurable:!0}),d(c.prototype,"originX",{get:function(){return this._originX},set:function(a){var b=this._originX;b!==a&&(this._originX=a,this.updateOrigin(),this.notifyPropertyChange("originX",b))},enumerable:!0,configurable:!0}),d(c.prototype,"originY",{get:function(){return this._originY},set:function(a){var b=this._originY;b!==a&&(this._originY=a,this.updateOrigin(),this.notifyPropertyChange("originY",b))},enumerable:!0,configurable:!0}),d(c.prototype,"originZ",{get:function(){return this._originZ},set:function(a){var b=this._originZ;b!==a&&(this._originZ=a,this.updateOrigin(),this.notifyPropertyChange("originZ",b))},enumerable:!0,configurable:!0}),c.prototype.notifyPropertyChange=function(a,b){},c.prototype.update=function(){this._deferred?this._dirty=!0:(this._dirty=!1,this.context&&this.context.onTransformUpdate(),this._el.style[zf]=this._flags&&Cf?c.resolve3d(this):c.resolve2d(this,this._accelerate))},c.prototype.updateOrigin=function(){this._deferred?this._originDirty=!0:(this._originDirty=!1,this._el.style[Af]=100*this._originX+"% "+100*this._originY+"% "+(this._originZ&&Cf?this._originZ+"px":""))},c.prototype.destroy=function(){this._el=this.context=null},c.prototype.clone=function(a){var b=c.KEYWORDS_LIST,d=this._deferred;this.deferred=!0;for(var e=-1,f=b.length;++e-f?b[j]=0:b[j]=~~(1e7*k)/1e7}var l=0;return 0!==b._p&&(l=1),1!==b._scaleZ&&(l|=2),0!==b._rotationX&&(l|=4),0!==b._rotationY&&(l|=8),0!==b._tz&&(l|=16),b._flags=l,b._accelerate=!!l||16===e.length,b._deferred=d,b},c.KEYWORDS_LIST="tx ty tz scaleX scaleY scaleZ rotation rotationX rotationY skewX skewY p originX originY originZ".split(" "),c.KEYWORDS=e(c.KEYWORDS_LIST),c.INNER_KEYWORDS_LIST=("_"+c.KEYWORDS_LIST).replace(/ /g," _").split(" "),c.defaultAccelerate=!1,c._transformEl=null,c}(nc),_g="__leo_transform__",ah=/(?:\-|\b)([\d\-\.e]+)/gi,bh=/^matrix(?:3d)?\([^)]+\)$/,ch=b.contains?function(a,b){return a.contains(b)}:function(a,b){return!!(16&a.compareDocumentPosition(b))},dh=/^(?:mouse|contextmenu)|click|tap|touch|pointer/,eh={},fh=function(a,b,c,d){for(var e=b,f=Za(a),g=eh[f]||(eh[f]={}),h=hh,i=gh,j=b;e;){var k=i(a,e,c,d);if(g[k])return;var l=h[e];e=null,l&&(l.bind&&(c=l.bind(a,c)),l.type&&(e=b=l.type)),g[k]=c}var m=c;dh.test(j)&&(m=function(a){var b=a instanceof Yh?a:Yh.delegate(a);c.call(this,b),Yh.recycle(b)},g[k]=m,m[lh]=c[lh]),a.addEventListener(b,m,!1)},gh=function(a,b,c,d){var e,f,g=lh;return(e=a[g])||(e=a[g]=kh++),(f=c[g])||(f=c[g]=kh++),e+"_"+b+"_"+f+(d?"_$":"")},hh={};"onmouseenter"in qc||k({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){hh[b]={type:a,bind:function(a,c){return function(d){var e=d.relatedTarget;e&&(e===a||ch(a,e))||(d._type=b,c.call(a,d))}}}}),"keypress keydown keyup".replace(/\w+/g,function(a){hh[a]={bind:function(a,b){return function(c){var d=c instanceof Xh?c:Xh.delegate(c);b.call(a,d),Xh.recycle(d)}}}}),qc.onmousewheel===c&&(hh.mousewheel={type:"wheel",bind:function(a,b){return function(c){c.wheelDeltaY=c.wheelDelta=c._originalEvent.deltaY>0?-120:120,c._type="mousewheel",b.call(a,c)}}});var ih=function(a,b,c,d){if(a[lh]&&c[lh]){var e,f=Za(a),g=b,h=eh[f],i=hh,j=gh;if(h){for(;g;){if(!(e=j(a,g,c,d)))return;var k=i[g];if(g=null,!h[e])return;k&&(k.unbind&&k.unbind(a,c),k.type&&(g=b=k.type)),c=h[e],delete h[e]}dc(h)&&delete eh[f],a.removeEventListener(b,c,!1)}}},jh=function(a,b){var c=a[lh];if(c&&eh[c]){var d=eh[c],e=function(){},f=lh,g=ih;for(var h in d){var i=h.split("_"),j=i[1];e[f]=i[2],i[3]||b&&b!==j||g(a,j,e)}}},kh=1,lh="__event_guid__",mh=function(a,b,c){var d=function(d){ih(a,b,c),c.call(a,d)},e=lh;c[e]||(c[e]=kh++),d[e]=c[e],fh(a,b,d)};if(yf){var nh={};k({tapstart:["mousedown","touchstart"],tapmove:["mousemove","touchmove"],tapend:["mouseup","touchend"],tapcancel:["mouseleave","touchcancel"]},function(a,b){var c=a[1],d=a[0];hh[c]={bind:function(a,b){return function(c){return b.call(a,$a(a,c))}}},hh[b]={type:d,bind:function(a,d){var e=function(c){c._type=b,d.call(a,c)};return _a(a,c,gh(a,b,d),e),e},unbind:function(a,d){ab(a,c,gh(a,b,d))}}});var oh=-1;hh.tap={type:"tapstart",timeThreshold:500,pixelThreshold:5,bind:function(a,b){function c(a){j&&a.preventDefault(),k&&a.stopPropagation(),j=!1,k=!1}var d,e,f,g=!1,h=hh.tap.timeThreshold,i=hh.tap.pixelThreshold,j=!1,k=!1;nh[gh(a,"tap-click",b)]=c,fh(a,"click",c,!0);var l=gh(a,"tap-tapend",b),m=function(c){ab(a,"tapend",l),c.tapStartTime||(c.tapStartTime=d,c.tapStartX=e,c.tapStartY=f);var j=c.timeStamp-d,k=c.tapStartX-e,m=c.tapStartY-f,j=c.tapStartTime-d,n=Math.sqrt(k*k+m*m);j<=h&&n<=i&&(c._type="tap",b.call(a,c)),c.tapStartTime=null,g=!1};return function(b){if(d=b.timeStamp,e=b.pageX,f=b.pageY,!g){var c=oh;d-c>=h&&(g=!0,oh=d,fh(a,"tapend",nh[l]=m,!0))}}},unbind:function(a,b){ab(a,"tapend",gh(a,"tap-tapend",b)),ab(a,"click",gh(a,"tap-click",b))}},hh.doubletap={type:"tap",timeThreshold:500,pixelThreshold:10,bind:function(a,b){var c,d,e,f=0,g=hh.doubletap.timeThreshold,h=hh.doubletap.pixelThreshold;return function(i){var j,k,l,m;f>0&&(j=i.tapStartX-d,k=i.tapStartY-e,l=i.tapStartTime-c,m=Math.sqrt(j*j+k*k),(l>g||m>h)&&(f=0)),0===f&&(c=i.tapStartTime,d=i.tapStartX,e=i.tapStartY),f++,2===f&&(f=0,i._type="doubletap",b.call(a,i))}}}}else{var ph=navigator.msPointerEnabled||navigator.pointerEnabled,qh=navigator.pointerEnabled?"":"MS";k({tapstart:ph?qh+"PointerDown":"mousedown",tapmove:ph?qh+"PointerMove":"mousemove",tapend:ph?qh+"PointerUp":"mouseup",tap:"click",doubletap:"dblclick"},function(a,b){hh[b]={type:a,bind:function(a,c){return function(d){d._type=b,c.call(a,d)}}}})}var rh=function(a,b,c){Ah.test(b)||Ch.test(b)?Va(a).appendChild(Hh(b,c)):a.innerHTML=b};if(function(){var a=Ad("svg");return a.innerHTML="",!(a.firstChild&&"rect"===(a.firstChild.tagName+"").toLocaleLowerCase())}()){var sh=function(a,b){if(a.childNodes)for(var c=a.childNodes,d=0,e=c.length;d])*>',"i"),"").replace(new RegExp("$","i"),"")},set:function(a){sh(Hh(a),Va(this))}}})}var th=qc.matches||qc[Ug("matchesSelector",qc)],uh=function(a,b){return th.call(b,a)},vh=function(a){var b={left:0,top:0},c=a.ownerDocument;if(!c)return b;var d=c.defaultView||c.parentWindow,e=c.documentElement;if(!ch(e,a))return b;if(a.getBoundingClientRect){var f=a.getBoundingClientRect();b.top=f.top,b.left=f.left}return{top:b.top+d.pageYOffset-e.clientTop,left:b.left+d.pageXOffset-e.clientLeft}},wh=function(a){for(var b=a.offsetParent||qc;b&&"HTML"!==b.tagName&&"static"===Xe(b,"position");)b=b.offsetParent;return b||qc},xh=Ad("script"),yh=b.createRange(),zh=b.createDocumentFragment(),Ah=/