file-formats-aspnet-mvc-ej1.../Scripts/excanvas.min.js

10 строки
18 KiB
JavaScript

/*!
* filename: excanvas.min.js
* version : 11.4
* Copyright Syncfusion Inc. 2001 - 2013. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
document.createElement("canvas").getContext||function(){function gt(){return this.context_||(this.context_=new rt(this))}function ni(n,t){var i=ot.call(arguments,2);return function(){return n.apply(t,i.concat(ot.call(arguments)))}}function st(n){return String(n).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function ht(n,t,i){n.namespaces[t]||n.namespaces.add(t,i,"#default#VML")}function ct(n){if(ht(n,"g_vml_","urn:schemas-microsoft-com:vml"),ht(n,"g_o_","urn:schemas-microsoft-com:office:office"),!n.styleSheets.ex_canvas_){var t=n.createStyleSheet();t.owningElement.id="ex_canvas_",t.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}function ti(n){var t=n.srcElement;switch(n.propertyName){case"width":t.getContext().clearRect(),t.style.width=t.attributes.width.nodeValue+"px",t.firstChild.style.width=t.clientWidth+"px";break;case"height":t.getContext().clearRect(),t.style.height=t.attributes.height.nodeValue+"px",t.firstChild.style.height=t.clientHeight+"px"}}function ii(n){var t=n.srcElement;t.firstChild&&(t.firstChild.style.width=t.clientWidth+"px",t.firstChild.style.height=t.clientHeight+"px")}function d(){return[[1,0,0],[0,1,0],[0,0,1]]}function l(n,t){for(var e=d(),r,f,u,i=0;i<3;i++)for(r=0;r<3;r++){for(f=0,u=0;u<3;u++)f+=n[i][u]*t[u][r];e[i][r]=f}return e}function lt(n,t){t.fillStyle=n.fillStyle,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.lineWidth=n.lineWidth,t.miterLimit=n.miterLimit,t.shadowBlur=n.shadowBlur,t.shadowColor=n.shadowColor,t.shadowOffsetX=n.shadowOffsetX,t.shadowOffsetY=n.shadowOffsetY,t.strokeStyle=n.strokeStyle,t.globalAlpha=n.globalAlpha,t.font=n.font,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline,t.arcScaleX_=n.arcScaleX_,t.arcScaleY_=n.arcScaleY_,t.lineScale_=n.lineScale_}function vt(n){var i=n.indexOf("(",3),r=n.indexOf(")",i+1),t=n.substring(i+1,r).split(",");return(t.length!=4||n.charAt(3)!="a")&&(t[3]=1),t}function g(n){return parseFloat(n)/100}function nt(n,t,i){return Math.min(i,Math.max(t,n))}function ri(n){var e,s,h,i,r,t,u,f;return i=parseFloat(n[0])/360%360,i<0&&i++,r=nt(g(n[1]),0,1),t=nt(g(n[2]),0,1),r==0?e=s=h=t:(u=t<.5?t*(1+r):t+r-t*r,f=2*t-u,e=tt(f,u,i+1/3),s=tt(f,u,i),h=tt(f,u,i-1/3)),"#"+o[Math.floor(e*255)]+o[Math.floor(s*255)]+o[Math.floor(h*255)]}function tt(n,t,i){return i<0&&i++,i>1&&i--,6*i<1?n+(t-n)*6*i:2*i<1?t:3*i<2?n+(t-n)*(2/3-i)*6:n}function it(n){var u,i,f,r,t;if(n in y)return y[n];if(u=1,n=String(n),n.charAt(0)=="#")i=n;else if(/^rgb/.test(n)){for(t=vt(n),i="#",r=0;r<3;r++)f=t[r].indexOf("%")!=-1?Math.floor(g(t[r])*255):+t[r],i+=o[nt(f,0,255)];u=+t[3]}else/^hsl/.test(n)?(t=vt(n),i=ri(t),u=t[3]):i=at[n]||n;return y[n]={color:i,alpha:u}}function ui(n){if(p[n])return p[n];var i=document.createElement("div"),t=i.style;try{t.font=n}catch(r){}return p[n]={style:t.fontStyle||s.style,variant:t.fontVariant||s.variant,weight:t.fontWeight||s.weight,size:t.fontSize||s.size,family:t.fontFamily||s.family}}function fi(n,t){var r={},f,u,i;for(f in n)r[f]=n[f];return u=parseFloat(t.currentStyle.fontSize),i=parseFloat(n.size),r.size=typeof n.size=="number"?n.size:n.size.indexOf("px")!=-1?i:n.size.indexOf("em")!=-1?u*i:n.size.indexOf("%")!=-1?u/100*i:n.size.indexOf("pt")!=-1?i/.75:u,r.size*=.981,r}function ei(n){return n.style+" "+n.variant+" "+n.weight+" "+n.size+"px "+n.family}function oi(n){return yt[n]||"square"}function rt(n){var u,t,r;this.m_=d(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=i*1,this.globalAlpha=1,this.font="10px sans-serif",this.textAlign="left",this.textBaseline="alphabetic",this.canvas=n,u="width:"+n.clientWidth+"px;height:"+n.clientHeight+"px;overflow:hidden;position:absolute",t=n.ownerDocument.createElement("div"),t.style.cssText=u,n.appendChild(t),r=t.cloneNode(!1),r.style.backgroundColor="red",r.style.filter="alpha(opacity=0)",n.appendChild(r),this.element_=t,this.arcScaleX_=1,this.arcScaleY_=1,this.lineScale_=1}function pt(n,t,i,r){n.currentPath_.push({type:"bezierCurveTo",cp1x:t.x,cp1y:t.y,cp2x:i.x,cp2y:i.y,x:r.x,y:r.y}),n.currentX_=r.x,n.currentY_=r.y}function wt(n,t){var r=it(n.strokeStyle),f=r.color,u=r.alpha*n.globalAlpha,i=n.lineScale_*n.lineWidth;i<1&&(u*=i),t.push("<g_vml_:stroke",' opacity="',u,'"',' joinstyle="',n.lineJoin,'"',' miterlimit="',n.miterLimit,'"',' endcap="',oi(n.lineCap),'"',' weight="',i,'px"',' color="',f,'" />')}function bt(n,t,u,e){var o=n.fillStyle,l=n.arcScaleX_,a=n.arcScaleY_,y=e.x-u.x,p=e.y-u.y,c,d,s,w,nt,et,ot;if(o instanceof v){var h=0,b={x:0,y:0},k=0,tt=1;if(o.type_=="gradient"){var ht=o.x0_/l,ct=o.y0_/a,lt=o.x1_/l,at=o.y1_/a,c=r(n,ht,ct),rt=r(n,lt,at),vt=rt.x-c.x,yt=rt.y-c.y;h=Math.atan2(vt,yt)*180/Math.PI,h<0&&(h+=360),h<1e-6&&(h=0)}else c=r(n,o.x0_,o.y0_),b={x:(c.x-u.x)/y,y:(c.y-u.y)/p},y/=l*i,p/=a*i,d=f.max(y,p),k=2*o.r0_/d,tt=2*o.r1_/d-k;s=o.colors_,s.sort(function(n,t){return n.offset-t.offset});var g=s.length,pt=s[0].color,wt=s[g-1].color,bt=s[0].alpha*n.globalAlpha,kt=s[g-1].alpha*n.globalAlpha,ft=[];for(w=0;w<g;w++)nt=s[w],ft.push(nt.offset*tt+k+" "+nt.color);t.push('<g_vml_:fill type="',o.type_,'"',' method="none" focus="100%"',' color="',pt,'"',' color2="',wt,'"',' colors="',ft.join(","),'"',' opacity="',kt,'"',' g_o_:opacity2="',bt,'"',' angle="',h,'"',' focusposition="',b.x,",",b.y,'" />')}else if(o instanceof ut)y&&p&&(et=-u.x,ot=-u.y,t.push("<g_vml_:fill",' position="',et/y*l*l,",",ot/p*a*a,'"',' type="tile"',' src="',o.src_,'" />'));else{var st=it(n.fillStyle),dt=st.color,gt=st.alpha*n.globalAlpha;t.push('<g_vml_:fill color="',dt,'" opacity="',gt,'" />')}}function r(n,t,r){var u=n.m_;return{x:i*(t*u[0][0]+r*u[1][0]+u[2][0])-e,y:i*(t*u[0][1]+r*u[1][1]+u[2][1])-e}}function si(n){return isFinite(n[0][0])&&isFinite(n[0][1])&&isFinite(n[1][0])&&isFinite(n[1][1])&&isFinite(n[2][0])&&isFinite(n[2][1])}function a(n,t,i){if(si(t)&&(n.m_=t,i)){var r=t[0][0]*t[1][1]-t[0][1]*t[1][0];n.lineScale_=dt(kt(r))}}function v(n){this.type_=n,this.x0_=0,this.y0_=0,this.r0_=0,this.x1_=0,this.y1_=0,this.r1_=0,this.colors_=[]}function ut(n,t){hi(n);switch(t){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=t;break;default:ft("SYNTAX_ERR")}this.src_=n.src,this.width_=n.width,this.height_=n.height}function ft(n){throw new et(n);}function hi(n){n&&n.nodeType==1&&n.tagName=="IMG"||ft("TYPE_MISMATCH_ERR"),n.readyState!="complete"&&ft("INVALID_STATE_ERR")}function et(n){this.code=this[n],this.message=n+": DOM Exception "+this.code}var f=Math,t=f.round,w=f.sin,b=f.cos,kt=f.abs,dt=f.sqrt,i=10,e=i/2,ci=+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1],ot=Array.prototype.slice,k,o,h,c,at,y,s,p,yt,n,u;for(ct(document),k={init:function(n){var t=n||document;t.createElement("canvas"),t.attachEvent("onreadystatechange",ni(this.init_,this,t))},init_:function(n){for(var i=n.getElementsByTagName("canvas"),t=0;t<i.length;t++)this.initElement(i[t])},initElement:function(n){if(!n.getContext){n.getContext=gt,ct(n.ownerDocument),n.innerHTML="",n.attachEvent("onpropertychange",ti),n.attachEvent("onresize",ii);var t=n.attributes;t.width&&t.width.specified?n.style.width=t.width.nodeValue+"px":n.width=n.clientWidth,t.height&&t.height.specified?n.style.height=t.height.nodeValue+"px":n.height=n.clientHeight}return n}},k.init(),o=[],h=0;h<16;h++)for(c=0;c<16;c++)o[h*16+c]=h.toString(16)+c.toString(16);at={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},y={},s={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"},p={},yt={butt:"flat",round:"round"},n=rt.prototype,n.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null),this.element_.innerHTML=""},n.beginPath=function(){this.currentPath_=[]},n.moveTo=function(n,t){var i=r(this,n,t);this.currentPath_.push({type:"moveTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},n.lineTo=function(n,t){var i=r(this,n,t);this.currentPath_.push({type:"lineTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},n.bezierCurveTo=function(n,t,i,u,f,e){var o=r(this,f,e),s=r(this,n,t),h=r(this,i,u);pt(this,s,h,o)},n.quadraticCurveTo=function(n,t,i,u){var o=r(this,n,t),f=r(this,i,u),e={x:this.currentX_+2/3*(o.x-this.currentX_),y:this.currentY_+2/3*(o.y-this.currentY_)},s={x:e.x+(f.x-this.currentX_)/3,y:e.y+(f.y-this.currentY_)/3};pt(this,e,s,f)},n.arc=function(n,t,u,f,o,s){u*=i;var y=s?"at":"wa",h=n+b(f)*u-e,p=t+w(f)*u-e,c=n+b(o)*u-e,k=t+w(o)*u-e;h!=c||s||(h+=.125);var l=r(this,n,t),a=r(this,h,p),v=r(this,c,k);this.currentPath_.push({type:y,x:l.x,y:l.y,radius:u,xStart:a.x,yStart:a.y,xEnd:v.x,yEnd:v.y})},n.rect=function(n,t,i,r){this.moveTo(n,t),this.lineTo(n+i,t),this.lineTo(n+i,t+r),this.lineTo(n,t+r),this.closePath()},n.strokeRect=function(n,t,i,r){var u=this.currentPath_;this.beginPath(),this.moveTo(n,t),this.lineTo(n+i,t),this.lineTo(n+i,t+r),this.lineTo(n,t+r),this.closePath(),this.stroke(),this.currentPath_=u},n.fillRect=function(n,t,i,r){var u=this.currentPath_;this.beginPath(),this.moveTo(n,t),this.lineTo(n+i,t),this.lineTo(n+i,t+r),this.lineTo(n,t+r),this.closePath(),this.fill(),this.currentPath_=u},n.createLinearGradient=function(n,t,i,r){var u=new v("gradient");return u.x0_=n,u.y0_=t,u.x1_=i,u.y1_=r,u},n.createRadialGradient=function(n,t,i,r,u,f){var e=new v("gradientradial");return e.x0_=n,e.y0_=t,e.r0_=i,e.x1_=r,e.y1_=u,e.r1_=f,e},n.drawImage=function(n){var u,e,o,s,a,v,y,p,rt=n.runtimeStyle.width,ut=n.runtimeStyle.height,h,c,k;if(n.runtimeStyle.width="auto",n.runtimeStyle.height="auto",h=n.width,c=n.height,n.runtimeStyle.width=rt,n.runtimeStyle.height=ut,arguments.length==3)u=arguments[1],e=arguments[2],a=v=0,y=o=h,p=s=c;else if(arguments.length==5)u=arguments[1],e=arguments[2],o=arguments[3],s=arguments[4],a=v=0,y=h,p=c;else if(arguments.length==9)a=arguments[1],v=arguments[2],y=arguments[3],p=arguments[4],u=arguments[5],e=arguments[6],o=arguments[7],s=arguments[8];else throw Error("Invalid number of arguments");var w=r(this,u,e),ft=y/2,et=p/2,b=[],d=10,g=10;if(b.push(" <g_vml_:group",' coordsize="',i*d,",",i*g,'"',' coordorigin="0,0"',' style="width:',d,"px;height:",g,"px;position:absolute;"),this.m_[0][0]!=1||this.m_[0][1]||this.m_[1][1]!=1||this.m_[1][0]){k=[],k.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",t(w.x/i),",","Dy=",t(w.y/i),"");var l=w,nt=r(this,u+o,e),tt=r(this,u,e+s),it=r(this,u+o,e+s);l.x=f.max(l.x,nt.x,tt.x,it.x),l.y=f.max(l.y,nt.y,tt.y,it.y),b.push("padding:0 ",t(l.x/i),"px ",t(l.y/i),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",k.join(""),", sizingmethod='clip');")}else b.push("top:",t(w.y/i),"px;left:",t(w.x/i),"px;");b.push(' ">','<g_vml_:image src="',n.src,'"',' style="width:',i*o,"px;"," height:",i*s,'px"',' cropleft="',a/h,'"',' croptop="',v/c,'"',' cropright="',(h-a-y)/h,'"',' cropbottom="',(c-v-p)/c,'"'," />","<\/g_vml_:group>"),this.element_.insertAdjacentHTML("BeforeEnd",b.join(""))},n.stroke=function(n){var u=[],s=10,h=10,o,r,c;u.push("<g_vml_:shape",' filled="',!!n,'"',' style="position:absolute;width:',s,"px;height:",h,'px;"',' coordorigin="0,0"',' coordsize="',i*s,",",i*h,'"',' stroked="',!n,'"',' path="');var f={x:null,y:null},e={x:null,y:null};for(o=0;o<this.currentPath_.length;o++){r=this.currentPath_[o];switch(r.type){case"moveTo":c=r,u.push(" m ",t(r.x),",",t(r.y));break;case"lineTo":u.push(" l ",t(r.x),",",t(r.y));break;case"close":u.push(" x "),r=null;break;case"bezierCurveTo":u.push(" c ",t(r.cp1x),",",t(r.cp1y),",",t(r.cp2x),",",t(r.cp2y),",",t(r.x),",",t(r.y));break;case"at":case"wa":u.push(" ",r.type," ",t(r.x-this.arcScaleX_*r.radius),",",t(r.y-this.arcScaleY_*r.radius)," ",t(r.x+this.arcScaleX_*r.radius),",",t(r.y+this.arcScaleY_*r.radius)," ",t(r.xStart),",",t(r.yStart)," ",t(r.xEnd),",",t(r.yEnd))}r&&((f.x==null||r.x<f.x)&&(f.x=r.x),(e.x==null||r.x>e.x)&&(e.x=r.x),(f.y==null||r.y<f.y)&&(f.y=r.y),(e.y==null||r.y>e.y)&&(e.y=r.y))}u.push(' ">'),n?bt(this,u,f,e):wt(this,u),u.push("<\/g_vml_:shape>"),this.element_.insertAdjacentHTML("beforeEnd",u.join(""))},n.fill=function(){this.stroke(!0)},n.closePath=function(){this.currentPath_.push({type:"close"})},n.save=function(){var n={};lt(this,n),this.aStack_.push(n),this.mStack_.push(this.m_),this.m_=l(d(),this.m_)},n.restore=function(){this.aStack_.length&&(lt(this.aStack_.pop(),this),this.m_=this.mStack_.pop())},n.translate=function(n,t){var i=[[1,0,0],[0,1,0],[n,t,1]];a(this,l(i,this.m_),!1)},n.rotate=function(n){var t=b(n),i=w(n),r=[[t,i,0],[-i,t,0],[0,0,1]];a(this,l(r,this.m_),!1)},n.scale=function(n,t){this.arcScaleX_*=n,this.arcScaleY_*=t;var i=[[n,0,0],[0,t,0],[0,0,1]];a(this,l(i,this.m_),!0)},n.transform=function(n,t,i,r,u,f){var e=[[n,t,0],[i,r,0],[u,f,1]];a(this,l(e,this.m_),!0)},n.setTransform=function(n,t,i,r,u,f){var e=[[n,t,0],[i,r,0],[u,f,1]];a(this,e,!0)},n.drawText_=function(n,u,f,e,o){var l=this.m_,p=1e3,h=0,a=p,v={x:0,y:0},c=[],y=fi(ui(this.font),this.element_),g=ei(y),b=this.element_.currentStyle,s=this.textAlign.toLowerCase(),w,k,d;switch(s){case"left":case"center":case"right":break;case"end":s=b.direction=="ltr"?"right":"left";break;case"start":s=b.direction=="rtl"?"right":"left";break;default:s="left"}switch(this.textBaseline){case"hanging":case"top":v.y=y.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":v.y=-y.size/2.25}switch(s){case"right":h=p,a=.05;break;case"center":h=a=p/2}w=r(this,u+v.x,f+v.y),c.push('<g_vml_:line from="',-h,' 0" to="',a,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!o,'" stroked="',!!o,'" style="position:absolute;width:1px;height:1px;">'),o?wt(this,c):bt(this,c,{x:-h,y:0},{x:a,y:y.size}),k=l[0][0].toFixed(3)+","+l[1][0].toFixed(3)+","+l[0][1].toFixed(3)+","+l[1][1].toFixed(3)+",0,0",d=t(w.x/i)+","+t(w.y/i),c.push('<g_vml_:skew on="t" matrix="',k,'" ',' offset="',d,'" origin="',h,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',st(n),'" style="v-text-align:',s,";font:",st(g),'" /><\/g_vml_:line>'),this.element_.insertAdjacentHTML("beforeEnd",c.join(""))},n.fillText=function(n,t,i,r){this.drawText_(n,t,i,r,!1)},n.strokeText=function(n,t,i,r){this.drawText_(n,t,i,r,!0)},n.measureText=function(n){var t,i;return this.textMeasureEl_||(t='<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"><\/span>',this.element_.insertAdjacentHTML("beforeEnd",t),this.textMeasureEl_=this.element_.lastChild),i=this.element_.ownerDocument,this.textMeasureEl_.innerHTML="",this.textMeasureEl_.style.font=this.font,this.textMeasureEl_.appendChild(i.createTextNode(n)),{width:this.textMeasureEl_.offsetWidth}},n.clip=function(){},n.arcTo=function(){},n.createPattern=function(n,t){return new ut(n,t)},v.prototype.addColorStop=function(n,t){t=it(t),this.colors_.push({offset:n,color:t.color,alpha:t.alpha})},u=et.prototype=new Error,u.INDEX_SIZE_ERR=1,u.DOMSTRING_SIZE_ERR=2,u.HIERARCHY_REQUEST_ERR=3,u.WRONG_DOCUMENT_ERR=4,u.INVALID_CHARACTER_ERR=5,u.NO_DATA_ALLOWED_ERR=6,u.NO_MODIFICATION_ALLOWED_ERR=7,u.NOT_FOUND_ERR=8,u.NOT_SUPPORTED_ERR=9,u.INUSE_ATTRIBUTE_ERR=10,u.INVALID_STATE_ERR=11,u.SYNTAX_ERR=12,u.INVALID_MODIFICATION_ERR=13,u.NAMESPACE_ERR=14,u.INVALID_ACCESS_ERR=15,u.VALIDATION_ERR=16,u.TYPE_MISMATCH_ERR=17,G_vmlCanvasManager=k,CanvasRenderingContext2D=rt,CanvasGradient=v,CanvasPattern=ut,DOMException=et}()