assets.js.GroupdocsAnnotation.all.min.js Maven / Gradle / Ivy
Show all versions of groupdocs-annotation Show documentation
!function(a){a(function(){a.support.transition=function(){var a=function(){var c=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},a;for(a in b){if(c.style[a]!==undefined){return b[a];}}}();return a&&{end:a};}();});}(window.jQuery),!function(a){var c='[data-dismiss="alert"]',b=function(b){a(b).on("click",c,this.close);};b.prototype.close=function(e){function f(){b.trigger("closed").remove();}var d=a(this),c=d.attr("data-target"),b;c||(c=d.attr("href"),c=c&&c.replace(/.*(?=#[^\s]*$)/,"")),b=a(c),e&&e.preventDefault(),b.length||(b=d.hasClass("alert")?d:d.parent()),b.trigger(e=a.Event("close"));if(e.isDefaultPrevented()){return;}b.removeClass("in"),a.support.transition&&b.hasClass("fade")?b.on(a.support.transition.end,f):f();};var d=a.fn.alert;a.fn.alert=function(c){return this.each(function(){var e=a(this),d=e.data("alert");d||e.data("alert",d=new b(this)),typeof c=="string"&&d[c].call(e);});},a.fn.alert.Constructor=b,a.fn.alert.noConflict=function(){return a.fn.alert=d,this;},a(document).on("click.alert.data-api",c,b.prototype.close);}(window.jQuery),!function(a){var b=function(c,b){this.$element=a(c),this.options=a.extend({},a.fn.button.defaults,b);};b.prototype.setState=function(c){var b="disabled",a=this.$element,e=a.data(),d=a.is("input")?"val":"html";c+="Text",e.resetText||a.data("resetText",a[d]()),a[d](e[c]||this.options[c]),setTimeout(function(){c=="loadingText"?a.addClass(b).attr(b,b):a.removeClass(b).removeAttr(b);},0);},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active");};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var e=a(this),d=e.data("button"),f=typeof c=="object"&&c;d||e.data("button",d=new b(this,f)),c=="toggle"?d.toggle():c&&d.setState(c);});},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this;},a(document).on("click.button.data-api","[data-toggle^=button]",function(c){var b=a(c.target);b.hasClass("btn")||(b=b.closest(".btn")),b.button("toggle");});}(window.jQuery),!function(a){var b=function(c,b){this.$element=a(c),this.$indicators=this.$element.find(".carousel-indicators"),this.options=b,this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this));};b.prototype={cycle:function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this;},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active);},to:function(b){var c=this.getActiveIndex(),d=this;return b>this.$items.length-1||b<0?void 0:this.sliding?this.$element.one("slid",function(){d.to(b);}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]));},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this;},next:function(){return this.sliding?void 0:this.slide("next");},prev:function(){return this.sliding?void 0:this.slide("prev");},slide:function(e,i){var g=this.$element.find(".item.active"),b=i||g[e](),h=this.interval,d=e=="next"?"left":"right",j=e=="next"?"first":"last",f=this,c;this.sliding=!0,h&&this.pause(),b=b.length?b:this.$element.find(".item")[j](),c=a.Event("slide",{relatedTarget:b[0],direction:d});if(b.hasClass("active")){return;}this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(f.$indicators.children()[f.getActiveIndex()]);b&&b.addClass("active");}));if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(c);if(c.isDefaultPrevented()){return;}b.addClass(e),b[0].offsetWidth,g.addClass(d),b.addClass(d),this.$element.one(a.support.transition.end,function(){b.removeClass([e,d].join(" ")).addClass("active"),g.removeClass(["active",d].join(" ")),f.sliding=!1,setTimeout(function(){f.$element.trigger("slid");},0);});}else{this.$element.trigger(c);if(c.isDefaultPrevented()){return;}g.removeClass("active"),b.addClass("active"),this.sliding=!1,this.$element.trigger("slid");}return h&&this.cycle(),this;}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var g=a(this),d=g.data("carousel"),e=a.extend({},a.fn.carousel.defaults,typeof c=="object"&&c),f=typeof c=="string"?c:e.slide;d||g.data("carousel",d=new b(this,e)),typeof c=="number"?d.to(c):f?d[f]():e.interval&&d.pause().cycle();});},a.fn.carousel.defaults={interval:5000,pause:"hover"},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this;},a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(g){var b=a(this),e,c=a(b.attr("data-target")||(e=b.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},c.data(),b.data()),d;c.carousel(f),(d=b.attr("data-slide-to"))&&c.data("carousel").pause().to(d).cycle(),g.preventDefault();});}(window.jQuery),!function(a){var b=function(c,b){this.$element=a(c),this.options=a.extend({},a.fn.collapse.defaults,b),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle();};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height";},show:function(){var d,e,b,c;if(this.transitioning||this.$element.hasClass("in")){return;}d=this.dimension(),e=a.camelCase(["scroll",d].join("-")),b=this.$parent&&this.$parent.find("> .accordion-group > .in");if(b&&b.length){c=b.data("collapse");if(c&&c.transitioning){return;}b.collapse("hide"),c||b.data("collapse",null);}this.$element[d](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[d](this.$element[0][e]);},hide:function(){var b;if(this.transitioning||!this.$element.hasClass("in")){return;}b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0);},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a!==null?"addClass":"removeClass"]("collapse"),this;},transition:function(f,c,e){var b=this,d=function(){c.type=="show"&&b.reset(),b.transitioning=0,b.$element.trigger(e);};this.$element.trigger(c);if(c.isDefaultPrevented()){return;}this.transitioning=1,this.$element[f]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,d):d();},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]();}};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var e=a(this),d=e.data("collapse"),f=a.extend({},a.fn.collapse.defaults,e.data(),typeof c=="object"&&c);d||e.data("collapse",d=new b(this,f)),typeof c=="string"&&d[c]();});},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this;},a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(f){var b=a(this),d,c=b.attr("data-target")||f.preventDefault()||(d=b.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),e=a(c).data("collapse")?"toggle":b.data();b[a(c).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(c).collapse(e);});}(window.jQuery),!function(a){function e(){a(".dropdown-backdrop").remove(),a(c).each(function(){d(a(this)).removeClass("open");});}function d(d){var b=d.attr("data-target"),c;b||(b=d.attr("href"),b=b&&/#/.test(b)&&b.replace(/.*(?=#[^\s]*$)/,"")),c=b&&a(b);if(!c||!c.length){c=d.parent();}return c;}var c="[data-toggle=dropdown]",b=function(c){var b=a(c).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){b.parent().removeClass("open");});};b.prototype={constructor:b,toggle:function(){var b=a(this),c,f;return b.is(".disabled, :disabled")?void 0:(c=d(b),f=c.hasClass("open"),e(),f||("ontouchstart" in document.documentElement&&a('').insertBefore(a(this)).on("click",e),c.toggleClass("open")),b.focus(),!1);},keydown:function(e){var g,f,j,h,i,b;if(!/(38|40|27)/.test(e.keyCode)){return;}g=a(this),e.preventDefault(),e.stopPropagation();if(g.is(".disabled, :disabled")){return;}h=d(g),i=h.hasClass("open");if(!i||i&&e.keyCode==27){return e.which==27&&h.find(c).focus(),g.click();}f=a("[role=menu] li:not(.divider):visible a",h);if(!f.length){return;}b=f.index(f.filter(":focus")),e.keyCode==38&&b>0&&b--,e.keyCode==40&&b ').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this)),c&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!b){return;}c?this.$backdrop.one(a.support.transition.end,b):b();}else{!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b):b()):b&&b();}}};var c=a.fn.modal;a.fn.modal=function(c){return this.each(function(){var e=a(this),d=e.data("modal"),f=a.extend({},a.fn.modal.defaults,e.data(),typeof c=="object"&&c);d||e.data("modal",d=new b(this,f)),typeof c=="string"?d[c]():f.show&&d.show();});},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this;},a(document).on("click.modal.data-api",'[data-toggle="modal"]',function(f){var b=a(this),c=b.attr("href"),d=a(b.attr("data-target")||c&&c.replace(/.*(?=#[^\s]+$)/,"")),e=d.data("modal")?"toggle":a.extend({remote:!/#/.test(c)&&c},d.data(),b.data());f.preventDefault(),d.modal(e).one("hide",function(){b.focus();});});}(window.jQuery),!function(a){var b=function(a,b){this.init("tooltip",a,b);};b.prototype={constructor:b,init:function(i,g,h){var e,f,d,b,c;this.type=i,this.$element=a(g),this.options=this.getOptions(h),this.enabled=!0,d=this.options.trigger.split(" ");for(c=d.length;c--;){b=d[c],b=="click"?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):b!="manual"&&(e=b=="hover"?"mouseenter":"focus",f=b=="hover"?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));}this.options.selector?(this._options=a.extend({},this.options,{trigger:"manual",selector:""})):this.fixTitle();},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b;},enter:function(e){var d=a.fn[this.type].defaults,c={},b;this._options&&a.each(this._options,function(a,b){d[a]!=b&&(c[a]=b);},this),b=a(e.currentTarget)[this.type](c).data(this.type);if(!b.options.delay||!b.options.delay.show){return b.show();}clearTimeout(this.timeout),b.hoverState="in",this.timeout=setTimeout(function(){b.hoverState=="in"&&b.show();},b.options.delay.show);},leave:function(c){var b=a(c.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!b.options.delay||!b.options.delay.hide){return b.hide();}b.hoverState="out",this.timeout=setTimeout(function(){b.hoverState=="out"&&b.hide();},b.options.delay.hide);},show:function(){var c,b,f,e,g,d,h=a.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(h);if(h.isDefaultPrevented()){return;}c=this.tip(),this.setContent(),this.options.animation&&c.addClass("fade"),g=typeof this.options.placement=="function"?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,c.detach().css({top:0,left:0,display:"block"}),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element),b=this.getPosition(),f=c[0].offsetWidth,e=c[0].offsetHeight;switch(g){case"bottom":d={top:b.top+b.height,left:b.left+b.width/2-f/2};break;case"top":d={top:b.top-e,left:b.left+b.width/2-f/2};break;case"left":d={top:b.top+b.height/2-e/2,left:b.left-f};break;case"right":d={top:b.top+b.height/2-e/2,left:b.left+b.width};}this.applyPlacement(d,g),this.$element.trigger("shown");}},applyPlacement:function(b,e){var a=this.tip(),i=a[0].offsetWidth,f=a[0].offsetHeight,d,c,g,h;a.offset(b).addClass(e).addClass("in"),d=a[0].offsetWidth,c=a[0].offsetHeight,e=="top"&&c!=f&&(b.top=b.top+f-c,h=!0),e=="bottom"||e=="top"?(g=0,b.left<0&&(g=b.left*-2,b.left=0,a.offset(b),d=a[0].offsetWidth,c=a[0].offsetHeight),this.replaceArrow(g-i+d,d,"left")):this.replaceArrow(c-f,c,"top"),h&&a.offset(b);},replaceArrow:function(a,c,b){this.arrow().css(b,a?50*(1-a/c)+"%":"");},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right");},hide:function(){function d(){var c=setTimeout(function(){b.off(a.support.transition.end).detach();},500);b.one(a.support.transition.end,function(){clearTimeout(c),b.detach();});}var e=this,b=this.tip(),c=a.Event("hide");this.$element.trigger(c);return c.isDefaultPrevented()?void 0:(b.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():b.detach(),this.$element.trigger("hidden"),this);},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").attr("title","");},hasContent:function(){return this.getTitle();},getPosition:function(){var b=this.$element[0];return a.extend({},typeof b.getBoundingClientRect=="function"?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset());},getTitle:function(){var b,c=this.$element,a=this.options;return b=c.attr("data-original-title")||(typeof a.title=="function"?a.title.call(c[0]):a.title),b;},tip:function(){return this.$tip=this.$tip||a(this.options.template);},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow");},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null);},enable:function(){this.enabled=!0;},disable:function(){this.enabled=!1;},toggleEnabled:function(){this.enabled=!this.enabled;},toggle:function(c){var b=c?a(c.currentTarget)[this.type](this._options).data(this.type):this;b.tip().hasClass("in")?b.hide():b.show();},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type);}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var e=a(this),d=e.data("tooltip"),f=typeof c=="object"&&c;d||e.data("tooltip",d=new b(this,f)),typeof c=="string"&&d[c]();});},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this;};}(window.jQuery),!function(a){var b=function(a,b){this.init("popover",a,b);};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var a=this.tip(),c=this.getTitle(),b=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](c),a.find(".popover-content")[this.options.html?"html":"text"](b),a.removeClass("fade top bottom left right in");},hasContent:function(){return this.getTitle()||this.getContent();},getContent:function(){var b,c=this.$element,a=this.options;return b=(typeof a.content=="function"?a.content.call(c[0]):a.content)||c.attr("data-content"),b;},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip;},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type);}});var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var e=a(this),d=e.data("popover"),f=typeof c=="object"&&c;d||e.data("popover",d=new b(this,f)),typeof c=="string"&&d[c]();});},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:''}),a.fn.popover.noConflict=function(){return a.fn.popover=c,this;};}(window.jQuery),!function(a){function b(b,e){var f=a.proxy(this.process,this),d=a(b).is("body")?a(window):a(b),c;this.options=a.extend({},a.fn.scrollspy.defaults,e),this.$scrollElement=d.on("scroll.scroll-spy.data-api",f),this.selector=(this.options.target||(c=a(b).attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body"),this.refresh(),this.process();}b.prototype={constructor:b,refresh:function(){var b=this,c;this.offsets=a([]),this.targets=a([]),c=this.$body.find(this.selector).map(function(){var e=a(this),d=e.data("target")||e.attr("href"),c=/^#\w/.test(d)&&a(d);return c&&c.length&&[[c.position().top+(!a.isWindow(b.$scrollElement.get(0))&&b.$scrollElement.scrollTop()),d]]||null;}).sort(function(a,b){return a[0]-b[0];}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1]);});},process:function(){var c=this.$scrollElement.scrollTop()+this.options.offset,g=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,f=g-this.$scrollElement.height(),b=this.offsets,d=this.targets,e=this.activeTarget,a;if(c>=f){return e!=(a=d.last()[0])&&this.activate(a);}for(a=b.length;a--;){e!=d[a]&&c>=b[a]&&(!b[a+1]||c<=b[a+1])&&this.activate(d[a]);}},activate:function(c){var b,d;this.activeTarget=c,a(this.selector).parent(".active").removeClass("active"),d=this.selector+'[data-target="'+c+'"],'+this.selector+'[href="'+c+'"]',b=a(d).parent("li").addClass("active"),b.parent(".dropdown-menu").length&&(b=b.closest("li.dropdown").addClass("active")),b.trigger("activate");}};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var e=a(this),d=e.data("scrollspy"),f=typeof c=="object"&&c;d||e.data("scrollspy",d=new b(this,f)),typeof c=="string"&&d[c]();});},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this;},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data());});});}(window.jQuery),!function(a){var b=function(b){this.element=a(b);};b.prototype={constructor:b,show:function(){var b=this.element,g=b.closest("ul:not(.dropdown-menu)"),c=b.attr("data-target"),d,f,e;c||(c=b.attr("href"),c=c&&c.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active")){return;}d=g.find(".active:last a")[0],e=a.Event("show",{relatedTarget:d}),b.trigger(e);if(e.isDefaultPrevented()){return;}f=a(c),this.activate(b.parent("li"),g),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:d});});},activate:function(b,g,d){function e(){c.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d();}var c=g.find("> .active"),f=d&&a.support.transition&&c.hasClass("fade");f?c.one(a.support.transition.end,e):e(),c.removeClass("in");}};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var e=a(this),d=e.data("tab");d||e.data("tab",d=new b(this)),typeof c=="string"&&d[c]();});},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this;},a(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show");});}(window.jQuery),!function(a){var b=function(c,b){this.$element=a(c),this.options=a.extend({},a.fn.typeahead.defaults,b),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=a(this.options.menu),this.shown=!1,this.listen();};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(a)).change(),this.hide();},updater:function(a){return a;},show:function(){var b=a.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:b.top+b.height,left:b.left}).show(),this.shown=!0,this;},hide:function(){return this.$menu.hide(),this.shown=!1,this;},lookup:function(){var b;return this.query=this.$element.val(),!this.query||this.query.length"+a+"";});},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0];}),b.first().addClass("active"),this.$menu.html(b),this;},next:function(){var c=this.$menu.find(".active").removeClass("active"),b=c.next();b.length||(b=a(this.$menu.find("li")[0])),b.addClass("active");},prev:function(){var b=this.$menu.find(".active").removeClass("active"),a=b.prev();a.length||(a=this.$menu.find("li").last()),a.addClass("active");},listen:function(){this.$element.on("focus",a.proxy(this.focus,this)).on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",a.proxy(this.keydown,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this)).on("mouseleave","li",a.proxy(this.mouseleave,this));},eventSupported:function(a){var b=a in this.$element;return b||(this.$element.setAttribute(a,"return;"),b=typeof this.$element[a]=="function"),b;},move:function(a){if(!this.shown){return;}switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next();}a.stopPropagation();},keydown:function(b){this.suppressKeyPressRepeat=~a.inArray(b.keyCode,[40,38,9,13,27]),this.move(b);},keypress:function(a){if(this.suppressKeyPressRepeat){return;}this.move(a);},keyup:function(a){switch(a.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown){return;}this.select();break;case 27:if(!this.shown){return;}this.hide();break;default:this.lookup();}a.stopPropagation(),a.preventDefault();},focus:function(){this.focused=!0;},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide();},click:function(a){a.stopPropagation(),a.preventDefault(),this.select(),this.$element.focus();},mouseenter:function(b){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active");},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide();}};var c=a.fn.typeahead;a.fn.typeahead=function(c){return this.each(function(){var e=a(this),d=e.data("typeahead"),f=typeof c=="object"&&c;d||e.data("typeahead",d=new b(this,f)),typeof c=="string"&&d[c]();});},a.fn.typeahead.defaults={source:[],items:8,menu:' ',minLength:1},a.fn.typeahead.Constructor=b,a.fn.typeahead.noConflict=function(){return a.fn.typeahead=c,this;},a(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var b=a(this);if(b.data("typeahead")){return;}b.typeahead(b.data());});}(window.jQuery),!function(a){var b=function(c,b){this.options=a.extend({},a.fn.affix.defaults,b),this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)).on("click.affix.data-api",a.proxy(function(){setTimeout(a.proxy(this.checkPosition,this),1);},this)),this.$element=a(c),this.checkPosition();};b.prototype.checkPosition=function(){if(!this.$element.is(":visible")){return;}var h=a(document).height(),f=this.$window.scrollTop(),g=this.$element.offset(),c=this.options.offset,e=c.bottom,d=c.top,i="affix affix-top affix-bottom",b;typeof c!="object"&&(e=d=c),typeof d=="function"&&(d=c.top()),typeof e=="function"&&(e=c.bottom()),b=this.unpin!=null&&f+this.unpin<=g.top?!1:e!=null&&g.top+this.$element.height()>=h-e?"bottom":d!=null&&f<=d?"top":!1;if(this.affixed===b){return;}this.affixed=b,this.unpin=b=="bottom"?g.top-f:null,this.$element.removeClass(i).addClass("affix"+(b?"-"+b:""));};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var e=a(this),d=e.data("affix"),f=typeof c=="object"&&c;d||e.data("affix",d=new b(this,f)),typeof c=="string"&&d[c]();});},a.fn.affix.Constructor=b,a.fn.affix.defaults={offset:0},a.fn.affix.noConflict=function(){return a.fn.affix=c,this;},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),b=c.data();b.offset=b.offset||{},b.offsetBottom&&(b.offset.bottom=b.offsetBottom),b.offsetTop&&(b.offset.top=b.offsetTop),c.affix(b);});});}(window.jQuery);(function(){function i(a,c,b){a.addEventListener?a.addEventListener(c,b,!1):a.attachEvent("on"+c,b);}function u(a){return"keypress"==a.type?String.fromCharCode(a.which):c[a.which]?c[a.which]:v[a.which]?v[a.which]:String.fromCharCode(a.which).toLowerCase();}function j(b,e){b=b||{};var c=!1,a;for(a in d){b[a]&&d[a]>e?(c=!0):(d[a]=0);}c||(f=!1);}function o(c,h,f,j,l){var e,a,i=[],g=f.type;if(!b[c]){return[];}"keyup"==g&&k(c)&&(h=[c]);for(e=0;eb||c.hasOwnProperty(b)&&(g[c[b]]=b);}}a=g[d]?"keydown":"keypress";}"keypress"==a&&e.length&&(a="keydown");return a;}function q(c,x,e,g,z){h[c+":"+e]=x;c=c.replace(/\s+/g," ");var i=c.split(" "),a,y,m=[];if(1":".","?":"/","|":"\\"},s={option:"alt",command:"meta","return":"enter",escape:"esc"},g,b={},h={},d={},r,n=!1,f=!1,a=1;20>a;++a){c[111+a]="f"+a;}for(a=0;9>=a;++a){c[a+96]=a;}i(document,"keypress",m);i(document,"keydown",m);i(document,"keyup",m);var e={bind:function(a,d,c){a=a instanceof Array?a:[a];for(var b=0;b ');this.assignViewPort();this.viewPortAdded=true;}this.assignOverview();if(this.$overview.length==0){this.$viewPort.wrapInner('');this.assignOverview();this.overviewAdded=true;}this.addScrollBar("vertical","prepend");this.addScrollBar("horizontal","append");},removeScrollbarComponents:function(){this.removeScrollbar("vertical");this.removeScrollbar("horizontal");this.overviewAdded&&this.$element.unwrap();this.viewPortAdded&&this.$element.unwrap();},removeScrollbar:function(a){this[a+"ScrollbarAdded"]&&this.$element.find(".scroll-bar."+a).remove();},assignViewPort:function(){this.$viewPort=this.$element.find(".viewport");},assignOverview:function(){this.$overview=this.$viewPort.find(".overview");},addScrollBar:function(a,b){if(this.$element.find(".scroll-bar."+a).length==0){this.$element[b](" ");this[a+"ScrollbarAdded"]=true;}},resize:function(a){this.vScrollbar&&this.vScrollbar.resize(a);this.hScrollbar&&this.hScrollbar.resize(a);},scrollTo:function(a){this.vScrollbar&&this.vScrollbar.scrollToElement(a);this.hScrollbar&&this.hScrollbar.scrollToElement(a);},scrollToXY:function(a,b){this.scrollToX(a);this.scrollToY(b);},scrollToX:function(a){this.hScrollbar&&this.hScrollbar.scrollOverviewTo(a,true);},scrollToY:function(a){this.vScrollbar&&this.vScrollbar.scrollOverviewTo(a,true);},scrollByX:function(a){this.hScrollbar&&this.scrollToX(this.hScrollbar.overviewPosition()+a);},scrollByY:function(a){this.vScrollbar&&this.scrollToY(this.vScrollbar.overviewPosition()+a);},remove:function(){this.removeScrollableClass();this.removeSkinClass();this.removeScrollbarComponents();this.$element.data("scrollable",null);this.removeKeyboardScrolling();this.vScrollbar&&this.vScrollbar.remove();this.hScrollbar&&this.hScrollbar.remove();},setAnimationSpeed:function(a){this.options.animationSpeed=a;},isInside:function(g,f){var e=a(g),d=a(f),c=e.offset(),b=d.offset();return c.top>=b.top&&c.left>=b.left&&c.top+e.height()<=b.top+d.height()&&c.left+e.width()<=b.left+d.width();},initKeyboardScrolling:function(){var a=this;this.elementKeydown=function(b){if(document.activeElement===a.$element[0]){a.vScrollbar&&a.vScrollbar.keyScroll(b);a.hScrollbar&&a.hScrollbar.keyScroll(b);}};this.$element.attr("tabindex","-1").keydown(this.elementKeydown);},removeKeyboardScrolling:function(){this.$element.removeAttr("tabindex").unbind("keydown",this.elementKeydown);},bindEvents:function(){if(this.options.onCustomScroll){this.$element.on("customScroll",this.options.onCustomScroll);}}};var c=function(a,b){this.scrollable=a;this.sizing=b;this.$scrollBar=this.sizing.scrollBar(this.scrollable.$element);this.$thumb=this.$scrollBar.find(".thumb");this.setScrollPosition(0,0);this.resize();this.initMouseMoveScrolling();this.initMouseWheelScrolling();this.initTouchScrolling();this.initMouseClickScrolling();this.initWindowResize();};c.prototype={resize:function(a){this.overviewSize=this.sizing.size(this.scrollable.$overview);this.calculateViewPortSize();this.sizing.size(this.scrollable.$viewPort,this.viewPortSize);this.ratio=this.viewPortSize/this.overviewSize;this.sizing.size(this.$scrollBar,this.viewPortSize);this.thumbSize=this.calculateThumbSize();this.sizing.size(this.$thumb,this.thumbSize);this.maxThumbPosition=this.calculateMaxThumbPosition();this.maxOverviewPosition=this.calculateMaxOverviewPosition();this.enabled=this.overviewSize>this.viewPortSize;if(this.scrollPercent===undefined){this.scrollPercent=0;}if(this.enabled){this.rescroll(a);}else{this.setScrollPosition(0,0);}this.$scrollBar.toggle(this.enabled);},calculateViewPortSize:function(){var a=this.sizing.size(this.scrollable.$element);if(a>0&&!this.maxSizeUsed){this.viewPortSize=a;this.maxSizeUsed=false;}else{var b=this.sizing.maxSize(this.scrollable.$element);this.viewPortSize=Math.min(b,this.overviewSize);this.maxSizeUsed=true;}},calculateThumbSize:function(){var b=this.sizing.fixedThumbSize(this.scrollable.options),a;if(b){a=b;}else{a=this.ratio*this.viewPortSize;}return Math.max(a,this.sizing.minSize(this.$thumb));},initMouseMoveScrolling:function(){var b=this;this.$thumb.mousedown(function(a){b.enabled&&b.startMouseMoveScrolling(a);});this.documentMouseup=function(a){b.stopMouseMoveScrolling(a);};a(document).mouseup(this.documentMouseup);this.documentMousemove=function(a){b.mouseMoveScroll(a);};a(document).mousemove(this.documentMousemove);this.$thumb.click(function(a){a.stopPropagation();});},removeMouseMoveScrolling:function(){this.$thumb.unbind();a(document).unbind("mouseup",this.documentMouseup);a(document).unbind("mousemove",this.documentMousemove);},initMouseWheelScrolling:function(){var a=this;this.scrollable.$element.mousewheel(function(e,f,c,d){if(a.enabled){var b=a.mouseWheelScroll(c,d);a.stopEventConditionally(e,b);}});},removeMouseWheelScrolling:function(){this.scrollable.$element.unbind("mousewheel");},initTouchScrolling:function(){if(document.addEventListener){var a=this;this.elementTouchstart=function(b){a.enabled&&a.startTouchScrolling(b);};this.scrollable.$element[0].addEventListener("touchstart",this.elementTouchstart);this.documentTouchmove=function(b){a.touchScroll(b);};this.scrollable.$element[0].addEventListener("touchmove",this.documentTouchmove);this.elementTouchend=function(b){a.stopTouchScrolling(b);};this.scrollable.$element[0].addEventListener("touchend",this.elementTouchend);}},removeTouchScrolling:function(){if(document.addEventListener){this.scrollable.$element[0].removeEventListener("touchstart",this.elementTouchstart);document.removeEventListener("touchmove",this.documentTouchmove);this.scrollable.$element[0].removeEventListener("touchend",this.elementTouchend);}},initMouseClickScrolling:function(){var a=this;this.scrollBarClick=function(b){a.mouseClickScroll(b);};this.$scrollBar.click(this.scrollBarClick);},removeMouseClickScrolling:function(){this.$scrollBar.unbind("click",this.scrollBarClick);},initWindowResize:function(){if(this.scrollable.options.updateOnWindowResize){var b=this;this.windowResize=function(){b.resize();};a(window).resize(this.windowResize);}},removeWindowResize:function(){a(window).unbind("resize",this.windowResize);},isKeyScrolling:function(a){return this.keyScrollDelta(a)!=null;},keyScrollDelta:function(a){for(var b in this.sizing.scrollingKeys){if(b==a){return this.sizing.scrollingKeys[a](this.viewPortSize);}}return null;},startMouseMoveScrolling:function(b){this.mouseMoveScrolling=true;a("body").addClass("not-selectable");this.setUnselectable(a("body"),"on");this.setScrollEvent(b);b.preventDefault();},stopMouseMoveScrolling:function(){this.mouseMoveScrolling=false;a("body").removeClass("not-selectable");this.setUnselectable(a("body"),null);},setUnselectable:function(a,b){if(a.attr("unselectable")!=b){a.attr("unselectable",b);a.find(":not(input)").attr("unselectable",b);}},mouseMoveScroll:function(a){if(this.mouseMoveScrolling){var b=this.sizing.mouseDelta(this.scrollEvent,a);this.scrollThumbBy(b);this.setScrollEvent(a);}},startTouchScrolling:function(a){if(a.touches&&a.touches.length==1){this.setScrollEvent(a.touches[0]);this.touchScrolling=true;a.stopPropagation();}},touchScroll:function(a){if(this.touchScrolling&&a.touches&&a.touches.length==1){var c=-this.sizing.mouseDelta(this.scrollEvent,a.touches[0])*this.scrollable.options.swipeSpeed,b=this.scrollOverviewBy(c);b&&this.setScrollEvent(a.touches[0]);this.stopEventConditionally(a,b);}},stopTouchScrolling:function(a){this.touchScrolling=false;a.stopPropagation();},mouseWheelScroll:function(b,c){var a=-this.sizing.wheelDelta(b,c)*this.scrollable.options.wheelSpeed;if(a!=0){return this.scrollOverviewBy(a);}},mouseClickScroll:function(b){var a=this.viewPortSize-20;if(b["page"+this.sizing.scrollAxis()]b?b:a;},triggerCustomScroll:function(a){this.scrollable.$element.trigger("customScroll",{scrollAxis:this.sizing.scrollAxis(),direction:this.sizing.scrollDirection(a,this.scrollPercent),scrollPercent:this.scrollPercent*100});},rescroll:function(c){if(c){var a=this.positionOrMax(this.overviewPosition(),this.maxOverviewPosition);this.scrollPercent=a/this.maxOverviewPosition;var b=this.scrollPercent*this.maxThumbPosition;this.setScrollPosition(a,b);}else{var b=this.scrollPercent*this.maxThumbPosition,a=this.scrollPercent*this.maxOverviewPosition;this.setScrollPosition(a,b);}},setScrollPosition:function(a,b){this.$thumb.css(this.sizing.offsetComponent(),b+"px");this.scrollable.$overview.css(this.sizing.offsetComponent(),-a+"px");},setScrollPositionWithAnimation:function(c,d){var b={},a={};b[this.sizing.offsetComponent()]=d+"px";this.$thumb.animate(b,this.scrollable.options.animationSpeed);a[this.sizing.offsetComponent()]=-c+"px";this.scrollable.$overview.animate(a,this.scrollable.options.animationSpeed);},calculateMaxThumbPosition:function(){return Math.max(0,this.sizing.size(this.$scrollBar)-this.thumbSize);},calculateMaxOverviewPosition:function(){return Math.max(0,this.sizing.size(this.scrollable.$overview)-this.sizing.size(this.scrollable.$viewPort));},setScrollEvent:function(a){var b="page"+this.sizing.scrollAxis();if(!this.scrollEvent||this.scrollEvent[b]!=a[b]){this.scrollEvent={pageX:a.pageX,pageY:a.pageY};}},scrollToElement:function(e){var b=a(e);if(this.sizing.isInside(b,this.scrollable.$overview)&&!this.sizing.isInside(b,this.scrollable.$viewPort)){var d=b.offset(),c=this.scrollable.$overview.offset(),f=this.scrollable.$viewPort.offset();this.scrollOverviewTo(d[this.sizing.offsetComponent()]-c[this.sizing.offsetComponent()],true);}},remove:function(){this.removeMouseMoveScrolling();this.removeMouseWheelScrolling();this.removeTouchScrolling();this.removeMouseClickScrolling();this.removeWindowResize();},stopEventConditionally:function(a,b){if(b||this.scrollable.options.preventDefaultScroll){a.preventDefault();a.stopPropagation();}}};var f=function(){};f.prototype={size:function(a,b){return b?a.width(b):a.width();},minSize:function(a){return parseInt(a.css("min-width"))||0;},maxSize:function(a){return parseInt(a.css("max-width"))||0;},fixedThumbSize:function(a){return a.fixedThumbWidth;},scrollBar:function(a){return a.find(".scroll-bar.horizontal");},mouseDelta:function(a,b){return b.pageX-a.pageX;},offsetComponent:function(){return"left";},wheelDelta:function(a){return a;},scrollAxis:function(){return"X";},scrollDirection:function(b,a){return b=b.left&&d.left+e.width()<=b.left+c.width();}};var g=function(){};g.prototype={size:function(a,b){return b?a.height(b):a.height();},minSize:function(a){return parseInt(a.css("min-height"))||0;},maxSize:function(a){return parseInt(a.css("max-height"))||0;},fixedThumbSize:function(a){return a.fixedThumbHeight;},scrollBar:function(a){return a.find(".scroll-bar.vertical");},mouseDelta:function(a,b){return b.pageY-a.pageY;},offsetComponent:function(){return"top";},wheelDelta:function(b,a){return a;},scrollAxis:function(){return"Y";},scrollDirection:function(b,a){return b=b.top&&d.top+e.height()<=b.top+c.height();}};return this.each(function(){if(b==undefined){b=d;}if(typeof b=="string"){var c=a(this).data("scrollable");c&&c[b](h);}else{if(typeof b=="object"){b=a.extend(d,b);new e(a(this),b);}else{throw"Invalid type of options";}}});};})(jQuery);(function(a){var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks){for(var d=b.length;d;){a.event.fixHooks[b[--d]]=a.event.mouseHooks;}}a.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var a=b.length;a;){this.addEventListener(b[--a],c,false);}}else{this.onmousewheel=c;}},teardown:function(){if(this.removeEventListener){for(var a=b.length;a;){this.removeEventListener(b[--a],c,false);}}else{this.onmousewheel=null;}}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel");},unmousewheel:function(a){return this.unbind("mousewheel",a);}});function c(e){var b=e||window.event,g=[].slice.call(arguments,1),c=0,h=true,f=0,d=0;e=a.event.fix(b);e.type="mousewheel";if(b.wheelDelta){c=b.wheelDelta/120;}if(b.detail){c=-b.detail/3;}d=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){d=0;f=c;}if(b.wheelDeltaY!==undefined){d=b.wheelDeltaY/120;}if(b.wheelDeltaX!==undefined){f=b.wheelDeltaX/120;}g.unshift(e,c,f,d);return(a.event.dispatch||a.event.handle).apply(this,g);}})(jQuery);!function(i){var c,b,g="0.4.2",f="hasOwnProperty",e=/[\.\/]/,h="*",j=function(){},k=function(a,b){return a-b;},d={n:{}},a=function(j,l){j=String(j);var d,o=b,m=Array.prototype.slice.call(arguments,2),f=a.listeners(j),i=0,h=[],n={},g=[],q=c;c=j,b=0;for(var e=0,p=f.length;p>e;e++){"zIndex" in f[e]&&(h.push(f[e].zIndex),f[e].zIndex<0&&(n[f[e].zIndex]=f[e]));}for(h.sort(k);h[i]<0;){if(d=n[h[i++]],g.push(d.apply(l,m)),b){return b=o,g;}}for(e=0;p>e;e++){if(d=f[e],"zIndex" in d){if(d.zIndex==h[i]){if(g.push(d.apply(l,m)),b){break;}do{if(i++,d=n[h[i]],d&&g.push(d.apply(l,m)),b){break;}}while(d);}else{n[d.zIndex]=d;}}else{if(g.push(d.apply(l,m)),b){break;}}}return b=o,c=q,g.length?g:null;};a._events=d,a.listeners=function(p){var a,l,g,b,m,c,n,i,o=p.split(e),f=d,j=[f],k=[];for(b=0,m=o.length;m>b;b++){for(i=[],c=0,n=j.length;n>c;c++){for(f=j[c].n,l=[f[o[b]],f[h]],g=2;g--;){a=l[g],a&&(i.push(a),k=k.concat(a.f||[]));}}j=i;}return k;},a.on=function(g,c){if(g=String(g),"function"!=typeof c){return function(){};}for(var f=g.split(e),a=d,b=0,h=f.length;h>b;b++){a=a.n,a=a.hasOwnProperty(f[b])&&a[f[b]]||(a[f[b]]={n:{}});}for(a.f=a.f||[],b=0,h=a.f.length;h>b;b++){if(a.f[b]==c){return j;}}return a.f.push(c),function(a){+a==+a&&(c.zIndex=+a);};},a.f=function(b){var c=[].slice.call(arguments,1);return function(){a.apply(null,[b,null].concat(c).concat([].slice.call(arguments,0)));};},a.stop=function(){b=1;},a.nt=function(a){return a?(new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)")).test(c):c;},a.nts=function(){return c.split(e);},a.off=a.unbind=function(q,p){if(!q){return void (a._events=d={n:{}});}var b,g,k,i,l,c,m,n=q.split(e),j=[d];for(i=0,l=n.length;l>i;i++){for(c=0;ci;i++){for(b=j[i];b.n;){if(p){if(b.f){for(c=0,m=b.f.length;m>c;c++){if(b.f[c]==p){b.f.splice(c,1);break;}}!b.f.length&&delete b.f;}for(g in b.n){if(b.n[f](g)&&b.n[g].f){var o=b.n[g].f;for(c=0,m=o.length;m>c;c++){if(o[c]==p){o.splice(c,1);break;}}!o.length&&delete b.n[g].f;}}}else{delete b.f;for(g in b.n){b.n[f](g)&&b.n[g].f&&delete b.n[g].f;}}b=b.n;}}},a.once=function(b,d){var c=function(){return a.unbind(b,c),d.apply(this,arguments);};return a.on(b,c);},a.version=g,a.toString=function(){return"You are running Eve "+g;},"undefined"!=typeof module&&module.exports?(module.exports=a):"undefined"!=typeof define?define("eve",[],function(){return a;}):(i.eve=a);}(window||this),function(a,b){"function"==typeof define&&define.amd?define(["eve"],function(c){return b(a,c);}):b(a,a.eve);}(this,function(G,f){function a(b){if(a.is(b,"function")){return qb?b():f.on("raphael.DOMload",b);}if(a.is(b,v)){return a._engine.create[l](a,b.splice(0,3+a.is(b[0],o))).add(b);}var c=Array.prototype.slice.call(arguments,0);if(a.is(c[c.length-1],"function")){var d=c.pop();return qb?d.call(a._engine.create[l](a,c)):f.on("raphael.DOMload",function(){d.call(a._engine.create[l](a,c));});}return a._engine.create[l](a,arguments);}function K(a){if("function"==typeof a||Object(a)!==a){return a;}var c=new a.constructor;for(var b in a){a[m](b)&&(c[b]=K(a[b]));}return c;}function ic(a,c){for(var b=0,d=a.length;d>b;b++){if(a[b]===c){return a.push(a.splice(b,1)[0]);}}}function x(c,d,b){function a(){var h=Array.prototype.slice.call(arguments,0),e=h.join("␀"),f=a.cache=a.cache||{},g=a.count=a.count||[];return f[m](e)?(ic(g,e),b?b(f[e]):f[e]):(g.length>=1000&&delete f[g.shift()],g.push(e),f[e]=c[l](d,h),b?b(f[e]):f[e]);}return a;}function W(){return this.hex;}function Kb(b,e){for(var f=[],c=0,d=b.length;d-2*!e>c;c+=2){var a=[{x:+b[c-2],y:+b[c-1]},{x:+b[c],y:+b[c+1]},{x:+b[c+2],y:+b[c+3]},{x:+b[c+4],y:+b[c+5]}];e?c?d-4==c?(a[3]={x:+b[0],y:+b[1]}):d-2==c&&(a[2]={x:+b[0],y:+b[1]},a[3]={x:+b[2],y:+b[3]}):(a[0]={x:+b[d-2],y:+b[d-1]}):d-4==c?(a[3]=a[2]):c||(a[0]={x:+b[c],y:+b[c+1]}),f.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y]);}return f;}function Lb(c,a,b,d,e){var f=-3*a+9*b-9*d+3*e,g=c*f+6*a-12*b+6*d;return c*g-3*a+3*b;}function H(i,j,k,l,m,n,o,p,a){null==a&&(a=1),a=a>1?1:0>a?0:a;for(var d=a/2,q=12,r=[-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816],s=[0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],e=0,b=0;q>b;b++){var f=d*r[b]+d,g=Lb(f,i,k,m,o),h=Lb(f,j,l,n,p),t=g*g+h*h;e+=s[b]*c.sqrt(t);}return d*e;}function jc(c,d,e,f,g,h,i,j,a){if(!(0>a||H(c,d,e,f,g,h,i,j)o;){l/=2,b+=(a>k?1:-1)*l,k=H(c,d,e,f,g,h,i,j,b);}return b;}}function kc(a,b,c,d,e,f,h,i){if(!(g(a,c)g(e,h)||g(b,d)g(f,i))){var p=(a*d-b*c)*(e-h)-(a-c)*(e*i-f*h),q=(a*d-b*c)*(f-i)-(b-d)*(e*i-f*h),m=(a-c)*(f-i)-(b-d)*(e-h);if(m){var n=p/m,o=q/m,j=+n.toFixed(2),l=+o.toFixed(2);if(!(j<+k(a,c).toFixed(2)||j>+g(a,c).toFixed(2)||j<+k(e,h).toFixed(2)||j>+g(e,h).toFixed(2)||l<+k(b,d).toFixed(2)||l>+g(b,d).toFixed(2)||l<+k(f,i).toFixed(2)||l>+g(f,i).toFixed(2))){return{x:n,y:o};}}}}function lc(q,s,u){var z=a.bezierBBox(q),A=a.bezierBBox(s);if(!a.isBBoxIntersect(z,A)){return u?0:[];}for(var B=H.apply(0,q),C=H.apply(0,s),j=g(~~(B/5),1),l=g(~~(C/5),1),v=[],w=[],y={},x=u?0:[],b=0;j+1>b;b++){var f=a.findDotsAtSegment.apply(a,q.concat(b/j));v.push({x:f.x,y:f.y,t:b/j});}for(b=0;l+1>b;b++){f=a.findDotsAtSegment.apply(a,s.concat(b/l)),w.push({x:f.x,y:f.y,t:b/l});}for(b=0;j>b;b++){for(var m=0;l>m;m++){var d=v[b],h=v[b+1],e=w[m],i=w[m+1],o=n(h.x-d.x)<0.001?"y":"x",p=n(i.x-e.x)<0.001?"y":"x",c=kc(d.x,d.y,h.x,h.y,e.x,e.y,i.x,i.y);if(c){if(y[c.x.toFixed(4)]==c.y.toFixed(4)){continue;}y[c.x.toFixed(4)]=c.y.toFixed(4);var r=d.t+n((c[o]-d[o])/(h[o]-d[o]))*(h.t-d.t),t=e.t+n((c[p]-e[p])/(i[p]-e[p]))*(i.t-e.t);r>=0&&1.001>=r&&t>=0&&1.001>=t&&(u?x++:x.push({x:c.x,y:c.y,t1:k(r,1),t2:k(t,1)}));}}}return x;}function pb(l,m,u){l=a._path2curve(l),m=a._path2curve(m);for(var c,d,e,f,n,o,p,q,g,h,r=u?0:[],s=0,v=l.length;v>s;s++){var j=l[s];if("M"==j[0]){c=n=j[1],d=o=j[2];}else{"C"==j[0]?(g=[c,d].concat(j.slice(1)),c=g[6],d=g[7]):(g=[c,d,c,d,n,o,n,o],c=n,d=o);for(var t=0,w=m.length;w>t;t++){var k=m[t];if("M"==k[0]){e=p=k[1],f=q=k[2];}else{"C"==k[0]?(h=[e,f].concat(k.slice(1)),e=h[6],f=h[7]):(h=[e,f,e,f,p,q,p,q],e=p,f=q);var b=lc(g,h,u);if(u){r+=b;}else{for(var i=0,x=b.length;x>i;i++){b[i].segment1=s,b[i].segment2=t,b[i].bez1=g,b[i].bez2=h;}r=r.concat(b);}}}}}return r;}function D(a,b,c,d,e,f){null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0);}function Nb(){return this.x+L+this.y+L+this.width+" × "+this.height;}function mc(i,d,e,j,k,l){function f(c){return((g*c+b)*c+a)*c;}function m(b,d){var a=o(b,d);return((p*a+h)*a+c)*a;}function o(i,l){var d,e,c,h,j,k;for(c=i,k=0;8>k;k++){if(h=f(c)-i,n(h)c){return d;}if(c>e){return e;}for(;e>d;){if(h=f(c),n(h-i)h?(d=c):(e=c),c=(e-d)/2+d;}return c;}var a=3*d,b=3*(j-d)-a,g=1-a-b,c=3*e,h=3*(k-e)-c,p=1-c-h;return m(i,1/(200*l));}function z(b,e){var a=[],d={};if(this.ms=e,this.times=1,b){for(var c in b){b[m](c)&&(d[i(c)]=b[c],a.push(i(c)));}a.sort(Wb);}this.anim=d,this.top=a[a.length-1],this.percents=a;}function M(j,l,v,t,R,S){v=i(v);var u,A,J,O,K,L,g=j.ms,e={},p={},k={};if(t){for(c=0,z=d.length;z>c;c++){var s=d[c];if(s.el.id==l.id&&s.anim==j){s.percent!=v?(d.splice(c,1),J=1):(A=s),l.attr(s.totalOrigin);break;}}}else{t=+p;}for(var c=0,z=j.percents.length;z>c;c++){if(j.percents[c]==v||j.percents[c]>t*j.top){v=j.percents[c],K=j.percents[c-1]||0,g=g/j.top*(v-K),O=j.percents[c+1],u=j.anim[v];break;}t&&l.attr(j.anim[j.percents[c]]);}if(u){if(A){A.initstatus=t,A.start=new Date-A.ms*t;}else{for(var b in u){if(u[m](b)&&(cb[m](b)||l.paper.customAttributes[m](b))){switch(e[b]=l.attr(b),null==e[b]&&(e[b]=Qb[b]),p[b]=u[b],cb[b]){case o:k[b]=(p[b]-e[b])/g;break;case"colour":e[b]=a.getRGB(e[b]);var F=a.getRGB(p[b]);k[b]={r:(F.r-e[b].r)/g,g:(F.g-e[b].g)/g,b:(F.b-e[b].b)/g};break;case"path":var M=I(e[b],p[b]),Q=M[1];for(e[b]=M[0],k[b]=[],c=0,z=e[b].length;z>c;c++){k[b][c]=[0];for(var r=1,G=e[b][c].length;G>r;r++){k[b][c][r]=(Q[c][r]-e[b][c][r])/g;}}break;case"transform":var N=l._,H=ac(N[b],p[b]);if(H){for(e[b]=H.from,p[b]=H.to,k[b]=[],k[b].real=!0,c=0,z=e[b].length;z>c;c++){for(k[b][c]=[e[b][c][0]],r=1,G=e[b][c].length;G>r;r++){k[b][c][r]=(p[b][c][r]-e[b][c][r])/g;}}}else{var n=l.matrix||new D,w={_:{transform:N.transform},getBBox:function(){return l.getBBox(1);}};e[b]=[n.a,n.b,n.c,n.d,n.e,n.f],Bb(w,p[b]),p[b]=w._.transform,k[b]=[(w.matrix.a-n.a)/g,(w.matrix.b-n.b)/g,(w.matrix.c-n.c)/g,(w.matrix.d-n.d)/g,(w.matrix.e-n.e)/g,(w.matrix.f-n.f)/g];}break;case"csv":var B=q(u[b])[y](rb),C=q(e[b])[y](rb);if("clip-rect"==b){for(e[b]=C,k[b]=[],c=C.length;c--;){k[b][c]=(B[c]-e[b][c])/g;}}p[b]=B;break;default:for(B=([])[h](u[b]),C=([])[h](e[b]),k[b]=[],c=l.paper.customAttributes[b].length;c--;){k[b][c]=((B[c]||0)-(C[c]||0))/g;}}}}var P=u.easing,x=a.easing_formulas[P];if(!x){if(x=q(P).match(sc),x&&5==x.length){var E=x;x=function(a){return mc(a,+E[1],+E[2],+E[3],+E[4],g);};}else{x=Zb;}}if(L=u.start||j.start||+new Date,s={anim:j,percent:v,timestamp:L,start:L+(j.del||0),status:0,initstatus:t||0,stop:!1,ms:g,easing:x,from:e,diff:k,to:p,el:l,callback:u.callback,prev:K,next:O,repeat:S||j.times,origin:l.attr(),totalOrigin:R},d.push(s),t&&!A&&!J&&(s.stop=!0,s.start=new Date-g*t,1==d.length)){return gb();}J&&(s.start=new Date-s.ms*t),1==d.length&&Ab(gb);}f("raphael.anim.start."+l.id,l,j);}}function Ob(b){for(var a=0;ad;d++){for(b=c[d],a=1,i=b.length;i>a;a+=2){f=e.x(b[a],b[a+1]),g=e.y(b[a],b[a+1]),b[a]=f,b[a+1]=g;}}return c;};if(a._g=b,a.type=b.win.SVGAngle||b.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==a.type){var T,kb=b.doc.createElement("div");if(kb.innerHTML=' ',T=kb.firstChild,T.style.behavior="url(#default#VML)",!T||"object"!=typeof T.adj){return a.type=s;}kb=null;}a.svg=!(a.vml="VML"==a.type),a._Paper=Jb,a.fn=j=Jb.prototype=a.prototype,a._id=0,a._oid=0,a.is=function(a,b){return b=Y.call(b),"finite"==b?!qc[m](+a):"array"==b?a instanceof Array:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||"array"==b&&Array.isArray&&Array.isArray(a)||nc.call(a).slice(8,-1).toLowerCase()==b;},a.angle=function(d,e,f,g,b,h){if(null==b){var i=d-f,j=e-g;return i||j?(180+180*c.atan2(-j,-i)/r+360)%360:0;}return a.angle(d,e,b,h)-a.angle(f,g,b,h);},a.rad=function(a){return a%360*r/180;},a.deg=function(a){return 180*a/r%360;},a.snapTo=function(b,d,c){if(c=a.is(c,"finite")?c:10,a.is(b,v)){for(var f=b.length;f--;){if(n(b[f]-d)<=c){return b[f];}}}else{b=+b;var e=d%b;if(c>e){return d-e;}if(e>b-c){return d-e+b;}}return d;};a.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase();};}(/[xy]/g,function(b){var a=16*c.random()|0,d="x"==b?a:3&a|8;return d.toString(16);});a.setWindow=function(c){f("raphael.setWindow",a,b.win,c),b.win=c,b.doc=b.win.document,a._engine.initWin&&a._engine.initWin(b.win);};var U=function(f){if(a.vml){var d,g=/^\s+|\s+$/g;try{var e=new ActiveXObject("htmlfile");e.write(""),e.close(),d=e.body;}catch(i){d=createPopup().document.body;}var h=d.createTextRange();U=x(function(b){try{d.style.color=q(b).replace(g,s);var a=h.queryCommandValue("ForeColor");return a=(255&a)<<16|65280&a|(16711680&a)>>>16,"#"+("000000"+a.toString(16)).slice(-6);}catch(c){return"none";}});}else{var c=b.doc.createElement("i");c.title="Raphaël Colour Picker",c.style.display="none",b.doc.body.appendChild(c),U=x(function(a){return c.style.color=a,b.doc.defaultView.getComputedStyle(c,s).getPropertyValue("color");});}return U(f);},fc=function(){return"hsb("+[this.h,this.s,this.b]+")";},gc=function(){return"hsl("+[this.h,this.s,this.l]+")";},Fb=function(){return this.hex;},Gb=function(b,c,d){if(null==c&&a.is(b,"object")&&"r" in b&&"g" in b&&"b" in b&&(d=b.b,c=b.g,b=b.r),null==c&&a.is(b,Z)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b;}return(b>1||c>1||d>1)&&(b/=255,c/=255,d/=255),[b,c,d];},Hb=function(b,c,d,e){b*=255,c*=255,d*=255;var f={r:b,g:c,b:d,hex:a.rgb(b,c,d),toString:Fb};return a.is(e,"finite")&&(f.opacity=e),f;};a.color=function(b){var c;return a.is(b,"object")&&"h" in b&&"s" in b&&"b" in b?(c=a.hsb2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):a.is(b,"object")&&"h" in b&&"s" in b&&"l" in b?(c=a.hsl2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):(a.is(b,"string")&&(b=a.getRGB(b)),a.is(b,"object")&&"r" in b&&"g" in b&&"b" in b?(c=a.rgb2hsl(b),b.h=c.h,b.s=c.s,b.l=c.l,c=a.rgb2hsb(b),b.v=c.b):(b={hex:"none"},b.r=b.g=b.b=b.h=b.s=b.v=b.l=-1)),b.toString=Fb,b;},a.hsb2rgb=function(a,h,d,i){this.is(a,"object")&&"h" in a&&"s" in a&&"b" in a&&(d=a.b,h=a.s,a=a.h,i=a.o),a*=360;var e,f,g,c,b;return a=a%360/60,b=d*h,c=b*(1-n(a%2-1)),e=f=g=d-b,a=~~a,e+=([b,c,0,0,c,b])[a],f+=([c,b,b,c,0,0])[a],g+=([0,0,c,b,b,c])[a],Hb(e,f,g,i);},a.hsl2rgb=function(a,e,c,i){this.is(a,"object")&&"h" in a&&"s" in a&&"l" in a&&(c=a.l,e=a.s,a=a.h),(a>1||e>1||c>1)&&(a/=360,e/=100,c/=100),a*=360;var f,g,h,d,b;return a=a%360/60,b=2*e*(0.5>c?c:1-c),d=b*(1-n(a%2-1)),f=g=h=c-b/2,a=~~a,f+=([b,d,0,0,d,b])[a],g+=([d,b,b,d,0,0])[a],h+=([0,0,d,b,b,d])[a],Hb(f,g,h,i);},a.rgb2hsb=function(b,c,a){a=Gb(b,c,a),b=a[0],c=a[1],a=a[2];var f,h,e,d;return e=g(b,c,a),d=e-k(b,c,a),f=0==d?null:e==b?(c-a)/d:e==c?(a-b)/d+2:(b-c)/d+4,f=(f+360)%6*60/360,h=0==d?0:d/e,{h:f,s:h,b:e,toString:fc};},a.rgb2hsl=function(c,d,a){a=Gb(c,d,a),c=a[0],d=a[1],a=a[2];var h,j,e,f,i,b;return f=g(c,d,a),i=k(c,d,a),b=f-i,h=0==b?null:f==c?(d-a)/b:f==d?(a-c)/b+2:(c-d)/b+4,h=(h+360)%6*60/360,e=(f+i)/2,j=0==b?0:0.5>e?b/(2*e):b/(2-2*e),{h:h,s:j,l:e,toString:gc};},a._path2string=function(){return this.join(",").replace(Tb,"$1");};a._preload=function(c,d){var a=b.doc.createElement("img");a.style.cssText="position:absolute;left:-9999em;top:-9999em",a.onload=function(){d.call(this),this.onload=null,b.doc.body.removeChild(this);},a.onerror=function(){b.doc.body.removeChild(this);},b.doc.body.appendChild(a),a.src=c;};a.getRGB=x(function(h){if(!h||(h=q(h)).indexOf("-")+1){return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:W};}if("none"==h){return{r:-1,g:-1,b:-1,hex:"none",toString:W};}!(Sb[m](h.toLowerCase().substring(0,2))||"#"==h.charAt())&&(h=U(h));var d,e,f,g,j,b,c=h.match(oc);return c?(c[2]&&(f=C(c[2].substring(5),16),e=C(c[2].substring(3,5),16),d=C(c[2].substring(1,3),16)),c[3]&&(f=C((j=c[3].charAt(3))+j,16),e=C((j=c[3].charAt(2))+j,16),d=C((j=c[3].charAt(1))+j,16)),c[4]&&(b=c[4][y](eb),d=i(b[0]),"%"==b[0].slice(-1)&&(d*=2.55),e=i(b[1]),"%"==b[1].slice(-1)&&(e*=2.55),f=i(b[2]),"%"==b[2].slice(-1)&&(f*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(g=i(b[3])),b[3]&&"%"==b[3].slice(-1)&&(g/=100)),c[5]?(b=c[5][y](eb),d=i(b[0]),"%"==b[0].slice(-1)&&(d*=2.55),e=i(b[1]),"%"==b[1].slice(-1)&&(e*=2.55),f=i(b[2]),"%"==b[2].slice(-1)&&(f*=2.55),("deg"==b[0].slice(-3)||"°"==b[0].slice(-1))&&(d/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(g=i(b[3])),b[3]&&"%"==b[3].slice(-1)&&(g/=100),a.hsb2rgb(d,e,f,g)):c[6]?(b=c[6][y](eb),d=i(b[0]),"%"==b[0].slice(-1)&&(d*=2.55),e=i(b[1]),"%"==b[1].slice(-1)&&(e*=2.55),f=i(b[2]),"%"==b[2].slice(-1)&&(f*=2.55),("deg"==b[0].slice(-3)||"°"==b[0].slice(-1))&&(d/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(g=i(b[3])),b[3]&&"%"==b[3].slice(-1)&&(g/=100),a.hsl2rgb(d,e,f,g)):(c={r:d,g:e,b:f,toString:W},c.hex="#"+(16777216|f|e<<8|d<<16).toString(16).slice(1),a.is(g,"finite")&&(c.opacity=g),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:W};},a),a.hsb=x(function(b,c,d){return a.hsb2rgb(b,c,d).hex;}),a.hsl=x(function(b,c,d){return a.hsl2rgb(b,c,d).hex;}),a.rgb=x(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1);}),a.getColor=function(b){var a=this.getColor.start=this.getColor.start||{h:0,s:1,b:b||0.75},c=this.hsb2rgb(a.h,a.s,a.b);return a.h+=0.075,a.h>1&&(a.h=0,a.s-=0.2,a.s<=0&&(this.getColor.start={h:0,s:1,b:a.b})),c.hex;},a.getColor.reset=function(){delete this.start;},a.parsePathString=function(c){if(!c){return null;}var d=B(c);if(d.arr){return w(d.arr);}var e={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},b=[];return a.is(c,v)&&a.is(c[0],v)&&(b=w(c)),b.length||q(c).replace(Ub,function(g,a,f){var c=[],d=a.toLowerCase();if(f.replace(zb,function(b,a){a&&c.push(+a);}),"m"==d&&c.length>2&&(b.push(([a])[h](c.splice(0,2))),d="l",a="m"==a?"l":"L"),"r"==d){b.push(([a])[h](c));}else{for(;c.length>=e[d]&&(b.push(([a])[h](c.splice(0,e[d]))),e[d]);){}}}),b.toString=a._path2string,d.arr=w(b),b;},a.parseTransformString=x(function(b){if(!b){return null;}var c=[];return a.is(b,v)&&a.is(b[0],v)&&(c=w(b)),c.length||q(b).replace(Vb,function(e,a,d){var b=[];Y.call(a);d.replace(zb,function(c,a){a&&b.push(+a);}),c.push(([a])[h](b));}),c.toString=a._path2string,c;});var B=function(b){var a=B.ps=B.ps||{};return a[b]?(a[b].sleep=100):(a[b]={sleep:100}),setTimeout(function(){for(var c in a){a[m](c)&&c!=b&&(a[c].sleep--,!a[c].sleep&&delete a[c]);}}),a[b];};a.findDotsAtSegment=function(f,g,d,e,h,i,k,l,a){var b=1-a,q=u(b,3),s=u(b,2),j=a*a,t=j*a,w=q*f+3*s*a*d+3*b*a*a*h+t*k,x=q*g+3*s*a*e+3*b*a*a*i+t*l,m=f+2*a*(d-f)+j*(h-2*d+f),n=g+2*a*(e-g)+j*(i-2*e+g),o=d+2*a*(h-d)+j*(k-2*h+d),p=e+2*a*(i-e)+j*(l-2*i+e),y=b*f+a*d,z=b*g+a*e,A=b*h+a*k,B=b*i+a*l,v=90-180*c.atan2(m-o,n-p)/r;return(m>o||p>n)&&(v+=180),{x:w,y:x,m:{x:m,y:n},n:{x:o,y:p},start:{x:y,y:z},end:{x:A,y:B},alpha:v};},a.bezierBBox=function(c,d,e,f,g,h,i,j){a.is(c,"array")||(c=[c,d,e,f,g,h,i,j]);var b=yb.apply(null,c);return{x:b.min.x,y:b.min.y,x2:b.max.x,y2:b.max.y,width:b.max.x-b.min.x,height:b.max.y-b.min.y};},a.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2;},a.isBBoxIntersect=function(b,c){var d=a.isPointInsideBBox;return d(c,b.x,b.y)||d(c,b.x2,b.y)||d(c,b.x,b.y2)||d(c,b.x2,b.y2)||d(b,c.x,c.y)||d(b,c.x2,c.y)||d(b,c.x,c.y2)||d(b,c.x2,c.y2)||(b.xc.x||c.xb.x)&&(b.yc.y||c.yb.y);},a.pathIntersection=function(a,b){return pb(a,b);},a.pathIntersectionNumber=function(a,b){return pb(a,b,1);},a.isPointInsidePath=function(b,c,d){var e=a.pathBBox(b);return a.isPointInsideBBox(e,c,d)&&pb(b,[["M",c,d],["H",e.x2+10]],1)%2==1;},a._removedFactory=function(a){return function(){f("raphael.log",null,"Raphaël: you are calling to method “"+a+"” of removed object",a);};};var ab=a.pathBBox=function(b){var j=B(b);if(j.bbox){return K(j.bbox);}if(!b){return{x:0,y:0,width:0,height:0,x2:0,y2:0};}b=I(b);for(var a,e=0,f=0,c=[],d=[],m=0,u=b.length;u>m;m++){if(a=b[m],"M"==a[0]){e=a[1],f=a[2],c.push(e),d.push(f);}else{var i=yb(e,f,a[1],a[2],a[3],a[4],a[5],a[6]);c=c[h](i.min.x,i.max.x),d=d[h](i.min.y,i.max.y),e=a[5],f=a[6];}}var n=k[l](0,c),o=k[l](0,d),p=g[l](0,c),q=g[l](0,d),r=p-n,s=q-o,t={x:n,y:o,x2:p,y2:q,width:r,height:s,cx:n+r/2,cy:o+s/2};return j.bbox=K(t),t;},w=function(c){var b=K(c);return b.toString=a._path2string,b;},Rb=a._pathToRelative=function(f){var n=B(f);if(n.rel){return w(n.rel);}a.is(f,v)&&a.is(f&&f[0],v)||(f=a.parsePathString(f));var c=[],h=0,g=0,j=0,k=0,o=0;"M"==f[0][0]&&(h=f[0][1],g=f[0][2],j=h,k=g,o++,c.push(["M",h,g]));for(var d=o,p=f.length;p>d;d++){var e=c[d]=[],b=f[d];if(b[0]!=Y.call(b[0])){switch(e[0]=Y.call(b[0]),e[0]){case"a":e[1]=b[1],e[2]=b[2],e[3]=b[3],e[4]=b[4],e[5]=b[5],e[6]=+(b[6]-h).toFixed(3),e[7]=+(b[7]-g).toFixed(3);break;case"v":e[1]=+(b[1]-g).toFixed(3);break;case"m":j=b[1],k=b[2];default:for(var i=1,q=b.length;q>i;i++){e[i]=+(b[i]-(i%2?h:g)).toFixed(3);}}}else{e=c[d]=[],"m"==b[0]&&(j=b[1]+h,k=b[2]+g);for(var l=0,r=b.length;r>l;l++){c[d][l]=b[l];}}var m=c[d].length;switch(c[d][0]){case"z":h=j,g=k;break;case"h":h+=+c[d][m-1];break;case"v":g+=+c[d][m-1];break;default:h+=+c[d][m-2],g+=+c[d][m-1];}}return c.toString=a._path2string,n.rel=w(c),c;},tb=a._pathToAbsolute=function(d){var n=B(d);if(n.abs){return w(n.abs);}if(a.is(d,v)&&a.is(d&&d[0],v)||(d=a.parsePathString(d)),!d||!d.length){return[["M",0,0]];}var i=[],e=0,f=0,k=0,l=0,q=0;"M"==d[0][0]&&(e=+d[0][1],f=+d[0][2],k=e,l=f,q++,i[0]=["M",e,f]);for(var b,c,r=3==d.length&&"M"==d[0][0]&&"R"==d[1][0].toUpperCase()&&"Z"==d[2][0].toUpperCase(),o=q,s=d.length;s>o;o++){if(i.push(b=[]),c=d[o],c[0]!=sb.call(c[0])){switch(b[0]=sb.call(c[0]),b[0]){case"A":b[1]=c[1],b[2]=c[2],b[3]=c[3],b[4]=c[4],b[5]=c[5],b[6]=+(c[6]+e),b[7]=+(c[7]+f);break;case"V":b[1]=+c[1]+f;break;case"H":b[1]=+c[1]+e;break;case"R":for(var j=([e,f])[h](c.slice(1)),g=2,p=j.length;p>g;g++){j[g]=+j[g]+e,j[++g]=+j[g]+f;}i.pop(),i=i[h](Kb(j,r));break;case"M":k=+c[1]+e,l=+c[2]+f;default:for(g=1,p=c.length;p>g;g++){b[g]=+c[g]+(g%2?e:f);}}}else{if("R"==c[0]){j=([e,f])[h](c.slice(1)),i.pop(),i=i[h](Kb(j,r)),b=(["R"])[h](c.slice(-2));}else{for(var m=0,t=c.length;t>m;m++){b[m]=c[m];}}}switch(b[0]){case"Z":e=k,f=l;break;case"H":e=b[1];break;case"V":f=b[1];break;case"M":k=b[b.length-2],l=b[b.length-1];default:e=b[b.length-2],f=b[b.length-1];}}return i.toString=a._path2string,n.abs=w(i),i;},N=function(c,d,a,b){return[c,d,a,b,a,b];},wb=function(g,h,c,d,e,f){var a=1/3,b=2/3;return[a*g+b*c,a*h+b*d,a*e+b*c,a*f+b*d,e,f];},xb=function(k,l,e,d,z,T,t,f,g,p){var q,I=120*r/180,A=r/180*(+z||0),i=[],B=x(function(b,d,a){var e=b*c.cos(a)-d*c.sin(a),f=b*c.sin(a)+d*c.cos(a);return{x:e,y:f};});if(p){b=p[0],a=p[1],v=p[2],w=p[3];}else{q=B(k,l,-A),k=q.x,l=q.y,q=B(f,g,-A),f=q.x,g=q.y;var m=(c.cos(r/180*z),c.sin(r/180*z),(k-f)/2),o=(l-g)/2,u=m*m/(e*e)+o*o/(d*d);u>1&&(u=c.sqrt(u),e=u*e,d=u*d);var D=e*e,E=d*d,N=(T==t?-1:1)*c.sqrt(n((D*E-D*o*o-E*m*m)/(D*o*o+E*m*m))),v=N*e*o/d+(k+f)/2,w=N*-d*m/e+(l+g)/2,b=c.asin(((l-w)/d).toFixed(9)),a=c.asin(((g-w)/d).toFixed(9));b=v>k?r-b:b,a=v>f?r-a:a,0>b&&(b=2*r+b),0>a&&(a=2*r+a),t&&b>a&&(b-=2*r),!t&&a>b&&(a-=2*r);}var C=a-b;if(n(C)>I){var O=a,P=f,Q=g;a=b+I*(t&&a>b?1:-1),f=v+e*c.cos(a),g=w+d*c.sin(a),i=xb(f,g,e,d,z,0,t,P,Q,[a,O,v,w]);}C=a-b;var R=c.cos(b),S=c.sin(b),U=c.cos(a),V=c.sin(a),F=c.tan(C/4),G=4/3*e*F,H=4/3*d*F,J=[k,l],s=[k+G*S,l-H*R],K=[f+G*V,g-H*U],L=[f,g];if(s[0]=2*J[0]-s[0],s[1]=2*J[1]-s[1],p){return([s,K,L])[h](i);}i=([s,K,L])[h](i).join()[y](",");for(var M=[],j=0,W=i.length;W>j;j++){M[j]=j%2?B(i[j-1],i[j],A).y:B(i[j],i[j+1],A).x;}return M;},O=function(c,d,e,f,g,h,i,j,a){var b=1-a;return{x:u(b,3)*c+3*u(b,2)*a*e+3*b*a*a*g+u(a,3)*i,y:u(b,3)*d+3*u(b,2)*a*f+3*b*a*a*h+u(a,3)*j};},yb=x(function(j,m,f,h,o,p,q,r){var b,i=o-2*f+j-(q-2*o+f),a=2*(f-j)-2*(o-f),u=j-f,d=(-a+c.sqrt(a*a-4*i*u))/2/i,e=(-a-c.sqrt(a*a-4*i*u))/2/i,s=[m,r],t=[j,q];return n(d)>"1e12"&&(d=0.5),n(e)>"1e12"&&(e=0.5),d>0&&1>d&&(b=O(j,m,f,h,o,p,q,r,d),t.push(b.x),s.push(b.y)),e>0&&1>e&&(b=O(j,m,f,h,o,p,q,r,e),t.push(b.x),s.push(b.y)),i=p-2*h+m-(r-2*p+h),a=2*(h-m)-2*(p-h),u=m-h,d=(-a+c.sqrt(a*a-4*i*u))/2/i,e=(-a-c.sqrt(a*a-4*i*u))/2/i,n(d)>"1e12"&&(d=0.5),n(e)>"1e12"&&(e=0.5),d>0&&1>d&&(b=O(j,m,f,h,o,p,q,r,d),t.push(b.x),s.push(b.y)),e>0&&1>e&&(b=O(j,m,f,h,o,p,q,r,e),t.push(b.x),s.push(b.y)),{min:{x:k[l](0,t),y:k[l](0,s)},max:{x:g[l](0,t),y:g[l](0,s)}};}),I=a._path2curve=x(function(q,k){var o=!k&&B(q);if(!k&&o.curve){return w(o.curve);}for(var b=tb(q),a=k&&tb(k),d={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=function(b,a,c){var d,e,f={T:1,Q:1};if(!b){return["C",a.x,a.y,a.x,a.y,a.x,a.y];}switch(!(b[0] in f)&&(a.qx=a.qy=null),b[0]){case"M":a.X=b[1],a.Y=b[2];break;case"A":b=(["C"])[h](xb[l](0,([a.x,a.y])[h](b.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*a.x-a.bx,e=2*a.y-a.by):(d=a.x,e=a.y),b=(["C",d,e])[h](b.slice(1));break;case"T":"Q"==c||"T"==c?(a.qx=2*a.x-a.qx,a.qy=2*a.y-a.qy):(a.qx=a.x,a.qy=a.y),b=(["C"])[h](wb(a.x,a.y,a.qx,a.qy,b[1],b[2]));break;case"Q":a.qx=b[1],a.qy=b[2],b=(["C"])[h](wb(a.x,a.y,b[1],b[2],b[3],b[4]));break;case"L":b=(["C"])[h](N(a.x,a.y,b[1],b[2]));break;case"H":b=(["C"])[h](N(a.x,a.y,b[1],a.y));break;case"V":b=(["C"])[h](N(a.x,a.y,a.x,b[1]));break;case"Z":b=(["C"])[h](N(a.x,a.y,a.X,a.Y));}return b;},s=function(c,d){if(c[d].length>7){c[d].shift();for(var e=c[d];e.length;){c.splice(d++,0,(["C"])[h](e.splice(0,6)));}c.splice(d,1),p=g(b.length,a&&a.length||0);}},t=function(d,f,e,h,c){d&&f&&"M"==d[c][0]&&"M"!=f[c][0]&&(f.splice(c,0,["M",h.x,h.y]),e.bx=0,e.by=0,e.x=d[c][1],e.y=d[c][2],p=g(b.length,a&&a.length||0));},c=0,p=g(b.length,a&&a.length||0);p>c;c++){b[c]=r(b[c],d),s(b,c),a&&(a[c]=r(a[c],e)),a&&s(a,c),t(b,a,d,e,c),t(a,b,e,d,c);var f=b[c],j=a&&a[c],m=f.length,n=a&&j.length;d.x=f[m-2],d.y=f[m-1],d.bx=i(f[m-4])||d.x,d.by=i(f[m-3])||d.y,e.bx=a&&(i(j[n-4])||e.x),e.by=a&&(i(j[n-3])||e.y),e.x=a&&j[n-2],e.y=a&&j[n-1];}return a||(o.curve=w(b)),a?[b,a]:b;},null,w),P=(a._parseDots=x(function(k){for(var c=[],b=0,g=k.length;g>b;b++){var e={},h=k[b].match(/^([^:]*):?([\d\.]*)/);if(e.color=a.getRGB(h[1]),e.color.error){return null;}e.color=e.color.hex,h[2]&&(e.offset=h[2]+"%"),c.push(e);}for(b=1,g=c.length-1;g>b;b++){if(!c[b].offset){for(var j=i(c[b-1].offset||0),f=0,d=b+1;g>d;d++){if(c[d].offset){f=c[d].offset;break;}}f||(f=100,d=g),f=i(f);for(var l=(f-j)/(d-b+1);d>b;b++){j+=l,c[b].offset=j+"%";}}}return c;}),a._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next);}),Xb=(a._tofront=function(a,b){b.top!==a&&(P(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a);},a._toback=function(a,b){b.bottom!==a&&(P(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a);},a._insertafter=function(a,b,c){P(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a;},a._insertbefore=function(a,b,c){P(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b;},a.toMatrix=function(b,c){var d=ab(b),a={_:{transform:s},getBBox:function(){return d;}};return Bb(a,c),a.matrix;}),Bb=(a.transformPath=function(a,b){return jb(a,Xb(a,b));},a._extractTransform=function(h,l){if(null==l){return h._.transform;}l=q(l).replace(/\.{3}|\u2026/g,h._.transform||s);var m=a.parseTransformString(l),n=0,u=0,v=0,o=1,p=1,e=h._,c=new D;if(e.transform=m||[],m){for(var t=0,y=m.length;y>t;t++){var w,x,i,j,d,b=m[t],f=b.length,k=q(b[0]).toLowerCase(),r=b[0]!=k,g=r?c.invert():0;"t"==k&&3==f?r?(w=g.x(0,0),x=g.y(0,0),i=g.x(b[1],b[2]),j=g.y(b[1],b[2]),c.translate(i-w,j-x)):c.translate(b[1],b[2]):"r"==k?2==f?(d=d||h.getBBox(1),c.rotate(b[1],d.x+d.width/2,d.y+d.height/2),n+=b[1]):4==f&&(r?(i=g.x(b[2],b[3]),j=g.y(b[2],b[3]),c.rotate(b[1],i,j)):c.rotate(b[1],b[2],b[3]),n+=b[1]):"s"==k?2==f||3==f?(d=d||h.getBBox(1),c.scale(b[1],b[f-1],d.x+d.width/2,d.y+d.height/2),o*=b[1],p*=b[f-1]):5==f&&(r?(i=g.x(b[3],b[4]),j=g.y(b[3],b[4]),c.scale(b[1],b[2],i,j)):c.scale(b[1],b[2],b[3],b[4]),o*=b[1],p*=b[2]):"m"==k&&7==f&&c.add(b[1],b[2],b[3],b[4],b[5],b[6]),e.dirtyT=1,h.matrix=c;}}h.matrix=c,e.sx=o,e.sy=p,e.deg=n,e.dx=u=c.e,e.dy=v=c.f,1==o&&1==p&&!n&&e.bbox?(e.bbox.x+=+u,e.bbox.y+=+v):(e.dirtyT=1);}),Cb=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case"s":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1];}},ac=a._equaliseTransform=function(h,f){f=q(f).replace(/\.{3}|\u2026/g,h),h=a.parseTransformString(h)||[],f=a.parseTransformString(f)||[];for(var c,k,b,d,l=g(h.length,f.length),i=[],j=[],e=0;l>e;e++){if(b=h[e]||Cb(f[e]),d=f[e]||Cb(b),b[0]!=d[0]||"r"==b[0].toLowerCase()&&(b[2]!=d[2]||b[3]!=d[3])||"s"==b[0].toLowerCase()&&(b[3]!=d[3]||b[4]!=d[4])){return;}for(i[e]=[],j[e]=[],c=0,k=g(b.length,d.length);k>c;c++){c in b&&(i[e][c]=b[c]),c in d&&(j[e][c]=d[c]);}}return{from:i,to:j};};a._getContainer=function(d,e,f,g){var c;return c=null!=g||a.is(d,"object")?d:b.doc.getElementById(d),null!=c?c.tagName?null==e?{container:c,width:c.style.pixelWidth||c.offsetWidth,height:c.style.pixelHeight||c.offsetHeight}:{container:c,width:e,height:f}:{container:1,x:d,y:e,width:f,height:g}:void 0;},a.pathToRelative=Rb,a._engine={},a.path2curve=I,a.matrix=function(a,b,c,d,e,f){return new D(a,b,c,d,e,f);},function(b){function d(a){return a[0]*a[0]+a[1]*a[1];}function e(a){var b=c.sqrt(d(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b);}b.add=function(a,h,i,j,k,l){var c,d,e,f,b=[[],[],[]],m=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],g=[[a,i,k],[h,j,l],[0,0,1]];for(a&&a instanceof D&&(g=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),c=0;3>c;c++){for(d=0;3>d;d++){for(f=0,e=0;3>e;e++){f+=m[c][e]*g[e][d];}b[c][d]=f;}}this.a=b[0][0],this.b=b[1][0],this.c=b[0][1],this.d=b[1][1],this.e=b[0][2],this.f=b[1][2];},b.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new D(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b);},b.clone=function(){return new D(this.a,this.b,this.c,this.d,this.e,this.f);},b.translate=function(a,b){this.add(1,0,0,1,a,b);},b.scale=function(d,c,a,b){null==c&&(c=d),(a||b)&&this.add(1,0,0,1,a,b),this.add(d,0,0,c,0,0),(a||b)&&this.add(1,0,0,1,-a,-b);},b.rotate=function(b,d,e){b=a.rad(b),d=d||0,e=e||0;var f=+c.cos(b).toFixed(9),g=+c.sin(b).toFixed(9);this.add(f,g,-g,f,d,e),this.add(1,0,0,1,-d,-e);},b.x=function(a,b){return a*this.a+b*this.c+this.e;},b.y=function(a,b){return a*this.b+b*this.d+this.f;},b.get=function(a){return +this[q.fromCharCode(97+a)].toFixed(4);},b.toString=function(){return a.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join();},b.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')";},b.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)];},b.split=function(){var b={};b.dx=this.e,b.dy=this.f;var f=[[this.a,this.c],[this.b,this.d]];b.scalex=c.sqrt(d(f[0])),e(f[0]),b.shear=f[0][0]*f[1][0]+f[0][1]*f[1][1],f[1]=[f[1][0]-f[0][0]*b.shear,f[1][1]-f[0][1]*b.shear],b.scaley=c.sqrt(d(f[1])),e(f[1]),b.shear/=b.scaley;var g=-f[0][1],h=f[1][1];return 0>h?(b.rotate=a.deg(c.acos(h)),0>g&&(b.rotate=360-b.rotate)):(b.rotate=a.deg(c.asin(g))),b.isSimple=!(+b.shear.toFixed(9)||b.scalex.toFixed(9)!=b.scaley.toFixed(9)&&b.rotate),b.isSuperSimple=!+b.shear.toFixed(9)&&b.scalex.toFixed(9)==b.scaley.toFixed(9)&&!b.rotate,b.noRotation=!+b.shear.toFixed(9)&&!b.rotate,b;},b.toTransformString=function(b){var a=b||this[y]();return a.isSimple?(a.scalex=+a.scalex.toFixed(4),a.scaley=+a.scaley.toFixed(4),a.rotate=+a.rotate.toFixed(4),(a.dx||a.dy?"t"+[a.dx,a.dy]:s)+(1!=a.scalex||1!=a.scaley?"s"+[a.scalex,a.scaley,0,0]:s)+(a.rotate?"r"+[a.rotate,0,0]:s)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)];};}(D.prototype);var S=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);j.safari="Apple Computer, Inc."==navigator.vendor&&(S&&S[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&S&&S[1]<8?function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove();});}:Yb;for(var bc=function(){this.returnValue=!1;},cc=function(){return this.originalEvent.preventDefault();},dc=function(){this.cancelBubble=!0;},ec=function(){return this.originalEvent.stopPropagation();},Eb=function(a){var c=b.doc.documentElement.scrollTop||b.doc.body.scrollTop,d=b.doc.documentElement.scrollLeft||b.doc.body.scrollLeft;return{x:a.clientX+d,y:a.clientY+c};},hc=function(){return b.doc.addEventListener?function(b,a,d,e){var c=function(a){var b=Eb(a);return d.call(e,a,b.x,b.y);};if(b.addEventListener(a,c,!1),V&&X[a]){var f=function(a){for(var f=Eb(a),g=a,c=0,h=a.targetTouches&&a.targetTouches.length;h>c;c++){if(a.targetTouches[c].target==b){a=a.targetTouches[c],a.originalEvent=g,a.preventDefault=cc,a.stopPropagation=ec;break;}}return d.call(e,a,f.x,f.y);};b.addEventListener(X[a],f,!1);}return function(){return b.removeEventListener(a,c,!1),V&&X[a]&&b.removeEventListener(X[a],c,!1),!0;};}:b.doc.attachEvent?function(a,c,e,f){var d=function(a){a=a||b.win.event;var c=b.doc.documentElement.scrollTop||b.doc.body.scrollTop,d=b.doc.documentElement.scrollLeft||b.doc.body.scrollLeft,g=a.clientX+d,h=a.clientY+c;return a.preventDefault=a.preventDefault||bc,a.stopPropagation=a.stopPropagation||dc,e.call(f,a,g,h);};a.attachEvent("on"+c,d);var g=function(){return a.detachEvent("on"+c,d),!0;};return g;}:void 0;}(),A=[],lb=function(c){for(var a,e=c.clientX,g=c.clientY,n=b.doc.documentElement.scrollTop||b.doc.body.scrollTop,o=b.doc.documentElement.scrollLeft||b.doc.body.scrollLeft,k=A.length;k--;){if(a=A[k],V&&c.touches){for(var h,l=c.touches.length;l--;){if(h=c.touches[l],h.identifier==a.el._drag.id){e=h.clientX,g=h.clientY,(c.originalEvent?c.originalEvent:c).preventDefault();break;}}}else{c.preventDefault();}var i,d=a.el.node,m=d.nextSibling,j=d.parentNode,p=d.style.display;b.win.opera&&j.removeChild(d),d.style.display="none",i=a.el.paper.getElementByPoint(e,g),d.style.display=p,b.win.opera&&(m?j.insertBefore(d,m):j.appendChild(d)),i&&f("raphael.drag.over."+a.el.id,a.el,i),e+=o,g+=n,f("raphael.drag.move."+a.el.id,a.move_scope||a.el,e-a.el._drag.x,g-a.el._drag.y,e,g,c);}},mb=function(d){a.unmousemove(lb).unmouseup(mb);for(var b,c=A.length;c--;){b=A[c],b.el._drag={},f("raphael.drag.end."+b.el.id,b.end_scope||b.start_scope||b.move_scope||b.el,d);}A=[];},e=a.el={},Ib=Mb.length;Ib--;){!function(c){a[c]=e[c]=function(d,e){return a.is(d,"function")&&(this.events=this.events||[],this.events.push({name:c,f:d,unbind:hc(this.shape||this.node||b.doc,c,d,e||this)})),this;},a["un"+c]=e["un"+c]=function(e){for(var b=this.events||[],d=b.length;d--;){b[d].name!=c||!a.is(e,"undefined")&&b[d].f!=e||(b[d].unbind(),b.splice(d,1),!b.length&&delete this.events);}return this;};}(Mb[Ib]);}e.data=function(b,e){var c=F[this.id]=F[this.id]||{};if(0==arguments.length){return c;}if(1==arguments.length){if(a.is(b,"object")){for(var d in b){b[m](d)&&this.data(d,b[d]);}return this;}return f("raphael.data.get."+this.id,this,c[b],b),c[b];}return c[b]=e,f("raphael.data.set."+this.id,this,e,b),this;},e.removeData=function(a){return null==a?(F[this.id]={}):F[this.id]&&delete F[this.id][a],this;},e.getData=function(){return K(F[this.id]||{});},e.hover=function(b,c,a,d){return this.mouseover(b,a).mouseout(c,d||a);},e.unhover=function(a,b){return this.unmouseover(a).unmouseout(b);};var E=[];e.drag=function(c,d,e,g,h,j){function i(i){(i.originalEvent||i).preventDefault();var l=i.clientX,m=i.clientY,n=b.doc.documentElement.scrollTop||b.doc.body.scrollTop,o=b.doc.documentElement.scrollLeft||b.doc.body.scrollLeft;if(this._drag.id=i.identifier,V&&i.touches){for(var k,p=i.touches.length;p--;){if(k=i.touches[p],this._drag.id=k.identifier,k.identifier==this._drag.id){l=k.clientX,m=k.clientY;break;}}}this._drag.x=l+o,this._drag.y=m+n,!A.length&&a.mousemove(lb).mouseup(mb),A.push({el:this,move_scope:g,start_scope:h,end_scope:j}),d&&f.on("raphael.drag.start."+this.id,d),c&&f.on("raphael.drag.move."+this.id,c),e&&f.on("raphael.drag.end."+this.id,e),f("raphael.drag.start."+this.id,h||g||this,i.clientX+o,i.clientY+n,i);}return this._drag={},E.push({el:this,start:i}),this.mousedown(i),this;},e.onDragOver=function(a){a?f.on("raphael.drag.over."+this.id,a):f.unbind("raphael.drag.over."+this.id);},e.undrag=function(){for(var b=E.length;b--;){E[b].el==this&&(this.unmousedown(E[b].start),E.splice(b,1),f.unbind("raphael.drag.*."+this.id));}!E.length&&a.unmousemove(lb).unmouseup(mb),A=[];},j.circle=function(c,d,e){var b=a._engine.circle(this,c||0,d||0,e||0);return this.__set__&&this.__set__.push(b),b;},j.rect=function(c,d,e,f,g){var b=a._engine.rect(this,c||0,d||0,e||0,f||0,g||0);return this.__set__&&this.__set__.push(b),b;},j.ellipse=function(c,d,e,f){var b=a._engine.ellipse(this,c||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(b),b;},j.path=function(b){b&&!a.is(b,Z)&&!a.is(b[0],v)&&(b+=s);var c=a._engine.path(a.format[l](a,arguments),this);return this.__set__&&this.__set__.push(c),c;},j.image=function(c,d,e,f,g){var b=a._engine.image(this,c||"about:blank",d||0,e||0,f||0,g||0);return this.__set__&&this.__set__.push(b),b;},j.text=function(c,d,e){var b=a._engine.text(this,c||0,d||0,q(e));return this.__set__&&this.__set__.push(b),b;},j.set=function(c){!a.is(c,"array")&&(c=Array.prototype.splice.call(arguments,0,arguments.length));var b=new J(c);return this.__set__&&this.__set__.push(b),b.paper=this,b.type="set",b;},j.setStart=function(a){this.__set__=a||this.set();},j.setFinish=function(){var a=this.__set__;return delete this.__set__,a;},j.setSize=function(b,c){return a._engine.setSize.call(this,b,c);},j.setViewBox=function(b,c,d,e,f){return a._engine.setViewBox.call(this,b,c,d,e,f);},j.top=j.bottom=null,j.raphael=a;var Pb=function(d){var e=d.getBoundingClientRect(),f=d.ownerDocument,a=f.body,c=f.documentElement,g=c.clientTop||a.clientTop||0,h=c.clientLeft||a.clientLeft||0,i=e.top+(b.win.pageYOffset||c.scrollTop||a.scrollTop)-g,j=e.left+(b.win.pageXOffset||c.scrollLeft||a.scrollLeft)-h;return{y:i,x:j};};j.getElementByPoint=function(g,h){var e=this,c=e.canvas,a=b.doc.elementFromPoint(g,h);if(b.win.opera&&"svg"==a.tagName){var i=Pb(c),d=c.createSVGRect();d.x=g-i.x,d.y=h-i.y,d.width=d.height=1;var f=c.getIntersectionList(d,null);f.length&&(a=f[f.length-1]);}if(!a){return null;}for(;a.parentNode&&a!=c.parentNode&&!a.raphael;){a=a.parentNode;}return a==e.canvas.parentNode&&(a=c),a=a&&a.raphael?e.getById(a.raphaelid):null;},j.getElementsByBBox=function(c){var b=this.set();return this.forEach(function(d){a.isBBoxIntersect(d.getBBox(),c)&&b.push(d);}),b;},j.getById=function(b){for(var a=this.bottom;a;){if(a.id==b){return a;}a=a.next;}return null;},j.forEach=function(b,c){for(var a=this.bottom;a;){if(b.call(c,a)===!1){return this;}a=a.next;}return this;},j.getElementsByPoint=function(b,c){var a=this.set();return this.forEach(function(d){d.isPointInside(b,c)&&a.push(d);}),a;},e.isPointInside=function(c,d){var b=this.realPath=R[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(b=a.transformPath(b,this.attr("transform"))),a.isPointInsidePath(b,c,d);},e.getBBox=function(b){if(this.removed){return{};}var a=this._;return b?((a.dirty||!a.bboxwt)&&(this.realPath=R[this.type](this),a.bboxwt=ab(this.realPath),a.bboxwt.toString=Nb,a.dirty=0),a.bboxwt):((a.dirty||a.dirtyT||!a.bbox)&&((a.dirty||!this.realPath)&&(a.bboxwt=0,this.realPath=R[this.type](this)),a.bbox=ab(jb(this.realPath,this.matrix)),a.bbox.toString=Nb,a.dirty=a.dirtyT=0),a.bbox);},e.clone=function(){if(this.removed){return null;}var a=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(a),a;},e.glow=function(a){if("text"==this.type){return null;}a=a||{};var b={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:a.opacity||0.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},d=b.width/2,f=this.paper,g=f.set(),c=this.realPath||R[this.type](this);c=this.matrix?jb(c,this.matrix):c;for(var e=1;d+1>e;e++){g.push(f.path(c).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/d*e).toFixed(3),opacity:+(b.opacity/d).toFixed(3)}));}return g.insertBefore(this).translate(b.offsetx,b.offsety);};var bb=function(b,c,d,e,f,g,h,i,j){return null==j?H(b,c,d,e,f,g,h,i):a.findDotsAtSegment(b,c,d,e,f,g,h,i,jc(b,c,d,e,f,g,h,i,j));},db=function(c,b){return function(j,m,o){j=I(j);for(var f,g,d,k,e,h="",l={},i=0,n=0,p=j.length;p>n;n++){if(d=j[n],"M"==d[0]){f=+d[1],g=+d[2];}else{if(k=bb(f,g,d[1],d[2],d[3],d[4],d[5],d[6]),i+k>m){if(b&&!l.start){if(e=bb(f,g,d[1],d[2],d[3],d[4],d[5],d[6],m-i),h+=["C"+e.start.x,e.start.y,e.m.x,e.m.y,e.x,e.y],o){return h;}l.start=h,h=["M"+e.x,e.y+"C"+e.n.x,e.n.y,e.end.x,e.end.y,d[5],d[6]].join(),i+=k,f=+d[5],g=+d[6];continue;}if(!c&&!b){return e=bb(f,g,d[1],d[2],d[3],d[4],d[5],d[6],m-i),{x:e.x,y:e.y,alpha:e.alpha};}}i+=k,f=+d[5],g=+d[6];}h+=d.shift()+d;}return l.end=h,e=c?i:b?l:a.findDotsAtSegment(f,g,d[0],d[1],d[2],d[3],d[4],d[5],1),e.alpha&&(e={x:e.x,y:e.y,alpha:e.alpha}),e;};},ub=db(1),vb=db(),fb=db(0,1);a.getTotalLength=ub,a.getPointAtLength=vb,a.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<0.000001){return fb(a,b).end;}var d=fb(a,c,1);return b?fb(d,b).end:d;},e.getTotalLength=function(){var a=this.getPath();if(a){return this.node.getTotalLength?this.node.getTotalLength():ub(a);}},e.getPointAtLength=function(b){var a=this.getPath();if(a){return vb(a,b);}},e.getPath=function(){var b,c=a._getPath[this.type];if("text"!=this.type&&"set"!=this.type){return c&&(b=c(this)),b;}},e.getSubpath=function(c,d){var b=this.getPath();if(b){return a.getSubpath(b,c,d);}};var t=a.easing_formulas={linear:function(a){return a;},"<":function(a){return u(a,1.7);},">":function(a){return u(a,0.48);},"<>":function(g){var b=0.48-g/1.04,d=c.sqrt(0.1734+b*b),e=d-b,h=u(n(e),1/3)*(0>e?-1:1),f=-d-b,i=u(n(f),1/3)*(0>f?-1:1),a=h+i+0.5;return 3*(1-a)*a*a+a*a*a;},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b);},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1;},elastic:function(a){return a==!!a?a:u(2,-10*a)*c.sin(2*(a-0.075)*r/0.3)+1;},bounce:function(a){var c,d=7.5625,b=2.75;return 1/b>a?(c=d*a*a):2/b>a?(a-=1.5/b,c=d*a*a+0.75):2.5/b>a?(a-=2.25/b,c=d*a*a+0.9375):(a-=2.625/b,c=d*a*a+0.984375),c;}};t.easeIn=t["ease-in"]=t["<"],t.easeOut=t["ease-out"]=t[">"],t.easeInOut=t["ease-in-out"]=t["<>"],t["back-in"]=t.backIn,t["back-out"]=t.backOut;var d=[],Ab=G.requestAnimationFrame||G.webkitRequestAnimationFrame||G.mozRequestAnimationFrame||G.oRequestAnimationFrame||G.msRequestAnimationFrame||function(a){setTimeout(a,16);},gb=function(){for(var z=+new Date,r=0;rs)){if(j>s){var p=A(s/j);for(var c in i){if(i[m](c)){switch(cb[c]){case o:g=+i[c]+p*j*l[c];break;case"colour":g="rgb("+[hb(nb(i[c].r+p*j*l[c].r)),hb(nb(i[c].g+p*j*l[c].g)),hb(nb(i[c].b+p*j*l[c].b))].join(",")+")";break;case"path":g=[];for(var e=0,v=i[c].length;v>e;e++){g[e]=[i[c][e][0]];for(var k=1,w=i[c][e].length;w>k;k++){g[e][k]=+i[c][e][k]+p*j*l[c][e][k];}g[e]=g[e].join(L);}g=g.join(L);break;case"transform":if(l[c].real){for(g=[],e=0,v=i[c].length;v>e;e++){for(g[e]=[i[c][e][0]],k=1,w=i[c][e].length;w>k;k++){g[e][k]=i[c][e][k]+p*j*l[c][e][k];}}}else{var q=function(a){return +i[c][a]+p*j*l[c][a];};g=[["m",q(0),q(1),q(2),q(3),q(4),q(5)]];}break;case"csv":if("clip-rect"==c){for(g=[],e=4;e--;){g[e]=+i[c][e]+p*j*l[c][e];}}break;default:var B=([])[h](i[c]);for(g=[],e=n.paper.customAttributes[c].length;e--;){g[e]=+B[e]+p*j*l[c][e];}}x[c]=g;}}n.attr(x),function(a,b,c){setTimeout(function(){f("raphael.anim.frame."+a,b,c);});}(n.id,n,b.anim);}else{if(function(c,b,d){setTimeout(function(){f("raphael.anim.frame."+b.id,b,d),f("raphael.anim.finish."+b.id,b,d),a.is(c,"function")&&c.call(b);});}(b.callback,n,b.anim),n.attr(u),d.splice(r--,1),b.repeat>1&&!b.next){for(t in u){u[m](t)&&(y[t]=b.totalOrigin[t]);}b.el.attr(y),M(b.anim,b.el,b.anim.percents[0],null,b.totalOrigin,b.repeat-1);}b.next&&!b.stop&&M(b.anim,b.el,b.next,null,b.totalOrigin,b.repeat);}}}}a.svg&&n&&n.paper&&n.paper.safari(),d.length&&Ab(gb);},hb=function(a){return a>255?255:0>a?0:a;};e.animateWith=function(i,j,e,k,l,f){var b=this;if(b.removed){return f&&f.call(b),b;}var g=e instanceof z?e:a.animation(e,k,l,f);M(g,b,g.percents[0],null,b.attr());for(var c=0,h=d.length;h>c;c++){if(d[c].anim==j&&d[c].el==i){d[h-1].start=d[c].start;break;}}return b;},e.onAnimation=function(a){return a?f.on("raphael.anim.frame."+this.id,a):f.unbind("raphael.anim.frame."+this.id),this;},z.prototype.delay=function(b){var a=new z(this.anim,this.ms);return a.times=this.times,a.del=+b||0,a;},z.prototype.repeat=function(b){var a=new z(this.anim,this.ms);return a.del=this.del,a.times=c.floor(g(b,0))||1,a;},a.animation=function(b,e,d,f){if(b instanceof z){return b;}(a.is(d,"function")||!d)&&(f=f||d||null,d=null),b=Object(b),e=+e||0;var h,c,g={};for(c in b){b[m](c)&&i(c)!=c&&i(c)+"%"!=c&&(h=!0,g[c]=b[c]);}return h?(d&&(g.easing=d),f&&(g.callback=f),new z({100:g},e)):new z(b,e);},e.animate=function(c,f,g,d){var b=this;if(b.removed){return d&&d.call(b),b;}var e=c instanceof z?c:a.animation(c,f,g,d);return M(e,b,e.percents[0],null,b.attr()),b;},e.setTime=function(a,b){return a&&null!=b&&this.status(a,k(b,a.ms)/a.ms),this;},e.status=function(b,e){var f,a,g=[],c=0;if(null!=e){return M(b,this,-1,k(e,1)),this;}for(f=d.length;f>c;c++){if(a=d[c],a.el.id==this.id&&(!b||a.anim==b)){if(b){return a.status;}g.push({anim:a.anim,status:a.status});}}return b?0:g;},e.pause=function(b){for(var a=0;ab;b++){!a[b]||a[b].constructor!=e.constructor&&a[b].constructor!=J||(this[this.items.length]=this.items[this.items.length]=a[b],this.length++);}}},p=J.prototype;p.push=function(){for(var a,b,c=0,d=arguments.length;d>c;c++){a=arguments[c],!a||a.constructor!=e.constructor&&a.constructor!=J||(b=this.items.length,this[b]=this.items[b]=a,this.length++);}return this;},p.pop=function(){return this.length&&delete this[this.length--],this.items.pop();},p.forEach=function(b,c){for(var a=0,d=this.items.length;d>a;a++){if(b.call(c,this.items[a],a)===!1){return this;}}return this;};for(var ib in e){e[m](ib)&&(p[ib]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][l](c,b);});};}(ib));}return p.attr=function(b,e){if(b&&a.is(b,v)&&a.is(b[0],"object")){for(var c=0,f=b.length;f>c;c++){this.items[c].attr(b[c]);}}else{for(var d=0,g=this.items.length;g>d;d++){this.items[d].attr(b,e);}}return this;},p.clear=function(){for(;this.length;){this.pop();}},p.splice=function(b,c){b=0>b?g(this.length+b,0):b,c=g(0,k(this.length-b,c));for(var e=[],h=[],f=[],a=2;aa;a++){h.push(this[b+a]);}for(;aa?f[a]:e[a-d];}for(a=this.items.length=this.length-=c-d;this[a];){delete this[a++];}return new J(h);},p.exclude=function(b){for(var a=0,c=this.length;c>a;a++){if(this[a]==b){return this.splice(a,1),!0;}}},p.animate=function(i,j,b,e){(a.is(b,"function")||!b)&&(e=b||null);var h,f,d=this.items.length,c=d,k=this;if(!d){return this;}e&&(f=function(){!--d&&e.call(k);}),b=a.is(b,Z)?b:f;var g=a.animation(i,j,b,f);for(h=this.items[--c].animate(g);c--;){this.items[c]&&!this.items[c].removed&&this.items[c].animateWith(h,g,g),this.items[c]&&!this.items[c].removed||d--;}return this;},p.insertAfter=function(b){for(var a=this.items.length;a--;){this.items[a].insertAfter(b);}return this;},p.getBBox=function(){for(var b=[],c=[],d=[],e=[],f=this.items.length;f--;){if(!this.items[f].removed){var a=this.items[f].getBBox();b.push(a.x),c.push(a.y),d.push(a.x+a.width),e.push(a.y+a.height);}}return b=k[l](0,b),c=k[l](0,c),d=g[l](0,d),e=g[l](0,e),{x:b,y:c,x2:d,y2:e,width:d-b,height:e-c};},p.clone=function(a){a=this.paper.set();for(var b=0,c=this.items.length;c>b;b++){a.push(this.items[b].clone());}return a;},p.toString=function(){return"Raphaël‘s set";},p.glow=function(b){var a=this.paper.set();return this.forEach(function(d){var c=d.glow(b);null!=c&&c.forEach(function(b){a.push(b);});}),a;},p.isPointInside=function(b,c){var a=!1;return this.forEach(function(d){if(d.isPointInside(b,c)){return a=!0,!1;}}),a;},a.registerFont=function(a){if(!a.face){return a;}this.fonts=this.fonts||{};var c={w:a.w,face:{},glyphs:{}},e=a.face["font-family"];for(var f in a.face){a.face[m](f)&&(c.face[f]=a.face[f]);}if(this.fonts[e]?this.fonts[e].push(c):(this.fonts[e]=[c]),!a.svg){c.face["units-per-em"]=C(a.face["units-per-em"],10);for(var d in a.glyphs){if(a.glyphs[m](d)){var b=a.glyphs[d];if(c.glyphs[d]={w:b.w,k:{},d:b.d&&"M"+b.d.replace(/[mlcxtrv]/g,function(a){return({l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"})[a]||"M";})+"z"},b.k){for(var g in b.k){b[m](g)&&(c.glyphs[d].k[g]=b.k[g]);}}}}}return a;},j.getFont=function(i,d,e,f){if(f=f||"normal",e=e||"normal",d=+d||({normal:400,bold:700,lighter:300,bolder:800})[d]||400,a.fonts){var c=a.fonts[i];if(!c){var j=new RegExp("(^|\\s)"+i.replace(/[^\w\d\s+!~.:_-]/g,s)+"(\\s|$)","i");for(var g in a.fonts){if(a.fonts[m](g)&&j.test(g)){c=a.fonts[g];break;}}}var b;if(c){for(var h=0,k=c.length;k>h&&(b=c[h],b.face["font-weight"]!=d||b.face["font-style"]!=e&&b.face["font-style"]||b.face["font-stretch"]!=f);h++){}}return b;}},j.print=function(w,x,z,b,A,j,l,m){j=j||"middle",l=g(k(l||0,1),-1),m=g(k(m||1,3),1);var c,e=q(z)[y](s),n=0,f=0,r=s;if(a.is(b,"string")&&(b=this.getFont(b)),b){c=(A||16)/b.face["units-per-em"];for(var h=b.face.bbox[y](rb),t=+h[0],o=h[3]-h[1],u=0,v=+h[1]+("baseline"==j?o+ +b.face.descent:o/2),d=0,B=e.length;B>d;d++){if("\n"==e[d]){n=0,i=0,f=0,u+=o*m;}else{var p=f&&b.glyphs[e[d-1]]||{},i=b.glyphs[e[d]];n+=f?(p.w||b.w)+(p.k&&p.k[e[d]]||0)+b.w*l:0,f=1;}i&&i.d&&(r+=a.transformPath(i.d,["t",n*c,u*c,"s",c,c,t,v,"t",(w-t)/c,(x-v)/c]));}}return this.path(r).attr({fill:"#000",stroke:"none"});},j.add=function(c){if(a.is(c,"array")){for(var b,e=this.set(),d=0,f=c.length;f>d;d++){b=c[d]||{},pc[m](b.type)&&e.push(this[b.type]().attr(b));}}return e;},a.format=function(b,d){var c=a.is(d,v)?([0])[h](d):arguments;return b&&a.is(b,Z)&&c.length-1&&(b=b.replace(rc,function(b,a){return null==c[++a]?s:c[a];})),b||s;},a.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(d,e,c){var a=c;return e.replace(b,function(e,b,f,c,d){b=b||c,a&&(b in a&&(a=a[b]),"function"==typeof a&&d&&(a=a()));}),a=(null==a||a==c?d:a)+"";};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d);});};}(),a.ninja=function(){return ob.was?(b.win.Raphael=ob.is):delete Raphael,a;},a.st=p,function(b,c,d){function e(){/in/.test(b.readyState)?setTimeout(e,9):a.eve("raphael.DOMload");}null==b.readyState&&b.addEventListener&&(b.addEventListener(c,d=function(){b.removeEventListener(c,d,!1),b.readyState="complete";},!1),b.readyState="loading"),e();}(document,"DOMContentLoaded"),f.on("raphael.DOMload",function(){qb=!0;}),function(){if(a.svg){var c="hasOwnProperty",e=String,f=parseFloat,w=parseInt,k=Math,s=k.max,o=k.abs,t=k.pow,l=/[, ]+/,p=a.eve,h="",q=" ",m="http://www.w3.org/1999/xlink",A={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},g={};a.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version;};var b=function(d,g){if(g){"string"==typeof d&&(d=b(d));for(var f in g){g[c](f)&&("xlink:"==f.substring(0,6)?d.setAttributeNS(m,f.substring(6),e(g[f])):d.setAttribute(f,e(g[f])));}}else{d=a._g.doc.createElementNS("http://www.w3.org/2000/svg",d),d.style&&(d.style.webkitTapHighlightColor="rgba(0,0,0,0)");}return d;},x=function(d,i){var q="linear",j=d.id+i,r=0.5,g=0.5,v=d.node,w=d.paper,u=v.style,l=a._g.doc.getElementById(j);if(!l){if(i=e(i).replace(a._radial_gradient,function(d,a,b){if(q="radial",a&&b){r=f(a),g=f(b);var c=2*(g>0.5)-1;t(r-0.5,2)+t(g-0.5,2)>0.25&&(g=k.sqrt(0.25-t(r-0.5,2))*c+0.5)&&0.5!=g&&(g=g.toFixed(5)-0.00001*c);}return h;}),i=i.split(/\s*\-\s*/),"linear"==q){var n=i.shift();if(n=-f(n),isNaN(n)){return null;}var c=[0,0,k.cos(a.rad(n)),k.sin(a.rad(n))],x=1/(s(o(c[2]),o(c[3]))||1);c[2]*=x,c[3]*=x,c[2]<0&&(c[0]=-c[2],c[2]=0),c[3]<0&&(c[1]=-c[3],c[3]=0);}var p=a._parseDots(i);if(!p){return null;}if(j=j.replace(/[\(\)\s,\xb0#]/g,"_"),d.gradient&&j!=d.gradient.id&&(w.defs.removeChild(d.gradient),delete d.gradient),!d.gradient){l=b(q+"Gradient",{id:j}),d.gradient=l,b(l,"radial"==q?{fx:r,fy:g}:{x1:c[0],y1:c[1],x2:c[2],y2:c[3],gradientTransform:d.matrix.invert()}),w.defs.appendChild(l);for(var m=0,y=p.length;y>m;m++){l.appendChild(b("stop",{offset:p[m].offset?p[m].offset:m?"100%":"0%","stop-color":p[m].color||"#fff"}));}}}return b(v,{fill:"url(#"+j+")",opacity:1,"fill-opacity":1}),u.fill=h,u.opacity=1,u.fillOpacity=1,1;},r=function(a){var c=a.getBBox(1);b(a.pattern,{patternTransform:a.matrix.invert()+" translate("+c.x+","+c.y+")"});},i=function(d,D,r){if("path"==d.type){for(var n,o,y,z,i,B=e(D).toLowerCase().split("-"),E=d.paper,f=r?"end":"start",F=d.node,j=d.attrs,s=j["stroke-width"],C=B.length,k="classic",l=3,m=3,u=5;C--;){switch(B[C]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":k=B[C];break;case"wide":m=5;break;case"narrow":m=2;break;case"long":l=5;break;case"short":l=2;}}if("open"==k?(l+=2,m+=2,u+=2,y=1,z=r?4:1,i={fill:"none",stroke:j.stroke}):(z=y=l/2,i={fill:j.stroke,stroke:"none"}),d._.arrows?r?(d._.arrows.endPath&&g[d._.arrows.endPath]--,d._.arrows.endMarker&&g[d._.arrows.endMarker]--):(d._.arrows.startPath&&g[d._.arrows.startPath]--,d._.arrows.startMarker&&g[d._.arrows.startMarker]--):(d._.arrows={}),"none"!=k){var p="raphael-marker-"+k,q="raphael-marker-"+f+k+l+m;a._g.doc.getElementById(p)?g[p]++:(E.defs.appendChild(b(b("path"),{"stroke-linecap":"round",d:A[k],id:p})),g[p]=1);var v,t=a._g.doc.getElementById(q);t?(g[q]++,v=t.getElementsByTagName("use")[0]):(t=b(b("marker"),{id:q,markerHeight:m,markerWidth:l,orient:"auto",refX:z,refY:m/2}),v=b(b("use"),{"xlink:href":"#"+p,transform:(r?"rotate(180 "+l/2+" "+m/2+") ":h)+"scale("+l/u+","+m/u+")","stroke-width":(1/((l/u+m/u)/2)).toFixed(4)}),t.appendChild(v),E.defs.appendChild(t),g[q]=1),b(v,i);var w=y*("diamond"!=k&&"oval"!=k);r?(n=d._.arrows.startdx*s||0,o=a.getTotalLength(j.path)-w*s):(n=w*s,o=a.getTotalLength(j.path)-(d._.arrows.enddx*s||0)),i={},i["marker-"+f]="url(#"+q+")",(o||n)&&(i.d=a.getSubpath(j.path,n,o)),b(F,i),d._.arrows[f+"Path"]=p,d._.arrows[f+"Marker"]=q,d._.arrows[f+"dx"]=w,d._.arrows[f+"Type"]=k,d._.arrows[f+"String"]=D;}else{r?(n=d._.arrows.startdx*s||0,o=a.getTotalLength(j.path)-n):(n=0,o=a.getTotalLength(j.path)-(d._.arrows.enddx*s||0)),d._.arrows[f+"Path"]&&b(F,{d:a.getSubpath(j.path,n,o)}),delete d._.arrows[f+"Path"],delete d._.arrows[f+"Marker"],delete d._.arrows[f+"dx"],delete d._.arrows[f+"Type"],delete d._.arrows[f+"String"];}for(i in g){if(g[c](i)&&!g[i]){var x=a._g.doc.getElementById(i);x&&x.parentNode.removeChild(x);}}}},B={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},y=function(d,a,h){if(a=B[e(a).toLowerCase()]){for(var f=d.attrs["stroke-width"]||"1",i=({round:f,square:f,butt:0})[d.attrs["stroke-linecap"]||h["stroke-linecap"]]||0,g=[],c=a.length;c--;){g[c]=a[c]*f+(c%2?1:-1)*i;}b(d.node,{"stroke-dasharray":g.join(",")});}},u=function(d,q){var g=d.node,j=d.attrs,J=g.style.visibility;g.style.visibility="hidden";for(var k in q){if(q[c](k)){if(!a._availableAttrs[c](k)){continue;}var f=q[k];switch(j[k]=f,k){case"blur":d.blur(f);break;case"title":var t=g.getElementsByTagName("title");if(t.length&&(t=t[0])){t.firstChild.nodeValue=f;}else{t=b("title");var K=a._g.doc.createTextNode(f);t.appendChild(K),g.appendChild(t);}break;case"href":case"target":var A=g.parentNode;if("a"!=A.tagName.toLowerCase()){var G=b("a");A.insertBefore(G,g),G.appendChild(g),A=G;}"target"==k?A.setAttributeNS(m,"show","blank"==f?"new":f):A.setAttributeNS(m,k,f);break;case"cursor":g.style.cursor=f;break;case"transform":d.transform(f);break;case"arrow-start":i(d,f);break;case"arrow-end":i(d,f,1);break;case"clip-rect":var u=e(f).split(l);if(4==u.length){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var n=b("clipPath"),B=b("rect");n.id=a.createUUID(),b(B,{x:u[0],y:u[1],width:u[2],height:u[3]}),n.appendChild(B),d.paper.defs.appendChild(n),b(g,{"clip-path":"url(#"+n.id+")"}),d.clip=B;}if(!f){var H=g.getAttribute("clip-path");if(H){var D=a._g.doc.getElementById(H.replace(/(^url\(#|\)$)/g,h));D&&D.parentNode.removeChild(D),b(g,{"clip-path":h}),delete d.clip;}}break;case"path":"path"==d.type&&(b(g,{d:f?(j.path=a._pathToAbsolute(f)):"M0,0"}),d._.dirty=1,d._.arrows&&("startString" in d._.arrows&&i(d,d._.arrows.startString),"endString" in d._.arrows&&i(d,d._.arrows.endString,1)));break;case"width":if(g.setAttribute(k,f),d._.dirty=1,!j.fx){break;}k="x",f=j.x;case"x":j.fx&&(f=-j.x-(j.width||0));case"rx":if("rx"==k&&"rect"==d.type){break;}case"cx":g.setAttribute(k,f),d.pattern&&r(d),d._.dirty=1;break;case"height":if(g.setAttribute(k,f),d._.dirty=1,!j.fy){break;}k="y",f=j.y;case"y":j.fy&&(f=-j.y-(j.height||0));case"ry":if("ry"==k&&"rect"==d.type){break;}case"cy":g.setAttribute(k,f),d.pattern&&r(d),d._.dirty=1;break;case"r":"rect"==d.type?b(g,{rx:f,ry:f}):g.setAttribute(k,f),d._.dirty=1;break;case"src":"image"==d.type&&g.setAttributeNS(m,"href",f);break;case"stroke-width":(1!=d._.sx||1!=d._.sy)&&(f/=s(o(d._.sx),o(d._.sy))||1),d.paper._vbSize&&(f*=d.paper._vbSize),g.setAttribute(k,f),j["stroke-dasharray"]&&y(d,j["stroke-dasharray"],q),d._.arrows&&("startString" in d._.arrows&&i(d,d._.arrows.startString),"endString" in d._.arrows&&i(d,d._.arrows.endString,1));break;case"stroke-dasharray":y(d,f,q);break;case"fill":var E=e(f).match(a._ISURL);if(E){n=b("pattern");var F=b("image");n.id=a.createUUID(),b(n,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),b(F,{x:0,y:0,"xlink:href":E[1]}),n.appendChild(F),function(c){a._preload(E[1],function(){var a=this.offsetWidth,e=this.offsetHeight;b(c,{width:a,height:e}),b(F,{width:a,height:e}),d.paper.safari();});}(n),d.paper.defs.appendChild(n),b(g,{fill:"url(#"+n.id+")"}),d.pattern=n,d.pattern&&r(d);break;}var p=a.getRGB(f);if(p.error){if(("circle"==d.type||"ellipse"==d.type||"r"!=e(f).charAt())&&x(d,f)){if("opacity" in j||"fill-opacity" in j){var v=a._g.doc.getElementById(g.getAttribute("fill").replace(/^url\(#|\)$/g,h));if(v){var z=v.getElementsByTagName("stop");b(z[z.length-1],{"stop-opacity":("opacity" in j?j.opacity:1)*("fill-opacity" in j?j["fill-opacity"]:1)});}}j.gradient=f,j.fill="none";break;}}else{delete q.gradient,delete j.gradient,!a.is(j.opacity,"undefined")&&a.is(q.opacity,"undefined")&&b(g,{opacity:j.opacity}),!a.is(j["fill-opacity"],"undefined")&&a.is(q["fill-opacity"],"undefined")&&b(g,{"fill-opacity":j["fill-opacity"]});}p[c]("opacity")&&b(g,{"fill-opacity":p.opacity>1?p.opacity/100:p.opacity});case"stroke":p=a.getRGB(f),g.setAttribute(k,p.hex),"stroke"==k&&p[c]("opacity")&&b(g,{"stroke-opacity":p.opacity>1?p.opacity/100:p.opacity}),"stroke"==k&&d._.arrows&&("startString" in d._.arrows&&i(d,d._.arrows.startString),"endString" in d._.arrows&&i(d,d._.arrows.endString,1));break;case"gradient":("circle"==d.type||"ellipse"==d.type||"r"!=e(f).charAt())&&x(d,f);break;case"opacity":j.gradient&&!j[c]("stroke-opacity")&&b(g,{"stroke-opacity":f>1?f/100:f});case"fill-opacity":if(j.gradient){v=a._g.doc.getElementById(g.getAttribute("fill").replace(/^url\(#|\)$/g,h)),v&&(z=v.getElementsByTagName("stop"),b(z[z.length-1],{"stop-opacity":f}));break;}default:"font-size"==k&&(f=w(f,10)+"px");var I=k.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase();});g.style[I]=f,d._.dirty=1,g.setAttribute(k,f);}}}C(d,q),g.style.visibility=J;},z=1.2,C=function(k,f){if("text"==k.type&&(f[c]("text")||f[c]("font")||f[c]("font-size")||f[c]("x")||f[c]("y"))){var i=k.attrs,g=k.node,o=g.firstChild?w(a._g.doc.defaultView.getComputedStyle(g.firstChild,h).getPropertyValue("font-size"),10):10;if(f[c]("text")){for(i.text=f.text;g.firstChild;){g.removeChild(g.firstChild);}for(var l,p=e(f.text).split("\n"),j=[],d=0,m=p.length;m>d;d++){l=b("tspan"),d&&b(l,{dy:o*z,x:i.x}),l.appendChild(a._g.doc.createTextNode(p[d])),g.appendChild(l),j[d]=l;}}else{for(j=g.getElementsByTagName("tspan"),d=0,m=j.length;m>d;d++){d?b(j[d],{dy:o*z,x:i.x}):b(j[0],{dy:0});}}b(g,{x:i.x,y:i.y}),k._.dirty=1;var q=k._getBBox(),n=i.y-(q.y+q.height/2);n&&a.is(n,"finite")&&b(j[0],{dy:n});}},j=function(c,b){this[0]=this.node=c,c.raphael=!0,this.id=a._oid++,c.raphaelid=this.id,this.matrix=a.matrix(),this.realPath=null,this.paper=b,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!b.bottom&&(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null;},d=a.el;j.prototype=d,d.constructor=j,a._engine.path=function(e,a){var d=b("path");a.canvas&&a.canvas.appendChild(d);var c=new j(d,a);return c.type="path",u(c,{fill:"none",stroke:"#000",path:e}),c;},d.rotate=function(a,c,b){if(this.removed){return this;}if(a=e(a).split(l),a.length-1&&(c=f(a[1]),b=f(a[2])),a=f(a[0]),null==b&&(c=b),null==c||null==b){var d=this.getBBox(1);c=d.x+d.width/2,b=d.y+d.height/2;}return this.transform(this._.transform.concat([["r",a,c,b]])),this;},d.scale=function(a,d,c,b){if(this.removed){return this;}if(a=e(a).split(l),a.length-1&&(d=f(a[1]),c=f(a[2]),b=f(a[3])),a=f(a[0]),null==d&&(d=a),null==b&&(c=b),null==c||null==b){var g=this.getBBox(1);}return c=null==c?g.x+g.width/2:c,b=null==b?g.y+g.height/2:b,this.transform(this._.transform.concat([["s",a,d,c,b]])),this;},d.translate=function(a,b){return this.removed?this:(a=e(a).split(l),a.length-1&&(b=f(a[1])),a=f(a[0])||0,b=+b||0,this.transform(this._.transform.concat([["t",a,b]])),this);},d.transform=function(e){var d=this._;if(null==e){return d.transform;}if(a._extractTransform(this,e),this.clip&&b(this.clip,{transform:this.matrix.invert()}),this.pattern&&r(this),this.node&&b(this.node,{transform:this.matrix}),1!=d.sx||1!=d.sy){var f=this.attrs[c]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":f});}return this;},d.hide=function(){return !this.removed&&this.paper.safari(this.node.style.display="none"),this;},d.show=function(){return !this.removed&&this.paper.safari(this.node.style.display=""),this;},d.remove=function(){if(!this.removed&&this.node.parentNode){var b=this.paper;b.__set__&&b.__set__.exclude(this),p.unbind("raphael.*.*."+this.id),this.gradient&&b.defs.removeChild(this.gradient),a._tear(this,b),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var c in this){this[c]="function"==typeof this[c]?a._removedFactory(c):null;}this.removed=!0;}},d._getBBox=function(){if("none"==this.node.style.display){this.show();var b=!0;}var a={};try{a=this.node.getBBox();}catch(c){}finally{a=a||{};}return b&&this.hide(),a;},d.attr=function(b,i){if(this.removed){return this;}if(null==b){var f={};for(var k in this.attrs){this.attrs[c](k)&&(f[k]=this.attrs[k]);}return f.gradient&&"none"==f.fill&&(f.fill=f.gradient)&&delete f.gradient,f.transform=this._.transform,f;}if(null==i&&a.is(b,"string")){if("fill"==b&&"none"==this.attrs.fill&&this.attrs.gradient){return this.attrs.gradient;}if("transform"==b){return this._.transform;}for(var m=b.split(l),h={},g=0,j=m.length;j>g;g++){b=m[g],h[b]=b in this.attrs?this.attrs[b]:a.is(this.paper.customAttributes[b],"function")?this.paper.customAttributes[b].def:a._availableAttrs[b];}return j-1?h:h[m[0]];}if(null==i&&a.is(b,"array")){for(h={},g=0,j=b.length;j>g;g++){h[b[g]]=this.attr(b[g]);}return h;}if(null!=i){var e={};e[b]=i;}else{null!=b&&a.is(b,"object")&&(e=b);}for(var d in e){p("raphael.attr."+d+"."+this.id,this,e[d]);}for(d in this.paper.customAttributes){if(this.paper.customAttributes[c](d)&&e[c](d)&&a.is(this.paper.customAttributes[d],"function")){var n=this.paper.customAttributes[d].apply(this,[].concat(e[d]));this.attrs[d]=e[d];for(var o in n){n[c](o)&&(e[o]=n[o]);}}}return u(this,e),this;},d.toFront=function(){if(this.removed){return this;}"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var b=this.paper;return b.top!=this&&a._tofront(this,b),this;},d.toBack=function(){if(this.removed){return this;}var b=this.node.parentNode;"a"==b.tagName.toLowerCase()?b.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):b.firstChild!=this.node&&b.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper);this.paper;return this;},d.insertAfter=function(b){if(this.removed){return this;}var c=b.node||b[b.length-1].node;return c.nextSibling?c.parentNode.insertBefore(this.node,c.nextSibling):c.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper),this;},d.insertBefore=function(b){if(this.removed){return this;}var c=b.node||b[0].node;return c.parentNode.insertBefore(this.node,c),a._insertbefore(this,b,this.paper),this;},d.blur=function(e){var c=this;if(0!==+e){var d=b("filter"),f=b("feGaussianBlur");c.attrs.blur=e,d.id=a.createUUID(),b(f,{stdDeviation:+e||1.5}),d.appendChild(f),c.paper.defs.appendChild(d),c._blur=d,b(c.node,{filter:"url(#"+d.id+")"});}else{c._blur&&(c._blur.parentNode.removeChild(c._blur),delete c._blur,delete c.attrs.blur),c.node.removeAttribute("filter");}return c;},a._engine.circle=function(c,e,f,g){var d=b("circle");c.canvas&&c.canvas.appendChild(d);var a=new j(d,c);return a.attrs={cx:e,cy:f,r:g,fill:"none",stroke:"#000"},a.type="circle",b(d,a.attrs),a;},a._engine.rect=function(c,f,g,h,i,d){var e=b("rect");c.canvas&&c.canvas.appendChild(e);var a=new j(e,c);return a.attrs={x:f,y:g,width:h,height:i,r:d||0,rx:d||0,ry:d||0,fill:"none",stroke:"#000"},a.type="rect",b(e,a.attrs),a;},a._engine.ellipse=function(c,e,f,g,h){var d=b("ellipse");c.canvas&&c.canvas.appendChild(d);var a=new j(d,c);return a.attrs={cx:e,cy:f,rx:g,ry:h,fill:"none",stroke:"#000"},a.type="ellipse",b(d,a.attrs),a;},a._engine.image=function(c,e,f,g,h,i){var a=b("image");b(a,{x:f,y:g,width:h,height:i,preserveAspectRatio:"none"}),a.setAttributeNS(m,"href",e),c.canvas&&c.canvas.appendChild(a);var d=new j(a,c);return d.attrs={x:f,y:g,width:h,height:i,src:e},d.type="image",d;},a._engine.text=function(d,f,g,h){var e=b("text");d.canvas&&d.canvas.appendChild(e);var c=new j(e,d);return c.attrs={x:f,y:g,"text-anchor":"middle",text:h,font:a._availableAttrs.font,stroke:"none",fill:"#000"},c.type="text",u(c,c.attrs),c;},a._engine.setSize=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this;},a._engine.create=function(){var e=a._getContainer.apply(0,arguments),c=e&&e.container,h=e.x,i=e.y,f=e.width,g=e.height;if(!c){throw new Error("SVG container not found.");}var j,d=b("svg"),k="overflow:hidden;";return h=h||0,i=i||0,f=f||512,g=g||342,b(d,{height:g,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg"}),1==c?(d.style.cssText=k+"position:absolute;left:"+h+"px;top:"+i+"px",a._g.doc.body.appendChild(d),j=1):(d.style.cssText=k+"position:relative",c.firstChild?c.insertBefore(d,c.firstChild):c.appendChild(d)),c=new a._Paper,c.width=f,c.height=g,c.canvas=d,c.clear(),c._left=c._top=0,j&&(c.renderfix=function(){}),c.renderfix(),c;},a._engine.setViewBox=function(c,f,d,e,g){p("raphael.setViewBox",this,this._viewBox,[c,f,d,e,g]);var h,j,i=s(d/this.width,e/this.height),a=this.top,k=g?"xMidYMid meet":"xMinYMin";for(null==c?(this._vbSize&&(i=1),delete this._vbSize,h="0 0 "+this.width+q+this.height):(this._vbSize=i,h=c+q+f+q+d+q+e),b(this.canvas,{viewBox:h,preserveAspectRatio:k});i&&a;){j="stroke-width" in a.attrs?a.attrs["stroke-width"]:1,a.attr({"stroke-width":j}),a._.dirty=1,a._.dirtyT=1,a=a.prev;}return this._viewBox=[c,f,d,e,!!g],this;},a.prototype.renderfix=function(){var a,b=this.canvas,e=b.style;try{a=b.getScreenCTM()||b.createSVGMatrix();}catch(f){a=b.createSVGMatrix();}var c=-a.e%1,d=-a.f%1;(c||d)&&(c&&(this._left=(this._left+c)%1,e.left=this._left+"px"),d&&(this._top=(this._top+d)%1,e.top=this._top+"px"));},a.prototype.clear=function(){a.eve("raphael.clear",this);for(var c=this.canvas;c.firstChild;){c.removeChild(c.firstChild);}this.bottom=this.top=null,(this.desc=b("desc")).appendChild(a._g.doc.createTextNode("Created with Raphaël "+a.version)),c.appendChild(this.desc),c.appendChild(this.defs=b("defs"));},a.prototype.remove=function(){p("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var b in this){this[b]="function"==typeof this[b]?a._removedFactory(b):null;}};var v=a.st;for(var n in d){d[c](n)&&!v[c](n)&&(v[n]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b);});};}(n));}}}(),function(){if(a.vml){var j="hasOwnProperty",c=String,f=parseFloat,l=Math,g=l.round,s=l.max,v=l.min,q=l.abs,m="fill",n=/[, ]+/,A=a.eve,B=" progid:DXImageTransform.Microsoft",h=" ",e="",w={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},C=/([clmz]),?([^clmz]*)/gi,D=/ progid:\S+Blur\([^\)]+\)/g,E=/-?[^,\s-]+/g,x="position:absolute;left:0;top:0;width:1px;height:1px",b=21600,F={path:1,rect:1,image:1},G={circle:1,ellipse:1},H=function(f){var l=/[ahqstv]/gi,m=a._pathToAbsolute;if(c(f).match(l)&&(m=a._path2curve),l=/[clmz]/g,m==a._pathToAbsolute&&!c(f).match(l)){return c(f).replace(C,function(h,c,e){var a=[],f="m"==c.toLowerCase(),d=w[c];return e.replace(E,function(e){f&&2==a.length&&(d+=a+w["m"==c?"l":"L"],a=[]),a.push(g(e*b));}),d+a;});}var n,d,o=m(f);i=[];for(var j=0,q=o.length;q>j;j++){n=o[j],d=o[j][0].toLowerCase(),"z"==d&&(d="x");for(var k=1,p=n.length;p>k;k++){d+=g(n[k]*b)+(k!=p-1?",":e);}i.push(d);}return i.join(h);},y=function(e,c,d){var b=a.matrix();return b.rotate(-e,0.5,0.5),{dx:b.x(c,d),dy:b.y(c,d)};},r=function(l,e,f,n,o,j){var g=l._,s=l.matrix,c=g.fillpos,d=l.node,k=d.style,p=1,r="",t=b/e,u=b/f;if(k.visibility="hidden",e&&f){if(d.coordsize=q(t)+h+q(u),k.rotation=j*(0>e*f?-1:1),j){var i=y(j,n,o);n=i.dx,o=i.dy;}if(0>e&&(r+="x"),0>f&&(r+=" y")&&(p=-1),k.flip=r,d.coordorigin=n*-t+h+o*-u,c||g.fillsize){var a=d.getElementsByTagName(m);a=a&&a[0],d.removeChild(a),c&&(i=y(j,s.x(c[0],c[1]),s.y(c[0],c[1])),a.position=i.dx*p+h+i.dy*p),g.fillsize&&(a.size=g.fillsize[0]*q(e)+h+g.fillsize[1]*q(f)),d.appendChild(a);}k.visibility="visible";}};a.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version;};var t=function(i,j,k){for(var a=c(j).toLowerCase().split("-"),d=k?"end":"start",b=a.length,f="classic",g="medium",h="medium";b--;){switch(a[b]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":f=a[b];break;case"wide":case"narrow":h=a[b];break;case"long":case"short":g=a[b];}}var e=i.node.getElementsByTagName("stroke")[0];e[d+"arrow"]=f,e[d+"arrowlength"]=g,e[d+"arrowwidth"]=h;},k=function(l,d){l.attrs=l.attrs||{};var q=l.node,k=l.attrs,y=q.style,U=F[l.type]&&(d.x!=k.x||d.y!=k.y||d.width!=k.width||d.height!=k.height||d.cx!=k.cx||d.cy!=k.cy||d.rx!=k.rx||d.ry!=k.ry||d.r!=k.r),ab=G[l.type]&&(k.cx!=d.cx||k.cy!=d.cy||k.r!=d.r||k.rx!=d.rx||k.ry!=d.ry),p=l;for(var L in d){d[j](L)&&(k[L]=d[L]);}if(U&&(k.path=a._getPath[l.type](l),l._.dirty=1),d.href&&(q.href=d.href),d.title&&(q.title=d.title),d.target&&(q.target=d.target),d.cursor&&(y.cursor=d.cursor),"blur" in d&&l.blur(d.blur),(d.path&&"path"==l.type||U)&&(q.path=H(~c(k.path).toLowerCase().indexOf("r")?a._pathToAbsolute(k.path):k.path),"image"==l.type&&(l._.fillpos=[k.x,k.y],l._.fillsize=[k.width,k.height],r(l,1,1,0,0,0))),"transform" in d&&l.transform(d.transform),ab){var O=+k.cx,Q=+k.cy,R=+k.rx||+k.r||0,S=+k.ry||+k.r||0;q.path=a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",g((O-R)*b),g((Q-S)*b),g((O+R)*b),g((Q+S)*b),g(O*b)),l._.dirty=1;}if("clip-rect" in d){var w=c(d["clip-rect"]).split(n);if(4==w.length){w[2]=+w[2]+ +w[0],w[3]=+w[3]+ +w[1];var D=q.clipRect||a._g.doc.createElement("div"),A=D.style;A.clip=a.format("rect({1}px {2}px {3}px {0}px)",w),q.clipRect||(A.position="absolute",A.top=0,A.left=0,A.width=l.paper.width+"px",A.height=l.paper.height+"px",q.parentNode.insertBefore(D,q),D.appendChild(q),q.clipRect=D);}d["clip-rect"]||q.clipRect&&(q.clipRect.style.clip="auto");}if(l.textpath){var B=l.textpath.style;d.font&&(B.font=d.font),d["font-family"]&&(B.fontFamily='"'+d["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,e)+'"'),d["font-size"]&&(B.fontSize=d["font-size"]),d["font-weight"]&&(B.fontWeight=d["font-weight"]),d["font-style"]&&(B.fontStyle=d["font-style"]);}if("arrow-start" in d&&t(p,d["arrow-start"]),"arrow-end" in d&&t(p,d["arrow-end"],1),null!=d.opacity||null!=d["stroke-width"]||null!=d.fill||null!=d.src||null!=d.stroke||null!=d["stroke-width"]||null!=d["stroke-opacity"]||null!=d["fill-opacity"]||null!=d["stroke-dasharray"]||null!=d["stroke-miterlimit"]||null!=d["stroke-linejoin"]||null!=d["stroke-linecap"]){var o=q.getElementsByTagName(m),Z=!1;if(o=o&&o[0],!o&&(Z=o=i(m)),"image"==l.type&&d.src&&(o.src=d.src),d.fill&&(o.on=!0),(null==o.on||"none"==d.fill||null===d.fill)&&(o.on=!1),o.on&&d.fill){var K=c(d.fill).match(a._ISURL);if(K){o.parentNode==q&&q.removeChild(o),o.rotate=!0,o.src=K[1],o.type="tile";var E=l.getBBox(1);o.position=E.x+h+E.y,l._.fillpos=[E.x,E.y],a._preload(K[1],function(){l._.fillsize=[this.offsetWidth,this.offsetHeight];});}else{o.color=a.getRGB(d.fill).hex,o.src=e,o.type="solid",a.getRGB(d.fill).error&&(p.type in {circle:1,ellipse:1}||"r"!=c(d.fill).charAt())&&z(p,d.fill,o)&&(k.fill="none",k.gradient=d.fill,o.rotate=!1);}}if("fill-opacity" in d||"opacity" in d){var x=((+k["fill-opacity"]+1||2)-1)*((+k.opacity+1||2)-1)*((+a.getRGB(d.fill).o+1||2)-1);x=v(s(x,0),1),o.opacity=x,o.src&&(o.color="none");}q.appendChild(o);var u=q.getElementsByTagName("stroke")&&q.getElementsByTagName("stroke")[0],T=!1;!u&&(T=u=i("stroke")),(d.stroke&&"none"!=d.stroke||d["stroke-width"]||null!=d["stroke-opacity"]||d["stroke-dasharray"]||d["stroke-miterlimit"]||d["stroke-linejoin"]||d["stroke-linecap"])&&(u.on=!0),("none"==d.stroke||null===d.stroke||null==u.on||0==d.stroke||0==d["stroke-width"])&&(u.on=!1);var V=a.getRGB(d.stroke);u.on&&d.stroke&&(u.color=V.hex),x=((+k["stroke-opacity"]+1||2)-1)*((+k.opacity+1||2)-1)*((+V.o+1||2)-1);var C=0.75*(f(d["stroke-width"])||1);if(x=v(s(x,0),1),null==d["stroke-width"]&&(C=k["stroke-width"]),d["stroke-width"]&&(u.weight=C),C&&1>C&&(x*=C)&&(u.weight=1),u.opacity=x,d["stroke-linejoin"]&&(u.joinstyle=d["stroke-linejoin"]||"miter"),u.miterlimit=d["stroke-miterlimit"]||8,d["stroke-linecap"]&&(u.endcap="butt"==d["stroke-linecap"]?"flat":"square"==d["stroke-linecap"]?"square":"round"),"stroke-dasharray" in d){var W={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};u.dashstyle=W[j](d["stroke-dasharray"])?W[d["stroke-dasharray"]]:e;}T&&q.appendChild(u);}if("text"==p.type){p.paper.canvas.style.display=e;var M=p.paper.span,N=100,I=k.font&&k.font.match(/\d+(?:\.\d*)?(?=px)/);y=M.style,k.font&&(y.font=k.font),k["font-family"]&&(y.fontFamily=k["font-family"]),k["font-weight"]&&(y.fontWeight=k["font-weight"]),k["font-style"]&&(y.fontStyle=k["font-style"]),I=f(k["font-size"]||I&&I[0])||10,y.fontSize=I*N+"px",p.textpath.string&&(M.innerHTML=c(p.textpath.string).replace(/"));var J=M.getBoundingClientRect();p.W=k.w=(J.right-J.left)/N,p.H=k.h=(J.bottom-J.top)/N,p.X=k.x,p.Y=k.y+p.H/2,("x" in d||"y" in d)&&(p.path.v=a.format("m{0},{1}l{2},{1}",g(k.x*b),g(k.y*b),g(k.x*b)+1));for(var X=["x","y","text","font","font-family","font-weight","font-style","font-size"],P=0,Y=X.length;Y>P;P++){if(X[P] in d){p._.dirty=1;break;}}switch(k["text-anchor"]){case"start":p.textpath.style["v-text-align"]="left",p.bbx=p.W/2;break;case"end":p.textpath.style["v-text-align"]="right",p.bbx=-p.W/2;break;default:p.textpath.style["v-text-align"]="center",p.bbx=0;}p.textpath.style["v-text-kern"]=!0;}},z=function(d,i,b){d.attrs=d.attrs||{};var m=(d.attrs,Math.pow),n="linear",p=".5 .5";if(d.attrs.gradient=i,i=c(i).replace(a._radial_gradient,function(c,b,a){return n="radial",b&&a&&(b=f(b),a=f(a),m(b-0.5,2)+m(a-0.5,2)>0.25&&(a=l.sqrt(0.25-m(b-0.5,2))*(2*(a>0.5)-1)+0.5),p=b+h+a),e;}),i=i.split(/\s*\-\s*/),"linear"==n){var k=i.shift();if(k=-f(k),isNaN(k)){return null;}}var g=a._parseDots(i);if(!g){return null;}if(d=d.shape||d.node,g.length){d.removeChild(b),b.on=!0,b.method="none",b.color=g[0].color,b.color2=g[g.length-1].color;for(var o=[],j=0,q=g.length;q>j;j++){g[j].offset&&o.push(g[j].offset+h+g[j].color);}b.colors=o.length?o.join():"0% "+b.color,"radial"==n?(b.type="gradientTitle",b.focus="100%",b.focussize="0 0",b.focusposition=p,b.angle=0):(b.type="gradient",b.angle=(270-k)%360),d.appendChild(b);}return 1;},o=function(c,b){this[0]=this.node=c,c.raphael=!0,this.id=a._oid++,c.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=b,this.matrix=a.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!b.bottom&&(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null;},d=a.el;o.prototype=d,d.constructor=o,d.transform=function(i){if(null==i){return this._.transform;}var l,f=this.paper._viewBoxShift,s=f?"s"+[f.scale,f.scale]+"-1-1t"+[f.dx,f.dy]:e;f&&(l=i=c(i).replace(/\.{3}|\u2026/g,this._.transform||e)),a._extractTransform(this,s+i);var d,g=this.matrix.clone(),j=this.skew,k=this.node,m=~c(this.attrs.fill).indexOf("-"),t=!c(this.attrs.fill).indexOf("url(");if(g.translate(1,1),t||m||"image"==this.type){if(j.matrix="1 0 0 1",j.offset="0 0",d=g.split(),m&&d.noRotation||!d.isSimple){k.style.filter=g.toFilter();var n=this.getBBox(),o=this.getBBox(1),p=n.x-o.x,q=n.y-o.y;k.coordorigin=p*-b+h+q*-b,r(this,1,1,p,q,0);}else{k.style.filter=e,r(this,d.scalex,d.scaley,d.dx,d.dy,d.rotate);}}else{k.style.filter=e,j.matrix=c(g),j.offset=g.offset();}return l&&(this._.transform=l),this;},d.rotate=function(a,d,b){if(this.removed){return this;}if(null!=a){if(a=c(a).split(n),a.length-1&&(d=f(a[1]),b=f(a[2])),a=f(a[0]),null==b&&(d=b),null==d||null==b){var e=this.getBBox(1);d=e.x+e.width/2,b=e.y+e.height/2;}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,d,b]])),this;}},d.translate=function(a,b){return this.removed?this:(a=c(a).split(n),a.length-1&&(b=f(a[1])),a=f(a[0])||0,b=+b||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=b),this.transform(this._.transform.concat([["t",a,b]])),this);},d.scale=function(a,e,d,b){if(this.removed){return this;}if(a=c(a).split(n),a.length-1&&(e=f(a[1]),d=f(a[2]),b=f(a[3]),isNaN(d)&&(d=null),isNaN(b)&&(b=null)),a=f(a[0]),null==e&&(e=a),null==b&&(d=b),null==d||null==b){var g=this.getBBox(1);}return d=null==d?g.x+g.width/2:d,b=null==b?g.y+g.height/2:b,this.transform(this._.transform.concat([["s",a,e,d,b]])),this._.dirtyT=1,this;},d.hide=function(){return !this.removed&&(this.node.style.display="none"),this;},d.show=function(){return !this.removed&&(this.node.style.display=e),this;},d._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H};},d.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),a.eve.unbind("raphael.*.*."+this.id),a._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var b in this){this[b]="function"==typeof this[b]?a._removedFactory(b):null;}this.removed=!0;}},d.attr=function(b,h){if(this.removed){return this;}if(null==b){var e={};for(var l in this.attrs){this.attrs[j](l)&&(e[l]=this.attrs[l]);}return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e;}if(null==h&&a.is(b,"string")){if(b==m&&"none"==this.attrs.fill&&this.attrs.gradient){return this.attrs.gradient;}for(var o=b.split(n),g={},f=0,i=o.length;i>f;f++){b=o[f],g[b]=b in this.attrs?this.attrs[b]:a.is(this.paper.customAttributes[b],"function")?this.paper.customAttributes[b].def:a._availableAttrs[b];}return i-1?g:g[o[0]];}if(this.attrs&&null==h&&a.is(b,"array")){for(g={},f=0,i=b.length;i>f;f++){g[b[f]]=this.attr(b[f]);}return g;}var c;null!=h&&(c={},c[b]=h),null==h&&a.is(b,"object")&&(c=b);for(var d in c){A("raphael.attr."+d+"."+this.id,this,c[d]);}if(c){for(d in this.paper.customAttributes){if(this.paper.customAttributes[j](d)&&c[j](d)&&a.is(this.paper.customAttributes[d],"function")){var p=this.paper.customAttributes[d].apply(this,[].concat(c[d]));this.attrs[d]=c[d];for(var q in p){p[j](q)&&(c[q]=p[q]);}}}c.text&&"text"==this.type&&(this.textpath.string=c.text),k(this,c);}return this;},d.toFront=function(){return !this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&a._tofront(this,this.paper),this;},d.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper)),this);},d.insertAfter=function(b){return this.removed?this:(b.constructor==a.st.constructor&&(b=b[b.length-1]),b.node.nextSibling?b.node.parentNode.insertBefore(this.node,b.node.nextSibling):b.node.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper),this);},d.insertBefore=function(b){return this.removed?this:(b.constructor==a.st.constructor&&(b=b[0]),b.node.parentNode.insertBefore(this.node,b.node),a._insertbefore(this,b,this.paper),this);},d.blur=function(c){var b=this.node.runtimeStyle,d=b.filter;return d=d.replace(D,e),0!==+c?(this.attrs.blur=c,b.filter=d+h+B+".Blur(pixelradius="+(+c||1.5)+")",b.margin=a.format("-{0}px 0 0 -{0}px",g(+c||1.5))):(b.filter=d,b.margin=0,delete this.attrs.blur),this;},a._engine.path=function(g,d){var c=i("shape");c.style.cssText=x,c.coordsize=b+h+b,c.coordorigin=d.coordorigin;var a=new o(c,d),j={fill:"none",stroke:"#000"};g&&(j.path=g),a.type="path",a.path=[],a.Path=e,k(a,j),d.canvas.appendChild(c);var f=i("skew");return f.on=!0,c.appendChild(f),a.skew=f,a.transform(e),a;},a._engine.rect=function(j,d,e,f,g,h){var i=a._rectPath(d,e,f,g,h),b=j.path(i),c=b.attrs;return b.X=c.x=d,b.Y=c.y=e,b.W=c.width=f,b.H=c.height=g,c.r=h,c.path=i,b.type="rect",b;},a._engine.ellipse=function(f,d,e,b,c){var a=f.path();a.attrs;return a.X=d-b,a.Y=e-c,a.W=2*b,a.H=2*c,a.type="ellipse",k(a,{cx:d,cy:e,rx:b,ry:c}),a;},a._engine.circle=function(e,c,d,b){var a=e.path();a.attrs;return a.X=c-b,a.Y=d-b,a.W=a.H=2*b,a.type="circle",k(a,{cx:c,cy:d,r:b}),a;},a._engine.image=function(l,j,f,g,h,i){var k=a._rectPath(f,g,h,i),b=l.path(k).attr({stroke:"none"}),c=b.attrs,e=b.node,d=e.getElementsByTagName(m)[0];return c.src=j,b.X=c.x=f,b.Y=c.y=g,b.W=c.width=h,b.H=c.height=i,c.path=k,b.type="image",d.parentNode==e&&e.removeChild(d),d.rotate=!0,d.src=j,d.type="tile",b._.fillpos=[f,g],b._.fillsize=[h,i],e.appendChild(d),r(b,1,1,0,0,0),b;},a._engine.text=function(r,j,m,l){var f=i("shape"),n=i("path"),p=i("textpath");j=j||0,m=m||0,l=l||"",n.v=a.format("m{0},{1}l{2},{1}",g(j*b),g(m*b),g(j*b)+1),n.textpathok=!0,p.string=c(l),p.on=!0,f.style.cssText=x,f.coordsize=b+h+b,f.coordorigin="0 0";var d=new o(f,r),s={fill:"#000",stroke:"none",font:a._availableAttrs.font,text:l};d.shape=f,d.path=n,d.textpath=p,d.type="text",d.attrs.text=c(l),d.attrs.x=j,d.attrs.y=m,d.attrs.w=1,d.attrs.h=1,k(d,s),f.appendChild(p),f.appendChild(n),r.canvas.appendChild(f);var q=i("skew");return q.on=!0,f.appendChild(q),d.skew=q,d.transform(e),d;},a._engine.setSize=function(b,c){var d=this.canvas.style;return this.width=b,this.height=c,b==+b&&(b+="px"),c==+c&&(c+="px"),d.width=b,d.height=c,d.clip="rect(0 "+b+" "+c+" 0)",this._viewBox&&a._engine.setViewBox.apply(this,this._viewBox),this;},a._engine.setViewBox=function(d,e,b,c,j){a.eve("raphael.setViewBox",this,this._viewBox,[d,e,b,c,j]);var f,g,h=this.width,i=this.height,k=1/s(b/h,c/i);return j&&(f=i/c,g=h/b,h>b*f&&(d-=(h-b*f)/2/f),i>c*g&&(e-=(i-c*g)/2/g)),this._viewBox=[d,e,b,c,!!j],this._viewBoxShift={dx:-d,dy:-e,scale:k},this.forEach(function(a){a.transform("...");}),this;};var i;a._engine.initWin=function(b){var a=b.document;a.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!a.namespaces.rvml&&a.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),i=function(b){return a.createElement("');};}catch(c){i=function(b){return a.createElement("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');};}},a._engine.initWin(a._g.win),a._engine.create=function(){var g=a._getContainer.apply(0,arguments),f=g.container,d=g.height,e=g.width,k=g.x,l=g.y;if(!f){throw new Error("VML container not found.");}var c=new a._Paper,i=c.canvas=a._g.doc.createElement("div"),j=i.style;return k=k||0,l=l||0,e=e||512,d=d||342,c.width=e,c.height=d,e==+e&&(e+="px"),d==+d&&(d+="px"),c.coordsize=1000*b+h+1000*b,c.coordorigin="0 0",c.span=a._g.doc.createElement("span"),c.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",i.appendChild(c.span),j.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",e,d),1==f?(a._g.doc.body.appendChild(i),j.left=k+"px",j.top=l+"px",j.position="absolute"):f.firstChild?f.insertBefore(i,f.firstChild):f.appendChild(i),c.renderfix=function(){},c;},a.prototype.clear=function(){a.eve("raphael.clear",this),this.canvas.innerHTML=e,this.span=a._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null;},a.prototype.remove=function(){a.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var b in this){this[b]="function"==typeof this[b]?a._removedFactory(b):null;}return !0;};var u=a.st;for(var p in d){d[j](p)&&!u[j](p)&&(u[p]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b);});};}(p));}}}(),ob.was?(b.win.Raphael=a):(Raphael=a),a;});(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var d=b.ui.mouse.prototype,e=d._mouseInit,c;function a(a,d){if(a.originalEvent.touches.length>1){return;}a.preventDefault();var b=a.originalEvent.changedTouches[0],c=document.createEvent("MouseEvents");c.initMouseEvent(d,true,true,window,1,b.screenX,b.screenY,b.clientX,b.clientY,false,false,false,false,0,null);a.target.dispatchEvent(c);}d._touchStart=function(b){var d=this;if(c||!d._mouseCapture(b.originalEvent.changedTouches[0])){return;}c=true;d._touchMoved=false;a(b,"mouseover");a(b,"mousemove");a(b,"mousedown");};d._touchMove=function(b){if(!c){return;}this._touchMoved=true;a(b,"mousemove");};d._touchEnd=function(b){if(!c){return;}a(b,"mouseup");a(b,"mouseout");!this._touchMoved&&a(b,"click");c=false;};d._mouseInit=function(){var a=this;a.element.bind("touchstart",b.proxy(a,"_touchStart")).bind("touchmove",b.proxy(a,"_touchMove")).bind("touchend",b.proxy(a,"_touchEnd"));e.call(a);};})(jQuery);if(!window.jGroupdocs){window.jGroupdocs={};}jGroupdocs.html={toText:function(a){return a&&a.length?a.replace(/||||
/ig,"\n").replace(/
- /ig," * ").replace(/<[^>]+>/ig,""):"";},textWidth:function(d,b){var a=document.createElement("div");a.style.position="absolute";a.style.left="-999em";a.style.whiteSpace="nowrap";a.style.font=b;a.innerHTML=d;document.body.appendChild(a);var c=a.clientWidth;document.body.removeChild(a);return c;}};jSaaspose.utils={getSequenceNumber:function(){var a=1000;return function(){return ++a;};}(),getName:function(a){return a!=null?a.replace(/.*(\/|\\)/,""):"";},getExt:function(a){var b=a!=null?Container.Resolve("PathProvider").getName(a):"";return b.replace(/.*[\.]/,"");},getHexColor:function(a){return"#"+("000000"+(a&&a.toString?a.toString(16):"")).substr(-6);}};(function(a){if(!window.jGroupdocs){window.jGroupdocs={};}jGroupdocs.UndoManager=function(){this._commands=[];this._pendingCommands=[];this._position=-1;this._doing=false;this._redoing=false;};a.extend(jGroupdocs.UndoManager.prototype,{_commands:null,_pendingCommands:null,_position:-1,_doing:false,_redoing:false,canUndo:function(){return !this._doing&&this._position>=0;},canRedo:function(){return !this._doing&&this._position
0){var b=this._pendingCommands.shift();b.executeAsync();this._onExecuting();}else{this._doing=false;this._redoing=false;}},_onUndone:function(){this._position--;this._doing=false;},_onDoUndoFailed:function(){this._pendingCommands.splice(0,this._pendingCommands.length);this._doing=false;this._redoing=false;},_clearRedo:function(){this._commands=this._commands.slice(0,this._position+1);}});jGroupdocs.UndoableCommand=function(){};a.extend(jGroupdocs.UndoableCommand.prototype,{undoCommand:function(){throw up;}});jGroupdocs.AsyncCommand=function(a){jGroupdocs.UndoableCommand.prototype.constructor.apply(this,arguments);this._callbacks=a;};a.extend(jGroupdocs.AsyncCommand.prototype,jGroupdocs.UndoableCommand.prototype,{_callbacks:{onDone:null,onUndone:null,onDoFailed:null,onUndoFailed:null,onIdsFixedUp:null},executeAsync:function(){throw up;},undoAsync:function(){this.undoCommand().executeAsync();},redoAsync:function(){this.executeAsync();},_onDone:function(a){if(this._callbacks.onDone){this._callbacks.onDone(a);}},_onDoFailed:function(a){if(this._callbacks.onDoFailed){this._callbacks.onDoFailed(a);}},_onUndone:function(a){if(this._callbacks.onUndone){this._callbacks.onUndone(a);}},_onUndoFailed:function(a){if(this._callbacks.onUndoFailed){this._callbacks.onUndoFailed(a);}}});})(jQuery);(function(a){a.widget("ui.printable",{options:{contentLoader:null,displayName:null},_viewModel:null,_frame:null,_frameLoaded:false,_fileId:"",_create:function(){this._viewModel=new printableViewModel;},_init:function(){},viewModel:function(){return this._viewModel;},print:function(c,d){this._viewModel.printing(true);if(this._frameLoaded&&this._fileId==c){this._preview();return;}var b=this;this._fileId=c;if(!this._frame||!this._frame.length){this._frame=a("");this._frame.appendTo(this.element);}this.options.contentLoader(c,d,function(c){!b._frameLoaded&&b._frame.load(function(){window.setTimeout(function(){b._preview();},10);b._frameLoaded=true;});var a=b._frame.get(0).contentWindow.document;a.open();a.write(c.data.content);a.close();},function(){});},_preview:function(){this._viewModel.printing(false);this._frame.get(0).contentWindow.focus();this._frame.get(0).contentWindow.print();}});printableViewModel=function(){this._init();};a.extend(printableViewModel.prototype,{printing:null,_init:function(){this.printing=ko.observable(false);}});})(jQuery);$.extend(jSaaspose.PortalService.prototype,{getReviewerContactsAsync:function(){},listAnnotationsAsync:function(c,f,d,e,a,b){var g={connectionId:c,userId:f,privateKey:d,fileId:e};return this._runServiceAsync(this.applicationPath+"document-annotation/ListAnnotations"+this._urlSuffix,g,a,b,false);},createAnnotationAsync:function(e,m,g,l,p,j,f,h,a,i,k,c,o,b,d){var n={connectionId:e,userId:m,privateKey:g,fileId:l,type:p,message:j,pageNumber:f,rectangle:h,annotationPosition:a,textRange:i,svgPath:k,drawingOptions:c,font:o};return this._runServiceAsync(this.applicationPath+"document-annotation/CreateAnnotation"+this._urlSuffix,n,b,d,false);},deleteAnnotationAsync:function(d,g,e,f,b,a,c){var h={connectionId:d,userId:g,privateKey:e,fileId:f,annotationGuid:b};return this._runServiceAsync(this.applicationPath+"document-annotation/DeleteAnnotation"+this._urlSuffix,h,a,c,false);},addAnnotationReplyAsync:function(e,i,f,h,c,g,a,b,d){var j={connectionId:e,userId:i,privateKey:f,fileId:h,annotationGuid:c,message:g,parentReplyGuid:a};return this._runServiceAsync(this.applicationPath+"document-annotation/AddAnnotationReply"+this._urlSuffix,j,b,d,false);},deleteAnnotationReplyAsync:function(d,h,e,g,b,f,a,c){var i={connectionId:d,userId:h,privateKey:e,fileId:g,annotationGuid:b,replyGuid:f};return this._runServiceAsync(this.applicationPath+"document-annotation/DeleteAnnotationReply"+this._urlSuffix,i,a,c,false);},editAnnotationReplyAsync:function(d,i,e,h,b,f,g,a,c){var j={connectionId:d,userId:i,privateKey:e,fileId:h,annotationGuid:b,replyGuid:f,message:g};return this._runServiceAsync(this.applicationPath+"document-annotation/EditAnnotationReply"+this._urlSuffix,j,a,c,false);},restoreAnnotationRepliesAsync:function(d,f,b,e,a,c){var g={connectionId:d,fileId:f,annotationGuid:b,replies:e};return this._runServiceAsync(this.applicationPath+"document-annotation/RestoreAnnotationReplies"+this._urlSuffix,g,a,c,false);},viewAnnotatedDocumentAsync:function(h,e,l,n,i,j,m,f,g,a,c,d,b){var k={userId:h,privateKey:e,guid:l,width:j,quality:f,usePdf:g,preloadPagesCount:i,watermarkText:a.text,watermarkColor:a.color,watermarkPosition:a.position,watermarkFontSize:a.fontSize};this._runServiceAsync(this.applicationPath+this.urlPrefix+"/ViewDocument"+this._urlSuffix,k,c,d,b!=null?b:true);},moveAnnotationMarkerAsync:function(d,h,f,g,b,j,k,e,a,c){var i={connectionId:d,userId:h,privateKey:f,fileId:g,annotationGuid:b,left:j,top:k,pageNumber:e};return this._runServiceAsync(this.applicationPath+"document-annotation/MoveAnnotationMarker"+this._urlSuffix,i,a,c,false);},saveTextFieldAsync:function(d,i,f,h,b,k,e,g,a,c){var j={connectionId:d,userId:i,privateKey:f,fileId:h,annotationGuid:b,text:k,fontFamily:e,fontSize:g};return this._runServiceAsync(this.applicationPath+"document-annotation/SaveTextField"+this._urlSuffix,j,a,c,false);},setTextFieldColorAsync:function(d,h,e,g,b,f,a,c){var i={connectionId:d,userId:h,privateKey:e,fileId:g,annotationGuid:b,fontColor:f};return this._runServiceAsync(this.applicationPath+"document-annotation/SetTextFieldColor"+this._urlSuffix,i,a,c,false);},setAnnotationBackgroundColorAsync:function(d,e,b,f,a,c){var g={connectionId:d,fileId:e,annotationGuid:b,color:f};return this._runServiceAsync(this.applicationPath+"document-annotation/SetAnnotationBackgroundColor"+this._urlSuffix,g,a,c,false);},resizeAnnotationAsync:function(d,h,e,f,b,i,g,a,c){var j={connectionId:d,userId:h,privateKey:e,fileId:f,annotationGuid:b,width:i,height:g};return this._runServiceAsync(this.applicationPath+"document-annotation/ResizeAnnotation"+this._urlSuffix,j,a,c,false);},exportAnnotationsAsync:function(d,e,a,g,b,c){var f={connectionId:d,fileId:e,format:a,mode:g};console.log(a);return this._runServiceAsync(this.applicationPath+"document-annotation/ExportAnnotations"+this._urlSuffix,f,b,c,false);},importAnnotationsAsync:function(g,e,d,f,a,b,c){var h={connectionId:d,fileGuid:f,userId:g,privateKey:e,saveCurrentAnnotations:a};return this._runServiceAsync(this.applicationPath+"document-annotation/ImportAnnotations"+this._urlSuffix,h,b,c,false);},getPdfVersionOfDocumentAsync:function(c,d,a,b){var e={connectionId:c,fileId:d};return this._runServiceAsync(this.applicationPath+"document-annotation/GetPdfVersionOfDocument"+this._urlSuffix,e,a,b,false);},addDocumentReviewerAsync:function(i,g,h,f,b,c,a,d,e){var j={userId:i,privateKey:g,fileId:h,reviewerEmail:f,reviewerFirstName:b,reviewerLastName:c,reviewerInvitationMessage:a};return this._runServiceAsync(this.applicationPath+"document-annotation/AddDocumentReviewer",j,d,e,false);},getDocumentCollaboratorsAsync:function(e,c,d,a,b){var f={userId:e,privateKey:c,fileId:d};return this._runServiceAsync(this.applicationPath+"document-annotation/GetDocumentCollaborators"+this._urlSuffix,f,a,b,false);},getDocumentCollaboratorsSync:function(f,d,e){var a=null,g={userId:f,privateKey:d,fileId:e},b=function(b){a=b;},c=function(b){a={error:b};};this._runService(this.applicationPath+"document-annotation/GetDocumentCollaborators"+this._urlSuffix,g,false,b,c,false);return a;},setReviewerContactsAsync:function(){},getFile:function(a,b){var e={fileId:a};b({fileId:a,url:this.applicationPath+this.urlPrefix+"/GetFile"+this._urlSuffix+"?path="+a});},getDocumentPrintViewAsync:function(c,e,d,a,b){var f={connectionId:c,fileId:e,options:d};return this._runServiceAsync(this.applicationPath+"document-annotation/GetPrintView"+this._urlSuffix,f,a,b,false);}});(function(a,b){var c={Name:"[email protected]",DisplayName:"guest"},d={ago:"ago",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",day:"day",days:"days",week:"week",weeks:"weeks",lessThanAMinuteAgo:"less than a minute ago"};AnnotationReply=function(b,a){this._init(b,a||new Date);};a.extend(AnnotationReply.prototype,{guid:null,index:-1,text:null,repliedOn:null,userGuid:null,userName:null,parentReply:null,replyLevel:0,baseAvatarUrl:null,avatarUrl:null,childReplies:null,_init:function(g,t){this.guid=ko.observable(g.guid);this.repliedOn=g.repliedOn;var r=new Date(this.repliedOn),u=t,h=u.getTime()-r.getTime();h=h>0?h:0;var e=Math.floor(h/1000/60/60/24);h-=e*1000*60*60*24;var b=Math.floor(h/1000/60/60);h-=b*1000*60*60;var i=Math.floor(h/1000/60);h-=i*1000*60;if(b>0){if(i>15&&i<45){b+=0.5;}if(i>=45){b+=1;if(b>=24){e+=1;}}}var f=a.extend(true,{},d,window.localizedStrings||{}),j=f.ago,m=f.hour,k=f.hours,n=f.day,l=f.days,q=f.week,o=f.weeks;if(e<7){if(e==0){if(b==0){if(i==0){this.displayDateTime=f.lessThanAMinuteAgo;}else{var s=f.minute,p=f.minutes;this.displayDateTime=window.jGroupdocs.stringExtensions.format("{0} {1} {2}",i,i==1?s:p,j);}}else{this.displayDateTime=window.jGroupdocs.stringExtensions.format("{0} {1} {2}",b,b==1?m:k,j);}}else{this.displayDateTime=window.jGroupdocs.stringExtensions.format("{0} {1} {2} {3} {4}",e,e==1?n:l,b,b==1?m:k,j);}}else{this.displayDateTime=window.jGroupdocs.stringExtensions.format("{0} {1} {2} {3} {4}",Math.floor(e/7),Math.floor(e/7)==1?q:o,e%7,e%7==1?n:l,j);}this.userGuid=g.userGuid;this.userName=g.userName==c.Name?c.DisplayName:g.userName||c.DisplayName;this.text=ko.observable(g.text);this.parentReplyGuid=ko.observable(g.parentReplyGuid);this.replyLevel=g.replyLevel;this.avatarUrl=g.isAvatarExist===false?null:this.baseAvatarUrl+g.userGuid;this.childReplies=ko.observableArray([]);this.isEmpty=ko.computed(function(){return !(this.guid()&&this.guid().length);},this);},clone:function(){return new AnnotationReply(ko.toJS(this),new Date);},restore:function(a){if(!a||a.guid()!=this.guid()){return false;}this.text(a.text());return true;}});Annotation=function(a,b){this._init(a,b);};a.extend(Annotation.prototype,{guid:null,creatorGuid:null,type:null,access:null,bounds:null,displayBounds:null,annotationPosition:null,annotationOriginalTextBoxDisplayPosition:null,annotationSideIconDisplayPosition:null,textRange:null,createdOn:null,documentGuid:null,sessionGuid:null,comments:null,replies:null,activeReply:null,activeReplyData:null,svgPath:null,displaySvgPath:null,connectingLine:null,annotationIsPublic:null,startingPoint:null,text:null,fontSize:null,fontFamily:null,isBeingDeleted:null,fontColor:null,penColor:null,penWidth:null,penStyle:null,backgroundColor:null,selectionCounter:null,connectorPosition:0,AnnotationType:{None:-1,Text:0,Area:1,Point:2,TextStrikeout:3,Polyline:4,TextField:5,Watermark:6,TextReplacement:7,TextRemoval:8,Arrow:9,TextRedaction:10,ResourcesRedaction:11,TextUnderline:12,Distance:13},AnnotationExportMode:{Append:0,TrackChanges:1},AnnotationAccess:{Public:0,Private:1},ConnectorPosition:{Middle:0,Bottom:1},_init:function(c,d){this.guid=c.guid;this.type=c.type;this.access=c.access;this.pageNumber=c.pageNumber;this.bounds=ko.observable(new jSaaspose.Rect(c.box.x,c.box.y,c.box.x+c.box.width,c.box.y+c.box.height,false));this.displayBounds=ko.observable(new jSaaspose.Rect(0,0,0,0));this.annotationPosition=ko.observable(new jSaaspose.Point(c.annotationPosition.x,c.annotationPosition.y));this.annotationOriginalTextBoxDisplayPosition=ko.observable(new jSaaspose.Point(0,0));this.annotationSideIconDisplayPosition=ko.observable(new jSaaspose.Point(0,0));this.createdOn=c.createdOn;this.documentGuid=c.documentGuid;this.sessionGuid=c.sessionGuid;this.replies=ko.observableArray([]);this.comments=ko.observableArray([]);this.activeReply=ko.observable(-1);this.svgPath=c.svgPath;this.displaySvgPath="";this.annotationIsPublic=ko.observable(c.access==Annotation.prototype.AnnotationAccess.Public);this.creatorGuid=c.creatorGuid;this.startingPoint=c.startingPoint;this.text=c.fieldText;this.fontFamily=c.fontFamily;this.fontSize=c.fontSize;this.isBeingDeleted=ko.observable(false);this.fontColor=ko.observable(c.fontColor||0);this.selectionCounter=c.selectionCounter;this.penColor=c.penColor||(c.drawingOptions?c.drawingOptions.penColor:b);this.penWidth=c.penWidth||(c.drawingOptions?c.drawingOptions.penWidth:b);this.penStyle=c.penStyle||(c.drawingOptions?c.drawingOptions.penStyle:b);this.backgroundColor=ko.observable(c.backgroundColor||(c.drawingOptions?c.drawingOptions.brushColor:b));if(c.range){this.textRange={position:c.range.position,length:c.range.length};}this.commentsEnabled=this.type!=Annotation.prototype.AnnotationType.TextStrikeout&&this.type!=Annotation.prototype.AnnotationType.TextField&&this.type!=Annotation.prototype.AnnotationType.Watermark;this.sortReplies(c.replies,d);this.replyCount=ko.computed(function(){return a.grep(this.replies(),function(a){return !a.isEmpty();}).length;},this);this.activeReply.subscribe(function(b){var a=this.getReplyAt(b);if(a){this.activeReplyData=a.clone();}},this);},boundingBox:function(){if(this.bounds().top()<0){this.bounds().setTop(0);this.bounds(this.bounds());}if(this.svgPath&&this.svgPath.length>0&&(this.type==Annotation.prototype.AnnotationType.Text||this.type==Annotation.prototype.AnnotationType.TextReplacement||this.type==Annotation.prototype.AnnotationType.TextRedaction)){var c=JSON.parse(this.svgPath);if(a.isArray(c)==false){return this.bounds();}for(var b=new jSaaspose.Rect(c[0].x,c[0].y,0,0),d=1;d0&&!this.replies()[a-1].guid()){this.replies()[a-1].index++;this.activeReply()>=a-1&&this.activeReply(this.activeReply()+1);c.index=a-1;this.replies.splice(-1,0,c);}else{this.pushReply(c);this.deactivateActiveReply();}return c;},getActiveReply:function(){var a=this.activeReply();return this.getReplyAt(a);},setActiveReply:function(c){var b=a.inArray(c,this.replies());this.activeReply(b);},setActiveReplyIndex:function(a){this.activeReply(a);},getReplyAt:function(a){return a<0||a>=this.replies().length?null:this.replies()[a];},updateReply:function(b,c){var a=this.findReply(b);a&&a.text(c);},deleteAllReplies:function(){this.replies.removeAll();},makeEmpty:function(){var a=new AnnotationReply({text:"",repliedOn:"",userName:""});this.replies([a]);},findReply:function(b){for(var a=0;a0){for(var e=b.pop(),c=0;c").appendTo(this._containerElement).addClass("raphaelWrapper");this._canvas=Raphael(b[0],"100%","100%");}return this._canvas;},setFileId:function(a){this.fileId=a;},listAnnotations:function(){this._model.listAnnotations(this.fileId,function(a){this._onAnnotationsReceived(a.data);}.bind(this),function(a){this._onError(a);}.bind(this));},removeActiveAnnotation:function(){var a=this.activeAnnotation();!a.isBeingDeleted()&&this.removeAnnotation(a);},removeAnnotation:function(a){if(a.guid==null){return;}a.isBeingDeleted&&a.isBeingDeleted(true);var d=a.bounds(),f=a.annotationPosition(),c=a.guid,b=a.getActiveReply(),g={creatorGuid:this.userId,guid:a.guid,type:a.type,fieldText:a.fieldText,pageNumber:a.pageNumber,box:d?{x:d.left(),y:d.top(),width:d.width(),height:d.height()}:null,annotationPosition:f?{x:f.x,y:f.y}:null,range:a.range,svgPath:a.svgPath,drawingOptions:a.drawingOptions,replies:a.replies(),access:a.access,startingPoint:a.startingPoint,selectionCounter:a.selectionCounter},e=a.getReplyDescendants(null),h=new DeleteAnnotationCommand(this._model,this.fileId,g,{onDone:function(){a.isBeingDeleted(false);if(b!=null&&b.initialText!=null&&b.initialText.length>=0){b.text(b.initialText);b.initialText=null;}this._onAnnotationRemoved(a);}.bind(this),onDoFailed:this._onError.bind(this),onUndone:function(b){c=g.guid=b.data.annotationGuid;a.guid=c;this._addAnnotation(a);this.activeAnnotation(a);}.bind(this),onUndoFailed:this._onError.bind(this),onIdsFixedUp:function(b){if(c==b.oldId){c=b.newId;a.guid=c;}else{for(var d=0;dp-q){e.x=(p-q-r-H.offsetX)/m;if(b){var c=b.getBBox(false),D=new jSaaspose.Rect(c.x,c.y,c.x+c.width,c.y+c.height),F=this.getSelectableInstance(),o=b.getPointAtLength(0);k=new jSaaspose.Point(o.x,o.y);var A=F.convertRectToAbsoluteCoordinates(D,k);e.y=A.bottom()+v/m;}else{e.y=n.y+n.height+v;}}var I=this,w=null;if(s!=null&&u!=null){w={position:s,length:u};}if(l&&l.length){var h=[],j=this.unscaledPageHeight;a.each(l,function(){h.push({x:this.left(),y:j-this.top()});h.push({x:this.right(),y:j-this.top()});h.push({x:this.left(),y:j-this.bottom()});h.push({x:this.right(),y:j-this.bottom()});});t=JSON.stringify(h);}var d=null,f="",x={guid:"",type:y,fieldText:G,pageNumber:E,box:n,annotationPosition:e,range:w,svgPath:t,drawingOptions:B,fontFamily:i?i.family:null,fontSize:i?i.size:null},C=new CreateAnnotationCommand(this._model,this.fileId,x,{onDone:function(c){f=c.data.annotationGuid;d=new Annotation(a.extend(x,{guid:f,replies:[],creatorGuid:this.userId,access:Annotation.prototype.AnnotationAccess.Public,startingPoint:k,selectionCounter:z}));this.updateAnnotationDisplayPosition(d);this._onAnnotationCreated(d,b);}.bind(this),onDoFailed:this._onError.bind(this),onUndone:function(){this._onAnnotationRemoved(d);f="";b=null;}.bind(this),onUndoFailed:this._onError.bind(this),onIdsFixedUp:function(a){f=d.guid=a.newId;d=this.findAnnotation(f);b=null;}.bind(this)});this._undoRedo.executeAsync(C);},_onAnnotationCreated:function(c,e){if(!c.commentsEnabled){this.annotations.push(c);a(this).trigger("onAnnotationCreated",[c]);return;}c.addReply(this.userId,this.userName);this.annotations.push(c);this.preventIconsFromOverlapping();var d=c.backgroundColor();c.selectionCounter=this.selectTextInRect(c.bounds(),this.markerClickHandler.bind(this,c),c.pageNumber,c.selectionCounter,d&&d!==b?this.getRgbColorFromInteger(d):null,{mouseenter:function(){this.hoveredAnnotation(c);}.bind(this),mouseleave:function(){this.hoveredAnnotation(null);}.bind(this)});this.createConnectingLineAndIcon(c);this.activeAnnotation(c);a(this).trigger("onAnnotationCreated",[c,e]);c.activeReply(0);},createClickHandler:function(b,c){a(b).click(this.markerClickHandler.bind(this,c));},editAnnotationReply:function(f,g){var b=this.findAnnotation(f),a=b.findReply(g),d=a.text(),c=b.activeReplyData.text(),e=new EditAnnotationReplyCommand(this._model,this.fileId,b,{onDone:function(){a.text(d);}.bind(this),onUndone:function(){a.text(c);}.bind(this),onDoFailed:function(){a.text(c);this._onError.bind(this);}.bind(this),onUndoFailed:this._onError.bind(this)},a,d,c);this._undoRedo.executeAsync(e);},restoreAnnotationReplies:function(a,b){this._model.restoreAnnotationReplies(this.fileId,a,b,function(){}.bind(this),this._onError.bind(this));},deleteAnnotationReply:function(d,c){var b=this.findAnnotation(d),e=b.findReply(c),a=b.getReplyDescendants(c);deleteReplyCommand=new DeleteAnnotationReplyCommand(this._model,this.fileId,b,{onDone:function(a){this._onAnnotationReplyRemoved(a);}.bind(this),onUndone:function(){this._onAnnotationReplyAdded(b,e,true,true);for(var c=0;c1||a.length==1&&a[0].guid())&&b.replies.remove(c);a.length==1&&!a[0].guid()&&c.text("");this.disconnectUncommented&&b.replyCount()==0&&b.removeConnectingLine();},addAnnotationReply:function(d,a,f){if(d.guid&&a&&a.text().length){var c=a.guid()||"",e=d.guid,g=new CreateAnnotationReplyCommand(this._model,this.fileId,d,{onDone:function(e){a.guid(e.data.replyGuid);a.repliedOn=e.data.repliedOn;var g=c!=null&&c!==b&&c.length>0&&c!=a.guid();c=a.guid();this._onAnnotationReplyAdded(d,a,f,g);}.bind(this),onUndone:function(a){this._onAnnotationReplyRemoved(a);}.bind(this),onIdsFixedUp:function(a){if(c==a.oldId){c=a.newId;d.findReply(c);}else{if(e==a.oldId){e=a.newId;d=this.findAnnotation(e);}}}.bind(this),onDoFailed:this._onError.bind(this),onUndoFailed:this._onError.bind(this)},a);this._undoRedo.executeAsync(g);}},commitAnnotationReplyOnBlur:function(b,a,c){if(this.saveReplyOnFocusLoss){return this.commitAnnotationReply(b,a,c);}},activateComment:function(elem,root,reply){if(elem.text()==""){root.activeAnnotation().activeReply(reply);}},commitAnnotationReply:function(b,c,d){var a=d;if(!a){a=b.getActiveReply();}if(a){b.deactivateActiveReply();if(a.guid()&&a.guid().length){var e=jGroupdocs.html.toText(a.text());this.editAnnotationReply(b.guid,a.guid(),e);}else{this.addAnnotationReply(b,a,c);}}},activateAnnotationReply:function(a,b){var c=a.getReplyAt(b);c&&c.userName==this.userName&&a.activeReply(b);},exportAnnotations:function(){this.exportingAnnotationsProgress.modal("show");this._model.exportAnnotations(this.fileId,"Pdf",Annotation.prototype.AnnotationExportMode.Append,function(a){if(a.success){this._onExportJobScheduled(a.jobId);}else{this.exportingAnnotationsProgress.modal("hide");this._onError({Reason:a.error});}}.bind(this),function(a){this._onError(a);});},chooseImportFormat:function(){this.choosingImportFormat.modal("show");},importAnnotations:function(a){this.importDocumentAnnotations(this.fileId,a);},importDocumentAnnotations:function(a,b){this.choosingImportFormat&&this.choosingImportFormat.modal("hide");this.importingAnnotationsProgress&&this.importingAnnotationsProgress.modal("show");this._model.importAnnotations(a,b,function(a){if(a.success){this._onAnnotationsImported(a);}else{this.importingAnnotationsProgress.modal("hide");this._onError({Reason:a.error});}}.bind(this),function(a){this._onError(a);}.bind(this));},_onAnnotationsImported:function(){this.importingAnnotationsProgress.modal("hide");},getPdfVersionOfDocument:function(){this.exportingAnnotationsProgress.modal("show");this._model.getPdfVersionOfDocument(this.fileId,function(a){if(a.success){this._onExportJobScheduled(a.jobId);}else{this.exportingAnnotationsProgress.modal("hide");this._onError({Reason:a.error});}}.bind(this),function(a){this._onError(a);});},setAnnotationMode:function(b){var a=this.getSelectable();if(a!=null){a.dvselectable("setMode",b);a.dvselectable("setTextSelectionMode",this.textSelectionByCharModeEnabled);}},setTextAnnotationMode:function(){this.setAnnotationMode(a.ui.dvselectable.prototype.SelectionModes.SelectText);this.annotationModeObservable(Annotation.prototype.AnnotationType.Text);},setAreaAnnotationMode:function(){this.setAnnotationMode(a.ui.dvselectable.prototype.SelectionModes.SelectRectangle);this.annotationModeObservable(Annotation.prototype.AnnotationType.Area);},setPointAnnotationMode:function(){this.setAnnotationMode(a.ui.dvselectable.prototype.SelectionModes.ClickPoint);this.annotationModeObservable(Annotation.prototype.AnnotationType.Point);},setStrikeoutTextMode:function(){this.setAnnotationMode(a.ui.dvselectable.prototype.SelectionModes.SelectTextToStrikeout);this.annotationModeObservable(Annotation.prototype.AnnotationType.TextStrikeout);},setPolylineAnnotationMode:function(){this.setAnnotationMode(a.ui.dvselectable.prototype.SelectionModes.TrackMouseMovement);this.annotationModeObservable(Annotation.prototype.AnnotationType.Polyline);},setTextFieldAnnotationMode:function(){this.setAnnotationMode(a.ui.dvselectable.prototype.SelectionModes.SelectRectangle);this.annotationModeObservable(Annotation.prototype.AnnotationType.TextField);},setWatermarkAnnotationMode:function(){this.setAnnotationMode(a.ui.dvselectable.prototype.SelectionModes.SelectRectangle);this.annotationModeObservable(Annotation.prototype.AnnotationType.Watermark);},setHandToolMode:function(){this.setAnnotationMode(this.textSelectionEnabled===true?a.ui.dvselectable.prototype.SelectionModes.SelectText:a.ui.dvselectable.prototype.SelectionModes.DoNothing);this.annotationModeObservable(null);},addAnnotationFromAnotherUser:function(a){var b=new Annotation({pageNumber:a.pageNumber,box:a.box,annotationPosition:a.annotationPosition,documentGuid:this.fileId,guid:a.annotationGuid,replies:[],type:a.annotationType,svgPath:a.svgPath,creatorGuid:a.userGuid,access:a.access,penColor:a.drawingOptions?a.drawingOptions.penColor:null,penWidth:a.drawingOptions?a.drawingOptions.penWidth:null,penStyle:a.drawingOptions?a.drawingOptions.penStyle:null,backgroundColor:a.drawingOptions?a.drawingOptions.brushColor:null,fontSize:a.font?a.font.size:null,fontFamily:a.font?a.font.family:null},new Date(a.serverTime));this.updateAnnotationDisplayPosition(b);this.annotations.push(b);if(b.commentsEnabled){b.addReply(this.userId,this.userName);this.preventIconsFromOverlapping();(b.type==Annotation.prototype.AnnotationType.Text||b.type==Annotation.prototype.AnnotationType.TextReplacement)&&this.selectTextForAnnotation(b);this.createConnectingLineAndIcon(b);}return b;},findAnnotation:function(c){for(var b=null,a=0;a=0&&a0){var a=this.annotations()[0];this.deleteAnnotationOnClient(a.guid);}},deleteAnnotationOnClient:function(c){for(var b=0;b=i){continue;}var e=new Annotation(b.annotations[d],new Date(b.serverTime));this._onAnnotationReceived(e);c.push(e);}}if(g){c=this.annotations().concat(c);}else{this._clearAnnotations();}this.annotations(c);this.preventIconsFromOverlapping();a(this).trigger("onAnnotationsReceived",[c]);},_onAnnotationReceived:function(b){this.updateAnnotationDisplayPosition(b);if(b.commentsEnabled){if(b.replies().length==0){b.addReply(this.userId,this.userName);b.setActiveReplyIndex(0);}else{b.setActiveReplyIndex(-1);}(b.type==Annotation.prototype.AnnotationType.Text||b.type==Annotation.prototype.AnnotationType.TextReplacement)&&this.selectTextForAnnotation(b);this.createConnectingLineAndIcon(b);}a(this).trigger("onAnnotationReceived",[b]);},_addAnnotation:function(b){this._onAnnotationReceived(b);this.annotations.push(b);this.preventIconsFromOverlapping();a(this).trigger("onAnnotationsReceived",[b]);},_clearAnnotations:function(){for(var c=this.annotations(),b=0;bf){f=d.bottom();}}var j=f-b;g=Math.round(b-(h-j)/2);e=Math.round(b+j/2);}else{if(this.connectorPosition==Annotation.prototype.ConnectorPosition.Middle){g=Math.round(a.top()-(h-a.height())/2);e=Math.round(a.top()+a.height()/2);}else{var l=c.type==Annotation.prototype.AnnotationType.Point?14:(c.penWidth||1)/2-1,k=Math.max(a.top(),a.bottom());g=Math.round(k-h/2+l);e=Math.round(k+l);}}return{iconTop:g,iconMiddle:e};},getAnnotationSideIconLeft:function(){var a=this.iconHeight;return Math.round(this.pageWidth()+this.imageHorizontalMargin-a);},setupRemoveAnnotationMenu:function(b){a("html").click(function(){b.remove();return false;});},setZoom:function(b){var a=this.activeAnnotation();this.activeAnnotation(null);this.redrawScreenWhenZooming(b);this.fullSynchronization&&this.isZoomBroadcastEnabled&&this.isMasterOfBroadcast&&this.broadcastDocumentScale();this.activeAnnotation(a);},broadcastDocumentScale:function(){var b=this.pageHeight()/this.documentSpace[0].clientHeight*100;a.connection.annotationHub.server.broadcastDocumentScale(this.userId,this.userKey,this.fileId,b);},redrawScreenWhenZooming:function(a){docViewerViewModel.prototype.setZoom.call(this,a,true);this.redrawWorkingArea();},resizePagesToWindowSize:function(){if(this.embeddedAnnotation&&this.fullSynchronization&&this.isMasterOfBroadcast){var a=this.getImageWidthWithoutRightPanel();if(a!=this.initialWidth){var b=this.zoom();this.initialWidth=a;this.pageImageWidth=a;docViewerViewModel.prototype.setZoom.call(this,b,true);}}},redrawWorkingArea:function(){this.reInitSelectable();this.recalculatePageLeft();for(var d=this.annotations().length,b=0;b0,d=(a&16)>0,e=(a&8)>0,c=(a&4)>0,b=(a&2)>0,g=(a&1)>0;this.canRedact(f);this.canDelete(d);this.canExport(e);this.canDownload(c);this.canAnnotate(b);this.canView(g);},setDocumentCollaborators:function(e,c){c&&this.newCollaborator(c);if(this.newCollaborator()!=""){this.busyAddingReviewer(true);for(var a=[],f,d,b=0;b0);l=ko.observable((c&16)>0);m=ko.observable((c&8)>0);k=ko.observable((c&4)>0);j=ko.observable((c&2)>0);o=ko.observable((c&1)>0);h=false;}a.guid==f.userId&&f._setAccessRights(c>0?c:-1);var r={emailAddress:i,displayName:d,color:ko.observable(a.color==null?f.getDefaultColor():a.color),id:a.id,guid:a.guid,canAnnotate:j,canDownload:k,canView:o,canExport:m,canDelete:l,canRedact:n,isOwner:h,avatar:a.avatar,avatarUrl:f.baseAvatarUrl+a.guid};if(h){g.splice(0,0,r);}else{g.push(r);}});function e(){return true;}if(!q&&b){if(b.firstName!=null&&b.lastName!=null&&b.firstName!=""&&b.lastName!=""){d=b.firstName+" "+b.lastName;}else{d=b.primary_email;}g.splice(0,0,{emailAddress:b.primary_email,displayName:d+p,color:ko.observable(b.color==null?f.getDefaultColor():b.color),id:null,guid:b.guid,canAnnotate:e,canDownload:e,canView:e,canExport:e,canDelete:e,canRedact:e,isOwner:true,avatarUrl:f.baseAvatarUrl+b.guid});}this._collaborators(g);},getReviewerContacts:function(){this.fileId&&!this.anonymousAnnotation&&this._model.getReviewerContacts(function(e){var d=[];a.each(e.data.reviewerContacts,function(b,a){d.push({emailAddress:a.emailAddress,firstName:a.firstName==null?"":a.firstName,lastName:a.lastName==null?"":a.lastName});});this.reviewerContacts(d);for(var c=[],b=0;b0){var c=a[a.length-1].userGuid;return this.getRgbColorOfReviewer(c);}else{return"#"+this.getDefaultColor().toString();}},getDefaultColor:function(){return 1201033;},getLastReplyText:function(b){var a=b.replies();if(a.length>0){var c=a[a.length-1].text();return(typeof c=="undefined"?"":jGroupdocs.html.toText(c));}else{return"";}},_getReviewerColor:function(c){var b=this.findCollaborator(c),a;if(b==null){a=this.getDefaultColor();}else{a=b.color();if(a==null){a=this.getDefaultColor();}}return a;},_getHexReviewerColor:function(a){var b=this._getReviewerColor(a);return jSaaspose.utils.getHexColor(b);},getRgbColorOfReviewer:function(a){var b=this._getReviewerColor(a);return this.getRgbColorFromInteger(b);},getRgbColorFromInteger:function(a){return isNaN(a)?"rgb(255, 255, 255)":"rgb("+(a>>16&255)+","+(a>>8&255)+","+(a&255)+")";},setReviewerRights:function(){this.busySavingReviewerRights(true);for(var c=[],b=0;b0&&g.tinyscrollbar_update("relative");},setReviewersColorsOnClient:function(b){for(var a=0;a0);a.canDelete((b&16)>0);a.canExport((b&8)>0);a.canDownload((b&4)>0);a.canAnnotate((b&2)>0);a.canView((b&1)>0);a.guid==this.userId&&this._setAccessRights(b);}}},triggerOnReviewerColorsChanged:function(){a(this).trigger("onReviewerColorsChanged",[]);},preventIconsFromOverlapping:function(){this.annotations.sort(function(d,c){var b=d.annotationOriginalTextBoxDisplayPosition().y,a=c.annotationOriginalTextBoxDisplayPosition().y;return b>a?1:b=c+d){a.annotationSideIconDisplayPosition().y=a.annotationOriginalTextBoxDisplayPosition().y;}else{b=d;a.annotationSideIconDisplayPosition().y=c+b;}}}c=a.annotationSideIconDisplayPosition().y;f=a.annotationOriginalTextBoxDisplayPosition().y;a.annotationSideIconDisplayPosition().x=a.annotationOriginalTextBoxDisplayPosition().x;a.annotationSideIconDisplayPosition(a.annotationSideIconDisplayPosition());this.createConnectingLineAndIcon(a,false);}},getImageWidthWithoutRightPanel:function(){var a,c=this.rightSideElement.children(":visible");if(this.isRightPanelEnabled){a=Math.round(c.width());}else{a=0;}var b=68;if(this.embeddedAnnotation&&this.fullSynchronization){if(this.isRightPanelEnabled){a*=2;b*=2;}else{b=40;}}return this.documentSpace.width()-a-b;},setImageWidthWithoutRightPanel:function(){var a=null;if(this.embeddedAnnotation){var b=this.getImageWidthWithoutRightPanel();a=b/this.pageImageWidth*100;}return a;},setDocumentScroll:function(a){var b=this.documentSpace[0];b.scrollTop=a;},scrollToVisible:function(c){var a=null;if(this.scrollOnFocus&&c.annotationSideIconDisplayPosition&&(a=c.annotationSideIconDisplayPosition())!=null){var e=c.replyCount()>0?165:190,d=Math.max(a.y-e,0),b=this.documentSpace[0];(a.yb.scrollTop+b.clientHeight)&&this.setDocumentScroll(d);}},setupChromeMouseWheelHandler:function(){var i=/chrom(e|ium)/.test(navigator.userAgent.toLowerCase());if(!i){return;}var b=this,c=0,d=false,f=0,e=0;function g(i){var h=0,g=i;if(i.originalEvent){g=i.originalEvent;}if(!g){g=window.event;}if(g.wheelDelta){h=g.wheelDelta/120;}else{if(g.detail){h=-g.detail/3;}}if(h&&c>0){var j=b.documentSpace.scrollTop();j-=h*c;j=0?this.annotations()[0]:this.annotations()[b-1];}this.activeAnnotation(a);return a;}});a.widget("ui.docAnnotationViewer",a.ui.docViewer,{_create:function(){a.ui.docViewer.prototype._create.call(this);var b=this.getViewModel();ko.bindingHandlers.makeDraggable={init:function(c,b){b()&&a(c).draggable(b());}};ko.bindingHandlers.htmlValue={init:function(b,g,f){function c(h){var e=g(),d=a(b).html();if(ko.isWriteableObservable(e)){e(d);}else{var c=f();c._ko_property_writers&&c._ko_property_writers.htmlValue&&c._ko_property_writers.htmlValue(d);}if(h){a(b).trigger("koValueUpdatedOnToolbar");}else{a(b).trigger("koValueUpdated",b);}}function d(){c(false);}function e(){c(true);}ko.utils.registerEventHandler(b,"clickoutside",d);ko.utils.registerEventHandler(b,"clickoutsideOnToolbar",e);ko.utils.registerEventHandler(b,"blur",c);ko.utils.registerEventHandler(b,"keyup",c);ko.utils.registerEventHandler(b,"input",c);},update:function(e,f){var b=ko.utils.unwrapObservable(f())||"",c=b&&b.length?b.replace(/\n/g,"
"):"";if(c!=e.innerHTML){e.innerHTML=c;}var d=a("#comments_scroll, .comments_scroll");d.length>0&&d.tinyscrollbar_update("relative");}};a(document).bind("mousedown",function(d){var c=a(document.activeElement),b=d&&d.target||d&&d.srcElement,f=a(".text_area_toolbar").has(c),e=f.length>0;if(b!=document.activeElement&&(c.is("input")||c.is("textarea")||c.is("[contenteditable='true']")||e)&&!a(b).is(".annotationButton")&&!a(b).is(".ta_resize_box")&&!(e&&f.parent().has(b).length>0&&a(b).is(".doc_text_area_text"))){if(a(".text_area_toolbar").has(b).length==0){c.trigger("clickoutside");}else{c.trigger("clickoutsideOnToolbar");}}var g=a(".text_area_toolbar:visible");a(".text_area_toolbar").has(b).length==0&&!a(b).is(".doc_text_area_text")&&g.trigger("clickoutside");return true;});},_createViewModel:function(){return new annotationViewModel(this.options);}});})(jQuery);jGroupdocs.AnnotationUndoManager=function(){jGroupdocs.UndoManager.prototype.constructor.apply(this,arguments);this.canRedoObservable=ko.observable(false);this.canUndoObservable=ko.observable(false);this.busy=ko.computed(function(){return this.canRedoObservable()&&this.canUndoObservable();},this);};$.extend(jGroupdocs.AnnotationUndoManager.prototype,jGroupdocs.UndoManager.prototype,{canRedoObservable:ko.observable(false),canUndoObservable:ko.observable(false),busy:null,_onDone:function(a){jGroupdocs.UndoManager.prototype._onDone.apply(this,arguments);this._fixupIds(a);this._refreshObservables();},_onUndone:function(a){jGroupdocs.UndoManager.prototype._onUndone.apply(this,arguments);this._fixupIds(a);this._refreshObservables();},_onDoUndoFailed:function(){jGroupdocs.UndoManager.prototype._onDoUndoFailed.apply(this,arguments);this._refreshObservables();},_onExecuting:function(){this._refreshObservables();},_refreshObservables:function(){this.canRedoObservable(this.canRedo());this.canUndoObservable(this.canUndo());},_fixupIds:function(d){for(var e=d.idsMap(),b=0;b0;if(a.oldId==null||a.oldId.length<=0||!f||a.oldId==a.newId){continue;}for(var c=0;c0;if(f&&d.fixupIds(a)){d.onIdsFixedUp(a);}}}});AnnotationCommand=function(d,c,a,b){jGroupdocs.AsyncCommand.prototype.constructor.apply(this,[b]);this._model=d;this._fileId=c;this._annotation=a;this._annotationId=a?a.guid:null;this._idsMap={oldId:a.guid,newId:a.guid};};$.extend(AnnotationCommand.prototype,jGroupdocs.AsyncCommand.prototype,{_model:null,_fileId:null,_annotation:null,_annotationId:null,_idsMap:{oldId:"",newId:""},idsMap:function(){return[this._idsMap];},fixupIds:function(a,b){if(this._annotationId!=a.oldId){return this._annotationId==a.newId;}this._annotationId=a.newId;this._annotation.guid=a.newId;if(!b){this._idsMap.newId=this._idsMap.oldId=a.newId;}return true;},onIdsFixedUp:function(a){if(this._callbacks&&this._callbacks.onIdsFixedUp){this._callbacks.onIdsFixedUp(a);}}});CreateAnnotationCommand=function(){AnnotationCommand.prototype.constructor.apply(this,arguments);};$.extend(CreateAnnotationCommand.prototype,AnnotationCommand.prototype,{executeAsync:function(){this._model.createAnnotation(this._fileId,this._annotation.type,this._annotation.fieldText,this._annotation.pageNumber,this._annotation.box,this._annotation.annotationPosition,this._annotation.range,this._annotation.svgPath,this._annotation.drawingOptions,{family:this._annotation.fontFamily,size:this._annotation.fontSize},this._onDone.bind(this),this._onDoFailed.bind(this));}});RestoreAnnotationRepliesCommand=function(e,d,b,c,a){AnnotationCommand.prototype.constructor.apply(this,arguments);this._replies=a;};$.extend(RestoreAnnotationRepliesCommand.prototype,AnnotationCommand.prototype,{_replies:null,executeAsync:function(){this._model.restoreAnnotationReplies(this._fileId,this._annotationId,this._replies,this._onDone.bind(this),this._onDoFailed.bind(this));},_onDone:function(){AnnotationCommand.prototype._onDone.apply(this,arguments);}});RestoreAnnotationCommand=function(g,f,d,e,b){AnnotationCommand.prototype.constructor.apply(this,arguments);this._replies=[];if(b&&b.length){for(var c=0;c").text("Delete").addClass("figureContextMenu").css("left",e.originalEvent.layerX-10).css("top",e.originalEvent.layerY-10).appendTo(b._containerElement.children(".raphaelWrapper")).click(c).bind("contextmenu",c);b.setupRemoveAnnotationMenu(f);return false;});},deleteAnnotationHandler:function(b,a){this.deleteAreaByAnnotationGuid(a.guid);},receiveAreaAnnotationHandler:function(a){(a.type==Annotation.prototype.AnnotationType.Area||a.type==Annotation.prototype.AnnotationType.ResourcesRedaction)&&this.createAreaAnnotationHandler(a);},addAnnotationFromAnotherUser:function(b){var a=annotationViewModel.prototype.addAnnotationFromAnotherUser.call(this,b);(a.type==Annotation.prototype.AnnotationType.Area||a.type==Annotation.prototype.AnnotationType.ResourcesRedaction)&&this.createAreaAnnotationHandler(a);return a;},clearAllAnnotationOnClient:function(){while(this._areas.length>0){var a=this._areas[0];this.deleteAreaByAnnotationGuid(a.annotation.guid);}annotationViewModel.prototype.clearAllAnnotationOnClient.call(this);},deleteAnnotationOnClient:function(a){this.deleteAreaByAnnotationGuid(a);annotationViewModel.prototype.deleteAnnotationOnClient.call(this,a);},deleteAreaByAnnotationGuid:function(c){for(var a=0;a Delete ").appendTo(this.options.graphicsContainerElement);a.ui.docPointAnnotationViewer.prototype._create.call(this);}});})(jQuery);(function(a){AnnotationPolyline=function(a,b){this._init(a,b);};a.extend(AnnotationPolyline.prototype,{annotation:null,raphaelFigure:null,_init:function(a,b){this.raphaelFigure=a;this.boundingBox=b;},setAnnotation:function(a){this.annotation=a;},deleteScreenFigure:function(){this.raphaelFigure.remove();this.boundingBox&&this.boundingBox.remove();},setSvgPath:function(a){this.raphaelFigure.attr("path",a);}});window.polylineAnnotationModel=function(b){a.extend(this,b);this._init();};a.extend(polylineAnnotationModel.prototype,textStrikeoutModel.prototype,{});window.polylineAnnotationViewModel=function(b){a.extend(this,b);this._create(b);};a.extend(polylineAnnotationViewModel.prototype,textStrikeoutViewModel.prototype,{_polylines:null,_create:function(a){this._model=new polylineAnnotationModel(a);this._init(a);},_init:function(c){textStrikeoutViewModel.prototype._init.call(this,c);this._polylines=[];var b=this;a(this).bind({onAnnotationRemoved:function(c,a){a.type==Annotation.prototype.AnnotationType.Polyline&&b.deletePolylineByAnnotationGuid(a.guid);}});a(this).bind({onAnnotationReceived:function(c,a){b.receivePolylineAnnotationHandler(a);}});a(this).bind({onAnnotationCreated:function(d,c,a){b.createPolylineAnnotationHandler(c,a);}});a(this).bind({onReviewerColorsChanged:function(){b.reviewerColorsChangedHandlerPolyline();}});a(this).bind({onSetZoom:function(c,a){b.setPolylineZoom(a);}});a(this).bind({onAnnotationMarkerMovedOnClient:function(f,c,e,d,a){b.moveAnnotationMarkerOnClientPolyline(c,e,d,a);}});},addPart:function(d,c){var b=d.attr("path")||[];if(a.isArray(b)){b.push(c);}else{b+=c[0]+c[1]+","+c[2];}d.attr("path",b);},setFigureLook:function(a,d,c){var b=this._getDrawingOptions(d,c);a.attr({stroke:this.getRgbColorFromInteger(b.penColor)});a.attr({"stroke-width":b.penWidth});a.attr({"stroke-dasharray":this._dasharray[b.penStyle]});a.attr({"stroke-opacity":1});},createPolylineAnnotation:function(j,d){var e=this.getSelectable(),k=window.jGroupdocs.stringExtensions.format("M{0},{1}",d.left,d.top),f=this.getCanvas().path(k).attr({fill:"#f00","fill-opacity":0});this.setFigureLook(f,null,this.polylineToolOptions);var b=this,g=d,a=new jSaaspose.Point(d.left,d.top),c;if(this.storeAnnotationCoordinatesRelativeToPages){c=this.convertPointToRelativeToPageUnscaledCoordinates(a,a);}else{c=this.convertPointToAbsoluteCoordinates(a,a);}if(c!=null){var i=this.scale(),h=window.jGroupdocs.stringExtensions.format("M{0},{1}",c.x,c.y);e.bind("onMouseDrag",function(k,a){var c=a.left-g.left,d=a.top-g.top;b.addPart(f,["l",c,d]);var e=c/i,j=d/i;h+=window.jGroupdocs.stringExtensions.format("l{0},{1}",e,j);g=a;});e.bind("onMouseMoveStopped",function(){e.unbind("onMouseMoveStopped");e.unbind("onMouseDrag");var c=f.getBBox(false),i=new jSaaspose.Rect(c.x,c.y,c.x+c.width,c.y+c.height),g=b.getSelectableInstance(),d;if(b.storeAnnotationCoordinatesRelativeToPages){d=g.convertRectToRelativeToPageUnscaledCoordinates(i,a);}else{d=g.convertRectToAbsoluteCoordinates(i,a);}var k=b._getDrawingOptions(null,b.polylineToolOptions);b.createAnnotation(Annotation.prototype.AnnotationType.Polyline,j,d,null,null,f,h,null,k);});}},createPolylineAnnotationHandler:function(a,b){if(a.type!=Annotation.prototype.AnnotationType.Polyline){return;}if(!b&&a.svgPath){for(var n=a.svgPath,o=this.scale(),j=this.getSelectableInstance(),h="M",m=n.substring(1,n.length-1).split("l"),p=m.length,i,d,g=0;g0){var a=this._polylines[0];this.deletePolylineByAnnotationGuid(a.annotation.guid);}textStrikeoutViewModel.prototype.clearAllAnnotationOnClient.call(this);},deletePolylineByAnnotationGuid:function(c){for(var a=0;a=0){var c=this._replacements()[b];this._replacements.splice(b,1);this.deselectTextInRect(a.bounds(),false,a.pageNumber,a.selectionCounter);}},_indexOfReplacementAnnotation:function(c){for(var a=0;a=0){var a=this._replacements()[f];a.text(e);a.selectedFontFamily(c);a.selectedFontSize(d);}}});})(jQuery);(function(a){var c=function(a){this._init(a);};a.extend(c.prototype,{bounds:null,_init:function(a){this.bounds=a;}});var b=function(a,b,c){this._init(a,b,c);};a.extend(b.prototype,{textRedactions:null,annotation:null,_init:function(a,b,c){this.textRedactions=a;this.annotation=b;this.pageNumber=c;}});window.textRedactionModel=function(b){a.extend(this,b);this._create(b);};a.extend(textRedactionModel.prototype,textReplacementModel.prototype,{});textRedactionViewModel=function(b){a.extend(this,b);this._create(b);};a.extend(textRedactionViewModel.prototype,textReplacementViewModel.prototype,{_textRedactionGroups:null,_create:function(a){this._model=new textRedactionModel(a);this._init(a);},_init:function(c){textReplacementViewModel.prototype._init.call(this,c);this._textRedactionGroups=ko.observableArray([]);var b=this;a(this).bind({onAnnotationRemoved:function(c,a){a.type==Annotation.prototype.AnnotationType.TextRedaction&&b._onTextRedactionAnnotationRemoved(a.guid);},onAnnotationReceived:function(c,a){b._onTextRedactionAnnotationCreated(a);},onAnnotationCreated:function(c,a){b._onTextRedactionAnnotationCreated(a);},onDocumentLoaded:function(){b._clearTextRedactions();},onSetZoom:function(c,a){b._onTextRedactionZoomSet(a);}});},setTextRedactionAnnotationMode:function(){this.setAnnotationMode(a.ui.dvselectable.prototype.SelectionModes.SelectText);this.annotationModeObservable(Annotation.prototype.AnnotationType.TextRedaction);},createTextRedactionAnnotation:function(b,c,e,f,a,d){this.createAnnotation(Annotation.prototype.AnnotationType.TextRedaction,b,c,null,null,null,null,a,null,d);},_onTextRedactionAnnotationCreated:function(a){if(a.type!=Annotation.prototype.AnnotationType.TextRedaction){return;}var d=a.bounds(),j=this.getSelectableInstance(),e=a.pageNumber;if(this.storeAnnotationCoordinatesRelativeToPages){d=this.convertPageAndRectToScreenCoordinates(e,a.bounds());}else{d=this.convertRectToScreenCoordinates(a.bounds());e=parseInt(j.findPageAtVerticalPosition(a.bounds().top()).pageId)-1;}d=d.round();for(var k=null,f=j.getRowsFromRect(d),h=[],i=null,g=0;g ").appendTo(this.options.graphicsContainerElement);a.ui.documentWithAnnotationsViewer.prototype._create.call(this);}});})(jQuery);Raphael.fn.arrow=function(f,g,a,b){var c=7,d=c/2,h=Math.atan2(g-b,f-a),e=this.set();e.push(this.path(Raphael.format("M{0},{1} L{2},{3}",f,g,a,b)),this.path(Raphael.format("M{0},{1} L{2},{3} {4},{5}",a-c,b-d,a,b,a-c,b+d)).transform("R"+Math.round(Raphael.deg(h-Math.PI))+","+a+","+b));return e;};(function(a){window.graphicsAnnotationModel=function(b){a.extend(this,b);this._init();};a.extend(graphicsAnnotationModel.prototype,textReplacementModel.prototype,{});window.graphicsAnnotationViewModel=function(b){a.extend(this,b);this._create(b);};a.extend(graphicsAnnotationViewModel.prototype,textRedactionViewModel.prototype,{_graphics:null,_arrowEnd:"open-wide-long",_create:function(a){this._model=new graphicsAnnotationModel(a);this._init(a);},_init:function(c){textRedactionViewModel.prototype._init.call(this,c);var b=this;this._graphics=[];a(this).bind({onAnnotationReceived:function(c,a){b._onGraphicsAnnotationCreated(a);},onAnnotationCreated:function(d,c,a){b._onGraphicsAnnotationCreated(c,a);},onAnnotationRemoved:function(c,a){b._onGraphicsAnnotationRemoved(a);},onSetZoom:function(c,a){b._setGraphicsZoom(a);}});a(this).bind({onAnnotationMarkerMovedOnClient:function(f,c,e,d,a){b.moveAnnotationMarkerOnClientGraphic(c,e,d,a);}});},_onGraphicsAnnotationCreated:function(b,c){if(b.type!=Annotation.prototype.AnnotationType.Arrow){return;}var a=b.displayBounds();if(!c){var f=this.getSelectableInstance();if(f._findPageAt(a.topLeft)!=null){b.startingPoint=a.topLeft;}else{if(f._findPageAt(a.bottomRight)!=null){b.startingPoint=a.bottomRight;}}var h=this.getCanvas(),d=["M",a.left(),a.top(),"L",a.right(),a.bottom()];c=h.arrow(d[1],d[2],d[4],d[5]);}a=a.clone().normalize();var e=this.getCanvas().rect(a.left(),a.top(),a.width(),a.height()).attr({stroke:"none",fill:"#f00","fill-opacity":0,cursor:"pointer"});this.setFigureLook(c,b,this.ArrowToolOptions);this.createClickHandler((e||c).node,b);this._makeDraggable(b,c,e);var g=new AnnotationPolyline(c,e);g.setAnnotation(b);this._graphics.push(g);},_onGraphicsAnnotationRemoved:function(a){if(a.type!=Annotation.prototype.AnnotationType.Arrow){return;}this._removeGraphicsAnnotation(a.guid);},_removeGraphicsAnnotation:function(c){for(var a=0;a');},_viewerMarkup:function(){var b="";if(this.element.find('[name="selection-content"]').length==0){b+=' ';}b+=""+(this.options.showHeader?this._toolbarMarkup():"")+" "+(this.options.tooltipsEnabled?this._tooltipMarkupt():"")+"
"+this._textfieldToolbarMarkup()+' '+this._watermarksMarkup()+' ';return a(a.trim(b));},_toolbarMarkup:function(){return' ';},_toolboxMarkup:function(){var c=' ";return a(c);},_sidebarMarkup:function(){return a(' ';},_watermarksMarkup:function(){return" "+this._textfieldToolbarMarkup()+" ";},_modalsMarkup:function(){return a(' Exporting the document
Importing internal document annotations...
Printing the document
E-mail
Add from Contacts Message
');},_tooltipMarkupt:function(){return'
',item:'
Summary
Comments for annotation