diff --git a/dist/graphics.d.ts b/dist/graphics.d.ts new file mode 100644 index 0000000..ad93c18 --- /dev/null +++ b/dist/graphics.d.ts @@ -0,0 +1,73 @@ +declare namespace acgraph { + /** Main namespace object */ + const acgraph: any; + + /** + * Creates a new graphic stage (canvas) for rendering SVG/VML elements. + * @param container ID of the HTML element or the element itself. + * @returns The stage object. + */ + function create(container: string | HTMLElement): Stage; + + /** + * Stage object representing the drawing canvas. + */ + interface Stage { + rect(left?: number, top?: number, width?: number, height?: number): Rect; + circle(cx?: number, cy?: number, radius?: number): Circle; + ellipse(cx?: number, cy?: number, rx?: number, ry?: number): Ellipse; + path(data?: string): Path; + text(data?: string): Text; + image(src?: string, x?: number, y?: number, width?: number, height?: number): Image; + layer(): Layer; + clear(): void; + size(width: number, height: number): Stage; + width(): number; + width(value: number): Stage; + height(): number; + height(value: number): Stage; + container(el: string | HTMLElement): Stage; + } + + interface Element { + fill(color: string): this; + stroke(color: string): this; + attr(attributes: Record): this; + data(value: string | any): string | this; + show(): this; + hide(): this; + rotate(degrees: number, cx?: number, cy?: number): this; + translate(tx: number, ty: number): this; + scale(sx: number, sy?: number): this; + transform(transform: string): this; + id(value?: string): string | this; + opacity(value: number): this; + remove(): void; + } + + interface Rect extends Element { + r(value: number): this; + truncatedRect(truncation: number | string): this; + } + + interface Circle extends Element {} + interface Ellipse extends Element {} + interface Path extends Element { + data(value?: string): string | this; + } + interface Text extends Element { + text(value?: string): string | this; + } + interface Image extends Element {} + interface Layer extends Element { + text(data?: string): Text; + rect(left?: number, top?: number, width?: number, height?: number): Rect; + circle(cx?: number, cy?: number, radius?: number): Circle; + ellipse(cx?: number, cy?: number, rx?: number, ry?: number): Ellipse; + path(data?: string): Path; + } +} + +declare module 'graphicsjs' { + export = acgraph; +} diff --git a/dist/graphics.npm.js b/dist/graphics.npm.js new file mode 100644 index 0000000..7ebe46d --- /dev/null +++ b/dist/graphics.npm.js @@ -0,0 +1,463 @@ +/** + * @fileoverview npm-friendly wrapper for GraphicsJS. + * + * The dist/graphics.min.js file uses the Closure Library runtime, + * which expects a global `goog` and `acgraph` namespace. This wrapper + * ensures those are available before the library loads, making it + * work with npm, Webpack, Rollup, Angular CLI, etc. + * + * @example + * // In your Angular component or any module: + * import 'graphicsjs'; + * + * // Then use the global acgraph: + * const stage = acgraph.create('#container'); + * const rect = stage.rect(10, 10, 200, 100).fill('steelblue'); + * + * @example + * // Or with require: + * const acgraph = require('graphicsjs'); + * const stage = acgraph.create('#container'); + */ + +// Ensure goog namespace exists before loading Closure-compiled code +(function () { + 'use strict'; + + // Set up goog global (Closure Compiler runtime dependency) + if (typeof goog === 'undefined') { + var goog = {}; + goog.global = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== 'undefined' ? window : global); + goog.global['CLOSURE_UNCOMPILED_DEFINES'] = goog.global['CLOSURE_UNCOMPILED_DEFINES'] || {}; + goog.global['CLOSURE_DEFINES'] = goog.global['CLOSURE_DEFINES'] || {}; + goog.global['CLOSURE_BASE_SCRIPT'] = goog.global['CLOSURE_BASE_SCRIPT'] || ''; + if (typeof module !== 'undefined' && module.exports) { + module.exports = goog; + } + } + + // Set up acgraph global namespace that the library expects + var globalObj = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : global; + if (!globalObj.acgraph) { + globalObj.acgraph = {}; + } + globalObj.acgraph.module = globalObj.acgraph.module || globalObj.acgraph; + + // Also set the legacy flag for AnyChart AMD detection + if (!globalObj.IS_ANYCHART_AMD) { + globalObj.IS_ANYCHART_AMD = false; + } +})(); +/** + * GraphicsJS is a lightweight JavaScript graphics library with an intuitive API, based on SVG/VML technology. + * Version: 1.4.4 (2024-09-10) + * License: BSD 3-clause + * Copyright: AnyChart.com 2024. All rights reserved. + */ +(function(){var f,aa=aa||{},n=this;function r(a){return void 0!==a}function u(a){return"string"==typeof a}function v(a){return"number"==typeof a}function ba(a){a=a.split(".");for(var b=n,c=0;c>>0),la=0;function ma(a,b,c){return a.call.apply(a.bind,arguments)} +function na(a,b,c){if(!a)throw Error();if(2c?null:u(a)?a.charAt(c):a[c]}function Aa(a,b){var c=va(a,b),d;(d=0<=c)&&Ba(a,c);return d} +function Ba(a,b){Array.prototype.splice.call(a,b,1)}function Ca(a){return Array.prototype.concat.apply([],arguments)}function Da(a){var b=a.length;if(0=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)}function Ha(a,b){a.sort(b||Ia)}function Ja(a,b){for(var c=Array(a.length),d=0;db?1:a360*a?a+360:a}function La(a){return a*Math.PI/180}function Ma(a,b){return b*Math.cos(La(a))}function Na(a,b){return b*Math.sin(La(a))};function Oa(a,b){this.x=r(a)?a:0;this.y=r(b)?b:0}f=Oa.prototype;f.clone=function(){return new Oa(this.x,this.y)};function Pa(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}f.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};f.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};f.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}; +f.translate=function(a,b){a instanceof Oa?(this.x+=a.x,this.y+=a.y):(this.x+=Number(a),v(b)&&(this.y+=b));return this};f.scale=function(a,b){var c=v(b)?b:a;this.x*=a;this.y*=c;return this};function Qa(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}f=Qa.prototype;f.clone=function(){return new Qa(this.top,this.right,this.bottom,this.left)};f.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};f.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +f.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};f.translate=function(a,b){a instanceof Oa?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(this.left+=a,this.right+=a,v(b)&&(this.top+=b,this.bottom+=b));return this};f.scale=function(a,b){var c=v(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function Ra(a,b){this.width=a;this.height=b}f=Ra.prototype;f.clone=function(){return new Ra(this.width,this.height)};f.aspectRatio=function(){return this.width/this.height};f.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};f.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};f.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; +f.scale=function(a,b){var c=v(b)?b:a;this.width*=a;this.height*=c;return this};function A(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}f=A.prototype;f.clone=function(){return new A(this.left,this.top,this.width,this.height)};function Sa(a,b){var c=Math.max(a.left+a.width,b.left+b.width),d=Math.max(a.top+a.height,b.top+b.height);a.left=Math.min(a.left,b.left);a.top=Math.min(a.top,b.top);a.width=c-a.left;a.height=d-a.top} +f.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};f.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};f.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; +f.translate=function(a,b){a instanceof Oa?(this.left+=a.x,this.top+=a.y):(this.left+=a,v(b)&&(this.top+=b));return this};f.scale=function(a,b){var c=v(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function Ta(a,b,c,d,e,g,h){var k=La(g);g=Math.ceil(Math.abs(k)/Math.PI*2);k/=g;var l=La(e);e=h?[a+Ma(e,c),b+Na(e,d)]:[];for(h=0;hp;p++){var q=-3*g[p]+9*h[p]-9*k[p]+3*l[p],t=6*g[p]-12*h[p]+6*k[p];m=3*h[p]-3*g[p];if(0==q)0!=t&&(m=-m/t,0m&&c[p].push(b(g[p],h[p],k[p],l[p],m))); +else{var B=t*t-4*m*q;0m&&c[p].push(b(g[p],h[p],k[p],l[p],m)),m=(-t-Math.sqrt(B))/(2*q),0m&&c[p].push(b(g[p],h[p],k[p],l[p],m))):0==B&&(m=-t/(2*q),0m&&c[p].push(b(g[p],h[p],k[p],l[p],m)))}}}d=new A(Math.min.apply(null,c[0]),Math.min.apply(null,c[1]),0,0);d.width=Math.max.apply(null,c[0])-d.left;d.height=Math.max.apply(null,c[1])-d.top;return d} +function Va(a){if(0==arguments.length)return null;for(var b=null,c=!1,d=0,e=arguments.length;d>>0).toString(16);xb.prototype.b="ac_uid_"+(1E9*Math.random()>>>0);function yb(a,b,c){return b[a.b]||(b[a.b]=zb(a,b,c))}function zb(a,b,c){return["ac",r(c)?c:b.ia?b.ia():"",a.f,(a.c++).toString(36)].join("_")};function vb(a,b){var c=a.length-b.length;return 0<=c&&a.indexOf(b,c)==c}var Ab=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]};function Cb(a){return a.replace(/^[\s\xa0]+/,"")}function Db(a,b){return a.replace(/(\r\n|\r|\n)/g,b?"
":"
")} +function Eb(a){if(!Fb.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Gb,"&"));-1!=a.indexOf("<")&&(a=a.replace(Hb,"<"));-1!=a.indexOf(">")&&(a=a.replace(Ib,">"));-1!=a.indexOf('"')&&(a=a.replace(Jb,"""));-1!=a.indexOf("'")&&(a=a.replace(Kb,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(Lb,"�"));return a}var Gb=/&/g,Hb=//g,Jb=/"/g,Kb=/'/g,Lb=/\x00/g,Fb=/[\x00&<>"']/;function Mb(a,b){return ab?1:0} +function Nb(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})}function Ob(a){var b=u(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#parseFloat(tc)){sc=String(vc);break a}}sc=tc}var gc={}; +function wc(a){return fc(a,function(){for(var b=0,c=Ab(String(sc)).split("."),d=Ab(String(a)).split("."),e=Math.max(c.length,d.length),g=0;0==b&&gb.length){c.push(Fc(a)+"(");for(var d=a.arguments,e=0;d&&e=a.keyCode)a.keyCode=-1}catch(b){}};var Xc="closure_listenable_"+(1E6*Math.random()|0);function Yc(a){return!(!a||!a[Xc])}var Zc=0;function $c(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.qd=e;this.key=++Zc;this.dc=this.Yc=!1}function ad(a){a.dc=!0;a.listener=null;a.proxy=null;a.src=null;a.qd=null};function bd(a){this.src=a;this.b={};this.c=0}bd.prototype.add=function(a,b,c,d,e){var g=a.toString();a=this.b[g];a||(a=this.b[g]=[],this.c++);var h=cd(a,b,d,e);-1c.keyCode||void 0!=c.returnValue)){a:{var g=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(l){g=!0}if(g||void 0==c.returnValue)c.returnValue=!0}c=[];for(g=d.c;g;g=g.parentNode)c.push(g);g=a.type;for(var h=c.length-1;!d.i&&0<=h;h--){d.c=c[h];var k=sd(c[h],g,!0,d);e=e&&k}for(h=0;!d.i&&h>>0);function jd(a){if("function"==ea(a))return a;a[ud]||(a[ud]=function(b){return a.handleEvent(b)});return a[ud]};x("acgraph.events.listen",hd);x("acgraph.events.listenOnce",id);x("acgraph.events.unlisten",pd);x("acgraph.events.unlistenByKey",qd);x("acgraph.events.removeAll",rd);var vd=!F||9<=Number(xc),wd=F||hc||kc;var xd={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};function yd(){this.b="";this.c=zd}yd.prototype.tb=!0;yd.prototype.Ia=function(){return this.b};yd.prototype.toString=function(){return"Const{"+this.b+"}"};function Ad(a){return a instanceof yd&&a.constructor===yd&&a.c===zd?a.b:"type_error:Const"}var zd={};function Bd(a){var b=new yd;b.b=a;return b}Bd("");function Cd(){this.b=Dd}Cd.prototype.tb=!0;Cd.prototype.Ia=function(){return""};Cd.prototype.ve=!0;Cd.prototype.Zb=function(){return 1};var Dd={};function Ed(){this.b="";this.c=Fd}Ed.prototype.tb=!0;Ed.prototype.Ia=function(){return this.b};Ed.prototype.ve=!0;Ed.prototype.Zb=function(){return 1};function Gd(a){if(a instanceof Ed&&a.constructor===Ed&&a.c===Fd)return a.b;ea(a);return"type_error:SafeUrl"}var Hd=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function Id(a){if(a instanceof Ed)return a;a=a.tb?a.Ia():String(a);Hd.test(a)||(a="about:invalid#zClosurez");return Jd(a)}var Fd={};function Jd(a){var b=new Ed;b.b=a;return b}Jd("about:blank");function Kd(){this.b="";this.c=Ld}Kd.prototype.tb=!0;var Ld={};Kd.prototype.Ia=function(){return this.b};function Md(a){var b=new Kd;b.b=a;return b}var Nd=Md("");function Od(a){if(a instanceof Ed)a='url("'+Gd(a).replace(/",0);Yd("",0);Yd("
",0);function de(a){return a?new ee(fe(a)):sa||(sa=new ee)}function ge(a){var b=document;return u(a)?b.getElementById(a):a}function he(a,b){return(b||document).getElementsByTagName(String(a))}function ie(a,b){var c=document;c=b||c;var d=a&&"*"!=a?String(a).toUpperCase():"";return c.querySelectorAll&&c.querySelector&&d?c.querySelectorAll(d):c.getElementsByTagName(d||"*")} +function je(a,b){Sb(b,function(b,d){b&&b.tb&&(b=b.Ia());"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:ke.hasOwnProperty(d)?a.setAttribute(ke[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})}var ke={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"}; +function le(a){var b=a.scrollingElement?a.scrollingElement:kc||"CSS1Compat"!=a.compatMode?a.body||a.documentElement:a.documentElement;a=a.parentWindow||a.defaultView;return F&&wc("10")&&a.pageYOffset!=b.scrollTop?new Oa(b.scrollLeft,b.scrollTop):new Oa(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function me(a,b,c){return ne(document,arguments)} +function ne(a,b){var c=String(b[0]),d=b[1];if(!vd&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',Eb(d.name),'"');if(d.type){c.push(' type="',Eb(d.type),'"');var e={};ac(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(u(d)?c.className=d:fa(d)?c.className=d.join(" "):je(c,d));2l&&(l=0);l=Math.sqrt(l);g==h&&(l=-l);g=l*d*c/e;k=-l*e*b/d;l=ab(1,0,(b-g)/d,(c-k)/e);b=ab((b-g)/d,(c-k)/e,(-b-g)/d,(-c-k)/e)%360;!h&&0b&&(b+=360);return Ff(a,d,e,l,b)} +function Ff(a,b,c,d,e){if(0==a.c.length)throw Cc(9);if(0==e)return a;var g=a.J[0]-Ma(d,b),h=a.J[1]-Na(d,c);var k=Math.ceil(Math.abs(e)/359.999-2E-15);for(var l=e/k,m=0;mg;p+=m)switch((Math.floor(p/90)+4)%4){case 0:h.push(a+c);break;case 1:k.push(b+d);break;case 2:h.push(a-c);break;case 3:k.push(b-d)}l.left=Math.min.apply(null,h);l.width=Math.max.apply(null,h)-l.left;l.top=Math.min.apply(null,k);l.height=Math.max.apply(null,k)-l.top;Sa(this.rect,l)};Gf=If; +P.prototype.Rc=function(){var a=0;if(0==this.c.length)return a;var b=[];this.te(function(c,d){if(1!=c){var e=Ga(b,b.length-2);if(4==c){var g=6;d=Ta(e[0]-Ma(d[2],d[0]),e[1]-Na(d[2],d[1]),d[0],d[1],d[2],d[3])}else 2==c?g=2:3==c&&(g=6);for(var h=0,k=d.length-(g-1);h=q;q++){m=q/100;var C={x:0,y:0};if(0===m)p.push(B[0]);else if(1===m)p.push(B[t]); +else{var w=B,H=1-m;if(1===t)m={x:H*w[0].x+m*w[1].x,y:H*w[0].y+m*w[1].y},p.push(m);else if(4>t){var U=H*H,N=m*m,J=0;if(2===t){w=[w[0],w[1],w[2],C];var rb=U;var Bb=H*m*2;var $a=N}else 3===t&&(rb=U*H,Bb=U*m*3,$a=H*N*3,J=m*N);m={x:rb*w[0].x+Bb*w[1].x+$a*w[2].x+J*w[3].x,y:rb*w[0].y+Bb*w[1].y+$a*w[2].y+J*w[3].y};p.push(m)}else{for(w=JSON.parse(JSON.stringify(B));1d.length?d=c=g=e=parseFloat(d[0]):(e=parseFloat(d[0]),g=parseFloat(d[1]),c=parseFloat(d[2]),d=parseFloat(d[3]));this.w[0]=e?e:0;this.v[0]=e?a:void 0;this.w[1]=g?g:0;this.v[1]=g?a:void 0;this.w[2]=c?c:0;this.v[2]=c?a:void 0;this.w[3]=d?d:0;this.v[3]=d?a:void 0}; +function Nf(a){var b=!a.u()||a.u().ea();b||a.u().suspend();Df(a);var c=a.w[0];a.xd(a.b.left+c,a.b.top);c=a.w[1];a.Ca(a.b.left+a.b.width-a.w[1],a.b.top);if(a.v[1])switch(a.v[1]){case "round":Ef(a,a.b.left+a.b.width,a.b.top+c,c,c,!1,!0);break;case "round-inner":Ef(a,a.b.left+a.b.width,a.b.top+c,c,c,!1,!1);break;case "cut":a.Ca(a.b.left+a.b.width,a.b.top+c)}c=a.w[2];a.Ca(a.b.left+a.b.width,a.b.top+a.b.height-c);if(a.v[2])switch(a.v[2]){case "round":Ef(a,a.b.left+a.b.width-c,a.b.top+a.b.height,c,c,!1, +!0);break;case "round-inner":Ef(a,a.b.left+a.b.width-c,a.b.top+a.b.height,c,c,!1,!1);break;case "cut":a.Ca(a.b.left+a.b.width-c,a.b.top+a.b.height)}c=a.w[3];a.Ca(a.b.left+c,a.b.top+a.b.height);if(a.v[3])switch(a.v[3]){case "round":Ef(a,a.b.left,a.b.top+a.b.height-c,c,c,!1,!0);break;case "round-inner":Ef(a,a.b.left,a.b.top+a.b.height-c,c,c,!1,!1);break;case "cut":a.Ca(a.b.left,a.b.top+a.b.height-c)}c=a.w[0];a.Ca(a.b.left,a.b.top+c);if(a.v[0])switch(a.v[0]){case "round":Ef(a,a.b.left+c,a.b.top,c,c, +!1,!0);break;case "round-inner":Ef(a,a.b.left+c,a.b.top,c,c,!1,!1)}a.je();b||a.u().resume()}f.round=function(a,b,c,d){Fa(arguments,0,0,"round");this.Ee.apply(this,arguments);Nf(this);return this};f.kh=function(a,b,c,d){Fa(arguments,0,0,"round-inner");this.Ee.apply(this,arguments);Nf(this);return this};f.Gg=function(a,b,c,d){Fa(arguments,0,0,"cut");this.Ee.apply(this,arguments);Nf(this);return this}; +f.F=function(a){Mf.m.F.call(this,a);this.Ne(a.x).Oe(a.y).Me(a.width).He(a.height);a.cornerTypes&&(this.v=sb(a.cornerTypes,4),a=sb(a.cornerSizes,4),wa(a,function(a,c,d){d[c]=parseFloat(a)}),this.w=a,Nf(this))};f.K=function(){var a=Mf.m.K.call(this);a.type="rect";a.x=this.b.left;a.y=this.b.top;a.width=this.b.width;a.height=this.b.height;a.cornerTypes=this.v.join(" ");a.cornerSizes=this.w.join(" ");return a};f.A=function(){this.b=this.v=this.w=null;this.M();Mf.m.A.call(this)};var Of=Mf.prototype; +x("acgraph.vector.Rect",Mf);Of.setX=Of.Ne;Of.setY=Of.Oe;Of.setWidth=Of.Me;Of.setHeight=Of.He;Of.setBounds=Of.mh;Of.cut=Of.Gg;Of.round=Of.round;Of.roundInner=Of.kh;function of(a,b,c,d,e){Nc.call(this);this.c=a;this.g=!1;this.f=[];this.b=this.V=null;this.kb.apply(this,Ga(arguments,1))}y(of,Nc);function Pf(a,b){if(r(b)){a.c=b;if(a.g){var c=a.c;c.ea()?c.ob.push(a):a.P()}return a}return a.c}var Qf={rect:Mf,circle:wf,ellipse:uf,path:Kf};f=of.prototype; +f.kb=function(a,b,c,d){if(arguments.length){if(D(a,pf))if(this.b){var e=!1;for(h in Qf){var g=Qf[h];if(D(this.b,g)&&D(a,g)){e=!0;break}}e?this.b.F(a.K()):(this.b.parent(null),this.b=a,this.b.parent(this))}else this.b=a,this.b.parent(this);else{if(D(a,A)){e=a.left;var h=a.top;g=a.width;var k=a.height}else fa(a)?(e=null!=a[0]?a[0]:0,h=null!=a[1]?a[1]:0,g=null!=a[2]?a[2]:0,k=null!=a[3]?a[3]:0):ia(a)?(e=null!=a.left?a.left:0,h=null!=a.top?a.top:0,g=null!=a.width?a.width:0,k=null!=a.height?a.height:0): +(e=null!=a?a:0,h=null!=b?b:0,g=null!=c?c:0,k=null!=d?d:0);this.b?D(this.b,Mf)?this.b.Ne(e).Oe(h).Me(g).He(k):(this.b.parent(null),this.b=Rf(e,h,g,k),this.b.parent(this)):(this.b=Rf(e,h,g,k),this.b.parent(this))}return this}return this.b};f.Ma=function(){return this.g};function Sf(a){if(!a.g&&(a.g=!0,a.c)){var b=a.c;b.ea()?b.ob.push(a):a.P()}}f.id=function(a){return r(a)?(this.V=a,this):this.V}; +f.P=function(){this.g=!1;if(this.V){L();var a=this.kb();if(a.h())this.kb().P();else{var b=Tf(this.u().ua,this);a.P();b.appendChild(a.h())}}};f.K=function(){return this.b.K()};f.F=function(a){var b=Qf[a.type];b&&(b=new b,b.F(a),this.kb(b))};f.nb=function(a){a.remove();ef(a,this);Sf(this);ff(a,!0);return this};f.removeChild=function(a){ef(a,null);var b=a.h();b&&G(b);Sf(this);ff(a,!1);return a};f.ba=function(){return null};f.Fc=function(){};f.u=function(){return Pf(this)};f.j=function(){Sf(this)}; +f.R=function(){of.m.R.call(this)};f.A=function(){this.c&&Aa(this.c.ob,this);L().Bf(this);this.b.R();delete this.c;delete this.V;delete this.f;delete this.g;delete this.b;of.m.A.call(this)};var Uf=of.prototype;Uf.shape=Uf.kb;Uf.dispose=Uf.R;function Q(){this.b=[];this.f=[];K.call(this)}y(Q,K);f=Q.prototype;f.ia=function(){return"layer"};f.$=K.prototype.$|224;f.Bd=function(){for(var a=0;aa||a>=this.Na()||0>b||b>=this.Na())throw Cc(8);if(a!=b){var c=this.b[a];this.b[a]=this.b[b];this.b[b]=c;this.j(128)}return this};f.rd=function(a){return!!a&&0<=va(this.b,a)};f.Na=function(){return this.b.length};f.zc=function(a,b){r(b)||(b=this);wa(this.b,a,b);return this};f.ac=function(){var a=Vf();a.parent(this);return a};f.Zd=function(){var a=new Wf(void 0);a.parent(this);return a};f.text=function(a,b,c,d){a=Xf(a,b);d&&a.style(d);c&&a.text(c);a.parent(this);return a}; +f.td=function(a,b,c,d){a=Xf(a,b);d&&a.style(d);c&&a.ce(c);a.parent(this);return a};f.rect=function(a,b,c,d){a=Rf(a,b,c,d);a.parent(this);return a};f.La=function(a,b,c,d,e){a=Yf(a,b,c,d,e);a.parent(this);return a};f.Gd=function(a,b){var c=this.path();Fa(arguments,0,0,c);return Zf.apply(this,arguments).parent(this)};f.Fd=function(a,b){var c=this.path();Fa(arguments,0,0,c);return $f.apply(this,arguments).parent(this)};f.Xd=function(a,b){var c=this.path();Fa(arguments,0,0,c);return ag.apply(this,arguments).parent(this)}; +f.Vb=function(a,b,c){a=bg(a,b,c);a.parent(this);return a};f.ellipse=function(a,b,c,d){a=cg(a,b,c,d);a.parent(this);return a};f.path=function(){return dg().parent(this)};f.Md=function(a,b,c,d,e,g,h){return eg(this.path(),a,b,c,d,e,g,h).parent(this)};f.Od=function(a,b,c){return fg(this.path(),a,b,c).parent(this)};f.Pd=function(a,b,c){return gg(this.path(),a,b,c).parent(this)};f.Qd=function(a,b,c){return hg(this.path(),a,b,c).parent(this)};f.Rd=function(a,b,c){return ig(this.path(),a,b,c).parent(this)}; +f.Nd=function(a,b,c){return jg(this.path(),a,b,c).parent(this)};f.Wd=function(a,b,c){return kg(this.path(),a,b,c).parent(this)};f.Td=function(a,b,c){return lg(this.path(),a,b,c).parent(this)};f.Vd=function(a,b,c){return mg(this.path(),a,b,c).parent(this)};f.Ud=function(a,b,c){return ng(this.path(),a,b,c).parent(this)};f.ed=function(a,b,c){return og(this.path(),a,b,c).parent(this)};f.$c=function(a,b,c){return pg(this.path(),a,b,c).parent(this)};f.dd=function(a,b,c){return qg(this.path(),a,b,c).parent(this)}; +f.pd=function(a,b,c){return rg(this.path(),a,b,c).parent(this)};f.$d=function(a,b,c){return sg(this.path(),a,b,c).parent(this)};f.Ad=function(a,b,c,d,e){return tg(this.path(),a,b,c,d,e).parent(this)};f.gd=function(a,b,c,d,e,g){return ug(this.path(),a,b,c,d,e,g).parent(this)};f.Ha=function(){return L().wc()}; +f.T=function(){this.D(32)&&this.We();var a=this.u();a=a.rc(Math.floor(Math.max(500-a.Ba,0)/3));this.D(64)&&vg(this);var b=this.u();b.Ba-=a;if(this.D(128)&&(a=this.u().rc(this.b.length+this.f.length+1),b=wg(this,a),b=b&&(p=!1);if(p){for(;l +d;d++){c=!1;for(var e=0;4>e;e++){c=!c;for(var g=0;4>g;g++)c&&Eg(this,a,a,e*a+d*this.size/2,g*a+this.size/2),c=!c}}},"solid-diamond":function(){Hg(this,[[this.size/2,0,0,this.size/2,this.size/2,this.size,this.size,this.size/2,this.size/2,0]],!0,!0)},"dashed-forward-diagonal":function(){Fg(this,[0,0,this.size/2,this.size/2,this.I])},"dashed-backward-diagonal":function(){Fg(this,[this.size/2,0,0,this.size/2,this.I])},"dashed-horizontal":function(){Fg(this,[0,0,this.size/2,0,this.I,this.size/2,this.size/ +2,this.size,this.size/2,this.I])},"dashed-vertical":function(){Fg(this,[0,0,0,this.size/2,this.I,this.size/2,this.size/2,this.size/2,this.size,this.I])},divot:function(){var a=.1*this.size,c=this.size*(.8-.2)/2;Hg(this,[[a+c,a,a,a+c/2,a+c,a+c],[this.size-a-c,this.size-a-c,this.size-a,this.size-a-c/2,this.size-a-c,this.size-a]])},"zig-zag":function(){Hg(this,[[0,0,this.size/2,this.size/2,this.size,0],[0,this.size/2,this.size/2,this.size,this.size,this.size/2]])},weave:function(){Hg(this,[[0,0,this.size/ +2,this.size/2,this.size,0],[0,this.size/2,this.size/2,this.size,this.size,this.size/2],[this.size/2,this.size/2,3*this.size/4,3*this.size/4],[this.size,this.size/2,3*this.size/4,this.size/4]])}};a["percent-05"]=pa(Bg,8,8,[0,0,4,4]);a["percent-10"]=pa(Bg,8,4,[0,0,4,2]);a["percent-20"]=pa(Bg,4,4,[0,0,2,2]);a["percent-25"]=pa(Bg,4,2,[0,0,2,1]);a["percent-30"]=pa(Bg,4,4,[0,0,2,0,3,1,0,2,2,2,1,3]);a["percent-40"]=pa(Bg,4,8,[0,0,2,0,3,1,0,2,2,2,1,3,3,3,0,4,2,4,1,5,3,5,0,6,2,6,1,7,3,7]);a["percent-50"]= +pa(Bg,2,2,[0,0,1,1]);a["percent-60"]=pa(Bg,4,4,[0,0,2,0,0,1,1,1,3,1,0,2,2,2,1,3,2,3,3,3]);a["percent-70"]=pa(Bg,4,4,[0,0,2,0,3,0,0,1,1,1,2,1,0,2,2,2,3,2,0,3,1,3,2,3]);a["percent-75"]=pa(Dg,4,4,[0,0,2,2]);a["percent-80"]=pa(Dg,8,4,[0,0,4,2]);a["percent-90"]=pa(Dg,8,8,[7,7,4,3]);return a}();function Hg(a,b,c,d){a=Ig(a,d);for(d=0;d=a?c=180+c:270=a&&(c=360+c);return c%360}f=Rg.prototype;f.cg=ca;f.Le=ca;f.Fe=ca;function S(a,b,c){for(var d in c)a.o(b,d,c[d])}f.o=function(a,b,c){a.setAttribute(b,c)};function nf(a,b,c){b&&(c?a.o(b,"id",c):b.removeAttribute("id"))} +function Xg(a,b,c){if(0==b.c.length)return null;var d=[],e=a.Qf;(c?b.Jg:b.te).call(b,function(a,b){var c=e[a];c&&(d.push(c),4==a?this.Rf(d,b):5!=a&&this.Sf(d,b))},a);return d.join(" ")}f.Rf=function(a,b){var c=b[3];a.push(b[0],b[1],0,180b?1:u(a)&&vb(a,"%")?1+parseFloat(a)/100:a} +f.ee=function(a){null!=a&&(this.f=a);return xh(this,"textIndent",a)};f.Bb=function(a){if(r(a))if("center"==a)a="middle";else{var b=!1;Sb(uh,function(c){a==c&&(b=!0)});b||(a="top")}return xh(this,"vAlign",a)};f.Ka=function(a){if(r(a))if("middle"==a)a="center";else{var b=!1;Sb(th,function(c){a==c&&(b=!0)});b||(a=T)}return xh(this,"hAlign",a)};f.ug=function(a){return xh(this,"wordBreak",a)};f.$e=function(a){return xh(this,"wordWrap",a)}; +f.mb=function(a){null!=a&&(this.ib=a);return xh(this,"textOverflow",a)};f.Jc=function(a){return xh(this,"selectable",a)};f.path=function(a){return r(a)?(this.Ra=a,this.u()&&this.Ra.parent(this.u().ua),(a=!this.u()||this.u().ea())||this.u().suspend(),this.H=!1,this.j(17504),this.hb(),a||this.u().resume(),this):this.Ra}; +f.style=function(a){if(null!=a){Sb(a,function(a,b){var c=b;switch(b){case "fontDecoration":case "textDecoration":c="decoration";break;case "fontColor":c="color";break;case "fontOpacity":c="opacity"}this.s[c]=a},this);this.ma=parseFloat(this.s.width)||0;this.va=parseFloat(this.s.height)||0;this.s.lineHeight&&(this.jb=yh(this.s.lineHeight));var b=this.s.vAlign;if(null!=b)if("center"==b)this.s.vAlign="middle";else{var c=!1;Sb(uh,function(a){b==a&&(c=!0)});c||(this.s.vAlign="top")}var d=this.s.hAlign; +null!=d&&("middle"==d?this.s.hAlign="center":(c=!1,Sb(th,function(a){d==a&&(c=!0)}),c||(this.s.hAlign=T)));null!=this.s.direction&&(this.v="rtl"==this.s.direction);null!=this.s.textOverflow&&(this.ib=this.s.textOverflow);null!=this.s.textIndent&&(this.f=this.s.textIndent);this.v&&(this.f=0);(a=!this.u()||this.u().ea())||this.u().suspend();this.H=!1;this.j(1024);this.j(32);this.j(16384);this.j(4);this.hb();a||this.u().resume();return this}return this.s}; +f.ce=function(a){return r(a)?(a!=this.Ga&&(this.Ga=String(a),this.gc=!0,(a=!this.u()||this.u().ea())||this.u().suspend(),this.H=!1,this.j(1024),this.j(32),this.j(16384),this.hb(),a||this.u().resume()),this):this.Ga};f.ia=function(){return"text"};f.qa=function(){return this.Oa.clone()};f.Za=function(a){this.H||this.Ob();return a?ph.m.Za.call(this,a):this.Tb(null)}; +f.Tb=function(a){if(this.path())if(this.se)var b=this.se;else{b=L();b.Wa();this.H||this.Ob();var c=this.path();c.h()||hf(c,!0);b.Ie(c);var d=c.h().parentNode;b.c.appendChild(c.h());d||(d=yb(xb.oa(),c.h(),"path"),nf(b,c.h(),d));this.h()||hf(this,!0);this.Be();this.Wc();L().Ke(this);M(this,1024);this.Ed();this.eb();d=yb(xb.oa(),c.h(),"path");c=zh();this.fa.setAttributeNS("http://www.w3.org/1999/xlink","href",c+"#"+d);c=this.h();d=c.parentNode;b.wa.appendChild(c);b=this.h().getBBox();d&&d.appendChild(c); +b=new A(b.x,b.y,b.width,b.height)}else b=this.Oa.clone();return Xa(b,a)};f.M=function(){ph.m.M.call(this);this.se=null};f.Nf=function(a){for(var b=L().g,c=arguments,d={},e=0,g=b.length;ee&&1a.ma?a.ma-d.width-e:a.f,0>a.f&&(a.f=0));a.Z=Math.max(a.Z,d.height);a.w+=d.width;0==a.b.length&&(a.w+=a.f);a.N=Math.max(a.N,c.f);a.fc=a.c.length?a.fc&&0==b.length:0==b.length;a.c.push(c);a.b.push(c);c.parent(a);return c} +function Ch(a,b){var c,d=b||ta(a.la),e=ta(d),g=a.ja(a.ib,e.b),h=a.ib,k=1a.Ea){var m=Ah(a,a.ib,e.b,0,a.Ea,g,!0);h=a.ib.substring(0,m)}m=a.Sc;var p=a.Ea;if(""==h)l=va(a.b,e)+1,Fa(a.b,l,a.b.length-l);else if(p-m>=g.width){a.c=d;l=va(a.b,e)+1;Fa(a.b,l,a.b.length-l);var q=Bh(a,h,e.b,g);2==a.c.length&&""==a.c[0].text&&(q.c=a.wb-a.c[0].height,q.i=!0)}else{for(k=d.length-1;!c&&0<=k;)e=d[k],g=a.ja(h,e.b),l=a.ja(e.text, +e.b),m-l.width+g.width<=a.Ea&&(c=e),m-=l.width,k--;c||1!=a.la.length||(c=d[0],m-=l.width);c&&(a.c=d,k=a.c[0].c,p-=g.width,l=va(d,c),Fa(d,l,d.length-l),l=va(a.b,c),Fa(a.b,l,a.b.length-l),a.Z=0,a.w=0,a.N=0,l=a.ja(c.text,c.b),m=Ah(a,c.text,c.b,m,p,l,!0),1>m&&(m=1),l=c.text.substring(0,m),d=a.ja(l,c.b),l=Bh(a,l,c.b,d,g.width),l.x=c.x,l.y=c.y,l.Ig=!0,d.width+g.width>a.Ea&&(m=Ah(a,a.ib,e.b,d.width,a.Ea,g,!0),h=a.ib.substring(0,m)),0a.Ea&&!a.Ab;){var h=Ah(a,b,c,g+a.w,a.Ea,e);1>h&&0==a.c.length&&(h=1);0!=h&&(g=Cb(b.substring(0,h)),e=a.ja(g,c),Bh(a,g,c,e));Eh(a);1==b.length&&(a.Ab=!0);g=0;b=Cb(b.substring(h,b.length));e=a.ja(b,c)}a.Ab||!b.length&&!d||Bh(a,b,c,e)}} +function Eh(a){if(!a.Ab&&0!=a.c.length){var b=0==a.la.length;if(a.va&&a.g+a.Z>a.va&&0!=a.la.length)Ch(a),a.Ab=!0;else{a.Z=u(a.jb)?parseInt(a.jb,0)+a.Z:a.jb*a.Z;if(L().Of()){var c;var d=a.v&&a.s.hAlign==T||!a.v&&"end"==a.s.hAlign||"right"==a.s.hAlign;var e="center"==a.s.hAlign;if(a.v&&"end"==a.s.hAlign||!a.v&&a.s.hAlign==T||"left"==a.s.hAlign){e=a.v?0:a.f&&b?a.f:0;var g=0;for(c=a.c.length;ga.Ea&&(1"!=e)break;"br"==a.c&&Dh(a.da);a.c="";k=!1;a.b=1;break}if(!a.c&&"<"==e){a.f+="<";break}if(!a.c&&h&&"/"!=e){a.f+="<"+e;a.b=1;break}if(!a.c&&"/"==e){a.b=3;break}if("br"==a.c&&">"==e){Dh(a.da);a.c="";a.b=1;break}if("br"==a.c&&("/"==e||g)){k=!0;break}a.c&&hh(a);if(a.c&&g){a.b=4;break}if(">"==e){kh(a);break}a.c+=e.toLowerCase();break;case 3:if(k){if(">"!=e)break;jh(a);k=!1;break}if(!a.G&&h){a.f+=""==e){jh(a);k=!1;break}a.G+=e.toLowerCase();break;case 4:if(k){if(">"!=e)break;kh(a,!0);k=!1;break}if(">"==e){kh(a,!0);break}if(g){a.b=5;break}if("="==e){a.g&&(a.b="style"==a.g?6:8);break}a.g+=e.toLowerCase();break;case 5:if(">"==e){kh(a,!0);break}if(g)break;if(a.g&&!h){a.g=e;a.b=4;break}if("="==e){a.g&&(a.b="style"==a.g?6:8);break}a.g+=e;a.b=4;break;case 6:if(g)break;if(">"==e){kh(a,!0);break}if("'"==e||'"'==e){a.Z=e;a.b=9;break}a.l=e;a.b=10;break;case 8:if(g)break;if(">"==e){a.g= +"";a.c="";a.b=1;break}if("'"==e||'"'==e){a.Z=e;a.b=7;break}a.b=11;break;case 9:if(g)break;if(e==a.Z){k=!0;lh(a,4,!0);break}if(":"==e){a.b=12;break}a.l+=e.toLowerCase();break;case 12:if(g)break;if(e==a.Z){k=!0;lh(a,4,!0);break}if(";"==e){lh(a,9);break}a.w+=e.toLowerCase();break;case 7:e==a.Z&&(a.g="",a.b=4);break;case 10:if(g){k=!0;lh(a,4,!0);break}if(">"==e){mh(a);break}if(":"==e){a.b=13;break}a.l+=e;break;case 11:if(g){lh(a,4,!0);break}">"==e&&kh(a);break;case 13:if(g){k=!0;lh(a,4,!0);break}if(">"== +e){mh(a);break}if(";"==e){lh(a,10);break}a.w+=e.toLowerCase();break;default:throw"Error while parsing HTML: Symbol '"+e+"', position: "+(d-1);}hh(a);Eh(a.da)}else for(this.Ga=this.Ga.replace(/\xa0|[ \t]+/g," ").replace(/(\r\n|\r|\n)/g,"\n"),c=this.Ga.split(/\n/g),b=0;bg)return a;h=h||0;var l=Ma(h,d),m=Na(h,d),p=360/(2*g),q;a.moveTo(l+b,m+c);if(k)for(q=0;qd&&(d=0);0>e&&(e=0);if(d=e)return tg(a,b,c,d,g,h);a=a.path?a.path():a;h=z(h,-360,360);k=360>Math.abs(h);a.vc(b,c,d,d,g,h).vc(b,c,e,e,g+h,-h,k);k&&a.close();return a}function Gh(a,b,c,d,e,g){a=Ma(c,a);b=Ma(d,b)-a;return 0<=e?a+b*(g+e-g*e):a+b*g*(e+1)}function Hh(a,b,c,d,e,g){a=Na(c,a);b=Na(d,b)-a;return 0<=e?a+b*(g+e-g*e):a+b*g*(e+1)} +function Ih(a){var b,c;switch(a.length){case 1:var d=b=c=a[0];a.push(d,b,c);break;case 2:b=a[0];c=a[1];a.push(b,c);break;case 3:c=a[1];a.push(c);break;case 4:break;default:a.push(5,5,5,5)}} +function ag(a,b,c){var d=a.path?a.path():a;if(6==arguments.length){var e=arguments[2];var g=arguments[3];var h=arguments[4];var k=arguments[5];d.moveTo(b.left+e,b.top).lineTo(b.left+b.width-g,b.top).lineTo(b.left+b.width,b.top+g).lineTo(b.left+b.width,b.top+b.height-h).lineTo(b.left+b.width-h,b.top+b.height).lineTo(b.left+k,b.top+b.height).lineTo(b.left,b.top+b.height-k).lineTo(b.left,b.top+e).close()}else k=Ga(arguments,2,6),Ih(k),e=k[0],g=k[1],h=k[2],k=k[3],ag(d,b,e,g,h,k);return d} +function Zf(a,b,c){var d=a.path?a.path():a;if(6==arguments.length){var e=arguments[2];var g=arguments[3];var h=arguments[4];var k=arguments[5];d.moveTo(b.left+e,b.top).lineTo(b.left+b.width-g,b.top).Sa(b.left+b.width,b.top+g,g,g,!1,!0).lineTo(b.left+b.width,b.top+b.height-h).Sa(b.left+b.width-h,b.top+b.height,h,h,!1,!0).lineTo(b.left+k,b.top+b.height).Sa(b.left,b.top+b.height-k,k,k,!1,!0);0!=e&&(d.lineTo(b.left,b.top+e),d.Sa(b.left+e,b.top,e,e,!1,!0));d.close()}else k=Ga(arguments,2,6),Ih(k),e=k[0], +g=k[1],h=k[2],k=k[3],Zf(d,b,e,g,h,k);return d} +function $f(a,b,c){var d=a.path?a.path():a;if(6==arguments.length){var e=arguments[2];var g=arguments[3];var h=arguments[4];var k=arguments[5];d.moveTo(b.left+e,b.top).lineTo(b.left+b.width-g,b.top).Sa(b.left+b.width,b.top+g,g,g,!1,!1).lineTo(b.left+b.width,b.top+b.height-h).Sa(b.left+b.width-h,b.top+b.height,h,h,!1,!1).lineTo(b.left+k,b.top+b.height).Sa(b.left,b.top+b.height-k,k,k,!1,!1);0!=e&&d.lineTo(b.left,b.top+e).Sa(b.left+e,b.top,e,e,!1,!1);d.close()}else k=Ga(arguments,2,6),Ih(k),e=k[0],g= +k[1],h=k[2],k=k[3],$f(d,b,e,g,h,k);return d}x("acgraph.vector.primitives.star",eg);x("acgraph.vector.primitives.star4",fg);x("acgraph.vector.primitives.star5",gg);x("acgraph.vector.primitives.star6",hg);x("acgraph.vector.primitives.star7",ig);x("acgraph.vector.primitives.star10",jg);x("acgraph.vector.primitives.diamond",og);x("acgraph.vector.primitives.triangleUp",kg);x("acgraph.vector.primitives.triangleDown",lg);x("acgraph.vector.primitives.triangleRight",mg); +x("acgraph.vector.primitives.triangleLeft",ng);x("acgraph.vector.primitives.cross",pg);x("acgraph.vector.primitives.diagonalCross",qg);x("acgraph.vector.primitives.hLine",rg);x("acgraph.vector.primitives.vLine",sg);x("acgraph.vector.primitives.pie",tg);x("acgraph.vector.primitives.donut",ug);x("acgraph.vector.primitives.truncatedRect",ag);x("acgraph.vector.primitives.roundedRect",Zf);x("acgraph.vector.primitives.roundedInnerRect",$f);function Jh(a,b,c,d){this.b=a;this.f=b;this.c=c;this.g=d}Jh.prototype.clone=function(){return new Jh(this.b,this.f,this.c,this.g)};function Kh(){Rg.call(this)}y(Kh,Rg);da(Kh);f=Kh.prototype;f.wa=null;f.X=null;f.bc=null;f.sa=null;f.sb=null;function Lh(a){return Zg.document.createElementNS("http://www.w3.org/2000/svg",a)} +f.Wa=function(){this.wa||(this.wa=Lh("svg"),this.X=this.Zc(),this.bc=this.pc(""),this.c=this.ke(),this.X.appendChild(this.bc),this.wa.appendChild(this.X),this.wa.appendChild(this.c),this.f=this.wc(),this.wa.appendChild(this.f),S(this,this.wa,{width:0,height:0}),this.wa.style.cssText="position: absolute; left: -99999px; top: -99999px",this.sa=this.wc(),this.wa.appendChild(this.sa),Zg.document.body.appendChild(this.wa))}; +function Mh(){var a=L();G(a.X);G(a.bc);G(a.c);G(a.f);G(a.sa);G(a.wa);a.X=null;a.bc=null;a.c=null;a.f=null;a.sa=null;a.wa=null} +f.measure=function(a,b){this.Wa();var c=null,d=0;if(0==a.length)return Tg(this,"",b)?d=Ug(this,"",b):(d=this.measure("a",b),d=new A(0,d.top,0,d.height),Ug(this,"",b,d)),d;if(" "==a)return Sg(this,b);0==a.lastIndexOf(" ",0)&&(d+=c=Sg(this,b).width);vb(a," ")&&(d+=c||Sg(this,b).width);b.fontStyle?this.o(this.X,"font-style",b.fontStyle):this.X.removeAttribute("font-style");b.fontVariant?this.o(this.X,"font-variant",b.fontVariant):this.X.removeAttribute("font-variant");b.fontFamily?this.o(this.X,"font-family", +b.fontFamily):this.X.removeAttribute("font-family");b.fontSize?this.o(this.X,"font-size",b.fontSize):this.X.removeAttribute("font-size");b.fontWeight?this.o(this.X,"font-weight",b.fontWeight):this.X.removeAttribute("font-weight");b.letterSpacing?this.o(this.X,"letter-spacing",b.letterSpacing):this.X.removeAttribute("letter-spacing");b.decoration?this.o(this.X,"text-decoration",b.decoration):this.X.removeAttribute("text-decoration");this.bc.nodeValue=a;c=this.X.getBBox();b.fontVariant&&hc&&(this.bc.nodeValue= +a.charAt(0).toUpperCase(),c.height=this.X.getBBox().height);return new A(c.x,c.y,c.width+d,c.height)};f.Mf=function(a){this.Wa();u(a)?this.sa.innerHTML=a:(a=a.cloneNode(!0),this.sa.appendChild(a));a=this.sa.getBBox();qe(this.sa);return new A(a.x,a.y,a.width,a.height)};f.wd=function(a,b){this.b||(Yg(this),this.b={},hd(this.sb,"complete",function(){this.i=!1},!1,this),hd(this.sb,"load",this.fh,!1,this));this.b[ja(b)]=[a,b];this.i=!0;Qg(this.sb,a,a);this.sb.start()}; +f.fh=function(a){var b=a.target;Sb(this.b,function(a,d){a[0]==b.id&&(a[1].call(this,b.naturalWidth,b.naturalHeight),delete this.b[d])},this)};f.Lf=function(){return this.i};f.Qf={1:"M",2:"L",3:"C",4:"A",5:"Z"};function Nh(a){var b=La(a),c=Math.tan(b);a=1/(2*c);c/=2;.5>=Math.abs(c)?(a=-.5,b=0>Math.cos(b)):(c=-.5,b=0Math.sin(d)||180==a||360==a;if(90==a||270==a)c+=1E-6;180!=a&&(0>Math.tan(d)||90==a||270==a)&&(e=-1,c=90-c);c=La(c);d=Math.sin(c)*(b.height/2-Math.tan(c)*b.width/2)+b.width/2/Math.cos(c);e*=Math.cos(c)*d;c=Math.sin(c)*d;k&&(e=-e,c=-c);return new Jh(Math.round(g-e),Math.round(h+c),Math.round(g+e),Math.round(h-c))}f.vf=function(){var a=Lh("svg");F||this.o(a,"xmlns","http://www.w3.org/2000/svg");this.o(a,"border","0");return a}; +f.tf=function(){return Lh("linearGradient")};f.rf=function(){return Lh("pattern")};f.sf=function(){return Lh("image")};f.wc=function(){return Lh("g")};f.mf=function(){return Lh("circle")};f.uf=function(){return Lh("path")};f.qf=function(){return Lh("ellipse")};f.ke=function(){return Lh("defs")};f.Zc=function(){return Lh("text")};f.wf=function(){return Lh("textPath")};f.oe=function(){return Lh("tspan")};f.pc=function(a){return document.createTextNode(String(a))}; +f.eg=function(a){var b=a.qa();S(this,a.h(),{x:b.left,y:b.top,width:b.width,height:b.height,patternUnits:"userSpaceOnUse"})}; +f.fg=function(a){var b=a.qa();this.wd(a.src(),ca);var c=a.src()||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",d=a.h(),e=b.left,g=b.top,h=b.width;b=b.height;switch(a.align()){case "x-min-y-min":var k="xMinYMin";break;case "x-mid-y-min":k="xMidYMin";break;case "x-max-y-min":k="xMaxYMin";break;case "x-min-y-mid":k="xMinYMid";break;case "x-mid-y-mid":k="xMidYMid";break;case "x-max-y-mid":k="xMaxYMid";break;case "x-min-y-max":k="xMinYMax";break;case "x-mid-y-max":k= +"xMidYMax";break;case "x-max-y-max":k="xMaxYMax";break;default:k="none"}k=k+" "+a.Yb();S(this,d,{x:e,y:g,width:h,height:b,"image-rendering":"optimizeQuality",preserveAspectRatio:k,opacity:a.opacity()});d.setAttributeNS("http://www.w3.org/1999/xlink","href",c)};f.bg=function(a,b){var c=a.h();c&&(c.style.cursor=b||"")};f.Je=function(a){var b=a.h();this.o(b,"x",a.G);this.o(b,"y",a.Pa)}; +f.Ke=function(a){var b=a.style(),c=a.path(),d=a.h();if(c&&a.u()){var e=a.u().ua;c.parent(e);c.P();M(c,df);var g=c.h();e.h().appendChild(g);e=yb(xb.oa(),g,"path");nf(this,g,e);g=zh();a.fa.setAttributeNS("http://www.w3.org/1999/xlink","href",g+"#"+e)}if(a.Jc()){if(d.style["-webkit-touch-callout"]="",d.style["-webkit-user-select"]="",d.style["-khtml-user-select"]="",d.style["-moz-user-select"]="",d.style["-ms-user-select"]="",d.style["-o-user-select"]="",d.style["user-select"]="",F&&9==xc||hc)d.removeAttribute("unselectable"), +d.removeAttribute("onselectstart")}else if(d.style["-webkit-touch-callout"]="none",d.style["-webkit-user-select"]="none",d.style["-khtml-user-select"]="none",d.style["-moz-user-select"]="moz-none",d.style["-ms-user-select"]="none",d.style["-o-user-select"]="none",d.style["user-select"]="none",F&&9==xc||hc)this.o(d,"unselectable","on"),this.o(d,"onselectstart","return false;");b.fontStyle?this.o(d,"font-style",b.fontStyle):d.removeAttribute("font-style");b.fontVariant?jc?d.style["font-variant"]=b.fontVariant: +this.o(d,"font-variant",b.fontVariant):jc?d.style["font-variant"]="":d.removeAttribute("font-variant");b.fontFamily?(this.o(d,"font-family",b.fontFamily),d.style.fontFamily=b.fontFamily):(d.removeAttribute("font-family"),d.style.fontFamily="");b.fontSize?this.o(d,"font-size",b.fontSize):d.removeAttribute("font-size");b.fontWeight?this.o(d,"font-weight",b.fontWeight):d.removeAttribute("font-weight");b.color?this.o(d,"fill",b.color):d.removeAttribute("fill");b.letterSpacing?this.o(d,"letter-spacing", +b.letterSpacing):d.removeAttribute("letter-spacing");b.decoration?this.o(d,"text-decoration",b.decoration):d.removeAttribute("text-decoration");b.direction?this.o(d,"direction",b.direction):d.removeAttribute("direction");b.hAlign&&!c?this.o(d,"text-anchor","rtl"==b.direction?jc||F?"end"==b.hAlign||"left"==b.hAlign?T:b.hAlign==T||"right"==b.hAlign?"end":"middle":"end"==b.hAlign||"left"==b.hAlign?"end":b.hAlign==T||"right"==b.hAlign?T:"middle":"end"==b.hAlign||"right"==b.hAlign?"end":b.hAlign==T||"left"== +b.hAlign?T:"middle"):d.removeAttribute("text-anchor");d.style.opacity=b.opacity?b.opacity:"1";a=b.textShadow;d.style.textShadow=a&&"none"!=a?a:""};f.Xe=function(a){var b=a.h(),c=a.parent();(a.i||a.g)&&this.o(b,"x",c.path()?a.g:c.G+a.g);this.o(b,"dy",a.c)}; +f.Ye=function(a){var b=a.b,c=a.h(),d=a.parent(),e=this.pc(a.text);c.appendChild(e);if(F&&9==xc||hc)d.Jc()?(c.removeAttribute("onselectstart"),c.removeAttribute("unselectable")):(this.o(c,"onselectstart","return false;"),this.o(c,"unselectable","on"));b.fontStyle&&this.o(c,"font-style",b.fontStyle);b.fontVariant&&this.o(c,"font-variant",b.fontVariant);b.fontFamily&&this.o(c,"font-family",b.fontFamily);b.fontSize&&this.o(c,"font-size",b.fontSize);b.fontWeight&&this.o(c,"font-weight",b.fontWeight);b.color&& +this.o(c,"fill",b.color);b.letterSpacing&&this.o(c,"letter-spacing",b.letterSpacing);b.Eb&&this.o(c,"text-decoration",b.Eb);(a.parent().path()?a.parent().fa:a.parent().h()).appendChild(c)}; +function Ph(a,b,c){var d=Qh(c,b.keys,b.cx,b.cy,b.fx,b.fy,b.opacity,b.mode,b.transform);if(!d.Vc){var e=Lh("radialGradient");nf(a,e,d.id());c.h().appendChild(e);d.oc=c;d.Vc=!0;wa(d.keys,function(a){var b=Lh("stop");S(this,b,{offset:a.offset,style:"stop-color:"+a.color+";stop-opacity:"+(isNaN(a.opacity)?d.opacity:a.opacity)});e.appendChild(b)},a);d.b?S(a,e,{cx:d.c*d.b.width+d.b.left,cy:d.f*d.b.height+d.b.top,fx:d.l*d.b.width+d.b.left,fy:d.v*d.b.height+d.b.top,r:Math.min(d.b.width,d.b.height)/2,spreadMethod:"pad", +gradientUnits:"userSpaceOnUse"}):S(a,e,{cx:d.c,cy:d.f,fx:d.l,fy:d.v,gradientUnits:"objectBoundingBox"});d.transform&&a.o(e,"gradientTransform",d.transform.toString())}return d.id()} +function Rh(a,b,c,d){var e=Sh(c,b.keys,b.opacity,!0===b.mode?Wg(b.angle,d):b.angle,b.mode,b.transform);if(!e.Uc){var g=a.tf();nf(a,g,e.id());c.h().appendChild(g);e.nc=c;e.Uc=!0;wa(e.keys,function(a){var b=Lh("stop");S(this,b,{offset:a.offset,style:"stop-color:"+a.color+";stop-opacity:"+(isNaN(a.opacity)?e.opacity:a.opacity)});g.appendChild(b)},a);e.c?(b=Oh(e.b,e.c),S(a,g,{x1:b.b,y1:b.f,x2:b.c,y2:b.g,spreadMethod:"pad",gradientUnits:"userSpaceOnUse"})):(b=Nh(e.b),S(a,g,{x1:b.b,y1:b.f,x2:b.c,y2:b.g, +gradientUnits:"objectBoundingBox"}));e.transform&&a.o(g,"gradientTransform",e.transform.toString())}return e.id()} +function Th(a,b){var c=b.Fa();if(c){var d=b.u().ua,e='url("'+zh()+"#";c&&c.opacity&&1E-4>=c.opacity&&F&&wc("9")&&(c.opacity=1E-4);if(u(c))a.o(b.h(),"fill",c),b.h().removeAttribute("fill-opacity");else if(fa(c.keys)&&c.cx&&c.cy)a.o(b.h(),"fill",e+Ph(a,c,d)+'")'),a.o(b.h(),"fill-opacity",r(c.opacity)?c.opacity:1);else if(fa(c.keys))b.ha()&&(a.o(b.h(),"fill",e+Rh(a,c,d,b.ha())+'")'),a.o(b.h(),"fill-opacity",r(c.opacity)?c.opacity:1));else if(c.src){var g=b.qa();g?(g.width=g.width||0,g.height=g.height|| +0,g.left=g.left||0,g.top=g.top||0):g=new A(0,0,0,0);"tile"==c.mode?Uh(d,c.src,g,c.mode,c.opacity,function(a){a.id();a.parent(b.u()).P();L().o(b.h(),"fill",e+a.id()+'")')}):(d=Uh(d,c.src,g,c.mode,c.opacity),d.id(),d.parent(b.u()).P(),a.o(b.h(),"fill",e+d.id()+'")'),a.o(b.h(),"fill-opacity",r(c.opacity)?c.opacity:1))}else D(c,sf)?(c=Vh(d,c.type,c.color,c.I,c.size),c.id(),c.parent(b.u()).P(),a.o(b.h(),"fill",e+c.id()+'")')):D(c,nb)?(c.id(),c.parent(b.u()).P(),a.o(b.h(),"fill",e+c.id()+'")')):S(a,b.h(), +{fill:c.color,"fill-opacity":c.opacity})}} +function Wh(a,b){var c=b.stroke();if(c){var d=b.u().ua,e=b.h(),g='url("'+zh()+"#";if(u(c))a.o(e,"stroke",c);else if(fa(c.keys)&&c.cx&&c.cy)a.o(e,"stroke",g+Ph(a,c,d)+'")');else if(fa(c.keys)){if(!b.ha())return;a.o(e,"stroke",g+Rh(a,c,d,b.ha())+'")')}else a.o(e,"stroke",c.color);c.lineJoin?a.o(e,"stroke-linejoin",c.lineJoin):e.removeAttribute("stroke-linejoin");c.lineCap?a.o(e,"stroke-linecap",c.lineCap):e.removeAttribute("stroke-linecap");c.opacity?a.o(e,"stroke-opacity",c.opacity):e.removeAttribute("stroke-opacity"); +c.thickness?a.o(e,"stroke-width",c.thickness):e.removeAttribute("stroke-width");c.dash?a.o(e,"stroke-dasharray",c.dash):e.removeAttribute("stroke-dasharray")}}f.df=function(a){Th(this,a);Wh(this,a)};f.og=function(a){a.visible()?a.h().removeAttribute("visibility"):this.o(a.h(),"visibility","hidden")};f.Nb=function(a){var b=a.C;b&&!Ya(b)?this.o(a.h(),"transform",b.toString()):a.h().removeAttribute("transform")};f.lg=function(a){var b=a.C;b&&!Ya(b)?this.o(a.h(),"patternTransform",b.toString()):a.h().removeAttribute("patternTransform")}; +f.kg=Kh.prototype.Nb;f.gg=Kh.prototype.Nb;f.ig=Kh.prototype.Nb;f.ng=Kh.prototype.Nb;f.dg=Kh.prototype.Nb;f.Kd=function(a,b,c){S(this,a,{width:b,height:c})};f.Le=function(a,b){var c=a.h();c&&(null!=b?(a.fb||(a.fb=Lh("title"),this.o(a.fb,"aria-label","")),re(a.fb)||c.insertBefore(a.fb,c.childNodes[0]||null),a.fb.innerHTML=b):a.fb&&c.removeChild(a.fb))}; +f.Fe=function(a,b){var c=a.h();c&&(null!=b?(a.Xa||(a.Xa=Lh("desc"),this.o(a.Xa,"aria-label","")),re(a.Xa)||c.insertBefore(a.Xa,c.childNodes[0]||null),a.Xa.innerHTML=b):a.Xa&&c.removeChild(a.Xa))};f.cg=function(a,b){var c=a.h();c&&(b?this.o(c,"vector-effect","non-scaling-stroke"):c.removeAttribute("vector-effect"))};f.hg=ca;f.ag=function(a){S(this,a.h(),{cx:a.Cb(),cy:a.Db(),r:a.Tf()})};f.Ge=function(a){S(this,a.h(),{cx:a.Cb(),cy:a.Db(),rx:a.Aa(),ry:a.lb()})}; +f.Ie=function(a){var b=Xg(this,a,!1);b?this.o(a.h(),"d",b):this.o(a.h(),"d","M 0,0")};f.Bf=function(a){for(var b=a.f,c=0;ca&&!isNaN(this.Ub)&&clearTimeout(this.Ub),this.vd=a,this.Ua(!0)),this):this.vd};f.kf=function(a){return r(a)?(a=ge(a||null),this.ra!=a&&(this.ra=a,Ci(this),this.Ua(!0),this.P()),this):this.ra?this.xa:null};f.Pg=function(){return this.ra};f.Gf=function(){return this.xa};f.suspend=function(){this.Mc++;return this};f.resume=function(a){this.Mc=a?0:Math.max(this.Mc-1,0);this.P();return this};f.Ag=function(a){return r(a)?(this.fe=!!a,this):this.fe}; +f.ea=function(){return!!this.Mc};f.ud=function(){return this.bb};f.title=function(a){return r(a)?(this.gb!=a&&(this.gb=a,L().Le(this,this.gb)),this):this.gb};f.re=function(a){return r(a)?(this.Ya!=a&&(this.Ya=a,L().Fe(this,this.Ya)),this):this.Ya};f.visible=function(a){if(0==arguments.length)return this.B.visible();this.B.visible(a);return this}; +f.data=function(a){if(0==arguments.length)return this.K();var b=a.type;if(b)switch(b){case "rect":var c=this.rect();break;case "circle":c=this.Vb();break;case "ellipse":c=this.ellipse();break;case "image":c=this.La();break;case "text":c=this.text();break;case "path":c=this.path();break;case "layer":c=this.ac();break;default:c=null}else this.F(a);c&&c.F(a);return this};f.remove=function(){return this.kf(null)};f.Gb=function(){return 0};f.Hb=function(){return 0}; +f.ha=function(){return new A(0,0,this.width(),this.height())};f.clip=function(a){return this.B.clip(a)};f.Og=function(){return this.hf}; +f.fullScreen=function(a){var b=this.Gf();if(r(a))return b&&this.Kf()&&(a=!!a,this.fullScreen()!=a&&(a?b.mozRequestFullScreenWithKeys?b.mozRequestFullScreenWithKeys():b.webkitRequestFullscreen?b.webkitRequestFullscreen():b.webkitRequestFullscreen?b.webkitRequestFullscreen():b.mozRequestFullScreen?b.mozRequestFullScreen():b.msRequestFullscreen?b.msRequestFullscreen():b.requestFullscreen&&b.requestFullscreen():(b=de().b,b.webkitCancelFullScreen?b.webkitCancelFullScreen():b.mozCancelFullScreen?b.mozCancelFullScreen(): +b.msExitFullscreen?b.msExitFullscreen():b.exitFullscreen&&b.exitFullscreen()))),this;if(!(a=!b)){a:{a=de().b;a=[a.webkitFullscreenElement,a.mozFullScreenElement,a.msFullscreenElement,a.fullscreenElement];for(var c=0;c2*this.f&&Qi(this),!0):!1};function Qi(a){if(a.f!=a.b.length){for(var b=0,c=0;bb)throw Error("Bad port number "+b);a.l=b}else a.l=null}function Xi(a,b,c){b instanceof Zi?(a.g=b,ej(a.g,a.b)):(c||(b=$i(b,fj)),a.g=new Zi(b,a.b))}function Yi(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""}function $i(a,b,c){return u(a)?(a=encodeURI(a).replace(b,gj),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null} +function gj(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var aj=/[#\/\?@]/g,cj=/[#\?:]/g,bj=/[#\?]/g,fj=/[#\?@]/g,dj=/#/g;function Zi(a,b){this.c=this.b=null;this.f=a||null;this.g=!!b}function hj(a){a.b||(a.b=new Pi,a.c=0,a.f&&Ti(a.f,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))} +function ij(a){var b=Ni(a);if("undefined"==typeof b)throw Error("Keys are undefined");var c=new Zi(null,void 0);a=Mi(a);for(var d=0;dNumber(sc)&& +(c.ca.src='javascript:""');d=c.ca.style;d.visibility="hidden";d.width=d.height="10px";d.display="none";kc?d.marginTop=d.marginLeft="-10px":(d.position="absolute",d.top=d.left="-10px");if(F&&!wc("11")){c.Y.target=c.Jb||"";de(c.Y).b.body.appendChild(c.ca);hd(c.ca,"readystatechange",c.Ae,!1,c);try{c.b=!1,c.Y.submit()}catch(ua){pd(c.ca,"readystatechange",c.Ae,!1,c),uj(c)}}else{de(c.Y).b.body.appendChild(c.ca);d=c.Jb+"_inner";e=se(c.ca);if(document.baseURI){var g=Eb(d);Bd("Short HTML snippet, input escaped, safe URL, for performance"); +g='';g=Yd(g,null)}else g=Eb(d),Bd("Short HTML snippet, input escaped, for performance"),g=Yd('',null);hc&&!kc?e.documentElement.innerHTML=Wd(g):e.write(Wd(g));hd(e.getElementById(d),"load",c.yd,!1,c);var h=he("TEXTAREA",c.Y);g=0;for(var k=h.length;g."); +if("A"in be)throw Error("Tag name is not allowed for SafeHtml.");H=null;U="";if(C)for(var Td in C){if(!$d.test(Td))throw Error('Invalid attribute name "'+Td+'".');var ti=C[Td];if(null!=ti){Bb=U;N=Td;J=ti;if(J instanceof yd)J=Ad(J);else if("style"==N.toLowerCase()){$a=rb=void 0;g=J;if(!ia(g))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof g+" given: "+g);if(!(g instanceof Kd)){k=g;h="";for($a in k){if(!/^[-_a-zA-Z0-9]+$/.test($a))throw Error("Name allows only [-_a-zA-Z0-9], got: "+ +$a);var Ic=k[$a];null!=Ic&&(Ic=fa(Ic)?xa(Ic,Od).join(" "):Od(Ic),h+=$a+":"+Ic+";")}g=h?Md(h):Nd}g instanceof Kd&&g.constructor===Kd&&g.c===Ld?rb=g.b:(ea(g),rb="type_error:SafeStyle");J=rb}else{if(/^on/i.test(N))throw Error('Attribute "'+N+'" requires goog.string.Const value, "'+J+'" given.');if(N.toLowerCase()in ae)if(J instanceof Cd)J instanceof Cd&&J.constructor===Cd&&J.b===Dd?J="":(ea(J),J="type_error:TrustedResourceUrl");else if(J instanceof Ed)J=Gd(J);else if(u(J))J=Id(J).Ia();else throw Error('Attribute "'+ +N+'" on tag "a" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+J+'" given.');}J.tb&&(J=J.Ia());var zk=N+'="'+Eb(String(J))+'"';U=Bb+(" "+zk)}}var lf="";else{var ui=ce(Hc);lf+=">"+Wd(ui)+"";H=ui.Zb()}var vi=C&&C.dir;vi&&(/^(ltr|rtl|auto)$/i.test(vi)?H=0:H=null);var Ak=Yd(lf,H);var wi=ce(yk,Ak,Zd("\nLine: "+w.lineNumber+"\n\nBrowser stack:\n"+w.stack+"-> [end]\n\nJS stack traversal:\n"+Dc(void 0)+"-> "))}catch(kf){wi= +Zd("Exception trying to expose exception! You win, we lose. "+kf)}Wd(wi);pd(e.getElementById(d),"load",c.yd,!1,c);e.close();uj(c)}}vj(c)}function tj(a,b){var c=de(a);Oi(b,function(b,e){fa(b)||(b=[b]);wa(b,function(b){b=c.c("INPUT",{type:"hidden",name:e,value:b});a.appendChild(b)})})}f=oj.prototype;f.Y=null;f.ca=null;f.Jb=null;f.eh=0;f.rb=!1;f.Ib=null;f.abort=function(){this.rb&&(rd(wj(this)),this.rb=!1,this.dispatchEvent("abort"),xj(this))}; +f.A=function(){this.rb&&this.abort();oj.m.A.call(this);this.ca&&yj(this);vj(this);delete this.g;this.Y=null;delete qj[this.f]};f.Ae=function(){if("complete"==this.ca.readyState){pd(this.ca,"readystatechange",this.Ae,!1,this);try{var a=se(this.ca);if(F&&"about:blank"==a.location&&!navigator.onLine){uj(this);return}}catch(b){uj(this);return}zj(this,a)}}; +f.yd=function(){if(!hc||kc||"about:blank"!=(this.ca?se(wj(this)):null).location){pd(wj(this),"load",this.yd,!1,this);try{zj(this,this.ca?se(wj(this)):null)}catch(a){uj(this)}}};function zj(a,b){a.rb=!1;var c,d;c||"function"!=typeof a.g||(d=a.g(b))&&(c=4);c?uj(a):(a.dispatchEvent("complete"),a.dispatchEvent("success"),xj(a))}function uj(a){a.b||(a.rb=!1,a.dispatchEvent("complete"),a.dispatchEvent("error"),xj(a),a.b=!0)}function xj(a){yj(a);vj(a);a.Y=null;a.dispatchEvent("ready")} +function yj(a){var b=a.ca;b&&(b.onreadystatechange=null,b.onload=null,b.onerror=null,a.c.push(b));a.Ib&&(n.clearTimeout(a.Ib),a.Ib=null);jc||hc&&!kc?a.Ib=ei(a.Cf,2E3,a):a.Cf();a.ca=null;a.Jb=null}f.Cf=function(){this.Ib&&(n.clearTimeout(this.Ib),this.Ib=null);for(;0!=this.c.length;){var a=this.c.pop();G(a)}};function vj(a){a.Y&&a.Y==rj&&qe(a.Y)}function wj(a){return a.ca?F&&!wc("11")?a.ca:se(a.ca).getElementById(a.Jb+"_inner"):null} +f.qg=function(){if(this.rb){var a=this.ca?se(wj(this)):null;a&&!ec(a,"documentUri")?(pd(wj(this),"load",this.yd,!1,this),uj(this)):ei(this.qg,250,this)}};function Aj(){}Aj.prototype.b=null;function Bj(a){var b;(b=a.b)||(b={},Cj(a)&&(b[0]=!0,b[1]=!0),b=a.b=b);return b};var Dj;function Ej(){}y(Ej,Aj);function Fj(a){return(a=Cj(a))?new ActiveXObject(a):new XMLHttpRequest}function Cj(a){if(!a.c&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;ck?[k/h*d,k]:[c,k],k[0]-=e||0,k[1]-=g||0,a=a.ec(k[0], +k[1])):a=a.ec(b["pdf-width"],b["pdf-height"]);b.data=a;b.dataType="svg";b.responseType="file"}f.qh=function(a,b,c,d,e,g,h,k){if("svg"==Ji){var l={};dk(this,l,d,e,g,h,k);Zj("pdf",l,!!c,!0,a,b)}else alert(Cc(15))};f.Ug=function(a,b,c,d,e){if("svg"==Ji){var g={};ak(this,g,c,d,e);Zj("png",g,!0,!1,a,b)}else alert(Cc(15))};f.Rg=function(a,b,c,d,e,g){if("svg"==Ji){var h={};bk(this,h,c,d,e,g);Zj("jpg",h,!0,!1,a,b)}else alert(Cc(15))}; +f.Wg=function(a,b,c,d){if("svg"==Ji){var e={};ck(this,e,c,d);Zj("svg",e,!0,!1,a,b)}else alert(Cc(15))};f.Tg=function(a,b,c,d,e,g){if("svg"==Ji){var h={};dk(this,h,c,d,e,g);Zj("pdf",h,!0,!1,a,b)}else alert(Cc(15))};f.Ce=function(a,b,c,d){if(this.qb)this.qb.Ce(this,this,a,b,c,d);else if("svg"==Ji){var e={};ak(this,e,a,b,c,d);sj(Xj+"/png",e)}else alert(Cc(15))};f.Yf=function(a,b,c,d,e){if(this.qb)this.qb.saveAsJpg(this,this,a,b,c,d,e);else if("svg"==Ji){var g={};bk(this,g,a,b,c,d,e);sj(Xj+"/jpg",g)}else alert(Cc(15))}; +f.Zf=function(a,b,c,d,e){if(this.qb)this.qb.saveAsPdf(this,this,a,b,c,d,e);else if("svg"==Ji){var g={};dk(this,g,a,b,c,d,e);sj(Xj+"/pdf",g)}else alert(Cc(15))};f.$f=function(a,b,c){if(this.qb)this.qb.saveAsSvg(this,this,a,b,c);else if("svg"==Ji){var d={};ck(this,d,a,b,c);sj(Xj+"/svg",d)}else alert(Cc(15))}; +f.print=function(a,b){if(r(a)||r(b)){var c=tb(a,b,"us-letter"),d=ii(this.Qe()).contentWindow.document;li("html, body {height: 100%; overflow: hidden}",d);var e=me("DIV");I(e,{width:c.width,height:c.height});d.body.appendChild(e);c=this.width();d=this.height();var g=Le(e);this.resize(g.width,g.height);g=this.h();"svg"==g.tagName&&g.cloneNode?(g=g.cloneNode(!0),e.appendChild(g)):Ki(e).data(this.data());this.resize(c,d)}else e=ii(this.Qe()).contentWindow.document,d=this.h(),"svg"==d.tagName?d.cloneNode? +c=d.cloneNode(!0):(d=Ki(e.body),d.data(this.data()),c=d.h()):(d=Ki(e.body),d.data(this.data())),d=L(),g=c,d.o(g,"width","100%"),d.o(g,"height","100%"),d.o(g,"viewBox","0 0 "+this.width()+" "+this.height()),I(g,"width","100%"),I(g,"height",""),I(g,"max-height","100%"),e.body.appendChild(c);mi()}; +f.ec=function(a,b){if("svg"!=Ji)return"";if(r(a)||r(b)){var c=tb(a,b);var d=re(this.h()),e=Ee(d,"width");d=Ee(d,"height");this.resize(c.width,c.height);c=ek(this.h());this.resize(e,d)}else L().Kd(this.h(),this.width(),this.height()),c=ek(this.h()),L().Kd(this.h(),"100%","100%");return''+c};function ek(a){var b="";a&&(b=(new XMLSerializer).serializeToString(a));return b}x("acgraph.server",function(a){r(a)&&(Xj=a);return Xj});var X=zi.prototype; +X.useAnychartExporting=X.uh;X.saveAsPNG=X.Ce;X.saveAsJPG=X.Yf;X.saveAsPDF=X.Zf;X.saveAsSVG=X.$f;X.saveAsPng=X.Ce;X.saveAsJpg=X.Yf;X.saveAsPdf=X.Zf;X.saveAsSvg=X.$f;X.shareAsPng=X.rh;X.shareAsJpg=X.ph;X.shareAsPdf=X.qh;X.shareAsSvg=X.sh;X.getPngBase64String=X.Ug;X.getJpgBase64String=X.Rg;X.getSvgBase64String=X.Wg;X.getPdfBase64String=X.Tg;X.print=X.print;X.toSvg=X.ec;function fk(a,b,c,d,e){of.call(this,a,b,c,d,e)}y(fk,of);fk.prototype.P=function(){var a=Pf(this),b=a&&!a.ea();b&&a.suspend();wa(this.f,function(a){a.j(512)},this);b&&a.resume()};x("acgraph.vml.Clip",fk);function gk(a,b,c,d,e,g,h){ri.call(this,a,b,c,b,b,g,h);this.g=d;this.i=e}y(gk,ri);function hk(a,b,c,d,e,g,h){g=null!=g?z(g,0,1):1;var k=[];wa(a,function(a){k.push(String(a.offset)+a.color+(a.opacity?a.opacity:null))});return k.join("")+g+b+c+d+e+(h?String(h.left)+h.top+h.width+h.height:"")};var ik={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",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",fuchsia:"#ff00ff",gainsboro:"#dcdcdc", +ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",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",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a", +lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",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",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",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",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57", +seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function jk(a){var b={};a=String(a);var c="#"==a.charAt(0)?a:"#"+a;if(kk.test(c))return b.ue=lk(c),b.type="hex",b;a:{var d=a.match(mk);if(d){c=Number(d[1]);var e=Number(d[2]);d=Number(d[3]);if(0<=c&&255>=c&&0<=e&&255>=e&&0<=d&&255>=d){c=[c,e,d];break a}}c=[]}if(c.length)return b.ue=pb(c),b.type="rgb",b;if(ik&&(c=ik[a.toLowerCase()]))return b.ue=c,b.type="named",b;throw Error(a+" is not a valid color string");}var nk=/#(.)(.)(.)/; +function lk(a){if(!kk.test(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(nk,"#$1$1$2$2$3$3"));return a.toLowerCase()}function ok(a){a=lk(a);return[parseInt(a.substr(1,2),16),parseInt(a.substr(3,2),16),parseInt(a.substr(5,2),16)]} +function pb(a){var b=a[0],c=a[1];a=a[2];b=Number(b);c=Number(c);a=Number(a);if(b!=(b&255)||c!=(c&255)||a!=(a&255))throw Error('"('+b+","+c+","+a+'") is not a valid RGB color');b=pk(b.toString(16));c=pk(c.toString(16));a=pk(a.toString(16));return"#"+b+c+a}var kk=/^#(?:[0-9a-f]{3}){1,2}$/i,mk=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function pk(a){return 1==a.length?"0"+a:a} +function qk(a,b,c){c=z(c,0,1);return[Math.round(c*a[0]+(1-c)*b[0]),Math.round(c*a[1]+(1-c)*b[1]),Math.round(c*a[2]+(1-c)*b[2])]};function rk(){Rg.call(this);var a=document;sk()||a.createStyleSheet().addRule("."+tk,"behavior:url(#default#VML)");try{a.namespaces[uk]||a.namespaces.add(uk,vk),this.c=function(a){return me(uk+":"+a,{"class":tk})}}catch(b){this.c=function(a){return me(uk+":"+a,{"class":tk,xmlns:"urn:schemas-microsoft.com:vml"})}}wk&&(this.o=this.lh)}y(rk,Rg);da(rk);var vk="urn:schemas-microsoft-com:vml",uk="any_vml",tk="any_vml",wk=Zg.document&&Zg.document.documentMode&&8<=Zg.document.documentMode; +function Y(a){return u(a)&&vb(a,"%")?parseFloat(a)+"%":parseFloat(String(a))+"px"}function Z(a){return 100*Math.round(a)}f=rk.prototype;f.pa=null;f.U=null;f.Oc=null;f.Lb=null;f.ya=null;f.Dc=null;f.lh=function(a,b,c){a[b]=c};f.me=function(){return document.createElement("div")}; +f.Wa=function(){this.Lb=this.oe();xk(this,this.Lb);this.Lb.style.display="none";S(this,this.Lb,{filled:"true",fillcolor:"black",stroked:"false",path:"m0,0 l1,0 e"});document.body.appendChild(this.Lb);this.pa=me("DIV");this.U=me("SPAN");this.Oc=me("SPAN");document.body.appendChild(this.pa);this.pa.appendChild(this.Oc);this.pa.appendChild(this.U);I(this.pa,{position:"absolute",visibility:"hidden",left:0,top:0});I(this.Oc,{"font-size":"0px",border:"0 solid"});this.Oc.innerHTML="a";this.b=me("SPAN"); +this.pa.appendChild(this.b);I(this.b,{"font-size":"0px",border:"0 solid"});this.b.innerHTML="a";this.Dc=me("IMG");I(this.Dc,{position:"absolute",left:0,top:0});this.pa.appendChild(this.Dc);this.sa=me("DIV");this.pa.appendChild(this.sa)};f.wd=function(a){this.pa||this.Wa();this.o(this.Dc,"src",a);return Je(this.Dc)}; +f.measure=function(a,b){if(""==a)return new A(0,0,0,0);this.pa||this.Wa();G(this.ya);this.ya=this.pc("");this.Lb.appendChild(this.ya);var c=null,d=0;if(" "==a)return Sg(this,b);0==a.lastIndexOf(" ",0)&&(d+=c=Sg(this,b).width);vb(a," ")&&(d+=c||Sg(this,b).width);Bk(this.U.style,"font-style");Bk(this.U.style,"font-variant");Bk(this.U.style,"font-family");Bk(this.U.style,"font-size");Bk(this.U.style,"font-weight");Bk(this.U.style,"letter-spacing");Bk(this.U.style,"text-decoration");this.U.style.cssText= +"";b.fontStyle&&(I(this.U,"font-style",b.fontStyle),I(this.ya,"font-style",b.fontStyle));b.fontVariant&&(I(this.U,"font-variant",b.fontVariant),I(this.ya,"font-variant",b.fontVariant));b.fontFamily&&(I(this.U,"font-family",b.fontFamily),I(this.ya,"font-family",b.fontFamily));b.fontSize&&(I(this.U,"font-size",b.fontSize),I(this.ya,"font-size",b.fontSize));b.fontWeight?(I(this.U,"font-weight",b.fontWeight),I(this.ya,"font-weight",b.fontWeight)):(I(this.U,"font-weight","normal"),I(this.ya,"font-weight", +"normal"));b.letterSpacing&&(I(this.U,"letter-spacing",b.letterSpacing),this.ya.style["v-text-spacing"]="normal"==b.letterSpacing?"":b.letterSpacing);b.Eb&&(I(this.U,"text-decoration",b.decoration),I(this.ya,"text-decoration",b.decoration));I(this.U,"border","0 solid");this.o(this.ya,"string",a);c=Je(this.Lb).width;I(this.pa,{left:0,top:0,width:"auto",height:"auto"});this.U.innerHTML=a;var e=Je(this.Oc),g=this.pa;e=-(e.top+e.height);g.style.left=He(0,!1);g.style.top=He(e,!1);g=Je(this.U);g.width= +c+d;--g.left;this.U.innerHTML="";return g};f.Mf=function(a){this.pa||this.Wa();u(a)?this.sa.innerHTML=a:(a=a.cloneNode(!0),this.sa.appendChild(a));a=Je(this.sa);this.sa.innerHTML="";return a};function Bk(a,b){a[b]&&(a.cssText=a.cssText.replace(new RegExp("(^|; )("+b+": [^;]*)(;|$)","ig"),";"))}function xk(a,b){a.o(b,"coordsize",Z(1)+" "+Z(1));S(a,b.style,{position:"absolute",left:Y(0),top:Y(0),width:Y(1),height:Y(1)})}f.Qf={1:"m",2:"l",3:"c",4:"ae",5:"x"}; +f.Rf=function(a,b){var c=b[2]+b[3];a.push(Z(b[4]-Ma(c,b[0])),Z(b[5]-Na(c,b[1])),Z(b[0]),Z(b[1]),Math.round(-65536*b[2]),Math.round(-65536*b[3]))};f.Sf=function(a,b){Ac(Array.prototype.push,xa(b,Z),a)};function sk(){return!!za(ji(),function(a){return a.selectorText==="."+tk})} +function Ck(a,b){var c=a%90,d=La(a),e=1,g=b.left+b.width/2,h=b.top+b.height/2,k=0>Math.sin(d)||180==a||360==a;if(90==a||270==a)c+=1E-6;180!=a&&(0>Math.tan(d)||90==a||270==a)&&(e=-1,c=90-c);c=La(c);d=Math.tan(c);d=Math.sin(c)*(b.height/2-d*b.width/2)+Math.sqrt(Math.pow(b.width/2,2)*(1+Math.pow(d,2)));e*=Math.cos(c)*d;c=Math.sin(c)*d;k&&(e=-e,c=-c);return{S:new Oa(Math.round(g-e),Math.round(h+c)),ka:new Oa(Math.round(g+e),Math.round(h-c))}} +function Dk(a,b){if(b.S.x==b.ka.x){var c=b.S.x;var d=a.y}else b.S.y==b.ka.y?(c=a.x,d=b.S.y):(c=(b.S.x*Math.pow(b.ka.y-b.S.y,2)+a.x*Math.pow(b.ka.x-b.S.x,2)+(b.ka.x-b.S.x)*(b.ka.y-b.S.y)*(a.y-b.S.y))/(Math.pow(b.ka.y-b.S.y,2)+Math.pow(b.ka.x-b.S.x,2)),d=(b.ka.x-b.S.x)*(a.x-c)/(b.ka.y-b.S.y)+a.y);c=new Oa(c,d);d=[z(b.S.x-b.ka.x,-1,1),z(b.S.y-b.ka.y,-1,1)];var e=[z(b.S.x-c.x,-1,1),z(b.S.y-c.y,-1,1)],g=[z(b.ka.x-c.x,-1,1),z(b.ka.y-c.y,-1,1)];return 0>(0==d[0]?(e[1]+g[1])*d[1]:(e[0]+g[0])*d[0])?-Pa(b.S, +c):Pa(b.S,c)} +function Ek(a,b,c,d){var e=Ck(c,d);d=Pa(e.S,e.ka);var g=Ck(c,b);b=Pa(g.S,g.ka);c=Dk(e.S,g);e=Dk(e.ka,g);g={offset:Math.round(c/b*100)/100,color:"",opacity:1};var h={offset:Math.round(e/b*100)/100,color:"",opacity:1},k=[];k.toString=function(){for(var a="\n",b=0,c=this.length;bg.offset&&q.offset=h.offset&&!m&&(m={offset:q.offset,color:q.color,opacity:q.opacity})}k.push(h);a=q=1;if(2h&&1>g?l?h>g:hh)?h:g);h=k.width*g;k=k.height*g;switch(e){case Lg:e=b.width;g=b.height;break;case "x-min-y-min":e=b.left;g=b.top;break;case "x-mid-y-min":e=b.left+b.width/2-h/2;g=b.top;break;case "x-max-y-min":e= +b.left+b.width-h;g=b.top;break;case "x-min-y-mid":e=b.left;g=b.top+b.height/2-k/2;break;default:case "x-mid-y-mid":e=b.left+b.width/2-h/2;g=b.top+b.height/2-k/2;break;case "x-max-y-mid":e=b.left+b.width-h;g=b.top+b.height/2-k/2;break;case "x-min-y-max":e=b.left;g=b.top+b.height-k;break;case "x-mid-y-max":e=b.left+b.width/2-h/2;g=b.top+b.height-k;break;case "x-max-y-max":e=b.left+b.width-h,g=b.top+b.height-k}}S(this,c.style,{position:"absolute",left:Y(e),top:Y(g),width:Y(h),height:Y(k)});this.o(c, +"src",d);a.clip(b)};f.ag=function(a){this.Ge(a)};f.Ge=function(a){var b=a.h();xk(this,b);var c=a.Cb(),d=a.Db(),e=a.Aa(),g=a.lb(),h=a.ba();h&&!Ya(h)?(c=Ta(c,d,e,g,0,360,!1),d=c.length,h.transform(c,0,c,0,d/2),h=["m",Z(c[d-2]),Z(c[d-1]),"c"],Ac(Array.prototype.push,xa(c,Z),h)):h=["ae",Z(c),Z(d),Z(e),Z(g),0,-23592960];h.push("x");M(a,4);M(a,256);this.o(b,"path",h.join(" "))}; +f.Ie=function(a){var b=a.h();xk(this,b);var c=Xg(this,a,!0);c?this.o(b,"path",c):(this.o(b,"path","M 0,0"),b.removeAttribute("path"));M(a,4);M(a,256)};f.oe=function(){var a=this.c("shape"),b=this.c("path");b.setAttribute("textpathok","t");a.appendChild(b);return a};f.Zc=function(){return document.createElement("span")};f.pc=function(a){var b=this.c("textpath");b.setAttribute("on","t");b.setAttribute("string",a);return b};f.bg=function(a,b){var c=a.h();c&&(c.style.cursor=b||"")}; +f.Je=function(a){var b=a.h().style;if(Fk(a)){if(!a.path()){var c=a.Pa;a.b.length&&(c-=a.b[0].f);var d=a.G;S(this,b,{position:"absolute",overflow:"visible",left:Y(d),top:Y(c)})}}else d=a.x(),c=a.y(),a.Bb()&&a.height()&&a.height()>a.g&&("middle"==a.Bb()&&(c+=a.height()/2-a.g/2),"bottom"==a.Bb()&&(c+=a.height()-a.g)),S(this,b,{position:"absolute",overflow:"hidden",left:Y(d),top:Y(c)})}; +f.Ke=function(a){var b=a.h(),c=b.style;b.style.cssText="";if(Fk(a))a.path()||S(this,c,{width:Y(1),height:Y(1)}),b.innerHTML="";else if(null!=a.Qb){a.fontSize()&&I(b,"font-size",a.fontSize());a.color()&&I(b,"color",a.color());a.fontFamily()&&I(b,"font-family",a.fontFamily());a.fontStyle()&&I(b,"font-style",a.fontStyle());a.fontVariant()&&I(b,"font-variant",a.fontVariant());a.fontWeight()&&I(b,"font-weight",a.fontWeight());a.letterSpacing()&&I(b,"letter-spacing",a.letterSpacing());a.Eb()&&I(b,"text-decoration", +a.Eb());a.opacity()&&(c.filter="alpha(opacity="+100*a.opacity()+")");a.de()&&I(b,"line-height",a.de());a.ee()&&I(b,"text-indent",a.ee());"..."==a.mb()&&I(b,"text-overflow","ellipsis");""==a.mb()&&I(b,"text-overflow","clip");a.qc()&&I(b,"direction",a.qc());I(b,"word-break",a.ug());I(b,"word-wrap",a.$e());null!=a.width()?I(this.b,"white-space","normal"):I(this.b,"white-space","nowrap");a.Ka()&&(b.style["text-align"]=a.v?"end"==a.Ka()||"left"==a.Ka()?"left":a.Ka()==T||"right"==a.Ka()?"right":"center": +"end"==a.Ka()||"right"==a.Ka()?"right":a.Ka()==T||"left"==a.Ka()?"left":"center");var d=!a.Jc(),e=b.getElementsByTagName("*");if(Ke){if(d=d?"none":"",b.style&&(b.style[Ke]=d),e)for(var g=0,h;h=e[g];g++)h.style&&(h.style[Ke]=d)}else if(F||hc)if(d=d?"on":"",b.setAttribute("unselectable",d),e)for(g=0;h=e[g];g++)h.setAttribute("unselectable",d);b.innerHTML=a.Qb;this.o(c,"width",String(a.width()?Y(a.width()):a.ha().width));this.o(c,"height",String(a.height()?Y(a.height()):a.ha().height))}}; +f.Xe=function(a){var b=a.h(),c=a.parent().path();if(c){var d=dg();d.F(Jf(c));a.i&&d.translate(a.g,a.c);a=c?Xg(this,d,!0):"m "+Z(a.x)+","+Z(a.y)+" l "+(Z(a.x)+1)+","+Z(a.y)+" e";b.setAttribute("path",a)}}; +f.Ye=function(a){var b=a.parent(),c=b.style(),d=a.h();c=Zb(c);ac(c,a.b);a=this.pc(a.text);c.fontStyle&&I(a,"font-style",c.fontStyle);c.fontVariant&&I(a,"font-variant",c.fontVariant);c.fontFamily&&I(a,"font-family",c.fontFamily);c.fontSize&&I(a,"font-size",c.fontSize);c.fontWeight&&I(a,"font-weight",c.fontWeight);c.letterSpacing&&(a.style["v-text-spacing"]="normal"==c.letterSpacing?"":c.letterSpacing);c.decoration&&I(a,"text-decoration",c.decoration);c.hAlign&&(a.style["v-text-align"]=b.v?"end"==c.hAlign|| +"left"==c.hAlign?"left":c.hAlign==T||"right"==c.hAlign?"right":"center":"end"==c.hAlign||"right"==c.hAlign?"right":c.hAlign==T||"left"==c.hAlign?"left":"center");if(c.opacity){var e=this.c("fill");this.o(e,"opacity",c.opacity);d.appendChild(e)}d.appendChild(a);b.Jc()?d.removeAttribute("unselectable"):this.o(d,"unselectable","on");xk(this,d);d.setAttribute("filled","t");d.setAttribute("fillcolor",c.color);d.setAttribute("stroked","f");b.h().appendChild(d)};f.Of=function(){return!0}; +f.df=function(a){var b=a.Fa();D(b,nb)&&(b="black");var c=a.stroke(),d;u(c)?d=c:d="keys"in c?0!=c.keys.length?c.keys[0].color:"#000":c.color;var e=!u(b)&&"keys"in b&&"cx"in b&&"cy"in b,g=!u(b)&&"keys"in b&&!e,h=!e&&!g,k="none"!=b&&"none"!=b.color,l="none"!=d&&0!=c.thickness,m=h&&k&&1!=b.opacity,p=!u(c)&&l&&(1!=c.opacity||"miter"!=c.lineJoin||"butt"!=c.lineCap||"none"!=c.dash);if(e||g||m||p){p=a.u();m=p.ua;var q=D(a,Kf)&&0==a.c.length?new A(0,0,1,1):a.ha();if(g){var t=D(b.mode,A);var B=Ga(b.keys,0); +0!=B[0].offset&&B.unshift({offset:0,color:B[0].color,opacity:B[0].opacity});var C=B[B.length-1];1!=C.offset&&B.push({offset:1,color:C.color,opacity:C.opacity});var w=b.mode?Wg(b.angle,q):b.angle;q=Sh(m,t?Ek(B,b.mode,w,q):B,b.opacity,w,b.mode)}else if(e){if(b.mode){var H=b.mode;C=Math.min(H.width,H.height);w=(b.cx*H.width-(q.left-H.left))/q.width;B=(b.cy*H.height-(q.top-H.top))/q.height;H=C/q.width;q=C/q.height}else w=b.cx,B=b.cy,H=q=1;q=Gk(m,b.keys,w,B,H,q,b.opacity,b.mode)}else q=b;w=Hk(m,q,c);if(!w.bf){H= +this.c("shapetype");nf(this,H,yb(xb.oa(),w));m.h().appendChild(H);w.bf=!0;var U=null;if(g){var N=q;N.Uc&&(N=new oi(N.keys,N.opacity,N.b,N.mode),w.b=N);U=this.c("fill");B=N.keys;var J=[];wa(B,function(a){J.push(a.offset+" "+a.color)},this);p=Ka(N.b+270);C=B[B.length-1];h=B[0];S(this,U,{type:"gradient",method:"none",colors:J.join(","),angle:p,color:h.color,opacity:t?N.opacity:isNaN(C.opacity)?N.opacity:C.opacity,color2:C.color,"o:opacity2":t?N.opacity:isNaN(h.opacity)?N.opacity:h.opacity});H.appendChild(U); +N.nc=m;N.Uc=!0}else e?(t=q,t.Vc&&(t=new gk(t.keys,t.c,t.f,t.g,t.i,t.opacity,t.b),w.b=t),U=this.c("fill"),B=t.keys,h=B[B.length-1],C=B[0],S(this,U,{src:p.pathToRadialGradientImage,size:t.g+","+t.i,origin:".5, .5",position:t.c+","+t.f,type:"pattern",method:"linear sigma",colors:"0 "+h.color+";1 "+C.color,color:h.color,opacity:isNaN(h.opacity)?t.opacity:h.opacity,color2:C.color,"o:opacity2":isNaN(C.opacity)?t.opacity:C.opacity}),H.appendChild(U),t.oc=m,t.Vc=!0):h&&(U=w.Fb?w.Fb:w.Fb=this.c("fill"),u(b)? +(S(this,a.h(),{fillcolor:b,filled:"none"!=b}),S(this,U,{type:"solid",on:"none"!=b,color:b,opacity:1})):(S(this,a.h(),{fillcolor:b.color,filled:"none"!=b.color}),S(this,U,{type:"solid",on:"none"!=b.color,color:b.color,opacity:isNaN(b.opacity)?1:b.opacity})));H.appendChild(U);t=w.Lc?w.Lc:w.Lc=this.c("stroke");m=c.thickness?c.thickness:1;p=(h=Ik(c.dash,m))?"flat":c.lineCap;S(this,t,{joinstyle:c.lineJoin||"miter",endcap:"butt"==p?"flat":p,dashstyle:h,on:l,color:d,opacity:ia(c)&&"opacity"in c?c.opacity: +1,weight:m+"px"});H.appendChild(t)}if(e||g)h=q.keys[q.keys.length-1],S(this,a.h(),{fillcolor:h.color,filled:"none"!=h.color});S(this,a.h(),{filled:k,fillcolor:b.color||b,stroked:l,strokecolor:d,strokeweight:c.thickness?c.thickness+"px":"1px"});S(this,a.h(),{type:"#"+yb(xb.oa(),w)})}else S(this,a.h(),{type:"",filled:k,fillcolor:b.color||b,stroked:l,strokecolor:d,strokeweight:c.thickness?c.thickness+"px":"1px"})}; +function Ik(a,b){a=String(a);if(!a)return"none";var c=a.split(" ");0!=c.length%2&&c.push.apply(c,c);for(var d=[],e=0;ea.g&&("middle"==a.Bb()&&(e+=a.height()/2-a.g/2),"bottom"==a.Bb()&&(e+=a.height()-a.g)),S(this,d,{position:"absolute",overflow:"hidden",left:Y(g+b.i),top:Y(e+b.l)})}};f.Ec=function(){return!0};f.mg=ca;f.Bf=ca; +f.De=function(a){var b=D(a,Q),c=a.clip();if(c){c=c.kb();c=c.Za(c.C);c=c.clone();var d=a.h().style;if(r(b)&&b)a=a.ba(),c=Xa(c,a);else if(!D(a,Kk)||Fk(a))c.left-=a.Gb()||0,c.top-=a.Hb()||0;a=c.left;b=c.top;this.o(d,"clip",["rect(",b+"px",a+c.width+"px",b+c.height+"px",a+"px",")"].join(" "))}else Bk(a.h().style,"clip")};f.ze=function(){return!0};function Lk(a,b){Nc.call(this);this.b=a;this.c=b}y(Lk,Nc);function Mk(a){delete a.b;G(a.Fb);a.Fb=null}f=Lk.prototype;f.Fb=null;f.Lc=null;f.bf=!1;f.ia=function(){return"shape-type"};f.A=function(){delete this.b;delete this.c;G(this.Fb);this.Fb=null;G(this.Lc);this.Lc=null};function Nk(a){yi.call(this,a);this.f={};this.l={}}y(Nk,yi);Nk.prototype.kc=function(){Xb(this.f);Xb(this.l);Nk.m.kc.call(this)}; +function Hk(a,b,c){var d="";d=u(b)?d+(b+"1"):D(b,ri)?hk(b.keys,b.c,b.f,b.g,b.i,b.opacity,b.b):D(b,oi)?pi(b.keys,b.opacity,b.b,b.mode):d+(b.color+b.opacity);if(u(c))var e=c;else if("keys"in c){var g=0!=c.keys.length?c.keys[0]:c;e=g.color||"black";e+="opacity"in g?g.opacity:1}else e=c.color,e+="opacity"in c?c.opacity:1;d+=String(c.thickness)+e+c.lineJoin+c.lineCap+c.dash;if(Vb(a.f,d))return a.f[d];b=new Lk(b,c);return a.f[d]=b} +function Gk(a,b,c,d,e,g,h,k){k=null!=k?k:null;var l=hk(b,c,d,e,g,h,k);return Vb(a.l,l)?a.l[l]:a.l[l]=new gk(b,c,d,e,g,h,k)}Nk.prototype.Vf=function(a){for(var b=si(a.keys,a.c,a.f,a.g,a.i,a.opacity,a.b),c=Tb(this.f),d=0,e=c.length;d" ], "license": "BSD-3-Clause", - "homepage": "http://www.graphicsjs.org/" + "homepage": "http://www.graphicsjs.org/", + "files": [ + "dist", + "src" + ], + "devDependencies": {} } diff --git a/src/npm-entry.js b/src/npm-entry.js new file mode 100644 index 0000000..b46dc94 --- /dev/null +++ b/src/npm-entry.js @@ -0,0 +1,50 @@ +/** + * @fileoverview npm-friendly wrapper for GraphicsJS. + * + * The dist/graphics.min.js file uses the Closure Library runtime, + * which expects a global `goog` and `acgraph` namespace. This wrapper + * ensures those are available before the library loads, making it + * work with npm, Webpack, Rollup, Angular CLI, etc. + * + * @example + * // In your Angular component or any module: + * import 'graphicsjs'; + * + * // Then use the global acgraph: + * const stage = acgraph.create('#container'); + * const rect = stage.rect(10, 10, 200, 100).fill('steelblue'); + * + * @example + * // Or with require: + * const acgraph = require('graphicsjs'); + * const stage = acgraph.create('#container'); + */ + +// Ensure goog namespace exists before loading Closure-compiled code +(function () { + 'use strict'; + + // Set up goog global (Closure Compiler runtime dependency) + if (typeof goog === 'undefined') { + var goog = {}; + goog.global = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== 'undefined' ? window : global); + goog.global['CLOSURE_UNCOMPILED_DEFINES'] = goog.global['CLOSURE_UNCOMPILED_DEFINES'] || {}; + goog.global['CLOSURE_DEFINES'] = goog.global['CLOSURE_DEFINES'] || {}; + goog.global['CLOSURE_BASE_SCRIPT'] = goog.global['CLOSURE_BASE_SCRIPT'] || ''; + if (typeof module !== 'undefined' && module.exports) { + module.exports = goog; + } + } + + // Set up acgraph global namespace that the library expects + var globalObj = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : global; + if (!globalObj.acgraph) { + globalObj.acgraph = {}; + } + globalObj.acgraph.module = globalObj.acgraph.module || globalObj.acgraph; + + // Also set the legacy flag for AnyChart AMD detection + if (!globalObj.IS_ANYCHART_AMD) { + globalObj.IS_ANYCHART_AMD = false; + } +})();