!function t(e,i,r){function n(a,o){if(!i[a]){if(!e[a]){var h="function"==typeof require&&require;if(!o&&h)return h(a,!0);if(s)return s(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=i[a]={exports:{}};e[a][0].call(l.exports,function(t){var i=e[a][1][t];return n(i?i:t)},l,l.exports,t,e,i,r)}return i[a].exports}for(var s="function"==typeof require&&require,a=0;ai;i++){var n=arguments[i];"function"==typeof n&&(n=n.prototype);for(var s in n)e[s]=n[s]}return e.initialize||(e.initialize=function(){}),e.constructor=function(t,i,r,n,s,a,o,h){return new e.initialize(t,i,r,n,s,a,o,h)},e.constructor.prototype=e.initialize.prototype=e,e.constructor}},{}],3:[function(t,e,i){var r={maroon:"#800000",red:"#ff0000",orange:"#ffA500",yellow:"#ffff00",olive:"#808000",purple:"#800080",fuchsia:"#ff00ff",white:"#ffffff",lime:"#00ff00",green:"#008000",navy:"#000080",blue:"#0000ff",aqua:"#00ffff",teal:"#008080",black:"#000000",silver:"#c0c0c0",gray:"#808080"},n=function(t,e){for(var i=[],r=0,n=t.length;n>r;r++)i[r]=e(t[r],r);return i},s=function(t,e){if(t.isColor)this.red=t.red,this.green=t.green,this.blue=t.blue,this.alpha=t.alpha;else{var i=r[t];switch(i&&(t=i,e="hex"),typeof t){case"string":e||(e=(e=t.match(/^rgb|^hsb|^hsl/))?e[0]:"hex");break;case"object":e=e||"rgb",t=t.toString();break;case"number":e="hex",t=t.toString(16)}t=s["parse"+e.toUpperCase()](t),this.red=t[0],this.green=t[1],this.blue=t[2],this.alpha=t[3]}this.isColor=!0},a=function(t,e,i){return Math.min(i,Math.max(e,t))},o=/([-.\d]+\%?)\s*,\s*([-.\d]+\%?)\s*,\s*([-.\d]+\%?)\s*,?\s*([-.\d]*\%?)/,h=/^#?([a-f0-9]{1,2})([a-f0-9]{1,2})([a-f0-9]{1,2})([a-f0-9]{0,2})$/i;s.parseRGB=function(t){return n(t.match(o).slice(1),function(t,e){return t&&(t=parseFloat(t)*("%"==t[t.length-1]?2.55:1)),3>e?Math.round((t%=256)<0?t+256:t):a(""===t?1:Number(t),0,1)})},s.parseHEX=function(t){return 1==t.length&&(t=t+t+t),n(t.match(h).slice(1),function(t,e){return 3==e?t?parseInt(t,16)/255:1:parseInt(1==t.length?t+t:t,16)})},s.parseHSB=function(t){var e=n(t.match(o).slice(1),function(t,e){return t&&(t=parseFloat(t)),0===e?Math.round((t%=360)<0?t+360:t):3>e?a(Math.round(t),0,100):a(""===t?1:Number(t),0,1)}),i=e[3],r=Math.round(e[2]/100*255);if(0==e[1])return[r,r,r,i];var s=e[0],h=s%60,u=Math.round(e[2]*(100-e[1])/1e4*255),l=Math.round(e[2]*(6e3-e[1]*h)/6e5*255),c=Math.round(e[2]*(6e3-e[1]*(60-h))/6e5*255);switch(Math.floor(s/60)){case 0:return[r,c,u,i];case 1:return[l,r,u,i];case 2:return[u,r,c,i];case 3:return[u,l,r,i];case 4:return[c,u,r,i];default:return[r,u,l,i]}},s.parseHSL=function(t){var e=n(t.match(o).slice(1),function(t,e){return t&&(t=parseFloat(t)),0===e?Math.round((t%=360)<0?t+360:t):3>e?a(Math.round(t),0,100):a(""===t?1:Number(t),0,1)}),i=e[0]/60,r=e[1]/100,s=e[2]/100,h=e[3],u=(1-Math.abs(2*s-1))*r,l=u*(1-Math.abs(i%2-1)),c=s-u/2,f=Math.round(255*(u+c)),p=Math.round(255*(l+c)),d=Math.round(255*c);switch(Math.floor(i)){case 0:return[f,p,d,h];case 1:return[p,f,d,h];case 2:return[d,f,p,h];case 3:return[d,p,f,h];case 4:return[p,d,f,h];default:return[f,d,p,h]}};var u=function(t,e){return 1!=e[3]?t+="a":e.pop(),t+"("+e.join(", ")+")"};s.prototype={toHSB:function(t){var e=this.red,i=this.green,r=this.blue,n=this.alpha,s=Math.max(e,i,r),a=Math.min(e,i,r),o=s-a,h=0,l=0!=o?o/s:0,c=s/255;if(l){var f=(s-e)/o,p=(s-i)/o,d=(s-r)/o;h=e==s?d-p:i==s?2+f-d:4+p-f,(h/=6)<0&&h++}var m=[Math.round(360*h),Math.round(100*l),Math.round(100*c),n];return t?m:u("hsb",m)},toHSL:function(t){var e=this.red,i=this.green,r=this.blue,n=this.alpha,s=Math.max(e,i,r),a=Math.min(e,i,r),o=s-a,h=0,l=0!=o?o/(255-Math.abs(s+a-255)):0,c=(s+a)/512;if(l){var f=(s-e)/o,p=(s-i)/o,d=(s-r)/o;h=e==s?d-p:i==s?2+f-d:4+p-f,(h/=6)<0&&h++}var m=[Math.round(360*h),Math.round(100*l),Math.round(100*c),n];return t?m:u("hsl",m)},toHEX:function(t){var e=this.alpha,i=1==(e=Math.round(255*e).toString(16)).length?e+e:e,r=n([this.red,this.green,this.blue],function(t){return t=t.toString(16),1==t.length?"0"+t:t});return t?r.concat(i):"#"+r.join("")+("ff"==i?"":i)},toRGB:function(t){var e=[this.red,this.green,this.blue,this.alpha];return t?e:u("rgb",e)}},s.prototype.toString=s.prototype.toRGB,s.hex=function(t){return new s(t,"hex")},null==this.hex&&(this.hex=s.hex),s.hsb=function(t,e,i,r){return new s([t||0,e||0,i||0,null==r?1:r],"hsb")},null==this.hsb&&(this.hsb=s.hsb),s.hsl=function(t,e,i,r){return new s([t||0,e||0,i||0,null==r?1:r],"hsl")},null==this.hsl&&(this.hsl=s.hsl),s.rgb=function(t,e,i,r){return new s([t||0,e||0,i||0,null==r?1:r],"rgb")},null==this.rgb&&(this.rgb=s.rgb),s.detach=function(t){return t=new s(t),[s.rgb(t.red,t.green,t.blue).toString(),t.alpha]},e.exports=s},{}],4:[function(t,e,i){function r(t,e,i,r,n,s){return t&&"object"==typeof t&&(e=t.yx,r=t.yy,s=t.y,i=t.xy,n=t.x,t=t.xx),this.xx=null==t?1:t,this.yx=e||0,this.xy=i||0,this.yy=null==r?1:r,this.x=(null==n?this.x:n)||0,this.y=(null==s?this.y:s)||0,this._transform(),this}var n=t("./class");e.exports=n({initialize:r,_transform:function(){},xx:1,yx:0,x:0,xy:0,yy:1,y:0,transform:function(t,e,i,r,n,s){var a=this;return t&&"object"==typeof t&&(e=t.yx,r=t.yy,s=t.y,i=t.xy,n=t.x,t=t.xx),n||(n=0),s||(s=0),this.transformTo(a.xx*t+a.xy*e,a.yx*t+a.yy*e,a.xx*i+a.xy*r,a.yx*i+a.yy*r,a.xx*n+a.xy*s+a.x,a.yx*n+a.yy*s+a.y)},transformTo:r,translate:function(t,e){return this.transform(1,0,0,1,t,e)},move:function(t,e){return this.x+=t||0,this.y+=e||0,this._transform(),this},scale:function(t,e){return null==e&&(e=t),this.transform(t,0,0,e,0,0)},rotate:function(t,e,i){(null==e||null==i)&&(e=(this.left||0)+(this.width||0)/2,i=(this.top||0)+(this.height||0)/2);var r=t*Math.PI/180,n=Math.sin(r),s=Math.cos(r);this.transform(1,0,0,1,e,i);var a=this;return this.transformTo(s*a.xx-n*a.yx,n*a.xx+s*a.yx,s*a.xy-n*a.yy,n*a.xy+s*a.yy,a.x,a.y).transform(1,0,0,1,-e,-i)},moveTo:function(t,e){var i=this;return this.transformTo(i.xx,i.yx,i.xy,i.yy,t,e)},rotateTo:function(t,e,i){var r=this,n=r.yx/r.xx>r.yy/r.xy?-1:1;return(r.xx<0?r.xy>=0:r.xy<0)&&(n=-n),this.rotate(t-180*Math.atan2(n*r.yx,n*r.xx)/Math.PI,e,i)},scaleTo:function(t,e){var i=this,r=Math.sqrt(i.xx*i.xx+i.yx*i.yx);return i.xx/=r,i.yx/=r,r=Math.sqrt(i.yy*i.yy+i.xy*i.xy),i.yy/=r,i.xy/=r,this.scale(t,e)},resizeTo:function(t,e){var i=this.width,r=this.height;return i&&r?this.scaleTo(t/i,e/r):this},inversePoint:function(t,e){var i=this.xx,r=this.yx,n=this.xy,s=this.yy,a=this.x,o=this.y,h=r*n-i*s;return 0==h?null:{x:(s*(a-t)+n*(e-o))/h,y:(i*(o-e)+r*(t-a))/h}},point:function(t,e){var i=this;return{x:i.xx*t+i.xy*e+i.x,y:i.yx*t+i.yy*e+i.y}}})},{"./class":2}],5:[function(t,e,i){var r=t("../core/class");e.exports=r({grab:function(){for(var t=0;tr;r++){var s,a=i[r];s="function"==typeof a?a.call(this,t):a.handleEvent(t),s===!1&&t.preventDefault()}}this.parentNode&&this.parentNode.dispatch&&this.parentNode.dispatch(t)},subscribe:function(t,e,i){if("string"!=typeof t){var r=[];for(var n in t)r.push(this.subscribe(n,t[n]));return function(){for(var t=0,e=r.length;e>t;t++)r[t]();return this}}var s="function"==typeof e?e.bind(i||this):e,a=this._events||(this._events={}),o=a[t]||(a[t]=[]);return o.push(s),function(){for(var t=0,e=o.length;e>t;t++)if(o[t]===s){o.splice(t,1);break}}}})},{"../core/class":2}],7:[function(t,e,i){function r(t){return t.toElement?t.toElement():t.getDOMNode?t.getDOMNode():t.getNode?t.getNode():t}var n=t("../core/class");e.exports=n({toElement:function(){return this.element},getDOMNode:function(){return this.toElement()},getNode:function(){return this.toElement()},inject:function(t){return(t.containerElement||r(t)).appendChild(this.element),this},injectBefore:function(t){var e=r(t);return e.parentNode.insertBefore(this.element,e),this},eject:function(){var t=this.element,e=t.parentNode;return e&&e.removeChild(t),this},subscribe:function(t,e,i){if("string"!=typeof t){var r=[];for(var n in t)r.push(this.subscribe(n,t[n]));return function(){for(var t=0,e=r.length;e>t;t++)r[t]();return this}}i||(i=this);var s;s="function"==typeof e?e.bind?e.bind(i):function(){return e.apply(i,arguments)}:e;var a=this.element;return a.addEventListener?(a.addEventListener(t,s,!1),function(){return a.removeEventListener(t,s,!1),this}):(a.attachEvent("on"+t,s),function(){return a.detachEvent("on"+t,s),this})}})},{"../core/class":2}],8:[function(t,e,i){var r=t("../core/class"),n=t("./dummy"),s=t("./native");e.exports=r(n,s,{dummy_inject:n.prototype.inject,dummy_injectBefore:n.prototype.injectBefore,dummy_eject:n.prototype.eject,native_inject:s.prototype.inject,native_injectBefore:s.prototype.injectBefore,native_eject:s.prototype.eject,inject:function(t){return this.dummy_inject(t),this.native_inject(t),this},injectBefore:function(t){return this.dummy_injectBefore(t),this.native_injectBefore(t),this},eject:function(){return this.dummy_eject(),this.native_eject(),this}})},{"../core/class":2,"./dummy":6,"./native":7}],9:[function(t,e,i){var r=t("./modes/current");r.Rectangle=t("./shapes/rectangle"),r.Pill=t("./shapes/pill"),r.Ellipse=t("./shapes/ellipse"),r.Wedge=t("./shapes/wedge"),r.Font||(r.Font=t("./shapes/font")),r.Transform=t("./core/transform"),r.Color=t("./core/color"),e.exports=r},{"./core/color":3,"./core/transform":4,"./modes/current":10,"./shapes/ellipse":20,"./shapes/font":21,"./shapes/pill":23,"./shapes/rectangle":24,"./shapes/wedge":25}],10:[function(t,e,i){function r(){throw new Error("You must require a mode before requiring anything else.")}i.Surface=r,i.Path=r,i.Shape=r,i.Group=r,i.ClippingRectangle=r,i.Text=r,i.setCurrent=function(t){for(var e in t)i[e]=t[e]}},{}],11:[function(t,e,i){i.Surface=t("./svg/surface"),i.Path=t("./svg/path"),i.Shape=t("./svg/shape"),i.Group=t("./svg/group"),i.ClippingRectangle=t("./svg/group"),i.Text=t("./svg/text"),t("./current").setCurrent(i)},{"./current":10,"./svg/group":14,"./svg/path":16,"./svg/shape":17,"./svg/surface":18,"./svg/text":19}],12:[function(t,e,i){var r=t("../../core/class"),n=t("../../core/color"),s=t("./node"),a=t("./dom"),o=a.createElement;e.exports=r(s,{element_initialize:s.prototype.initialize,initialize:function(t){this.element_initialize(t),this.brushes={},this.fill(),this.stroke()},_place:function(){return this.parentNode?(this._injectBrush("fill"),this._injectBrush("stroke")):(this._ejectBrush("fill"),this._ejectBrush("stroke")),this},_injectBrush:function(t){if(this.parentNode){var e="fill"==t?this.fillBrush:this.strokeBrush;e&&this.parentNode.defs.appendChild(e)}},_ejectBrush:function(t){var e=this[t+"Brush"];e&&e.parentNode&&e.parentNode.removeChild(e)},_createBrush:function(t,e){this._ejectBrush(t);var i=o(e);"fill"==t?this.fillBrush=i:this.strokeBrush=i;var r=t+"-brush-e"+a.uniqueID();return i.setAttribute("id",r),this._injectBrush(t),this.element.setAttribute(t,"url(#"+r+")"),i},_createGradient:function(t,e,i){var r=this._createBrush(t,e),s=function(t,e){e=n.detach(e);var i=o("stop");i.setAttribute("offset",t),i.setAttribute("stop-color",e[0]),i.setAttribute("stop-opacity",e[1]),r.appendChild(i)};if("length"in i)for(var a=0,h=i.length-1;h>=a;a++)s(a/h,i[a]);else for(var u in i)s(u,i[u]);return r.setAttribute("spreadMethod","reflect"),this.element.removeAttribute("fill-opacity"),r},_setColor:function(t,e){this._ejectBrush(t),this[t+"Brush"]=null;var i=this.element;null==e?(i.setAttribute(t,"none"),i.removeAttribute(t+"-opacity")):(e=n.detach(e),i.setAttribute(t,e[0]),i.setAttribute(t+"-opacity",e[1]))},fill:function(t){return arguments.length>1?this.fillLinear(arguments):this._setColor("fill",t),this},fillRadial:function(t,e,i,r,n,s,a){var o=this._createGradient("fill","radialGradient",t);o.setAttribute("gradientUnits","userSpaceOnUse"),null==e&&(e=(this.left||0)+.5*(this.width||0)),null==i&&(i=(this.top||0)+.5*(this.height||0)),null==n&&(n=r||.5*this.height||0),null==r&&(r=.5*(this.width||0)),null==s&&(s=e),null==a&&(a=i);var h=n/r;return o.setAttribute("fx",e),o.setAttribute("fy",i/h),o.setAttribute("r",r),1!=h&&o.setAttribute("gradientTransform","scale(1,"+h+")"),o.setAttribute("cx",s),o.setAttribute("cy",a/h),this},fillLinear:function(t,e,i,r,n){var s=this._createGradient("fill","linearGradient",t);if(5==arguments.length)s.setAttribute("gradientUnits","userSpaceOnUse");else{var a=(null==e?270:e)*Math.PI/180,o=Math.cos(a),h=-Math.sin(a),u=(Math.abs(o)+Math.abs(h))/2;o*=u,h*=u,e=.5-o,r=.5+o,i=.5-h,n=.5+h}return s.setAttribute("x1",e),s.setAttribute("y1",i),s.setAttribute("x2",r),s.setAttribute("y2",n),this},fillImage:function(t,e,i,r,s,h,u){var l=this._createBrush("fill","pattern"),c=o("image");if(a.link(c,t),c.setAttribute("width",e),c.setAttribute("height",i),c.setAttribute("preserveAspectRatio","none"),null!=h){h=new n(h),null==u?(u=new n(h),u.alpha=0):u=new n(u);var f=(h.red-u.red)/765,p=(h.green-u.green)/765,d=(h.blue-u.blue)/765,m=(h.alpha-u.alpha)/3,v=[f,f,f,0,u.red/255,p,p,p,0,u.green/255,d,d,d,0,u.blue/255,m,m,m,0,u.alpha],g=o("filter");g.setAttribute("id","testfilter"+this.uid);var y=o("feColorMatrix");y.setAttribute("type","matrix"),y.setAttribute("values",v.join(" ")),c.setAttribute("fill","#000"),c.setAttribute("filter","url(#testfilter"+this.uid+")"),g.appendChild(y),l.appendChild(g)}return l.appendChild(c),l.setAttribute("patternUnits","userSpaceOnUse"),l.setAttribute("patternContentsUnits","userSpaceOnUse"),l.setAttribute("x",r||0),l.setAttribute("y",s||0),l.setAttribute("width",e),l.setAttribute("height",i),this},stroke:function(t,e,i,r,n){var s=this.element;return s.setAttribute("stroke-width",null!=e?e:1),s.setAttribute("stroke-linecap",null!=i?i:"round"),s.setAttribute("stroke-linejoin",null!=r?r:"round"),n&&s.setAttribute("stroke-dasharray",n.join(",")),this._setColor("stroke",t),this}})},{"../../core/class":2,"../../core/color":3,"./dom":13,"./node":15}],13:[function(t,e,i){var r=+new Date;i.uniqueID=function(){return(r++).toString(36)};var n="http://www.w3.org/2000/svg",s="http://www.w3.org/1999/xlink",a="http://www.w3.org/XML/1998/namespace";i.NS=n,i.createElement=function(t){return document.createElementNS(n,t)},i.link=function(t,e){t.setAttributeNS(s,"href",e)},i.preserveSpace=function(t){t.setAttributeNS(a,"space","preserve")},i.createTextNode=function(t){return document.createTextNode(t)}},{}],14:[function(t,e,i){var r=t("../../core/class"),n=t("../../dom/container"),s=t("./node"),a=t("./dom");e.exports=r(s,n,{element_initialize:s.prototype.initialize,initialize:function(t,e){this.element_initialize("g"),this.width=t,this.height=e,this.defs=a.createElement("defs"),this.element.appendChild(this.defs)}})},{"../../core/class":2,"../../dom/container":5,"./dom":13,"./node":15}],15:[function(t,e,i){var r=t("../../core/class"),n=t("../../core/transform"),s=t("../../dom/shadow"),a=t("./dom");e.exports=r(s,n,{initialize:function(t){this.uid=a.uniqueID();var e=this.element=a.createElement(t);e.setAttribute("id","e"+this.uid)},_transform:function(){var t=this;this.element.setAttribute("transform","matrix("+[t.xx,t.yx,t.xy,t.yy,t.x,t.y]+")")},blend:function(t){return this.element.setAttribute("opacity",t),this},hide:function(){return this.element.setAttribute("display","none"),this},show:function(){return this.element.setAttribute("display",""),this},indicate:function(t,e){var i=this.element;if(t&&(this.element.style.cursor=t),e){var r=this.titleElement;r?r.firstChild.nodeValue=e:(this.titleElement=r=a.createElement("title"),r.appendChild(a.createTextNode(e)),i.insertBefore(r,i.firstChild))}return this}})},{"../../core/class":2,"../../core/transform":4,"../../dom/shadow":8,"./dom":13}],16:[function(t,e,i){var r=t("../../core/class"),n=function(t){return function(e,i){return this.push(t,e,i)}},s=function(t,e){return function(i,r,n,s,a){return this.push(t,Math.abs(n||i),Math.abs(s||n||r),0,a?1:0,e,i,r)}},a=function(t,e,i,r){return function(e,n,s,a,o,h){var u=arguments.length,l=4>u?t:6>u?i:r;return this.push(l,e,n,s,a,o,h)}},o=r({initialize:function(t){t instanceof o?this.path=[Array.prototype.join.call(t.path," ")]:t&&t.applyToPath?t.applyToPath(this):this.path=[t||"m0 0"]},push:function(){return this.path.push(Array.prototype.join.call(arguments," ")),this},reset:function(){return this.path=[],this},move:n("m"),moveTo:n("M"),line:n("l"),lineTo:n("L"),curve:a("t","s","q","c"),curveTo:a("T","S","Q","C"),arc:s("a",1),arcTo:s("A",1),counterArc:s("a",0),counterArcTo:s("A",0),close:function(){return this.push("z")},toSVG:function(){return this.path.join(" ")}});o.prototype.toString=o.prototype.toSVG,e.exports=o},{"../../core/class":2}],17:[function(t,e,i){var r=t("../../core/class"),n=t("./path"),s=t("./base");e.exports=r(s,{base_initialize:s.prototype.initialize,initialize:function(t,e,i){this.base_initialize("path"),this.element.setAttribute("fill-rule","evenodd"),this.width=e,this.height=i,null!=t&&this.draw(t)},draw:function(t,e,i){return t instanceof n||(t=new n(t)),this.element.setAttribute("d",t.toSVG()),null!=e&&(this.width=e),null!=i&&(this.height=i),this}})},{"../../core/class":2,"./base":12,"./path":16}],18:[function(t,e,i){var r=t("../../core/class"),n=t("../../dom/container"),s=t("../../dom/native"),a=t("./dom"),o=r(s,n,{initialize:function(t,e,i){var r=this.element=i||a.createElement("svg");r.setAttribute("xmlns",a.NS),r.setAttribute("version",1.1);var n=this.defs=a.createElement("defs");r.appendChild(n),null!=t&&null!=e&&this.resize(t,e)},resize:function(t,e){var i=this.element;return i.setAttribute("width",t),i.setAttribute("height",e),this.width=t,this.height=e,this}});o.tagName="svg",e.exports=o},{"../../core/class":2,"../../dom/container":5,"../../dom/native":7,"./dom":13}],19:[function(t,e,i){var r=t("../../core/class"),n=t("./path"),s=t("./base"),a=t("./surface"),o=t("./dom"),h=o.createElement,u="undefined"!=typeof navigator&&navigator&&navigator.userAgent,l=!/opera|safari|ie/i.test(u)||/chrome/i.test(u),c={left:"start",center:"middle",right:"end"},f={middle:"50%",end:"100%"};e.exports=r(s,{base_initialize:s.prototype.initialize,initialize:function(t,e,i,r){this.base_initialize("text"),this.draw.apply(this,arguments)},draw:function(t,e,i,r){var s=this.element;if(e)if("string"==typeof e)s.style.font=e;else{for(var a in e){var u=a.camelCase?a.camelCase():a;s.style[u]=e[a]}s.style.lineHeight="0.5em"}i&&s.setAttribute("text-anchor",this.textAnchor=c[i]||i),r&&"number"!=typeof r?this._createPaths(new n(r)):r===!1&&(this._ejectPaths(),this.pathElements=null);for(var p,d=this.pathElements;p=s.firstChild;)s.removeChild(p);var m=String(t).split(/\r?\n/),v=m.length,g="central";d&&v>d.length&&(v=d.length),l&&s.setAttribute("dominant-baseline",g),o.preserveSpace(s);for(var y=0;v>y;y++){var b,x,w=m[y];d?(b=h("textPath"),o.link(b,"#"+d[y].getAttribute("id")),b.setAttribute("startOffset",f[this.textAnchor]||0)):(b=h("tspan"),b.setAttribute("x",0),b.setAttribute("y",1.1*y+.5+"em")),l?(b.setAttribute("dominant-baseline",g),x=b):d?(x=h("tspan"),x.setAttribute("dy","0.35em"),b.appendChild(x)):(x=b,b.setAttribute("y",1.1*y+.85+"em")),o.preserveSpace(x),x.appendChild(o.createTextNode(w)),s.appendChild(b)}var A;try{A=s.getBBox()}catch(_){}return A&&A.width||(A=this._whileInDocument(s.getBBox,s)),this.left=A.x,this.top=A.y,this.width=A.width,this.height=A.height,this.right=A.x+A.width,this.bottom=A.y+A.height,this},base_place:s.prototype._place,_place:function(){return this.parentNode?this._injectPaths():this._ejectPaths(),this.base_place()},_injectPaths:function(){var t=this.pathElements;if(this.parentNode&&t)for(var e=this.parentNode.defs,i=0,r=t.length;r>i;i++)e.appendChild(t[i])},_ejectPaths:function(){var t=this.pathElements;if(t)for(var e=0,i=t;i>e;e++){var r=t[e];r.parentNode&&r.parentNode.removeChild(t[e])}},_createPaths:function(t){this._ejectPaths();for(var e="p"+o.uniqueID()+"-",i=[t.path],r=[],n=0,s=i.length;s>n;n++){var a=h("path");a.setAttribute("d",i[n].join(" ")),a.setAttribute("id",e+n),r.push(a)}this.pathElements=r,this._injectPaths()},_whileInDocument:function(t,e){var i=this.element,r=this.parentNode,n=i.parentNode,s=i.nextSibling,o=i.ownerDocument.body,h=new a(1,1).inject(o);this.inject(h);var u=t.call(e);return h.eject(),r&&this.inject(r),n&&n.insertBefore(i,s),u}})},{"../../core/class":2,"./base":12,"./dom":13,"./path":16,"./surface":18}],20:[function(t,e,i){var r=t("./generic");e.exports=r(function(t,e){this.width=t,this.height=e;var i=t/2,r=e/2;this.path.move(0,r).arc(t,0,i,r).arc(-t,0,i,r).close()})},{"./generic":22}],21:[function(t,e,i){var r=t("./generic"),n={},s=function(t){var e=/^\s*((?:(?:normal|bold|italic)\s+)*)(?:(\d+(?:\.\d+)?)[ptexm\%]*(?:\s*\/.*?)?\s+)?\s*\"?([^\"]*)/i,i=e.exec(t);return{fontFamily:i[3],fontSize:i[2],fontStyle:/italic/.exec(i[1])||"",fontWeight:/bold/.exec(i[1])||""}},a=r(function(t,e,i){"string"==typeof e&&(e=s(e)),e?this.font=e:e=this.font;var r=e.fontFamily||e["font-family"],a=e.fontWeight||e["font-weight"]||"normal",o=e.fontStyle||e["font-style"]||"normal",h=parseFloat(e.fontSize||e["font-size"]||e.size);if(e=e.glyphs?e:n[a+o+r],!e)throw new Error("The specified font has not been found.");for(var u=h/e.face["units-per-em"],l=0,c=h,f="",p="",d=0,m=u*e.face.ascent||h-u*e.face.descent,v=0,g=0,y=0,b=0,x=0,w=t.length;w>x;++x)if("\n"!=t.charAt(x)){var A=e.glyphs[t.charAt(x)]||e.glyphs.missing||e.glyphs[" "];if(A){var _=u*(A.w||e.w);if(A.d){var M=u;if(A.path)var j=A.path;else{for(var S,j=[],C=-1,N=("m"+A.d+"x").match(/[a-df-z]|[\-+]?(?:[\d\.]e[\-+]?|[^\s\-+,a-z])+/gi),z=0,B=N.length;B>z;z++){var E=N[z];E.match(/^[a-z]/i)?j[++C]=S=[E]:S.push(Number(E))}A.path=j}for(var z=0;zl&&(l=d)}}else("end"==i||"right"==i)&&(v-=d,f+="m"+-d+",0"),("middle"==i||"center"==i)&&(v-=d/2,f+="m"+-d/2+",0"),f+=p,f+="m"+-v+","+-g,v=g=0,p="",d=0,m+=1.1*h,c+=1.1*h;("end"==i||"right"==i)&&(f+="m"+-d+",0"),("middle"==i||"center"==i)&&(f+="m"+-d/2+",0"),f+=p,this.path.push(f),this.width=l,this.height=c});a.register=function(t){var e=t.face,i=e["font-family"],r=e["font-weight"]>500?"bold":"normal",s="oblique"==e["font-stretch"]||"oblique"==e["font-style"]||"italic"==e["font-style"]?"italic":"normal";return n[r+s+i]=t,this},e.exports=a},{"./generic":22}],22:[function(t,e,i){var r=t("../core/class"),n=t("../modes/current");e.exports=function(t){return r(n.Shape,{shape_initialize:n.Shape.prototype.initialize,shape_draw:n.Shape.prototype.draw,initialize:function(t){this.shape_initialize(),this.path=new n.Path,null!=t&&this.draw.apply(this,arguments)},draw:function(){return this.path.reset(),this._draw_function.apply(this,arguments),this.shape_draw(this.path,this.width,this.height),this},_draw_function:t})}},{"../core/class":2,"../modes/current":10}],23:[function(t,e,i){var r=t("./generic");e.exports=r(function(t,e){this.width=t,this.height=e;var i=this.path;if(0>t&&(i.move(t,0),t=-t),0>e&&(i.move(0,e),e=-e),e>t){var r=t/2;i.move(0,r).arc(t,0,r).line(0,e-t).arc(-t,0,r).line(0,t-e)}else{var r=e/2;i.move(r,0).line(t-e,0).arc(0,e,r).line(e-t,0).arc(0,-e,r)}i.close()})},{"./generic":22}],24:[function(t,e,i){var r=t("./generic");e.exports=r(function(t,e,i){this.width=t,this.height=e;var r=this.path;if(i){"number"==typeof i&&(i=[i,i,i,i]);var n=i[0],s=i[1],a=i[2],o=i[3];0>n&&(n=0),0>s&&(s=0),0>o&&(o=0),0>a&&(a=0),r.move(0,n),0>t&&r.move(t,0),0>e&&r.move(0,e),n>0&&r.arc(n,-n),r.line(Math.abs(t)-(s+n),0),s>0&&r.arc(s,s),r.line(0,Math.abs(e)-(s+a)),a>0&&r.arc(-a,a),r.line(-Math.abs(t)+(a+o),0),o>0&&r.arc(-o,-o),r.line(0,-Math.abs(e)+(o+n))}else r.move(0,0).line(t,0).line(0,e).line(-t,0).line(0,-e);r.close()})},{"./generic":22}],25:[function(t,e,i){var r=t("./generic");e.exports=r(function(t,e,i,r){var n=2*Math.PI,s=Math.PI/180,a=i*s%n||0,o=r*s%n||0,h=Math.min(t||0,e||0),u=Math.max(t||0,e||0),l=a>o?n-a+o:o-a;this.width=this.height=2*u;var c=this.path;if(l>=n)c.move(0,u).arc(2*u,0,u).arc(2*-u,0,u),h&&c.move(u-h,0).counterArc(2*h,0,h).counterArc(2*-h,0,h);else{var f=Math.sin(a),p=Math.sin(o),d=Math.cos(a),m=Math.cos(o),v=p-f,g=m-d,y=h-u,b=l>Math.PI;c.move(u+u*f,u-u*d).arc(u*v,u*-g,u,u,b).line(y*p,y*-m),h&&c.counterArc(h*-v,h*g,h,h,b)}c.close()})},{"./generic":22}]},{},[1]);