{"size": 44917, "ext": "js", "max_stars_repo_path": "pub/pubs/etc/epoflop/assets/player/KPFObjects.js", "max_stars_repo_name": "jrpool/jpdev", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "pub/pubs/etc/epoflop/assets/player/KPFObjects.js", "max_issues_repo_name": "jrpool/jpdev", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "pub/pubs/etc/epoflop/assets/player/KPFObjects.js", "max_forks_repo_name": "jrpool/jpdev", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 44917.0, "max_line_length": 44917, "alphanum_fraction": 0.7768773516}
var kpfLayerCounter=0;var eventOverallDuration=0;var KPFPlaybackController=Class.create({initialize:function(b,a){this.domNode=a;this.kpfEvent=null},destroy:function(){this.removeEvent();this.domNode=null},removeEvent:function(){if(this.kpfEvent){this.kpfEvent.destroy();delete this.kpfEvent;this.kpfEvent=null;while(this.domNode.childNodes.length>0){this.domNode.removeChild(this.domNode.childNodes[0])}}},renderEvent:function(a){this.removeEvent();this.kpfEvent=a;this.kpfEvent.renderEvent(this.domNode)},animateEvent:function(){if(this.kpfEvent){this.kpfEvent.animateEvent()}},eventOverallEndTime:function(){return this.kpfEvent.eventOverallEndTime}});var KPFEvent=Class.create({initialize:function(a){this.slideId=a.slideId;this.slideIndex=a.slideIndex;this.sceneIndex=a.sceneIndex;this.animationSupported=a.animationSupported;this.event=a.event;this.baseLayer={};this.effects=[];this.cssRenderer={};this.eventOverallEndTime=0;this.overallEndTimeInternal()},destroy:function(){this.baseLayer.destroy();this.cssRenderer.destroy();for(var a=0,b=this.effects.length;a<b;a++){this.effects[a].destroy()}delete this.baseLayer;delete this.cssRenderer;delete this.effects;delete this.event;this.slideId=null;this.slideIndex=null;this.sceneIndex=null;this.animationSupported=null;this.eventOverallEndTime=null},addAnimationsToIdenticalLayer:function(c,f){if(c.animations&&c.animations.length>0){for(var b=0,e=c.animations.length;b<e;b++){f.animations.push(c.animations[b])}}if(c.layers&&c.layers.length>0){for(var a=0,d=c.layers.length;a<d;a++){this.addAnimationsToIdenticalLayer(c.layers[a],f.layers[a])}}},processEffects:function(a){var d=[];for(var h=0;h<a.length;h++){var m=a[h];if(m.type==="actionBuild"){var f=false;var l;for(var g=0,b=d.length;g<b;g++){if(d[g].type==="actionBuild"&&d[g].objectID===m.objectID){l=g;f=true;break}}if(f){this.addAnimationsToIdenticalLayer(m.baseLayer,d[l].baseLayer);if(m.beginTime<d[l].beginTime){d[l].beginTime=m.beginTime}if(m.beginTime+m.duration>d[l].beginTime+d[l].duration){d[l].duration=m.beginTime+m.duration}for(var e=0,c=m.effects.length;e<c;e++){d[l].effects.push(m.effects[e])}if(d[l].names==null){d[l].names=[]}d[l].names.push(m.name)}else{d.push(m)}}else{d.push(m)}}for(var h=0,b=d.length;h<b;h++){d[h].effects=this.processEffects(d[h].effects)}return d},renderEvent:function(d){this.event.effects=this.processEffects(this.event.effects);var f={animationSupported:this.animationSupported};if(this.event.effects&&this.event.effects.length===1){f.name=this.event.effects[0].name;f.type=this.event.effects[0].type}this.baseLayer=new KPFLayer(this.event.baseLayer,f);for(var b=0,e=this.event.effects.length;b<e;b++){var c=new KPFEffect(this.event.effects[b],this.animationSupported);if(c.baseLayer!=null){if(this.baseLayer.objectID===c.objectID){var a=new KPFLayer(c.baseLayer,{animationSupported:this.animationSupported,name:c.name,type:c.type});this.baseLayer=a;c.kpfLayer=a}else{this.renderBaseLayerWithEffect(this.baseLayer,c)}}else{this.renderAudioOnlyEffect(c)}this.effects.push(c)}this.cssRenderer=new KPFCssRenderer(this.baseLayer,this.sceneIndex,this.animationSupported,this.effects);this.cssRenderer.draw(d)},renderAudioOnlyEffect:function(e){if(e.name!="renderMovie"){return}var b=e.movie;if(!b.isAudioOnly){return}if(gShowController.audioCache==null){gShowController.audioCache={}}var a=b.asset+"-audio";var d=gShowController.audioCache[a];if(d==null){var c=gShowController.textureManager.urlForAsset(b.asset,this.slideId);d=new Audio(c);if(b){if(b.loopMode&&b.loopMode==="looping"){d.loop=true}if(b.volume){d.volume=b.volume}}gShowController.audioCache[a]=d}d.play()},renderBaseLayerWithEffect:function(f,e){var c;for(var b=0,d=f.layers.length;b<d;b++){if(f.layers[b].objectID===e.objectID){var a=new KPFLayer(e.baseLayer,{animationSupported:this.animationSupported,name:e.name,type:e.type},f.bounds.offset);f.layers[b]=a;e.kpfLayer=a;c=true}else{c=this.renderBaseLayerWithEffect(f.layers[b],e)}if(c){break}}return c},animateEvent:function(){for(var a=0,b=this.effects.length;a<b;a++){this.animateEffect(this.effects[a])}},animateEffect:function(a){this.cssRenderer.animate(a);if(a.effects.length>0){setTimeout(this.handleEffectDidComplete.bind(this,a),(a.beginTime+a.duration)*1000)}},handleEffectDidComplete:function(b){for(var a=0,d=b.effects.length;a<d;a++){var c=b.effects[a];if(c.baseLayer!=null){this.animateSubEffect(this.baseLayer,c)}else{this.renderAudioOnlyEffect(c)}}},animateSubEffect:function(b,g){var d;for(var e=0,c=b.layers.length;e<c;e++){if(b.layers[e].objectID===g.objectID){var j=b.layers[e];var f=document.getElementById("layer"+b.layerId);var h=new KPFLayer(g.baseLayer,{animationSupported:this.animationSupported,name:g.name,type:g.type},b.bounds.offset);b.layers[e]=h;g.kpfLayer=h;var a=document.getElementById("layer"+j.layerId);var k=this.cssRenderer.createNodes(f,b,h);f.replaceChild(k,a);this.animateEffect(g);d=true}else{d=this.animateSubEffect(b.layers[e],g)}if(d){break}}return d},overallEndTime:function(){return this.eventOverallEndTime},overallEndTimeInternal:function(){for(var a=0,d=this.event.effects.length;a<d;a++){var c=0;var b=this.event.effects[a];this.calculateOverallEndTime(c,b)}},calculateOverallEndTime:function(e,c){var b=e+c.beginTime+c.duration;if(b>this.eventOverallEndTime){this.eventOverallEndTime=b}for(var a=0,d=c.effects.length;a<d;a++){this.calculateOverallEndTime(b,c.effects[a])}}});var KPFEffect=Class.create({initialize:function(b,a){this.type=b.type;this.name=b.name;this.beginTime=b.beginTime;this.duration=b.duration;this.objectID=b.objectID;this.baseLayer=b.baseLayer;if(b.movie){this.movie=b.movie}this.effects=[];this.addSubEffect(b.effects,a)},destroy:function(){for(var a=0,b=this.effects.length;a<b;a++){this.destroyEffect(this.effects[a])}this.type=null;this.name=null;this.beginTime=null;this.duration=null;this.objectID=null;delete this.kpfLayer;delete this.effects;delete this.baseLayer;if(this.movie){delete this.movie}},destroyEffect:function(b){for(var a=0,c=b.effects.length;a<c;a++){this.destroyEffect(b.effects[a])}b.type=null;b.name=null;b.beginTime=null;b.duration=null;b.objectID=null;delete b.kpfLayer;delete b.effects;delete b.baseLayer;if(b.movie){delete b.movie}},addSubEffect:function(c,a){for(var b=0,e=c.length;b<e;b++){var d=new KPFEffect(c[b],a);this.effects.push(d)}}});var KPFCssRenderer=Class.create({initialize:function(b,d,a,c){this.textureId=b.textureId;this.nativeWidth=b.bounds.width;this.nativeHeight=b.bounds.height;this.opacity=b.opacity;this.visibility=b.hidden===true?"hidden":"visible";this.textureTransform=b.textureTransform;this.affineTransform=b.affineTransform;this.anchorPoint=b.anchorPoint;this.contentsRect=b.contentsRect;this.layer=b;this.sceneIndex=d;this.animationSupported=a;if(c[0].type==="transition"&&c[0].name!="apple:ca-swing"){this.enableCompositingUsingBackface=true;this.enablePreserve3DFromParent=true}else{this.enableCompositingUsingBackface=false;this.enablePreserve3DFromParent=false}this.domNode=document.createElement("div");this.domNode.setAttribute("id","layer"+b.layerId)},destroy:function(){this.textureId=null;this.nativeWidth=null;this.nativeHeight=null;this.opacity=null;this.visibility=null;this.textureTransform=null;this.affineTransform=null;this.anchorPoint=null;this.textureAnimation=null;this.contentsRect=null;this.requiresPerspectiveTransform=null;this.sceneIndex=null;if(this.domNode.hasChildNodes()){while(this.domNode.childNodes.length>0){this.domNode.removeChild(this.domNode.firstChild)}}this.domNode=null},addAnimationNode:function(d,c,a,b){if(c==null){return d}var e=c.shift();if(e==null){return d}var g=document.createElement("div");var f=a+"-"+escapeTextureId(e);g.setAttribute("id",f);if(b.initialState.masksToBounds){setElementProperty(g,"overflow","hidden")}this.setStyle(g,"0px","0px",d.style.width,d.style.height,kPositionAbsolutePropertyValue,null,null);setElementProperty(g,kTransformStylePropertyName,kTransformStylePreserve3DPropertyValue);if(b.anchorPoint.pointX!=0.5||b.anchorPoint.pointY!=0.5){setElementProperty(g,kTransformOriginPropertyName,(b.anchorPoint.pointX*100)+"% "+(b.anchorPoint.pointY*100)+"%")}if(b.transformOriginZValue!=""&&e!="opacity"&&e!="doubleSided"){if(e!="anchorPointZ"){if(Prototype.Browser.Gecko){setElementProperty(g,kTransformOriginPropertyName,(b.anchorPoint.pointX*100)+"% "+(b.anchorPoint.pointY*100)+"% "+b.transformOriginZValue+"px")}else{setElementProperty(g,kTransformOriginZPropertyName,b.transformOriginZValue+"px");if(navigator.userAgent.lastIndexOf("Chrome/")<=0){setElementProperty(g,kTransformPropertyName,"translateZ("+b.transformOriginZValue+"px)")}}}}d.appendChild(g);return this.addAnimationNode(g,c,a,b)},createNodes:function(a,c,b){var d=this.addNode(a,c,b);return d},addNode:function(o,s,d){var t="layer"+d.layerId;var J=document.createElement("div");J.setAttribute("id",t);setElementProperty(J,"pointer-events","none");var B=d.contentsRect.x;var A=d.contentsRect.y;var C=d.contentsRect.width;var I=d.contentsRect.height;var Q=d.affineTransform[0];var O=d.affineTransform[1];var N=d.affineTransform[2];var M=d.affineTransform[3];var L=d.affineTransform[4];var K=d.affineTransform[5];var r="matrix("+Q+","+O+","+N+","+M+","+(L+d.bounds.offset.pointX)+","+(K+d.bounds.offset.pointY)+")";this.setStyle(J,"0px","0px",d.bounds.width+"px",d.bounds.height+"px",kPositionAbsolutePropertyValue,d.opacity,d.visibility);setElementProperty(J,kTransformPropertyName,r);if(d.anchorPoint.pointX!=0.5||d.anchorPoint.pointY!=0.5){setElementProperty(J,kTransformOriginPropertyName,(d.anchorPoint.pointX*100)+"% "+(d.anchorPoint.pointY*100)+"%")}if(d.initialState.masksToBounds){setElementProperty(J,"overflow","hidden")}o.appendChild(J);var u;if(this.animationSupported){u=this.addAnimationNode(J,d.divNames,t,d)}else{u=J}if(d.isTransition&&this.enablePreserve3DFromParent){if(s.sublayerTransform[11]!=0){setElementProperty(J,kTransformStylePropertyName,kTransformStylePreserve3DPropertyValue)}if(d.sublayerTransform[11]!=0){setElementProperty(J,kPerspectivePropertyName,gShowController.stageManager.perspective+"px");setElementProperty(J,kTransformStylePropertyName,kTransformStylePreserve3DPropertyValue)}}else{if(s.sublayerTransform[11]!=0){setElementProperty(o,kPerspectivePropertyName,gShowController.stageManager.perspective+"px");setElementProperty(J,kTransformStylePropertyName,kTransformStylePreserve3DPropertyValue)}else{setElementProperty(J,kTransformStylePropertyName,kTransformStyleFlatPropertyValue)}}var z=d.textureId;if(z){var v;var e;if(d.hasContentsAnimation){var P=d.cssAnimation.animations;for(var k=0,G=P.length;k<G;k++){if(P[k].property==="contents"){z=P[k].to.texture;e=P[k].from.texture;break}}}var v=this.cloneNode(gShowController.textureManager.getTextureObject(this.sceneIndex,z));v.setAttribute("id",z);if(browserPrefix==="webkit"&&d.isTransition==null){setElementProperty(v,kTransformPropertyName,"translateZ(0px)")}if(B===0&&A===0&&C===1&&I===1){this.setStyle(v,"0px","0px",d.bounds.width+"px",d.bounds.height+"px",kPositionAbsolutePropertyValue,null,null)}else{var a,c;if(v.nodeName.toLowerCase()==="svg"){a=v.getAttribute("width");c=v.getAttribute("height")}else{a=v.naturalWidth;c=v.naturalHeight;if(v.src.indexOf("KNTransitionSlide_Black.png")!=-1){a=gShowController.script.slideWidth;c=gShowController.script.slideHeight}}var m=A*c;var E=(B+C)*a;var b=(A+I)*c;var j=B*a;this.setStyle(v,(-m)+"px",(-j)+"px",a+"px",c+"px",kPositionAbsolutePropertyValue,null,null);setElementProperty(v,"clip","rect("+m+"px, "+E+"px, "+b+"px, "+j+"px)")}if(d.isTransition){if(this.enableCompositingUsingBackface){setElementProperty(v,kBackfaceVisibilityPropertyName,"hidden")}else{setElementProperty(v,kTransformPropertyName,"translateZ(0px)")}}var f=gShowController.textureManager.getTextureInfo(this.sceneIndex,d.textureId);var g;if(f.movie){if(gShowController.movieCache==null){gShowController.movieCache={}}var D=d.textureId+"-video";d.hasMovie=true;d.movieId=D;g=gShowController.movieCache[D];if(g==null){g=document.createElement("video");setElementProperty(g,"pointer-events","all");this.setStyle(g,"0px","0px",d.bounds.width+"px",d.bounds.height+"px",kPositionAbsolutePropertyValue,null,"hidden");g.setAttribute("id",D);g.setAttribute("src",gShowController.textureManager.getMovieUrl(this.sceneIndex,d.textureId));if(gShowController.isRecording===false){g.setAttribute("controls","controls")}Event.stopObserving(g,"play");Event.stopObserving(g,"ended");Event.observe(g,"play",this.handleMovieDidStart.bind(this,v,g));Event.observe(g,"ended",this.handleMovieDidEnd.bind(this,v,g));gShowController.movieCache[D]=g;if(d.animationInfo.type==="buildOut"){v.style.visibility="visible"}}else{if(g.isPlaying){if(d.animationInfo.type==="buildOut"){v.style.visibility="hidden"}else{if(!g.isEnded){g.play()}}}}}if(d.hasContentsAnimation){v.setAttribute("preserveAspectRatio","none");var q=document.createElement("div");q.id=t+"-contents-to";this.setStyle(q,v.style.top,v.style.left,v.style.width,v.style.height,kPositionAbsolutePropertyValue,null,null);q.appendChild(v);u.appendChild(q);setElementProperty(q,"opacity",0);var n=gShowController.textureManager.getTextureObject(this.sceneIndex,e).cloneNode(true);n.setAttribute("id",e);this.setStyle(n,"0px","0px",d.bounds.width+"px",d.bounds.height+"px",kPositionAbsolutePropertyValue,null,null);setElementProperty(n,kBackfaceVisibilityPropertyName,"hidden");var l=document.createElement("div");l.id=t+"-contents-from";this.setStyle(l,n.style.top,n.style.left,n.style.width,n.style.height,kPositionAbsolutePropertyValue,null,null);l.appendChild(n);u.appendChild(l)}else{u.appendChild(v)}if(g){u.appendChild(g)}}else{if(d.initialState.backgroundColor){var F=d.initialState.backgroundColor;setElementProperty(u,"background-color","rgba("+parseInt(F[0]*255)+","+parseInt(F[1]*255)+","+parseInt(F[2]*255)+","+F[3]+")")}}for(var H=0,p=d.layers.length;H<p;H++){this.addNode(u,d,d.layers[H])}return J},cloneNode:function(d){var f=d.cloneNode(true);if(browserPrefix==="ms"&&browserVersion>=10){var e=d.getElementsByTagName("feGaussianBlur");if(e){var b=f.getElementsByTagName("feGaussianBlur");for(var a=0,c=e.length;a<c;a++){b[a].setAttribute("stdDeviation",e[a].getAttribute("stdDeviation"))}}}return f},serializeSvg:function(e){var f=e.getElementsByTagName("image");for(var d=0,b=f.length;d<b;d++){var a=f[d];var g=document.createElement("a");g.href=a.getAttributeNS("http://www.w3.org/1999/xlink","href");var j=window.location.protocol+"//"+g.host+g.pathname;a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",j)}var h=new XMLSerializer;var c=h.serializeToString(e);return c},draw:function(a){this.setStyle(this.domNode,"0px","0px",this.nativeWidth+"px",this.nativeHeight+"px",kPositionAbsolutePropertyValue,this.opacity,this.visibility);if(browserPrefix==="webkit"){setElementProperty(this.domNode,kTransformPropertyName,"translateZ(0px)")}if(this.layer.sublayerTransform[11]!=0){setElementProperty(this.domNode,kPerspectivePropertyName,gShowController.stageManager.perspective+"px");setElementProperty(this.domNode,kTransformStylePropertyName,kTransformStylePreserve3DPropertyValue)}else{setElementProperty(this.domNode,kTransformStylePropertyName,kTransformStyleFlatPropertyValue)}for(var b=0,c=this.layer.layers.length;b<c;b++){this.createNodes(this.domNode,this.layer,this.layer.layers[b])}a.appendChild(this.domNode)},setStyle:function(f,h,g,e,b,a,d,c){f.style.top=h;f.style.left=g;f.style.width=e;f.style.height=b;f.style.position=a;if(d!=null&&d!=undefined){f.style.opacity=d}if(c!=null&&c!=undefined){f.style.visibility=c}},overallEndTime:function(a){var b={};b.duration=0;this.overallEndTimeForLayer(this.layer,b);return b.duration},overallEndTimeForLayer:function(b,c){if(b.cssAnimation){if(b.cssAnimation.overallEndTime>c.duration){c.duration=b.cssAnimation.overallEndTime}}for(var a=0,d=b.layers.length;a<d;a++){this.overallEndTimeForLayer(b.layers[a],c)}},animate:function(a){if(a.kpfLayer){if(a.movie){this.animateNode(a.kpfLayer,a.movie)}else{this.animateNode(a.kpfLayer)}}},animateNode:function(c,a){if(this.animationSupported){if(c.cssAnimationRules.length>0){var f=document.getElementById("layer"+c.layerId);if(f){this.applyCssAnimation(f,c)}}else{if(c.hasMovie&&c.animationInfo.name==="renderMovie"){var d=document.getElementById(c.movieId);if(a){if(a.loopMode&&a.loopMode==="looping"){d.loop=true}if(a.volume){d.volume=a.volume}}this.startMovie(d)}}for(var b=0,e=c.layers.length;b<e;b++){this.animateNode(c.layers[b],a)}}},applyCssAnimation:function(v,d){var P=d.cssAnimation;var y=d.cssAnimationRules;var O=d.cssAnimation.overallEndTime;if(d.hasMovie){if(d.animationInfo.type==="buildOut"){this.stopMovie(document.getElementById(d.movieId))}}if(isChrome&&d.animationInfo.name==="apple:doorway"){if(d.layers.length===0&&d.contentsRect.x===0&&d.contentsRect.y===0&&d.contentsRect.width===1&&d.contentsRect.height===1){v.style.visibility="hidden"}}for(var E in P.keyAnimations){if(E!="bounds"){continue}var r=P.keyAnimations[E];var w=document.styleSheets[1].cssRules;for(var U=0,X=w.length;U<X;U++){var s=w[U];var A=v.id+"-"+E;if(s.name===A){while(s.cssRules.length>0){if(browserPrefix==="ms"){for(var T=0,B=s.cssRules.length;T<B;T++){s.deleteRule(T)}}else{s.deleteRule(s.cssRules[0].keyText)}}for(var T=0,x=r.keyframes.length;T<x;T++){var e=r.keyframes[T];if(E==="bounds"){var Q,V,a,c;if(e.keyframe==0){Q=e.value.width;V=e.value.height;if(s.insertRule){s.insertRule("0% {"+kTransformPropertyName+": scaleX(1) scaleY(1); "+kAnimationTimingFunctionPropertyName+": "+e.timingFunction+";}")}else{s.appendRule("0% {"+kTransformPropertyName+": scaleX(1) scaleY(1); "+kAnimationTimingFunctionPropertyName+": "+e.timingFunction+";}")}}else{a=e.value.width;c=e.value.height;if(s.insertRule){s.insertRule(e.keyframe+"% {"+kTransformPropertyName+": scaleX("+a/Q+") scaleY("+c/V+"); "+kAnimationTimingFunctionPropertyName+": "+e.timingFunction+";}")}else{s.appendRule(e.keyframe+"% {"+kTransformPropertyName+": scaleX("+a/Q+") scaleY("+c/V+"); "+kAnimationTimingFunctionPropertyName+": "+e.timingFunction+";}")}}}}}}}if(d.initialState.rotation!==0||d.initialState.scale!==1){var g=document.getElementById(v.id);var F=window.getComputedStyle(g,null);var J=F.getPropertyValue(kTransformPropertyName);var K=parseTransformMatrix(J);var l="matrix(1,0,0,1,"+K[4]+","+K[5]+")";setElementProperty(g,kTransformPropertyName,l);var u=document.getElementById(v.id+"-"+escapeTextureId("transform.rotation.z"));if(u){setElementProperty(u,kTransformPropertyName,"rotateZ("+d.initialState.rotation+"rad)")}var D=document.getElementById(v.id+"-"+escapeTextureId("transform.scale.x"));if(D){setElementProperty(D,kTransformPropertyName,"scaleX("+d.initialState.scale+")")}var m=document.getElementById(v.id+"-"+escapeTextureId("transform.scale.y"));if(m){setElementProperty(m,kTransformPropertyName,"scaleY("+d.initialState.scale+")")}}for(var E in P.keyAnimations){var r=P.keyAnimations[E];var z=r.keyActions;var H=z[z.length-1];var G=r.keyframes[r.keyframes.length-1];var Y=this.cssPropertyNameForAction(E);var S=this.cssPropertyValueForActionValue(E,G.value);var k=O+"s";var A="";var M="";if(E==="isPlaying"){continue}if(E==="doubleSided"){var h=document.getElementById(v.id+"-"+escapeTextureId(E));if(h){setElementProperty(h,Y,S)}continue}switch(E){case"opacity":setElementProperty(v,"opacity",1);A=v.id+"-"+escapeTextureId(E);M=A;break;case"hidden":Y="opacity";if(S==="hidden"){S=0}else{v.style.visibility="visible";S=1}A=v.id;M=A+"-hidden";break;case"bounds":A=v.id+"-bounds";M=A;var Q,V,t,I;var n=r.keyframes[0];var R=r.keyframes[r.keyframes.length-1];S="scaleX("+R.value.width/n.value.width+") scaleY("+R.value.height/n.value.height+")";break;default:A=v.id+"-"+escapeTextureId(E);M=A;break}if(E==="contents"){var L=v.id+"-contents-from";var q=v.id+"-contents-to";var p=document.getElementById(L);var W=document.getElementById(q);setElementProperty(p,"opacity",0);setElementProperty(p,kAnimationNamePropertyName,L);setElementProperty(p,kAnimationDurationPropertyName,k);setElementProperty(W,"opacity",1);setElementProperty(W,kAnimationNamePropertyName,q);setElementProperty(W,kAnimationDurationPropertyName,k);continue}var b=document.getElementById(A);if(b){if(E==="anchorPoint"){var o={};o.x=H.to.pointX;o.y=H.to.pointY;var N={};var f={};var C={};f.x=d.bounds.width/2;f.y=d.bounds.height/2;if(o.x!=null&&o.y!=null){C.x=o.x*d.bounds.width;C.y=o.y*d.bounds.height;N.x=f.x-C.x;N.y=f.y-C.y;if(d.magicMoveOffsetValue){N.x=d.magicMoveOffsetValue.pointX;N.y=d.magicMoveOffsetValue.pointY}Y=kTransformPropertyName;S="translateX("+N.x+"px) translateY("+N.y+"px)"}}else{if(E==="anchorPointZ"){if(Prototype.Browser.Gecko||navigator.userAgent.lastIndexOf("Chrome/")>0){Y=kTransformPropertyName;S="translateZ("+-d.transformOriginZValue+"px)"}else{Y=kTransformPropertyName;S="translateZ("+d.transformOriginZValue+"px)"}}}if(E==="hidden"){setElementProperty(b,kAnimationFillModePropertyName,H.fillMode==="removed"?"none":H.fillMode)}else{setElementProperty(b,Y,S)}setElementProperty(b,kAnimationNamePropertyName,M);setElementProperty(b,kAnimationDurationPropertyName,k)}}},cssPropertyValueForActionValue:function(a,b){switch(a){case"hidden":if(b.scalar===true){return"hidden"}else{return"visible"}case"anchorPoint":return b.pointX+"% "+b.pointY+"%";case"anchorPointZ":return b.scalar;case"position":return"translate("+b.pointX+"px,"+b.pointY+"px)";case"zPosition":return"translateZ("+b.scalar+"px)";case"translationEmphasis":return"translateX("+b.translationEmphasis[0]+"px) translateY("+b.translationEmphasis[1]+"px) translateZ("+b.translationEmphasis[2]+")";case"rotationEmphasis":return"rotateZ("+b.rotationEmphasis[6]+"rad)";case"scaleEmphasis":return"scale3d("+ensureScaleFactorNotZero(b.scaleEmphasis[3])+","+ensureScaleFactorNotZero(b.scaleEmphasis[4])+","+ensureScaleFactorNotZero(b.scaleEmphasis[5])+")";case"transform.scale":case"transform.scale.xy":return"scale("+ensureScaleFactorNotZero(b.scalar)+")";case"transform.scale.x":return"scaleX("+ensureScaleFactorNotZero(b.scalar)+")";case"transform.scale.y":return"scaleY("+ensureScaleFactorNotZero(b.scalar)+")";case"transform.rotation.x":return"rotateX("+b.scalar+"rad)";case"transform.rotation.y":return"rotateY("+b.scalar+"rad)";case"transform.rotation.z":case"transform.rotation":return"rotateZ("+b.scalar+"rad)";case"transform.translation":return"translateX("+b.pointX+"px) translateY("+b.pointY+"px)";case"transform.translation.x":return"translateX("+b.scalar+"px)";case"transform.translation.y":return"translateY("+b.scalar+"px)";case"transform.translation.z":return"translateZ("+b.scalar+"px)";case"isPlaying":case"opacity":case"opacityMultiplier":return b.scalar+"";case"transform":return"matrix3d("+b.transform+")";case"doubleSided":if(b.scalar===false){return"hidden"}else{return"visible"}default:return"some value"}},cssPropertyNameForAction:function(a){switch(a){case"hidden":return kVisibilityPropertyName;case"anchorPoint":return kTransformOriginPropertyName;case"anchorPointZ":return kTransformOriginZPropertyName;case"opacityMultiplier":return kOpacityPropertyName;case"translationEmphasis":case"rotationEmphasis":case"scaleEmphasis":case"position":case"zPosition":case"transform":case"transform.scale":case"transform.scale.xy":case"transform.scale.x":case"transform.scale.y":case"transform.rotation.x":case"transform.rotation.y":case"transform.rotation.z":case"transform.rotation":case"transform.translation":case"transform.translation.x":case"transform.translation.y":case"transform.translation.z":case"bounds":return kTransformPropertyName;case"doubleSided":return kBackfaceVisibilityPropertyName;case"contents":return kBackgroundImagePropertyName;default:return a}},handleMovieDidStart:function(a,b){b.style.visibility="visible"},handleMovieDidEnd:function(a,b){if(!b.loop){b.isEnded=true}},startMovie:function(a){if(a){a.play();a.isPlaying=true}},stopMovie:function(a){if(a){a.pause()}}});var KPFLayer=Class.create({initialize:function(c,d,b){this.animationInfo=d;this.layerId=kpfLayerCounter;kpfLayerCounter=kpfLayerCounter+1;this.objectID=c.objectID!=null?c.objectID:null;this.textureId=c.texture?c.texture:null;this.animations=c.animations;this.initialState=c.initialState;this.cssAnimationRules=[];this.layers=[];this.affineTransform=this.initialState.affineTransform;this.position=this.initialState.position;this.textureTransform="";if(this.initialState.transform!=null&&this.initialState.transform!=undefined){this.textureTransform="matrix3D("+this.initialState.transform+")"}else{this.textureTransform="matrix("+this.affineTransform+")"}this.anchorPoint=this.initialState.anchorPoint;if(b==null){b={pointX:0,pointY:0}}var a=this.position.pointX-this.initialState.width/2-(this.anchorPoint.pointX-0.5)*this.initialState.width;var e=this.position.pointY-this.initialState.height/2-(this.anchorPoint.pointY-0.5)*this.initialState.height;a=Math.round(a*1000000)/1000000;e=Math.round(e*1000000)/1000000;this.bounds={width:this.initialState.width,height:this.initialState.height,origin:{pointX:this.affineTransform[4],pointY:this.affineTransform[5]},offset:{pointX:a,pointY:e},canvasOffset:{pointX:a+b.pointX,pointY:e+b.pointY}};this.sublayerTransform=this.initialState.sublayerTransform;this.contentsRect=this.initialState.contentsRect;this.hidden=this.initialState.hidden;this.opacity=this.initialState.opacity;this.visibility=this.hidden===true?"hidden":"visible";this.addSublayer(c.layers,d,this.bounds.offset);if(d.animationSupported){this.initLayerAnimations()}},destroy:function(){this.initialState=null;this.cssAnimationRules=null;this.affineTransform=null;this.textureTransform=null;this.anchorPoint=null;this.anchorPointZ=null;this.bounds=null;this.contentsRect=null;this.hidden=null;this.opacity=null},addSublayer:function(f,e,d){for(var a=0,b=f.length;a<b;a++){var c=new KPFLayer(f[a],e,d);this.layers.push(c)}},initLayerAnimations:function(){var k=false;var h=false;var b=false;var q=false;var g=false;var f=false;var d=false;var a=false;var n=false;var m=false;var l=false;var s=false;var v=false;var u=false;var c=false;var w=false;var o=false;var r=[];var e=false;if(this.animationInfo.type==="actionBuild"){this.isActionBuild=true}else{if(this.animationInfo.type==="buildIn"){this.isBuildIn=true}else{if(this.animationInfo.type==="buildOut"){this.isBuildOut=true}else{if(this.animationInfo.type==="transition"){this.isTransition=true;if(this.animationInfo.name==="apple:magic-move-implied-motion-path"){this.isMagicMove=true}else{if(this.animationInfo.name==="apple:ca-isometric"){e=true}}}}}}if(this.animations.length>0){this.cssAnimation=new KPFCssAnimation(this.animations,this)}if(this.cssAnimation){this.divNames=[];var p={isPlaying:0,opacityMultiplier:1,hidden:2};for(var x in this.cssAnimation.keyAnimations){if(!p.hasOwnProperty(x)){if(x=="opacity"){h=true}else{if(x==="anchorPoint"){b=true}else{if(x==="anchorPointZ"){q=true}else{if(!e&&x==="transform.translation.x"){g=true}else{if(!e&&x==="transform.translation.y"){f=true}else{if(!e&&x==="transform.translation.z"){d=true}else{if(!e&&x==="transform.translation"){a=true}else{if(!e&&x==="transform.rotation.x"){n=true}else{if(!e&&x==="transform.rotation.y"){m=true}else{if(!e&&x==="transform.rotation.z"){l=true}else{if(!e&&x==="transform.rotation"){s=true}else{if(x==="transform.scale.x"){v=true}else{if(x==="transform.scale.y"){u=true}else{if(x==="transform.scale.xy"){c=true}else{if(x==="transform.scale"){w=true}else{if(x==="transform"){o=true}else{if(x==="doubleSided"){k=true}else{if(x==="contents"){this.hasContentsAnimation=true}else{if(x==="bounds"){this.hasBoundsAnimation=true}else{if(x==="position"){this.hasPosition=true}else{r.push(x)}}}}}}}}}}}}}}}}}}}}}}if(h){this.divNames.push("opacity")}if(o){this.divNames.push("transform")}if(this.hasPosition){this.divNames.push("position")}if(b){this.divNames.push("anchorPoint")}if(q){this.divNames.push("anchorPointZ")}for(var t=0,j=r.length;t<j;t++){this.divNames.push(r[t])}if(g){this.divNames.push("transform.translation.x")}if(f){this.divNames.push("transform.translation.y")}if(a){this.divNames.push("transform.translation")}if(d){this.divNames.push("transform.translation.z")}if(n){this.divNames.push("transform.rotation.x")}if(m){this.divNames.push("transform.rotation.y")}if(l){this.divNames.push("transform.rotation.z")}if(this.initialState.rotation!==0&&this.divNames.indexOf("transform.rotation.z")===-1){this.divNames.push("transform.rotation.z")}if(s){this.divNames.push("transform.rotation")}if(v){this.divNames.push("transform.scale.x")}if(u){this.divNames.push("transform.scale.y")}if(this.initialState.scale!==1){if(this.divNames.indexOf("transform.scale.x")===-1){this.divNames.push("transform.scale.x")}if(this.divNames.indexOf("transform.scale.y")===-1){this.divNames.push("transform.scale.y")}}if(c){this.divNames.push("transform.scale.xy")}if(w){this.divNames.push("transform.scale")}if(this.hasBoundsAnimation){this.divNames.push("bounds")}if(k){this.divNames.push("doubleSided")}}}});var KPFCssAnimation=Class.create({initialize:function(n,F){this.kDelta=0.0001;this.kRoundingFactor=10000;this.animations=[];this.keyAnimations={};for(var A=0,g=n.length;A<g;A++){var C=n[A];var t=C.beginTime;var b=C.duration;var c=C.timingFunction?C.timingFunction:"linear";var E;var D;var h;var f;var w;var u=t+b;this.overallEndTime=0;if(u>this.overallEndTime){this.overallEndTime=u}if(c=="custom"){E=C.timingControlPoint1x;D=C.timingControlPoint1y;h=C.timingControlPoint2x;f=C.timingControlPoint2y}if(C.animations!=null&&C.animations.length>0){var p=C.animations;var o=t;if(p[0].property==null){o=p[0].beginTime;p=p[0].animations}for(var x=0,d=p.length;x<d;x++){var a=p[x];var m=a.property;var z=this.keyAnimations[m];if(z==null){z={groupBeginTime:o,earliestBeginTime:o+a.beginTime,latestEndTime:-1,keyActions:[]};this.keyAnimations[m]=z}if(o+a.beginTime+a.duration>z.latestEndTime){z.latestEndTime=o+a.beginTime+a.duration}if(a.path){var B=C.path.length;for(var v=0;A<B;v++){var q=C.path[v];var y=q.points[0];var G,e;if(v===0){e={pointX:y[0],pointY:y[1]}}else{G=C.path[v-1].points[0];e={pointX:G[0],pointY:G[1]}}switch(q.type){case"MoveToPoint":case"AddLine":case"AddCurve":case"AddQuadCurve":w={property:"position",from:e,to:{pointX:y[0],pointY:y[1]},fillMode:"forwards",beginTime:o+a.beginTime+(v/B)*a.duration,duration:1/B*a.duration,timingFunction:"linear",groupTimingFunction:c,groupBeginTime:t,groupDuration:b,groupTimingControlPoint1x:E,groupTimingControlPoint1y:D,groupTimingControlPoint2x:h,groupTimingControlPoint2y:f};break}this.addAction(w,a)}}else{if(a.keyTimes){var s=a.keyTimes.length;for(var v=0;v<s-1;v++){var r=a.keyTimes[v];var l=a.keyTimes[v+1];w={property:a.property,from:a.values[v],to:a.values[v+1],fillMode:a.fillMode,beginTime:o+a.beginTime+(r/1*a.duration),duration:(l-r)*a.duration,timingFunction:a.timingFunctions?a.timingFunctions[v]:"linear",groupTimingFunction:c,groupBeginTime:t,groupDuration:b,groupTimingControlPoint1x:E,groupTimingControlPoint1y:D,groupTimingControlPoint2x:h,groupTimingControlPoint2y:f};this.addAction(w,a)}}else{w={property:a.property,from:a.from,to:a.to,fillMode:a.fillMode,beginTime:o+a.beginTime,duration:a.duration,timingFunction:a.timingFunction?a.timingFunction:"linear",groupTimingFunction:c,groupBeginTime:t,groupDuration:b,groupTimingControlPoint1x:E,groupTimingControlPoint1y:D,groupTimingControlPoint2x:h,groupTimingControlPoint2y:f};this.addAction(w,a)}}}}else{var m=C.property;var z=this.keyAnimations[m];if(z==null){z={groupBeginTime:0,earliestBeginTime:C.beginTime,latestEndTime:-1,keyActions:[]};this.keyAnimations[m]=z}if(C.beginTime+C.duration>z.latestEndTime){z.latestEndTime=C.beginTime+C.duration}if(C.path){var B=C.path.length;for(var v=0;v<B;v++){var q=C.path[v];var y=q.points[0];var G,e;if(v===0){e={pointX:y[0],pointY:y[1]}}else{G=C.path[v-1].points[0];e={pointX:G[0],pointY:G[1]}}switch(q.type){case"MoveToPoint":case"AddLine":case"AddCurve":case"AddQuadCurve":w={property:"position",from:e,to:{pointX:y[0],pointY:y[1]},fillMode:"forwards",beginTime:t+v/B*b,duration:1/B*b,timingFunction:"linear"};break}this.addAction(w,C)}}else{if(C.keyTimes){var s=C.keyTimes.length;for(var v=0;v<s-1;v++){var r=C.keyTimes[v];var l=C.keyTimes[v+1];w={property:C.property,from:C.values[v],to:C.values[v+1],fillMode:C.fillMode,beginTime:r/1*b,duration:(l-r)*b,timingFunction:C.timingFunctions?C.timingFunctions[v]:"linear"};this.addAction(w,C)}}else{w={property:C.property,from:C.from,to:C.to,fillMode:C.fillMode,beginTime:t,duration:b,timingFunction:c?c:"linear"};this.addAction(w,C)}}}}this.createKeyActions();this.createAnimationRules(F);this.createAnimationRuleForKeyframes(F)},addAction:function(b,a){if(a.timingFunction==="custom"){b.timingControlPoint1x=a.timingControlPoint1x;b.timingControlPoint1y=a.timingControlPoint1y;b.timingControlPoint2x=a.timingControlPoint2x;b.timingControlPoint2y=a.timingControlPoint2y}else{if(b.timingFunction.timingFunction!=null){if(b.timingFunction.timingFunction==="custom"){b.timingControlPoint1x=b.timingFunction.timingControlPoint1x;b.timingControlPoint1y=b.timingFunction.timingControlPoint1y;b.timingControlPoint2x=b.timingFunction.timingControlPoint2x;b.timingControlPoint2y=b.timingFunction.timingControlPoint2y}b.timingFunction=b.timingFunction.timingFunction}}this.animations.push(b)},createKeyActions:function(){for(var e=0,a=this.animations.length;e<a;e++){var c=this.animations[e];var d=c.beginTime;var b=c.duration;var g=d+b;var n=c.property;var h=this.keyAnimations[n];var m=h.keyActions;var k=h.latestEndTime-h.earliestBeginTime;var l=0;var j=100;if(k>0){l=100*d/this.overallEndTime;j=100*g/this.overallEndTime}if(j>100){j=100}var f={startKeyframe:l,endKeyframe:j,from:c.from,to:c.to,timingFunction:c.timingFunction};if(c.fillMode){f.fillMode=c.fillMode}if(c.timingFunction=="custom"){f.timingControlPoint1x=c.timingControlPoint1x;f.timingControlPoint1y=c.timingControlPoint1y;f.timingControlPoint2x=c.timingControlPoint2x;f.timingControlPoint2y=c.timingControlPoint2y}m.push(f);m.sort(this.sortAction)}},sortAction:function(b,a){return b.startKeyframe-a.startKeyframe},roundNum:function(a){return Math.round(a*this.kRoundingFactor)/this.kRoundingFactor},createAnimationRules:function(x){var f=this.kDelta;for(var j in this.keyAnimations){if(j=="playing"){continue}var r=this.keyAnimations[j];var h=r.keyActions;var k=false;r.keyframes=[];var p=h[0];var t=this.roundNum(p.startKeyframe);var n=this.roundNum(100*r.groupBeginTime/this.overallEndTime);if(j=="anchorPoint"){var c={};c.x=p.to.pointX;c.y=p.to.pointY;var g=this.anchorPointOffset(x,c);var o={pointX:g.x,pointY:g.y};if(x.isMagicMove){var v=this.anchorPointOffset(x,{x:p.from.pointX,y:p.from.pointY});var l={pointX:v.x,pointY:v.y};var d=this.anchorPointOffset(x,{x:p.to.pointX,y:p.to.pointY});var w={pointX:d.x,pointY:d.y};if(l.pointX!==w.pointX||l.pointY!=w.pointY){o={pointX:w.pointX-l.pointX,pointY:w.pointY-l.pointY};x.magicMoveOffsetValue=o}}if(t!=0){var u=this.createInitialKeyframeValue(x,j,p.from,false);if(x.isMagicMove){u={pointX:0,pointY:0}}r.keyframes.push({keyframe:0,keyName:"position",value:u,timingFunction:"linear"});r.keyframes.push({keyframe:t-f,keyName:"position",value:u,timingFunction:"linear"})}r.keyframes.push({keyframe:t,keyName:"position",value:o,timingFunction:"linear"});r.keyframes.push({keyframe:100,keyName:"position",value:o,timingFunction:"linear"});x.transformOriginValue=(c.x*100)+"% "+(c.y*100)+"%";continue}if(j=="anchorPointZ"){k=true;if(t!=0){var u=this.createInitialKeyframeValue(x,j,p.from,true);r.keyframes.push({keyframe:0,keyName:"zPosition",value:u,timingFunction:"linear"});r.keyframes.push({keyframe:t-f,keyName:"zPosition",value:u,timingFunction:"linear"})}r.keyframes.push({keyframe:t,keyName:"zPosition",value:p.from,timingFunction:"linear"});r.keyframes.push({keyframe:100,keyName:"zPosition",value:p.to,timingFunction:"linear"});x.transformOriginZValue=p.to.scalar;continue}if(p==null){continue}var m=0;var s=null;var e=null;if(t!=0){if(j==="hidden"){e={scalar:x.hidden};this.insertInitialKeyframes(r,t-f,j,e)}else{if(j==="opacity"){if(p.fillMode==="both"||p.fillMode==="backwards"){e=p.from}else{e={scalar:x.opacity}}this.insertInitialKeyframes(r,t-f,j,e)}else{if(j==="position"){if(x.isBuildIn||x.isBuildOut){e={pointX:p.from.pointX-x.initialState.position.pointX,pointY:p.from.pointY-x.initialState.position.pointY}}else{e={pointX:0,pointY:0}}this.insertInitialKeyframes(r,t-f,j,e)}else{e=this.createInitialKeyframeValue(x,j,p.from,k);if(n>0){this.insertInitialKeyframes(r,n-f,j,e)}if(t-n>f){if(p.fillMode==="both"||p.fillMode==="backwards"){e=p.from}r.keyframes.push({keyframe:n,keyName:j,value:e,timingFunction:"linear"});r.keyframes.push({keyframe:t-f,keyName:j,value:e,timingFunction:"linear"})}}}}m=p.startKeyframe;s=e}for(var q=0,b=h.length;q<b;q++){p=h[q];if(j=="position"){e=x.initialState.position;p.from={pointX:p.from.pointX-e.pointX,pointY:p.from.pointY-e.pointY};p.to={pointX:p.to.pointX-e.pointX,pointY:p.to.pointY-e.pointY}}if(Math.abs(p.startKeyframe-m)>f){r.keyframes.push({keyframe:this.roundNum(p.startKeyframe)-f,keyName:j,value:s,timingFunction:"linear"})}var a=this.createTimingFunctionForAction(p);r.keyframes.push({keyframe:this.roundNum(p.startKeyframe),keyName:j,value:p.from,timingFunction:a});r.keyframes.push({keyframe:this.roundNum(p.endKeyframe)-(p.endKeyframe==100?0:f),keyName:j,value:p.to,timingFunction:a});s=p.to;m=p.endKeyframe}if(m!=100&&j!="hidden"){r.keyframes.push({keyframe:this.roundNum(m),keyName:j,value:s,timingFunction:"linear"});r.keyframes.push({keyframe:100,keyName:j,value:s,timingFunction:"linear"})}}},insertInitialKeyframes:function(b,c,d,a){b.keyframes.push({keyframe:0,keyName:d,value:a,timingFunction:"linear"});b.keyframes.push({keyframe:c,keyName:d,value:a,timingFunction:"linear"})},anchorPointOffset:function(c,e){var a={};var b={};var f={};var d=c.bounds;a.x=d.width/2;a.y=d.height/2;b.x=e.x*d.width;b.y=e.y*d.height;f.x=(a.x-b.x);f.y=(a.y-b.y);return f},createInitialKeyframeValue:function(a,c,e,b){var d={};switch(c){case"anchorPoint":d.pointX=(a.anchorPoint.pointX-0.5)*a.bounds.width;d.pointY=(a.anchorPoint.pointY-0.5)*a.bounds.height;break;case"anchorPointZ":if(Prototype.Browser.Gecko||Prototype.Browser.IE||isChrome||isIE){d.scalar=0}else{d.scalar=e.scalar+e.scalar}break;case"opacity":case"opacityMultiplier":d.scalar=a.opacity;break;case"hidden":d.scalar=a.hidden;break;case"position":d.pointX=a.affineTransform[4];d.pointY=a.affineTransform[5];break;case"zPosition":d.scalar=0;break;case"transform.scale":case"transform.scale.xy":case"transform.scale.x":case"transform.scale.y":d.scalar=a.initialState.scale;break;case"transform.rotation.z":d.scalar=a.initialState.rotation;case"transform":d.transform=e.transform;break;case"bounds":d.pointX=0;d.pointY=0;d.width=a.initialState.width;d.height=a.initialState.height;break;default:d.scalar=0;d.pointX=0;d.pointY=0;break}return d},createTimingFunctionForAction:function(b){var a="";switch(b.timingFunction){case"easeIn":a="ease-in";break;case"easeOut":a="ease-out";break;case"easeInOut":case"easeInEaseOut":a="ease-in-out";break;case"custom":a="cubic-bezier("+b.timingControlPoint1x+","+b.timingControlPoint1y+","+b.timingControlPoint2x+","+b.timingControlPoint2y+")";break;case"linear":a="linear";break;default:a="linear";break}return a},createAnimationRuleForKeyframes:function(d){for(var n in this.keyAnimations){var f=this.keyAnimations[n];var e="layer"+d.layerId+"-"+escapeTextureId(n);var b;var h="";var o;if(n==="contents"){var m=this.roundNum(f.keyActions[0].startKeyframe);b=gShowController.animationManager.createAnimation(e+"-from");var l="0% {opacity: 1; "+kAnimationTimingFunctionPropertyName+": linear;}";var k="49.999% {opacity: 1; "+kAnimationTimingFunctionPropertyName+": linear;}";var j="50% {opacity: 0; "+kAnimationTimingFunctionPropertyName+": linear;}";var g="100% {opacity: 0; "+kAnimationTimingFunctionPropertyName+": linear;}";if(m!==0){k=((100-m)/2+m-this.kDelta)-this.kDelta+"% {opacity: 1; "+kAnimationTimingFunctionPropertyName+": linear;}";j=((100-m)/2+m)+"% {opacity: 0; "+kAnimationTimingFunctionPropertyName+": linear;}"}if(b.insertRule){b.insertRule(l);b.insertRule(k);b.insertRule(j);b.insertRule(g)}else{b.appendRule(l);b.appendRule(k);b.appendRule(j);b.appendRule(g)}b=gShowController.animationManager.createAnimation(e+"-to");l="0% {opacity: 0; "+kAnimationTimingFunctionPropertyName+": linear;}";k="49.999% {opacity: 0; "+kAnimationTimingFunctionPropertyName+": linear;}";j="50% {opacity: 1; "+kAnimationTimingFunctionPropertyName+": linear;}";g="100% {opacity: 1; "+kAnimationTimingFunctionPropertyName+": linear;}";if(m!==0){k=((100-m)/2+m-this.kDelta)-this.kDelta+"% {opacity: 0; "+kAnimationTimingFunctionPropertyName+": linear;}";j=((100-m)/2+m)+"% {opacity: 1; "+kAnimationTimingFunctionPropertyName+": linear;}"}if(b.insertRule){b.insertRule(l);b.insertRule(k);b.insertRule(j);b.insertRule(g)}else{b.appendRule(l);b.appendRule(k);b.appendRule(j);b.appendRule(g)}continue}if(browserPrefix!="ms"){b=gShowController.animationManager.createAnimation(e);for(var c=0,a=f.keyframes.length;c<a;c++){o=f.keyframes[c];h=this.createAnimationRuleForKeyframe(n,o,d)+" ";if(b.insertRule){b.insertRule(h)}else{b.appendRule(h)}}d.cssAnimationRules.push(e)}else{if(browserVersion>=10){for(var c=0,a=f.keyframes.length;c<a;c++){o=f.keyframes[c];h+=this.createAnimationRuleForKeyframe(n,o,d)+" "}if(gShowController.animationManager.styleSheet.insertRule){gShowController.animationManager.styleSheet.insertRule(kKeyframesPropertyName+" "+e+" {"+h+"}",0)}else{gShowController.animationManager.styleSheet.appendRule(kKeyframesPropertyName+" "+e+" {"+h+"}",0)}d.cssAnimationRules.push(e)}}}},createAnimationRuleForKeyframe:function(l,m,g){var j=m.keyframe;var f=m.keyName;var k=m.value;var n=m.timingFunction;var d;var c=g.transformOriginValue;var e=g.transformOriginZValue;var h="";if(c){h=kTransformOriginPropertyName+": "+c+";"}if(f=="hidden"){var a={scalar:-1};if(k.scalar==false){a.scalar=1}else{a.scalar=0}f="opacity";d=this.cssPropertyValueForActionValue(l,f,a)}else{d=this.cssPropertyValueForActionValue(l,f,k)}var b;b=this.cssPropertyNameForAction(f)+": "+d+"; "+(j<100?kAnimationTimingFunctionPropertyName+": "+n+";":"");var i=j+"% {"+h+b+"}";return i},cssPropertyValueForActionValue:function(b,a,c){switch(a){case"hidden":if(c.scalar==true){return"hidden"}else{return"visible"}case"anchorPoint":return c.pointX+"% "+c.pointY+"%";case"anchorPointZ":return c.scalar;case"position":return"translate("+c.pointX+"px,"+c.pointY+"px)";case"zPosition":if(b=="anchorPointZ"&&(Prototype.Browser.Gecko||navigator.userAgent.lastIndexOf("Chrome/")>0)){return"translateZ("+-c.scalar+"px)"}else{return"translateZ("+c.scalar+"px)"}case"translationEmphasis":return"translateX("+c.translationEmphasis[0]+"px) translateY("+c.translationEmphasis[1]+"px) translateZ("+c.translationEmphasis[2]+")";case"rotationEmphasis":return"rotateZ("+c.rotationEmphasis[6]+"rad)";case"scaleEmphasis":return"scale3d("+ensureScaleFactorNotZero(c.scaleEmphasis[3])+","+ensureScaleFactorNotZero(c.scaleEmphasis[4])+","+ensureScaleFactorNotZero(c.scaleEmphasis[5])+")";case"transform.scale":case"transform.scale.xy":return"scale("+ensureScaleFactorNotZero(c.scalar)+")";case"transform.scale.x":return"scaleX("+ensureScaleFactorNotZero(c.scalar)+")";case"transform.scale.y":return"scaleY("+ensureScaleFactorNotZero(c.scalar)+")";case"transform.rotation.x":return"rotateX("+c.scalar+"rad)";case"transform.rotation.y":return"rotateY("+c.scalar+"rad)";case"transform.rotation.z":case"transform.rotation":return"rotateZ("+c.scalar+"rad)";case"transform.translation":return"translateX("+c.pointX+"px) translateY("+c.pointY+"px)";case"transform.translation.x":return"translateX("+c.scalar+"px)";case"transform.translation.y":return"translateY("+c.scalar+"px)";case"transform.translation.z":return"translateZ("+c.scalar+"px)";case"isPlaying":case"opacity":case"opacityMultiplier":return c.scalar+"";case"transform":return"matrix3d("+c.transform+")";case"doubleSided":if(c.scalar==false){return"hidden"}else{return"visible"}case"contents":return c.texture;default:return"some value"}},cssPropertyNameForAction:function(a){switch(a){case"hidden":return kVisibilityPropertyName;case"anchorPoint":return kTransformOriginPropertyName;case"anchorPointZ":return kTransformOriginZPropertyName;case"opacityMultiplier":return kOpacityPropertyName;case"translationEmphasis":case"rotationEmphasis":case"scaleEmphasis":case"position":case"zPosition":case"transform":case"transform.scale":case"transform.scale.xy":case"transform.scale.x":case"transform.scale.y":case"transform.rotation.x":case"transform.rotation.y":case"transform.rotation.z":case"transform.rotation":case"transform.translation":case"transform.translation.x":case"transform.translation.y":case"transform.translation.z":case"bounds":return kTransformPropertyName;case"doubleSided":return kBackfaceVisibilityPropertyName;case"contents":return kBackgroundImagePropertyName;default:return a}}});