var EnjoyHint=function(t){var r,o=this,i=$.extend({onStart:function(){},onEnd:function(){},onSkip:function(){},onNext:function(){},container:"body",animation_time:800},t),n=[],s=0;$body=$(i.container);var e=function(t){t.preventDefault()},a=function(){i.onEnd(),$body.enjoyhint("clear"),$body.enjoyhint("hide"),$body.css({overflow:"auto"}),$(document).off("touchmove",e)};o.clear=function(){var t=$(".enjoyhint_next_btn"),e=$(".enjoyhint_skip_btn");t.text("Next"),e.text("Skip")};var c=function(){if(n&&n[s]){i.onNext();var t=$(".enjoyhint");t.removeClass("enjoyhint-step-"+s),t.removeClass("enjoyhint-step-"+(s+1)),t.addClass("enjoyhint-step-"+(s+1));var l=n[s];l.onBeforeStart&&"function"==typeof l.onBeforeStart&&l.onBeforeStart();var e=l.timeout||0;setTimeout(function(){if(!l.selector)for(var t in l)if(l.hasOwnProperty(t)&&t.split(" ")[1]){l.selector=t.split(" ")[1];var e=t.split(" ")[0];"next"===e||"auto"===e||"custom"===e?l.event_type=e:l.event=e,l.description=l[t]}setTimeout(function(){o.clear()},250),$body.scrollTo(l.selector,l.scrollAnimationSpeed||250,{offset:-100}),setTimeout(function(){var h=$(l.selector),e=d(l.event);if($body.enjoyhint("show"),$body.enjoyhint("hide_next"),r=h,l.event_selector&&(r=$(l.event_selector)),l.event_type||"key"!=l.event||h.keydown(function(t){t.which==l.keyCode&&(s++,c())}),1==l.showNext&&$body.enjoyhint("show_next"),0==l.showSkip?$body.enjoyhint("hide_skip"):$body.enjoyhint("show_skip"),l.showSkip,l.nextButton){var t=$(".enjoyhint_next_btn");t.addClass(l.nextButton.className||""),t.text(l.nextButton.text||"Next"),o.nextUserClass=l.nextButton.className}if(l.skipButton){var i=$(".enjoyhint_skip_btn");i.addClass(l.skipButton.className||""),i.text(l.skipButton.text||"Skip"),o.skipUserClass=l.skipButton.className}if(l.event_type)switch(l.event_type){case"auto":return h[l.event](),l.event,s++,void c();case"custom":u(l.event,function(){s++,f(l.event),c()});break;case"next":$body.enjoyhint("show_next")}else r.on(e,function(t){l.keyCode&&t.keyCode!=l.keyCode||(s++,$(this).off(e),c())});var n=function(){var t=(h=$(l.selector))[0].getBoundingClientRect(),e=t.width,i=t.height,n=Math.max(e,i),a=l.radius||Math.round(n/2)+5,r=h.offset(),o=void 0!==l.margin?l.margin:10,s={x:r.left+Math.round(e/2),y:r.top+Math.round(i/2)-$(document).scrollTop()},c={enjoyHintElementSelector:l.selector,center_x:s.x,center_y:s.y,text:l.description,top:l.top,bottom:l.bottom,left:l.left,right:l.right,margin:l.margin,scroll:l.scroll};return l.shape&&"circle"==l.shape?(c.shape="circle",c.radius=a):(c.radius=0,c.width=e+o,c.height=i+o),c},a=n();$body.enjoyhint("render_label_with_shape",a,o.stop,n),"next"==l.event&&$body.enjoyhint("disable_element_events")},l.scrollAnimationSpeed+20||270)},e)}else a()},h=function(){s++,c()},l=function(){var t=n[s],e=$(t.selector);f(t.event),e.off(d(t.event)),e.off(d(t.event),!0),a()},d=function(t,e){return t+(e?"custom":"")+".enjoy_hint"},u=function(t,e){$body.on(d(t,!0),e)},f=function(t){$body.off(d(t,!0))};$(window).on("resize.enjoy_hint_permanent",function(){r[0]&&$body.enjoyhint("redo_events_near_rect",r[0].getBoundingClientRect())}),o.stop=function(){l()},o.reRunScript=function(t){s=t,c()},o.runScript=function(){$body.css({overflow:"hidden"}),$(document).on("touchmove",e),s=0,i.onStart(),c()},o.resumeScript=function(){c()},o.setCurrentStep=function(t){s=t},o.getCurrentStep=function(){return s},o.trigger=function(t){switch(t){case"next":h();break;case"skip":l();break;default:$body.trigger(d(t,!0))}},o.setScript=function(t){t&&(n=t)},o.set=function(t){o.setScript(t)},o.setSteps=function(t){o.setScript(t)},o.run=function(){o.runScript()},o.resume=function(){o.resumeScript()},$(".enjoyhint")&&$(".enjoyhint").remove(),$body.enjoyhint({onNextClick:function(){h()},onSkipClick:function(){i.onSkip(),l()},animation_time:i.animation_time})};CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,n,a){return i<2*a&&(a=i/2),n<2*a&&(a=n/2),this.beginPath(),this.moveTo(t+a,e),this.arcTo(t+i,e,t+i,e+n,a),this.arcTo(t+i,e+n,t,e+n,a),this.arcTo(t,e+n,t,e,a),this.arcTo(t,e,t+i,e,a),this.closePath(),this},function(H){window.innerWidth,window.innerHeight;var W,e={init:function(l){return this.each(function(){this.enjoyhint_obj={},(W=this.enjoyhint_obj).resetComponentStuff=function(){null,window.innerWidth,window.innerHeight};var t=H(this);function c(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg",t);for(var n in e)i.setAttribute(n,e[n]);return i}W.options=jQuery.extend({onNextClick:function(){},onSkipClick:function(){},animation_time:800},l),W.gcl={chooser:"enjoyhint"},W.cl={enjoy_hint:"enjoyhint",hide:"enjoyhint_hide",disable_events_element:"enjoyhint_disable_events",btn:"enjoyhint_btn",skip_btn:"enjoyhint_skip_btn",close_btn:"enjoyhint_close_btn",next_btn:"enjoyhint_next_btn",main_canvas:"enjoyhint_canvas",main_svg:"enjoyhint_svg",svg_wrapper:"enjoyhint_svg_wrapper",svg_transparent:"enjoyhint_svg_transparent",kinetic_container:"kinetic_container"},W.canvas_size={w:1.4*H(window).width(),h:1.4*H(window).height()};W.enjoyhint=H("
",{class:W.cl.enjoy_hint+" "+W.cl.svg_transparent}).appendTo(t),W.enjoyhint_svg_wrapper=H("
",{class:W.cl.svg_wrapper+" "+W.cl.svg_transparent}).appendTo(W.enjoyhint),W.$stage_container=H('
').appendTo(W.enjoyhint),W.$canvas=H('').appendTo(W.enjoyhint),W.$svg=H('').appendTo(W.enjoyhint_svg_wrapper);var e=H(c("defs")),i=H(c("marker",{id:"arrowMarker",viewBox:"0 0 36 21",refX:"21",refY:"10",markerUnits:"strokeWidth",orient:"auto",markerWidth:"16",markerHeight:"12"})),n=H(c("path",{style:"fill:none; stroke:rgb(255,255,255); stroke-width:2",d:"M0,0 c30,11 30,9 0,20"}));e.append(i.append(n)).appendTo(W.$svg),W.kinetic_stage=new Kinetic.Stage({container:W.cl.kinetic_container,width:W.canvas_size.w,height:W.canvas_size.h,scaleX:1}),W.layer=new Kinetic.Layer,W.rect=new Kinetic.Rect({fill:"rgba(0,0,0,0.6)",width:W.canvas_size.w,height:W.canvas_size.h});var a=H("
",{class:W.cl.disable_events_element}).appendTo(W.enjoyhint),r=a.clone().appendTo(W.enjoyhint),o=a.clone().appendTo(W.enjoyhint),s=a.clone().appendTo(W.enjoyhint);W.$element_dis_events=a.clone().appendTo(W.enjoyhint);var h=function(t){t.stopImmediatePropagation()};H("button").focusout(h),a.click(h),r.click(h),o.click(h),s.click(h),W.$element_dis_events.click(h),W.$skip_btn=H("
",{class:W.cl.skip_btn}).appendTo(W.enjoyhint).html("Skip").click(function(t){W.hide(),W.options.onSkipClick()}),W.$next_btn=H("
",{class:W.cl.next_btn}).appendTo(W.enjoyhint).html("Next").click(function(t){W.options.onNextClick()}),W.$close_btn=H("
",{class:W.cl.close_btn}).appendTo(W.enjoyhint).html("").click(function(t){W.hide(),W.options.onSkipClick()}),W.$canvas.mousedown(function(t){H("canvas").css({left:"4000px"});var e=document.elementFromPoint(t.clientX,t.clientY);return H("canvas").css({left:"0px"}),H(e).click(),!1});W.shape=new Kinetic.Shape({radius:0,center_x:-130,center_y:-130,width:0,height:0,sceneFunc:function(t){var e=this.getContext("2d")._context,i=(this.pos,e.globalCompositeOperation);e.globalCompositeOperation="destination-out",e.beginPath();var n=this.attrs.center_x-Math.round(this.attrs.width/2),a=this.attrs.center_y-Math.round(this.attrs.height/2);e.roundRect(n,a,this.attrs.width,this.attrs.height,this.attrs.radius),e.fillStyle="red",e.fill(),e.globalCompositeOperation=i}}),W.shape.radius=0,W.layer.add(W.rect),W.layer.add(W.shape),W.kinetic_stage.add(W.layer),H(window).on("resize.enjoy_hint",function(){if(!H(W.stepData.enjoyHintElementSelector).is(":visible"))return W.stopFunction(),void H(window).off("resize.enjoy_hint");var t=window.innerWidth,e=window.innerHeight;W.kinetic_stage.setAttr("width",t),W.kinetic_stage.setAttr("height",e),W.rect=new Kinetic.Rect({fill:"rgba(0,0,0,0.6)",width:t,height:e}),W.layer.removeChildren(),W.layer.add(W.rect),W.layer.add(W.shape),W.layer.draw(),W.kinetic_stage.draw(),W.renderLabelWithShape(W.updateShapeData())});W.enjoyhint,W.$element_dis_events;return W.show=function(){W.enjoyhint.removeClass(W.cl.hide)},W.hide=function(){W.enjoyhint.addClass(W.cl.hide),new Kinetic.Tween({node:W.shape,duration:.002,center_x:-130,center_y:-130}).play()},W.hide(),W.hideNextBtn=function(){W.$next_btn.addClass(W.cl.hide),W.nextBtn="hide"},W.showNextBtn=function(){W.$next_btn.removeClass(W.cl.hide),W.nextBtn="show"},W.hideSkipBtn=function(){W.$skip_btn.addClass(W.cl.hide)},W.showSkipBtn=function(){W.$skip_btn.removeClass(W.cl.hide)},W.disableEventsOfRect=function(){W.$element_dis_events.show()},W.renderCircle=function(t){var e=t.r||0,i=t.x||0,n=t.y||0;new Kinetic.Tween({node:W.shape,duration:.2,center_x:i,center_y:n,width:2*e,height:2*e,radius:e}).play();var a=i-e,r=i+e,o=n-e,s=n+e;return{x:i,y:n,left:a,right:r,top:o,bottom:s,conn:{left:{x:a-20,y:n},right:{x:r+20,y:n},top:{x:i,y:o-20},bottom:{x:i,y:s+20}}}},W.renderRect=function(t,e){var i=t.r||0,n=t.x||0,a=t.y||0,r=t.w||0,o=t.h||0;new Kinetic.Tween({node:W.shape,duration:e,center_x:n,center_y:a,width:r,height:o,radius:i}).play();var s=Math.round(r/2),c=Math.round(o/2),h=n-s,l=n+s,d=a-c,u=a+c;return{x:n,y:a,left:h,right:l,top:d,bottom:u,conn:{left:{x:h-20,y:a},right:{x:l+20,y:a},top:{x:n,y:d-20},bottom:{x:n,y:u+20}}}},W.renderLabel=function(t){var e=t.x||0;W.originalElementX=e;var i=t.y||0,n=(t.text,W.getLabelElement({x:e,y:i,text:t.text})),a=n.width(),r=n.height(),o=n.offset().left,s=n.offset().left+a,c=n.offset().top-H(document).scrollTop(),h=n.offset().top+r,l={x:o-10,y:c+Math.round(r/2)},d={x:s+10,y:c+Math.round(r/2)},u={x:o+Math.round(a/2),y:c-10},f={x:o+Math.round(a/2),y:h+10};return n.detach(),setTimeout(function(){H("#enjoyhint_label").remove(),n.appendTo(W.enjoyhint)},W.options.animation_time/2),{label:n,left:o,right:s,top:c,bottom:h,conn:{left:l,right:d,top:u,bottom:f}}},W.renderArrow=function(t){var e=t.x_from||0,i=t.y_from||0,n=t.x_to||0,a=t.y_to||0,r=t.by_top_side,o=0,s=0;640<=window.innerWidth&&(r?a<=i?(s=a,o=e):(s=i,o=n):a<=i?(s=i,o=n):(s=a,o=e));t.text;W.enjoyhint.addClass(W.cl.svg_transparent),setTimeout(function(){H("#enjoyhint_arrpw_line").remove();var t="M"+e+","+i+" Q"+o+","+s+" "+n+","+a;W.$svg.append(c("path",{style:"fill:none; stroke:rgb(255,255,255); stroke-width:3","marker-end":"url(#arrowMarker)",d:t,id:"enjoyhint_arrpw_line"})),W.enjoyhint.removeClass(W.cl.svg_transparent)},W.options.animation_time/2)},W.getLabelElement=function(t){return H("
",{class:"enjoy_hint_label",id:"enjoyhint_label"}).css({top:t.y+"px",left:t.x+"px"}).html(t.text).appendTo(W.enjoyhint)},W.disableEventsNearRect=function(t){a.css({top:"0",left:"0"}).height(t.top),r.css({top:t.bottom+"px",left:"0"}),o.css({top:"0",left:"0px"}).width(t.left),s.css({top:"0",left:t.right+"px"}),W.$element_dis_events.css({top:t.top+"px",left:t.left+"px"}).width(t.right-t.left).height(t.bottom-t.top).hide()},jQuery.event.special.destroyed={remove:function(t){t.handler&&t.handler()}},W.renderLabelWithShape=function(t){W.stepData=t;var e=function t(e){return"MD-DIALOG"===e.tagName?e:void 0===e.tagName?null:t(H(e).parent()[0])}(H(W.stepData.enjoyHintElementSelector)[0]);null!=e&&H(e).on("dialogClosing",function(){W.stopFunction()}),W.resetComponentStuff();var i=t.shape||"rect",n={},a=0,r=0,o=t.top||0,s=t.bottom||0,c=t.left||0,h=t.right||0;switch(i){case"circle":a=r=t.radius;var l=(g={top:t.center_y-r+o,bottom:t.center_y+r-s,left:t.center_x-a+c,right:t.center_x+a-h}).right-g.left,d=g.bottom-g.top;t.radius=Math.round(Math.min(l,d)/2),a=r=Math.round(t.radius/2);var u=Math.round(l/2),f=Math.round(d/2);t.center_x=g.left+u,t.center_y=g.top+f,n=W.renderCircle({x:t.center_x,y:t.center_y,r:t.radius});break;case"rect":a=Math.round(t.width/2),r=Math.round(t.height/2);var g={top:t.center_y-r+o,bottom:t.center_y+r-s,left:t.center_x-a+c,right:t.center_x+a-h};t.width=g.right-g.left,t.height=g.bottom-g.top,a=Math.round(t.width/2),r=Math.round(t.height/2),t.center_x=g.left+a,t.center_y=g.top+r,n=W.renderRect({x:t.center_x,y:t.center_y,w:t.width,h:t.height,r:t.radius},.2)}var p=W.enjoyhint.width(),v=W.enjoyhint.height(),_=W.getLabelElement({x:0,y:0,text:t.text}),K=_.outerWidth(),y=_.outerHeight();_.remove();var m=t.center_y-r,S=v-(t.center_y+r),x=(t.center_x,t.center_x,t.center_x,t.center_x,150+y+40),C=r+150,w="top"==(v-t.center_y=n.x,M=F.rightn.bottom,R=F.bottom>=n.y&&F.top<=n.y,I=F.bottom<=n.y&&!G,N=F.top>=n.y&&!L;function B(t,e,i){k=t,A=e,P=i}function j(t,e,i,n,a){var r=[];(r=G?t:I?e:R?i:N?n:a)&&B(r[0],r[1],r[2])}if(D)if(G)B("bottom","top","top");else{if(!L)return;B("top","bottom","bottom")}else M?j(["right","top","top"],["bottom","left","bottom"],["right","left","top"],["top","left","top"],["right","bottom","bottom"]):j(["left","top","top"],["bottom","right","bottom"],["left","right","top"],["top","right","top"],["left","bottom","bottom"]);var O=F.conn[k],E=n.conn[A],U="top"==P;W.renderArrow({x_from:O.x,y_from:O.y,x_to:window.innerWidth<640?n.left+(0"),Kinetic.window=Kinetic.document.createWindow(),Kinetic.window.Image=n.Image,Kinetic._nodeCanvas=n}return Kinetic.root=t,module.exports=i}"function"==typeof define&&define.amd&&define(e),Kinetic.document=document,Kinetic.window=window,Kinetic.root=t}(this,function(){return Kinetic}),function(){Kinetic.Collection=function(){var t=[].slice.call(arguments),e=t.length,i=0;for(this.length=e;i>16&255,g:e>>8&255,b:255&e}},getRandomColor:function(){for(var t=(16777215*Math.random()<<0).toString(16);t.length<6;)t="0"+t;return"#"+t},get:function(t,e){return void 0===t?e:t},getRGB:function(t){var e;return t in n?{r:(e=n[t])[0],g:e[1],b:e[2]}:"#"===t[0]?this._hexToRgb(t.substring(1)):"rgb("===t.substr(0,4)?(e=a.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},_merge:function(t,e){var i=this._clone(e);for(var n in t)i[n]=this._isObject(t[n])?this._merge(t[n],i[n]):t[n];return i},cloneObject:function(t){var e={};for(var i in t)e[i]=this._isObject(t[i])?this.cloneObject(t[i]):this._isArray(t[i])?this.cloneArray(t[i]):t[i];return e},cloneArray:function(t){return t.slice(0)},_degToRad:function(t){return t*e},_radToDeg:function(t){return t*i},_capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},error:function(t){throw new Error("Kinetic error: "+t)},warn:function(t){Kinetic.root.console&&console.warn&&Kinetic.showWarnings&&console.warn("Kinetic warning: "+t)},extend:function(t,e){function i(){this.constructor=t}i.prototype=e.prototype;var n=t.prototype;for(var a in t.prototype=new i,n)n.hasOwnProperty(a)&&(t.prototype[a]=n[a]);t.__super__=e.prototype},addMethods:function(t,e){var i;for(i in e)t.prototype[i]=e[i]},_getControlPoints:function(t,e,i,n,a,r,o){var s=Math.sqrt(Math.pow(i-t,2)+Math.pow(n-e,2)),c=Math.sqrt(Math.pow(a-i,2)+Math.pow(r-n,2)),h=o*s/(s+c),l=o*c/(s+c);return[i-h*(a-t),n-h*(r-e),i+l*(a-t),n+l*(r-e)]},_expandPoints:function(t,e){var i,n,a=t.length,r=[];for(i=2;i=Kinetic.traceArrMax&&e.shift()},reset:function(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)},getCanvas:function(){return this.canvas},clear:function(t){var e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth(),e.getHeight())},_applyLineCap:function(t){var e=t.getLineCap();e&&this.setAttr("lineCap",e)},_applyOpacity:function(t){var e=t.getAbsoluteOpacity();1!==e&&this.setAttr("globalAlpha",e)},_applyLineJoin:function(t){var e=t.getLineJoin();e&&this.setAttr("lineJoin",e)},setAttr:function(t,e){this._context[t]=e},arc:function(){var t=arguments;this._context.arc(t[0],t[1],t[2],t[3],t[4],t[5])},beginPath:function(){this._context.beginPath()},bezierCurveTo:function(){var t=arguments;this._context.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5])},clearRect:function(){var t=arguments;this._context.clearRect(t[0],t[1],t[2],t[3])},clip:function(){this._context.clip()},closePath:function(){this._context.closePath()},createImageData:function(){var t=arguments;return 2===t.length?this._context.createImageData(t[0],t[1]):1===t.length?this._context.createImageData(t[0]):void 0},createLinearGradient:function(){var t=arguments;return this._context.createLinearGradient(t[0],t[1],t[2],t[3])},createPattern:function(){var t=arguments;return this._context.createPattern(t[0],t[1])},createRadialGradient:function(){var t=arguments;return this._context.createRadialGradient(t[0],t[1],t[2],t[3],t[4],t[5])},drawImage:function(){var t=arguments,e=this._context;3===t.length?e.drawImage(t[0],t[1],t[2]):5===t.length?e.drawImage(t[0],t[1],t[2],t[3],t[4]):9===t.length&&e.drawImage(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},fill:function(){this._context.fill()},fillText:function(){var t=arguments;this._context.fillText(t[0],t[1],t[2])},getImageData:function(){var t=arguments;return this._context.getImageData(t[0],t[1],t[2],t[3])},lineTo:function(){var t=arguments;this._context.lineTo(t[0],t[1])},moveTo:function(){var t=arguments;this._context.moveTo(t[0],t[1])},rect:function(){var t=arguments;this._context.rect(t[0],t[1],t[2],t[3])},putImageData:function(){var t=arguments;this._context.putImageData(t[0],t[1],t[2])},quadraticCurveTo:function(){var t=arguments;this._context.quadraticCurveTo(t[0],t[1],t[2],t[3])},restore:function(){this._context.restore()},rotate:function(){var t=arguments;this._context.rotate(t[0])},save:function(){this._context.save()},scale:function(){var t=arguments;this._context.scale(t[0],t[1])},setLineDash:function(){var t=arguments,e=this._context;this._context.setLineDash?e.setLineDash(t[0]):"mozDash"in e?e.mozDash=t[0]:"webkitLineDash"in e&&(e.webkitLineDash=t[0])},setTransform:function(){var t=arguments;this._context.setTransform(t[0],t[1],t[2],t[3],t[4],t[5])},stroke:function(){this._context.stroke()},strokeText:function(){var t=arguments;this._context.strokeText(t[0],t[1],t[2])},transform:function(){var t=arguments;this._context.transform(t[0],t[1],t[2],t[3],t[4],t[5])},translate:function(){var t=arguments;this._context.translate(t[0],t[1])},_enableTrace:function(){var t,n,a=this,e=s.length,r=Kinetic.Util._simplifyArray,i=this.setAttr,o=function(t){var e,i=a[t];a[t]=function(){return n=r(Array.prototype.slice.call(arguments,0)),e=i.apply(a,arguments),a._trace({method:t,args:n}),e}};for(t=0;t>O,0!==w?(w=255/w,F[s]=(h*j>>O)*w,F[s+1]=(l*j>>O)*w,F[s+2]=(d*j>>O)*w):F[s]=F[s+1]=F[s+2]=0,h-=f,l-=g,d-=p,u-=v,f-=N.r,g-=N.g,p-=N.b,v-=N.a,r=c+((r=i+e+1)>O,0>O)*w,F[r+1]=(l*j>>O)*w,F[r+2]=(d*j>>O)*w):F[r]=F[r+1]=F[r+2]=0,h-=f,l-=g,d-=p,u-=v,f-=N.r,g-=N.g,p-=N.b,v-=N.a,r=i+((r=n+M)this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())},getTime:function(){return this._time},setPosition:function(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t},getPosition:function(t){return void 0===t&&(t=this._time),this.func(t,this.begin,this._change,this.duration)},play:function(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")},reverse:function(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")},seek:function(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")},reset:function(){this.pause(),this._time=0,this.update(),this.fire("onReset")},finish:function(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")},update:function(){this.setPosition(this.getPosition(this._time))},onEnterFrame:function(){var t=this.getTimer()-this._startTime;2===this.state?this.setTime(t):3===this.state&&this.setTime(this.duration-t)},pause:function(){this.state=1,this.fire("onPause")},getTimer:function(){return(new Date).getTime()}},Kinetic.Easings={BackEaseIn:function(t,e,i,n){return i*(t/=n)*t*(2.70158*t-1.70158)+e},BackEaseOut:function(t,e,i,n){return i*((t=t/n-1)*t*(2.70158*t+1.70158)+1)+e},BackEaseInOut:function(t,e,i,n){var a=1.70158;return(t/=n/2)<1?i/2*t*t*((1+(a*=1.525))*t-a)+e:i/2*((t-=2)*t*((1+(a*=1.525))*t+a)+2)+e},ElasticEaseIn:function(t,e,i,n,a,r){var o=0;return 0===t?e:1==(t/=n)?e+i:(r||(r=.3*n),!a||a>>1,w=_.slice(0,C+1),b=this._getTextWidth(w);b<=h?(y=C+1,S=w,x=b):m=C}if(!S)break;if(g){var F=Math.max(S.lastIndexOf(" "),S.lastIndexOf("-"))+1;0e?d=Kinetic.Path.getPointOnLine(e,l.x,l.y,u.points[0],u.points[1],l.x,l.y):u=void 0;break;case"A":var o=u.points[4],s=u.points[5],c=u.points[4]+s;0===f?f=o+1e-8:iu.pathLength?1e-8:e/u.pathLength:i