//>>built
define("dojox/gfx/vml","dojo/_base/lang,dojo/_base/declare,dojo/_base/array,dojo/_base/Color,dojo/_base/sniff,dojo/_base/config,dojo/dom,dojo/dom-geometry,dojo/_base/kernel,./_base,./shape,./path,./arc,./gradient,./matrix".split(","),function(l,j,s,t,o,p,y,z,A,i,k,u,B,r,m){function v(a,b,c){c=c||A.global;b.call(c,a);(a instanceof i.Surface||a instanceof i.Group)&&s.forEach(a.children,function(a){v(a,b,c)})}var g=i.vml={};g.xmlns="urn:schemas-microsoft-com:vml";document.namespaces.add("v",g.xmlns);
var r="*,group,roundrect,oval,shape,rect,imagedata,path,textpath,text".split(","),q=0,w=1,C=document.createStyleSheet();if(8<=o("ie"))q=1,w=r.length;for(;q<w;++q)C.addRule("v\\:"+r[q],"behavior:url(#default#VML); display:inline-block");g.text_alignment={start:"left",middle:"center",end:"right"};g._parseFloat=function(a){return a.match(/^\d+f$/i)?parseInt(a)/65536:parseFloat(a)};g._bool={t:1,"true":1};g._reparentEvents=function(a,b){for(var c in b)"on"==c.substr(0,2).toLowerCase()&&(a[c]=b[c],b[c]=
null)};g.Shape=j("dojox.gfx.vml.Shape",k.Shape,{destroy:function(){this.rawNode=null;k.Shape.prototype.destroy.apply(this,arguments)},setFill:function(a){if(!a)return this.fillStyle=null,this.rawNode.filled="f",this;var b,c,d;if("object"==typeof a&&"type"in a){switch(a.type){case "linear":var e=this._getRealMatrix(),f=this.getBoundingBox(),h=this._getRealBBox?this._getRealBBox():this.getTransformedBoundingBox();d=[];if(this.fillStyle!==a)this.fillStyle=i.makeParameters(i.defaultLinearGradient,a);
a=i.gradient.project(e,this.fillStyle,{x:f.x,y:f.y},{x:f.x+f.width,y:f.y+f.height},h[0],h[2]);c=a.colors;"0.00000"!=c[0].offset.toFixed(5)&&d.push("0 "+i.normalizeColor(c[0].color).toHex());for(b=0;b<c.length;++b)d.push(c[b].offset.toFixed(5)+" "+i.normalizeColor(c[b].color).toHex());b=c.length-1;"1.00000"!=c[b].offset.toFixed(5)&&d.push("1 "+i.normalizeColor(c[b].color).toHex());b=this.rawNode.fill;b.colors.value=d.join(";");b.method="sigma";b.type="gradient";b.angle=(270-m._radToDeg(a.angle))%360;
b.on=!0;break;case "radial":this.fillStyle=a=i.makeParameters(i.defaultRadialGradient,a);var e=parseFloat(this.rawNode.style.left),f=parseFloat(this.rawNode.style.top),h=parseFloat(this.rawNode.style.width),g=parseFloat(this.rawNode.style.height),k=isNaN(h)?1:2*a.r/h;c=[];0<a.colors[0].offset&&c.push({offset:1,color:i.normalizeColor(a.colors[0].color)});s.forEach(a.colors,function(a){c.push({offset:1-a.offset*k,color:i.normalizeColor(a.color)})});for(b=c.length-1;0<=b&&0>c[b].offset;)--b;if(b<c.length-
1){d=c[b];var j=c[b+1];j.color=t.blendColors(d.color,j.color,d.offset/(d.offset-j.offset));for(j.offset=0;2<c.length-b;)c.pop()}b=c.length-1;d=[];for(0<c[b].offset&&d.push("0 "+c[b].color.toHex());0<=b;--b)d.push(c[b].offset.toFixed(5)+" "+c[b].color.toHex());b=this.rawNode.fill;b.colors.value=d.join(";");b.method="sigma";b.type="gradientradial";b.focusposition=isNaN(h)||isNaN(g)||isNaN(e)||isNaN(f)?"0.5 0.5":((a.cx-e)/h).toFixed(5)+" "+((a.cy-f)/g).toFixed(5);b.focussize="0 0";b.on=!0;break;case "pattern":this.fillStyle=
a=i.makeParameters(i.defaultPattern,a);b=this.rawNode.fill;b.type="tile";b.src=a.src;if(a.width&&a.height)b.size.x=i.px2pt(a.width),b.size.y=i.px2pt(a.height);b.alignShape="f";b.position.x=0;b.position.y=0;b.origin.x=a.width?a.x/a.width:0;b.origin.y=a.height?a.y/a.height:0;b.on=!0}this.rawNode.fill.opacity=1;return this}this.fillStyle=i.normalizeColor(a);(b=this.rawNode.fill)||(b=this.rawNode.ownerDocument.createElement("v:fill"));b.method="any";b.type="solid";b.opacity=this.fillStyle.a;if(d=this.rawNode.filters["DXImageTransform.Microsoft.Alpha"])d.opacity=
Math.round(100*this.fillStyle.a);this.rawNode.fillcolor=this.fillStyle.toHex();this.rawNode.filled=!0;return this},setStroke:function(a){if(!a)return this.strokeStyle=null,this.rawNode.stroked="f",this;if("string"==typeof a||l.isArray(a)||a instanceof t)a={color:a};a=this.strokeStyle=i.makeParameters(i.defaultStroke,a);a.color=i.normalizeColor(a.color);var b=this.rawNode;b.stroked=!0;b.strokecolor=a.color.toCss();b.strokeweight=a.width+"px";if(b.stroke)b.stroke.opacity=a.color.a,b.stroke.endcap=this._translate(this._capMap,
a.cap),"number"==typeof a.join?(b.stroke.joinstyle="miter",b.stroke.miterlimit=a.join):b.stroke.joinstyle=a.join,b.stroke.dashstyle="none"==a.style?"Solid":a.style;return this},_capMap:{butt:"flat"},_capMapReversed:{flat:"butt"},_translate:function(a,b){return b in a?a[b]:b},_applyTransform:function(){var a=this._getRealMatrix();if(a){var b=this.rawNode.skew;if("undefined"==typeof b)for(var c=0;c<this.rawNode.childNodes.length;++c)if("skew"==this.rawNode.childNodes[c].tagName){b=this.rawNode.childNodes[c];
break}if(b){b.on="f";var c=a.xx.toFixed(8)+" "+a.xy.toFixed(8)+" "+a.yx.toFixed(8)+" "+a.yy.toFixed(8)+" 0 0",a=Math.floor(a.dx).toFixed()+"px "+Math.floor(a.dy).toFixed()+"px",d=this.rawNode.style,e=parseFloat(d.left),f=parseFloat(d.top),h=parseFloat(d.width),d=parseFloat(d.height);isNaN(e)&&(e=0);isNaN(f)&&(f=0);if(isNaN(h)||!h)h=1;if(isNaN(d)||!d)d=1;e=(-e/h-0.5).toFixed(8)+" "+(-f/d-0.5).toFixed(8);b.matrix=c;b.origin=e;b.offset=a;b.on=!0}}this.fillStyle&&"linear"==this.fillStyle.type&&this.setFill(this.fillStyle);
this.clip&&this.setClip(this.clip);return this},_setDimensions:function(){return this},setRawNode:function(a){a.stroked="f";a.filled="f";this.rawNode=a;this.rawNode.__gfxObject__=this.getUID()},_moveToFront:function(){this.rawNode.parentNode.appendChild(this.rawNode);return this},_moveToBack:function(){var a=this.rawNode,b=a.parentNode,c=b.firstChild;b.insertBefore(a,c);"rect"==c.tagName&&c.swapNode(a);return this},_getRealMatrix:function(){return this.parentMatrix?new m.Matrix2D([this.parentMatrix,
this.matrix]):this.matrix},setClip:function(a){this.inherited(arguments);var b=this.rawNode.style;if(a){if("width"in a){var c=this._getRealMatrix(),d=parseFloat(b.left),e=parseFloat(b.top);isNaN(d)&&(d=0);isNaN(e)&&(e=0);var f=m.multiplyRectangle(c,a),c=m.multiplyPoint(c,{x:d,y:e});b.clip="rect("+Math.round(f.y-c.y)+"px "+Math.round(f.x-c.x+f.width)+"px "+Math.round(f.y-c.y+f.height)+"px "+Math.round(f.x-c.x)+"px)"}}else b.position="absolute",b.clip="rect(0px "+b.width+" "+b.height+" 0px)";return this}});
g.Group=j("dojox.gfx.vml.Group",g.Shape,{constructor:function(){k.Container._init.call(this)},_applyTransform:function(){for(var a=this._getRealMatrix(),b=0;b<this.children.length;++b)this.children[b]._updateParentMatrix(a);this.clip&&this.setClip(this.clip);return this},_setDimensions:function(a,b){var c=this.rawNode,d=c.style,e=this.bgNode.style;d.width=a;d.height=b;c.coordsize=a+" "+b;e.width=a;e.height=b;for(c=0;c<this.children.length;++c)this.children[c]._setDimensions(a,b);return this},setClip:function(a){this.clip=
a;var b=this.rawNode.style;if(a){if("width"in a){var c=this._getRealMatrix(),a=m.multiplyRectangle(c,a),d=this.getBoundingBox(),c=(d=d?m.multiplyRectangle(c,d):null)&&0>d.x?d.x:0,d=d&&0>d.y?d.y:0;b.position="absolute";b.clip="rect("+Math.round(a.y-d)+"px "+Math.round(a.x+a.width-c)+"px "+Math.round(a.y+a.height-d)+"px "+Math.round(a.x-c)+"px)"}}else b.position="absolute",b.clip="rect(0px "+b.width+" "+b.height+" 0px)";return this},destroy:function(){this.clear(!0);g.Shape.prototype.destroy.apply(this,
arguments)}});g.Group.nodeType="group";g.Rect=j("dojox.gfx.vml.Rect",[g.Shape,k.Rect],{setShape:function(a){a=this.shape=i.makeParameters(this.shape,a);this.bbox=null;var b=Math.min(1,a.r/Math.min(parseFloat(a.width),parseFloat(a.height))).toFixed(8),c=this.rawNode.parentNode,d=null;if(c){if(c.lastChild!==this.rawNode)for(var e=0;e<c.childNodes.length;++e)if(c.childNodes[e]===this.rawNode){d=c.childNodes[e+1];break}c.removeChild(this.rawNode)}7<o("ie")?(e=this.rawNode.ownerDocument.createElement("v:roundrect"),
e.arcsize=b,e.style.display="inline-block",g._reparentEvents(e,this.rawNode),this.rawNode=e,this.rawNode.__gfxObject__=this.getUID()):this.rawNode.arcsize=b;c&&(d?c.insertBefore(this.rawNode,d):c.appendChild(this.rawNode));b=this.rawNode.style;b.left=a.x.toFixed();b.top=a.y.toFixed();b.width="string"==typeof a.width&&0<=a.width.indexOf("%")?a.width:Math.max(a.width.toFixed(),0);b.height="string"==typeof a.height&&0<=a.height.indexOf("%")?a.height:Math.max(a.height.toFixed(),0);return this.setTransform(this.matrix).setFill(this.fillStyle).setStroke(this.strokeStyle)}});
g.Rect.nodeType="roundrect";g.Ellipse=j("dojox.gfx.vml.Ellipse",[g.Shape,k.Ellipse],{setShape:function(a){a=this.shape=i.makeParameters(this.shape,a);this.bbox=null;var b=this.rawNode.style;b.left=(a.cx-a.rx).toFixed();b.top=(a.cy-a.ry).toFixed();b.width=(2*a.rx).toFixed();b.height=(2*a.ry).toFixed();return this.setTransform(this.matrix)}});g.Ellipse.nodeType="oval";g.Circle=j("dojox.gfx.vml.Circle",[g.Shape,k.Circle],{setShape:function(a){a=this.shape=i.makeParameters(this.shape,a);this.bbox=null;
var b=this.rawNode.style;b.left=(a.cx-a.r).toFixed();b.top=(a.cy-a.r).toFixed();b.width=(2*a.r).toFixed();b.height=(2*a.r).toFixed();return this}});g.Circle.nodeType="oval";g.Line=j("dojox.gfx.vml.Line",[g.Shape,k.Line],{constructor:function(a){a&&a.setAttribute("dojoGfxType","line")},setShape:function(a){a=this.shape=i.makeParameters(this.shape,a);this.bbox=null;this.rawNode.path.v="m"+a.x1.toFixed()+" "+a.y1.toFixed()+"l"+a.x2.toFixed()+" "+a.y2.toFixed()+"e";return this.setTransform(this.matrix)}});
g.Line.nodeType="shape";g.Polyline=j("dojox.gfx.vml.Polyline",[g.Shape,k.Polyline],{constructor:function(a){a&&a.setAttribute("dojoGfxType","polyline")},setShape:function(a,b){a&&a instanceof Array?(this.shape=i.makeParameters(this.shape,{points:a}),b&&this.shape.points.length&&this.shape.points.push(this.shape.points[0])):this.shape=i.makeParameters(this.shape,a);this.bbox=null;this._normalizePoints();var c=[],d=this.shape.points;if(0<d.length&&(c.push("m"),c.push(d[0].x.toFixed(),d[0].y.toFixed()),
1<d.length)){c.push("l");for(var e=1;e<d.length;++e)c.push(d[e].x.toFixed(),d[e].y.toFixed())}c.push("e");this.rawNode.path.v=c.join(" ");return this.setTransform(this.matrix)}});g.Polyline.nodeType="shape";g.Image=j("dojox.gfx.vml.Image",[g.Shape,k.Image],{setShape:function(a){a=this.shape=i.makeParameters(this.shape,a);this.bbox=null;this.rawNode.firstChild.src=a.src;return this.setTransform(this.matrix)},_applyTransform:function(){var a=this._getRealMatrix(),b=this.rawNode,c=b.style,d=this.shape,
a=a?m.multiply(a,{dx:d.x,dy:d.y}):m.normalize({dx:d.x,dy:d.y});if(0==a.xy&&0==a.yx&&0<a.xx&&0<a.yy)c.filter="",c.width=Math.floor(a.xx*d.width),c.height=Math.floor(a.yy*d.height),c.left=Math.floor(a.dx),c.top=Math.floor(a.dy);else{var e=b.parentNode.style;c.left="0px";c.top="0px";c.width=e.width;c.height=e.height;a=m.multiply(a,{xx:d.width/parseInt(c.width),yy:d.height/parseInt(c.height)});(b=b.filters["DXImageTransform.Microsoft.Matrix"])?(b.M11=a.xx,b.M12=a.xy,b.M21=a.yx,b.M22=a.yy,b.Dx=a.dx,b.Dy=
a.dy):c.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+a.xx+", M12="+a.xy+", M21="+a.yx+", M22="+a.yy+", Dx="+a.dx+", Dy="+a.dy+")"}return this},_setDimensions:function(a,b){var c=this.rawNode;return c.filters["DXImageTransform.Microsoft.Matrix"]?(c=c.style,c.width=a,c.height=b,this._applyTransform()):this}});g.Image.nodeType="rect";g.Text=j("dojox.gfx.vml.Text",[g.Shape,k.Text],{constructor:function(a){a&&a.setAttribute("dojoGfxType","text");this.fontStyle=null},_alignment:{start:"left",
middle:"center",end:"right"},setShape:function(a){this.shape=i.makeParameters(this.shape,a);this.bbox=null;var b=this.rawNode,a=this.shape,c=a.x,d=a.y.toFixed();switch(a.align){case "middle":c-=5;break;case "end":c-=10}for(var d="m"+c.toFixed()+","+d+"l"+(c+10).toFixed()+","+d+"e",e=null,c=null,f=b.childNodes,h=0;h<f.length;++h){var x=f[h].tagName;if("path"==x){if(e=f[h],c)break}else if("textpath"==x&&(c=f[h],e))break}e||(e=b.ownerDocument.createElement("v:path"),b.appendChild(e));c||(c=b.ownerDocument.createElement("v:textpath"),
b.appendChild(c));e.v=d;e.textPathOk=!0;c.on=!0;b=g.text_alignment[a.align];c.style["v-text-align"]=b?b:"left";c.style["text-decoration"]=a.decoration;c.style["v-rotate-letters"]=a.rotated;c.style["v-text-kern"]=a.kerning;c.string=a.text;return this.setTransform(this.matrix)},_setFont:function(){for(var a=this.fontStyle,b=this.rawNode.childNodes,c=0;c<b.length;++c)if("textpath"==b[c].tagName){b[c].style.font=i.makeFontString(a);break}this.setTransform(this.matrix)},_getRealMatrix:function(){var a=
this.inherited(arguments);a&&(a=m.multiply(a,{dy:0.35*-i.normalizedLength(this.fontStyle?this.fontStyle.size:"10pt")}));return a},getTextWidth:function(){var a=this.rawNode,b=a.style.display;a.style.display="inline";var c=i.pt2px(parseFloat(a.currentStyle.width));a.style.display=b;return c}});g.Text.nodeType="shape";g.Path=j("dojox.gfx.vml.Path",[g.Shape,u.Path],{constructor:function(a){a&&!a.getAttribute("dojoGfxType")&&a.setAttribute("dojoGfxType","path");this.vmlPath="";this.lastControl={}},_updateWithSegment:function(a){var b=
l.clone(this.last);this.inherited(arguments);if(!(1<arguments.length))b=this[this.renderers[a.action]](a,b),"string"==typeof this.vmlPath?(this.vmlPath+=b.join(""),this.rawNode.path.v=this.vmlPath+" r0,0 e"):Array.prototype.push.apply(this.vmlPath,b)},setShape:function(a){this.vmlPath=[];this.lastControl.type="";this.inherited(arguments);this.vmlPath=this.vmlPath.join("");this.rawNode.path.v=this.vmlPath+" r0,0 e";return this},_pathVmlToSvgMap:{m:"M",l:"L",t:"m",r:"l",c:"C",v:"c",qb:"Q",x:"z",e:""},
renderers:{M:"_moveToA",m:"_moveToR",L:"_lineToA",l:"_lineToR",H:"_hLineToA",h:"_hLineToR",V:"_vLineToA",v:"_vLineToR",C:"_curveToA",c:"_curveToR",S:"_smoothCurveToA",s:"_smoothCurveToR",Q:"_qCurveToA",q:"_qCurveToR",T:"_qSmoothCurveToA",t:"_qSmoothCurveToR",A:"_arcTo",a:"_arcTo",Z:"_closePath",z:"_closePath"},_addArgs:function(a,b,c,d){for(b=b instanceof Array?b:b.args;c<d;++c)a.push(" ",b[c].toFixed())},_adjustRelCrd:function(a,b,c){var b=b instanceof Array?b:b.args,d=b.length,e=Array(d),f=0,h=
a.x,a=a.y;"number"!=typeof h&&(e[0]=h=b[0],e[1]=a=b[1],f=2);if("number"==typeof c&&2!=c)for(var g=c;g<=d;){for(;f<g;f+=2)e[f]=h+b[f],e[f+1]=a+b[f+1];h=e[g-2];a=e[g-1];g+=c}else for(;f<d;f+=2)e[f]=h+=b[f],e[f+1]=a+=b[f+1];return e},_adjustRelPos:function(a,b){for(var c=b instanceof Array?b:b.args,d=c.length,e=Array(d),f=0;f<d;++f)e[f]=a+=c[f];return e},_moveToA:function(a){var b=[" m"],a=a instanceof Array?a:a.args,c=a.length;this._addArgs(b,a,0,2);2<c&&(b.push(" l"),this._addArgs(b,a,2,c));this.lastControl.type=
"";return b},_moveToR:function(a,b){return this._moveToA(this._adjustRelCrd(b,a))},_lineToA:function(a){var b=[" l"],a=a instanceof Array?a:a.args;this._addArgs(b,a,0,a.length);this.lastControl.type="";return b},_lineToR:function(a,b){return this._lineToA(this._adjustRelCrd(b,a))},_hLineToA:function(a,b){for(var c=[" l"],d=" "+b.y.toFixed(),e=a instanceof Array?a:a.args,f=e.length,h=0;h<f;++h)c.push(" ",e[h].toFixed(),d);this.lastControl.type="";return c},_hLineToR:function(a,b){return this._hLineToA(this._adjustRelPos(b.x,
a),b)},_vLineToA:function(a,b){for(var c=[" l"],d=" "+b.x.toFixed(),e=a instanceof Array?a:a.args,f=e.length,h=0;h<f;++h)c.push(d," ",e[h].toFixed());this.lastControl.type="";return c},_vLineToR:function(a,b){return this._vLineToA(this._adjustRelPos(b.y,a),b)},_curveToA:function(a){for(var b=[],a=a instanceof Array?a:a.args,c=a.length,d=this.lastControl,e=0;e<c;e+=6)b.push(" c"),this._addArgs(b,a,e,e+6);d.x=a[c-4];d.y=a[c-3];d.type="C";return b},_curveToR:function(a,b){return this._curveToA(this._adjustRelCrd(b,
a,6))},_smoothCurveToA:function(a,b){var c=[],d=a instanceof Array?a:a.args,e=d.length,f=this.lastControl,h=0;if("C"!=f.type)c.push(" c"),this._addArgs(c,[b.x,b.y],0,2),this._addArgs(c,d,0,4),f.x=d[0],f.y=d[1],f.type="C",h=4;for(;h<e;h+=4)c.push(" c"),this._addArgs(c,[2*b.x-f.x,2*b.y-f.y],0,2),this._addArgs(c,d,h,h+4),f.x=d[h],f.y=d[h+1];return c},_smoothCurveToR:function(a,b){return this._smoothCurveToA(this._adjustRelCrd(b,a,4),b)},_qCurveToA:function(a){for(var b=[],a=a instanceof Array?a:a.args,
c=a.length,d=this.lastControl,e=0;e<c;e+=4)b.push(" qb"),this._addArgs(b,a,e,e+4);d.x=a[c-4];d.y=a[c-3];d.type="Q";return b},_qCurveToR:function(a,b){return this._qCurveToA(this._adjustRelCrd(b,a,4))},_qSmoothCurveToA:function(a,b){var c=[],d=a instanceof Array?a:a.args,e=d.length,f=this.lastControl,h=0;if("Q"!=f.type)c.push(" qb"),this._addArgs(c,[f.x=b.x,f.y=b.y],0,2),f.type="Q",this._addArgs(c,d,0,2),h=2;for(;h<e;h+=2)c.push(" qb"),this._addArgs(c,[f.x=2*b.x-f.x,f.y=2*b.y-f.y],0,2),this._addArgs(c,
d,h,h+2);return c},_qSmoothCurveToR:function(a,b){return this._qSmoothCurveToA(this._adjustRelCrd(b,a,2),b)},_arcTo:function(a,b){for(var c=[],d=a.args,e=d.length,f="a"==a.action,h=0;h<e;h+=7){var g=d[h+5],i=d[h+6];f&&(g+=b.x,i+=b.y);for(var j=B.arcAsBezier(b,d[h],d[h+1],d[h+2],d[h+3]?1:0,d[h+4]?1:0,g,i),k=0;k<j.length;++k){c.push(" c");var l=j[k];this._addArgs(c,l,0,l.length);this._updateBBox(l[0],l[1]);this._updateBBox(l[2],l[3]);this._updateBBox(l[4],l[5])}b.x=g;b.y=i}this.lastControl.type="";
return c},_closePath:function(){this.lastControl.type="";return["x"]},_getRealBBox:function(){this._confirmSegmented();if(this.tbbox)return this.tbbox;if("string"==typeof this.shape.path)this.shape.path="";return this.inherited(arguments)}});g.Path.nodeType="shape";g.TextPath=j("dojox.gfx.vml.TextPath",[g.Path,u.TextPath],{constructor:function(a){a&&a.setAttribute("dojoGfxType","textpath");this.fontStyle=null;if(!("text"in this))this.text=l.clone(i.defaultTextPath);if(!("fontStyle"in this))this.fontStyle=
l.clone(i.defaultFont)},setText:function(a){this.text=i.makeParameters(this.text,"string"==typeof a?{text:a}:a);this._setText();return this},setFont:function(a){this.fontStyle="string"==typeof a?i.splitFontString(a):i.makeParameters(i.defaultFont,a);this._setFont();return this},_setText:function(){this.bbox=null;for(var a=this.rawNode,b=this.text,c=null,d=null,e=a.childNodes,f=0;f<e.length;++f){var h=e[f].tagName;if("path"==h){if(c=e[f],d)break}else if("textpath"==h&&(d=e[f],c))break}c||(c=this.rawNode.ownerDocument.createElement("v:path"),
a.appendChild(c));d||(d=this.rawNode.ownerDocument.createElement("v:textpath"),a.appendChild(d));c.textPathOk=!0;d.on=!0;a=g.text_alignment[b.align];d.style["v-text-align"]=a?a:"left";d.style["text-decoration"]=b.decoration;d.style["v-rotate-letters"]=b.rotated;d.style["v-text-kern"]=b.kerning;d.string=b.text},_setFont:function(){for(var a=this.fontStyle,b=this.rawNode.childNodes,c=0;c<b.length;++c)if("textpath"==b[c].tagName){b[c].style.font=i.makeFontString(a);break}}});g.TextPath.nodeType="shape";
g.Surface=j("dojox.gfx.vml.Surface",k.Surface,{constructor:function(){k.Container._init.call(this)},destroy:function(){this.clear(!0);this.inherited(arguments)},setDimensions:function(a,b){this.width=i.normalizedLength(a);this.height=i.normalizedLength(b);if(!this.rawNode)return this;var c=this.clipNode.style,d=this.rawNode,e=d.style,f=this.bgNode.style,g=this._parent.style;g.width=a;g.height=b;c.width=a;c.height=b;c.clip="rect(0px "+a+"px "+b+"px 0px)";e.width=a;e.height=b;d.coordsize=a+" "+b;f.width=
a;f.height=b;for(c=0;c<this.children.length;++c)this.children[c]._setDimensions(a,b);return this},getDimensions:function(){var a=this.rawNode?{width:i.normalizedLength(this.rawNode.style.width),height:i.normalizedLength(this.rawNode.style.height)}:null;if(0>=a.width)a.width=this.width;if(0>=a.height)a.height=this.height;return a}});g.createSurface=function(a,b,c){if(!b&&!c)var d=z.position(a),b=b||d.w,c=c||d.h;"number"==typeof b&&(b+="px");"number"==typeof c&&(c+="px");var d=new g.Surface,a=y.byId(a),
e=d.clipNode=a.ownerDocument.createElement("div"),f=d.rawNode=a.ownerDocument.createElement("v:group"),h=e.style,j=f.style;if(7<o("ie"))j.display="inline-block";d._parent=a;d._nodes.push(e);a.style.width=b;a.style.height=c;h.position="absolute";h.width=b;h.height=c;h.clip="rect(0px "+b+" "+c+" 0px)";j.position="absolute";j.width=b;j.height=c;f.coordsize=("100%"===b?b:parseFloat(b))+" "+("100%"===c?c:parseFloat(c));f.coordorigin="0 0";var h=d.bgNode=f.ownerDocument.createElement("v:rect"),k=h.style;
k.left=k.top=0;k.width=j.width;k.height=j.height;h.filled=h.stroked="f";f.appendChild(h);e.appendChild(f);a.appendChild(e);d.width=i.normalizedLength(b);d.height=i.normalizedLength(c);return d};var n=k.Container,j={add:!0===p.fixVmlAdd?function(a){if(this!=a.getParent()){var b=a.getParent();b&&b.remove(a);this.rawNode.appendChild(a.rawNode);n.add.apply(this,arguments);v(this,function(a){"function"==typeof a.getFont&&(a.setShape(a.getShape()),a.setFont(a.getFont()));"function"==typeof a.setFill&&(a.setFill(a.getFill()),
a.setStroke(a.getStroke()))})}return this}:function(a){this!=a.getParent()&&(this.rawNode.appendChild(a.rawNode),a.getParent()||(a.setFill(a.getFill()),a.setStroke(a.getStroke())),n.add.apply(this,arguments));return this},remove:function(a,b){this==a.getParent()&&(this.rawNode==a.rawNode.parentNode&&this.rawNode.removeChild(a.rawNode),n.remove.apply(this,arguments));return this},clear:function(){for(var a=this.rawNode;a.firstChild!=a.lastChild;)a.firstChild!=this.bgNode&&a.removeChild(a.firstChild),
a.lastChild!=this.bgNode&&a.removeChild(a.lastChild);return n.clear.apply(this,arguments)},getBoundingBox:n.getBoundingBox,_moveChildToFront:n._moveChildToFront,_moveChildToBack:n._moveChildToBack},p={createGroup:function(){var a=this.createObject(g.Group,null),b=a.rawNode.ownerDocument.createElement("v:rect");b.style.left=b.style.top=0;b.style.width=a.rawNode.style.width;b.style.height=a.rawNode.style.height;b.filled=b.stroked="f";a.rawNode.appendChild(b);a.bgNode=b;return a},createImage:function(a){if(!this.rawNode)return null;
var b=new g.Image,c=this.rawNode.ownerDocument,d=c.createElement("v:rect");d.stroked="f";d.style.width=this.rawNode.style.width;d.style.height=this.rawNode.style.height;c=c.createElement("v:imagedata");d.appendChild(c);b.setRawNode(d);this.rawNode.appendChild(d);b.setShape(a);this.add(b);return b},createRect:function(a){if(!this.rawNode)return null;var b=new g.Rect,c=this.rawNode.ownerDocument.createElement("v:roundrect");if(7<o("ie"))c.style.display="inline-block";b.setRawNode(c);this.rawNode.appendChild(c);
b.setShape(a);this.add(b);return b},createObject:function(a,b){if(!this.rawNode)return null;var c=new a,d=this.rawNode.ownerDocument.createElement("v:"+a.nodeType);c.setRawNode(d);this.rawNode.appendChild(d);switch(a){case g.Group:case g.Line:case g.Polyline:case g.Image:case g.Text:case g.Path:case g.TextPath:this._overrideSize(d)}c.setShape(b);this.add(c);return c},_overrideSize:function(a){var b=this.rawNode.style,c=b.width,b=b.height;a.style.width=c;a.style.height=b;a.coordsize=parseInt(c)+" "+
parseInt(b)}};l.extend(g.Group,j);l.extend(g.Group,k.Creator);l.extend(g.Group,p);l.extend(g.Surface,j);l.extend(g.Surface,k.Creator);l.extend(g.Surface,p);g.fixTarget=function(a){if(!a.gfxTarget)a.gfxTarget=k.byId(a.target.__gfxObject__);return!0};return g});